LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: codeReal
static void codeReal(Vdbe *v, const char *z, int negateFlag, int iMem){
  if( ALWAYS(z!=0) ){
    double value;
    char *zV;
    sqlite3AtoF(z, &value, sqlite3Strlen30(z), SQLITE_UTF8);
    assert( !sqlite3IsNaN(value) ); /* The new AtoF never returns NaN */
    if( negateFlag ) value = -value;
    zV = dup8bytes(v, (char*)&value);
    sqlite3VdbeAddOp4(v, OP_Real, 0, iMem, 0, zV, P4_REAL);
  }
}

// Assembly:
testq %rsi, %rsi
je 0x4e438
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %r15d
movq %rdi, %rbx
xorl %edx, %edx
cmpb $0x0, (%rsi,%rdx)
leaq 0x1(%rdx), %rdx
jne 0x4e3b0
decl %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
leaq -0x20(%rbp), %rax
movq %rsi, %rdi
movq %rax, %rsi
movl $0x1, %ecx
callq 0x248aa
testl %r15d, %r15d
je 0x4e3eb
movsd -0x20(%rbp), %xmm0
xorps 0x2afc9(%rip), %xmm0    # 0x793b0
movlps %xmm0, -0x20(%rbp)
movq (%rbx), %rdi
movl $0x8, %esi
callq 0x115e9
movq %rax, %r15
testq %rax, %rax
je 0x4e407
movq -0x20(%rbp), %rax
movq %rax, (%r15)
movq %rbx, %rdi
movl $0x82, %esi
xorl %edx, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
movl $0xfffffff4, %ecx       # imm = 0xFFFFFFF4
callq 0x11975
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3HexToBlob
SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3 *db, const char *z, int n){
  char *zBlob;
  int i;

  zBlob = (char *)sqlite3DbMallocRaw(db, n/2 + 1);
  n--;
  if( zBlob ){
    for(i=0; i<n; i+=2){
      zBlob[i/2] = (sqlite3HexToInt(z[i])<<4) | sqlite3HexToInt(z[i+1]);
    }
    zBlob[i/2] = 0;
  }
  return zBlob;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movl %edx, %esi
shrl $0x1f, %esi
addl %edx, %esi
sarl %esi
incl %esi
callq 0x115e9
testq %rax, %rax
je 0x4e4b5
cmpl $0x2, %r14d
jl 0x4e4af
decl %r14d
movslq %r14d, %rdx
xorl %ecx, %ecx
xorl %esi, %esi
movb (%rbx,%rsi), %dil
movb 0x1(%rbx,%rsi), %r8b
leal (%rdi,%rdi), %r9d
sarb $0x7, %r9b
andb $0x9, %r9b
addb %dil, %r9b
shlb $0x4, %r9b
leal (%r8,%r8), %edi
sarb $0x7, %dil
andb $0x9, %dil
addb %r8b, %dil
andb $0xf, %dil
orb %r9b, %dil
movb %dil, (%rax,%rcx)
addq $0x2, %rsi
incq %rcx
cmpq %rdx, %rsi
jl 0x4e46b
jmp 0x4e4b1
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCode
SQLITE_PRIVATE int sqlite3ExprCode(Parse *pParse, Expr *pExpr, int target){
  int inReg;

  assert( target>0 && target<=pParse->nMem );
  if( pExpr && pExpr->op==TK_REGISTER ){
    sqlite3VdbeAddOp2(pParse->pVdbe, OP_Copy, pExpr->iTable, target);
  }else{
    inReg = sqlite3ExprCodeTarget(pParse, pExpr, target);
    assert( pParse->pVdbe || pParse->db->mallocFailed );
    if( inReg!=target && pParse->pVdbe ){
      sqlite3VdbeAddOp2(pParse->pVdbe, OP_SCopy, inReg, target);
    }
  }
  return target;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
testq %rsi, %rsi
je 0x4e4de
cmpb $-0x7c, (%rsi)
jne 0x4e4de
movq 0x10(%r14), %rdi
movl 0x2c(%rsi), %edx
movl $0x1c, %esi
jmp 0x4e4fc
movq %r14, %rdi
movl %ebx, %edx
callq 0x4d211
cmpl %ebx, %eax
je 0x4e506
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x4e506
movl $0x1d, %esi
movl %eax, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCacheRemove
SQLITE_PRIVATE void sqlite3ExprCacheRemove(Parse *pParse, int iReg, int nReg){
  int i;
  int iLast = iReg + nReg - 1;
  struct yColCache *p;
  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    int r = p->iReg;
    if( r>=iReg && r<=iLast ){
      cacheEntryClear(pParse, p);
      p->iReg = 0;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
addl %esi, %edx
xorl %eax, %eax
movl 0x84(%rdi,%rax), %ecx
cmpl %esi, %ecx
setge %r8b
cmpl %edx, %ecx
setl %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x4e560
cmpb $0x0, 0x7c(%rdi,%rax)
je 0x4e555
movzbl 0x1f(%rdi), %r8d
cmpq $0x7, %r8
ja 0x4e550
leal 0x1(%r8), %r9d
movb %r9b, 0x1f(%rdi)
movl %ecx, 0x28(%rdi,%r8,4)
movb $0x0, 0x7c(%rdi,%rax)
movl $0x0, 0x84(%rdi,%rax)
addq $0x18, %rax
cmpl $0xf0, %eax
jne 0x4e515
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 (%rsi), %r12d
testl %r12d, %r12d
jle 0x4e5c6
movl %edx, %ebx
movq %rdi, %r14
movq 0x8(%rsi), %r13
xorl %r15d, %r15d
cmpl $0x1, %ecx
adcl $0x1c, %r15d
movq (%r13), %rsi
movq %r14, %rdi
movl %ebx, %edx
callq 0x4d211
cmpl %eax, %ebx
je 0x4e5bb
movq 0x10(%r14), %rdi
movl %r15d, %esi
movl %eax, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
addq $0x20, %r13
incl %ebx
decl %r12d
jne 0x4e596
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4ed74
movswl 0x40(%r15), %eax
cmpl %r14d, %eax
jne 0x4ed83
movq %r12, %rdi
movl $0x60, %esi
movl %ebx, %ecx
xorl %r8d, %r8d
jmp 0x4ed9e
testb $0x10, 0x46(%r15)
movl $0x29, %eax
movl $0x8a, %esi
cmovel %eax, %esi
movq %r12, %rdi
movl %r14d, %ecx
movl %ebx, %r8d
callq 0x45b9e
testl %r14d, %r14d
js 0x4edc0
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4c80f
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4eed5
movq %rdx, %rbx
testq %rdx, %rdx
je 0x4eec3
testb $0x1, 0x3(%rbx)
jne 0x4eeda
movq %r14, %rdi
callq 0x4b095
testq %rax, %rax
je 0x4eeda
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
jmp 0x4eee0
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x4b095
// File: /workspace/github_c_makefile_star2_O1/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 0x4b00f
testb %al, %al
sete %cl
testb %bl, %bl
sete %dl
orb %cl, %dl
jne 0x4ef15
cmpb $0x63, %al
setge %cl
cmpb $0x63, %bl
setge %al
orb %cl, %al
orb $0x62, %al
jmp 0x4ef25
leal (%rax,%rbx), %ecx
orb %bl, %al
movzbl %cl, %ecx
movl $0x62, %eax
cmovnel %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4b00f
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
jne 0x4f3f1
testb $0x8, 0x3(%rbx)
jne 0x4f3e3
testb %al, %al
movzbl %al, %ecx
movl $0x62, %eax
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 0x4eee9
// File: /workspace/github_c_makefile_star2_O1/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 (%rdi), %r12
cmpl $0x0, 0x28(%r12)
jle 0x4f890
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1(%rsi), %rax
movq %rax, -0x30(%rbp)
xorl %r15d, %r15d
leaq 0x2683d(%rip), %r13     # 0x76060
movq 0x20(%r12), %rax
movq %r15, %rcx
shlq $0x5, %rcx
cmpq $0x0, 0x8(%rax,%rcx)
je 0x4f883
testq %rbx, %rbx
je 0x4f878
addq %rcx, %rax
movq (%rax), %rax
movb (%rbx), %cl
testb %cl, %cl
je 0x4f868
movq -0x30(%rbp), %rdx
movzbl %cl, %esi
movb (%rsi,%r13), %sil
movzbl (%rax), %edi
cmpb (%rdi,%r13), %sil
jne 0x4f868
incq %rax
movb (%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x4f84c
movzbl %cl, %ecx
movb (%rcx,%r13), %cl
movzbl (%rax), %eax
cmpb (%rax,%r13), %cl
jne 0x4f883
movq %r14, %rdi
movl %r15d, %esi
callq 0x45ff7
incq %r15
movslq 0x28(%r12), %rax
cmpq %rax, %r15
jl 0x4f823
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %r13d
leaq -0x50(%rbp), %rbx
movl $0x18, %edi
movq %rbx, %rsi
leaq 0x2bf0d(%rip), %rdx     # 0x7b7f2
movl %r13d, %ecx
xorl %eax, %eax
callq 0xb859
movq (%r15), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x33aab
testq %rax, %rax
je 0x4f920
movq %r15, %rdi
leaq 0x2bef4(%rip), %rsi     # 0x7b800
movq %r12, %rdx
movq %rbx, %rcx
movq %r14, %r8
movq -0x30(%rbp), %r9
xorl %eax, %eax
callq 0x465b3
incl %r13d
cmpl $0x4, %r13d
jne 0x4f8d6
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3FkDropTable
SQLITE_PRIVATE void sqlite3FkDropTable(Parse *pParse, SrcList *pName, Table *pTab){
  sqlite3 *db = pParse->db;
  if( (db->flags&SQLITE_ForeignKeys) && !IsVirtual(pTab) && !pTab->pSelect ){
    int iSkip = 0;
    Vdbe *v = sqlite3GetVdbe(pParse);

    assert( v );                  /* VDBE has already been allocated */
    if( sqlite3FkReferences(pTab)==0 ){
      /* Search for a deferred foreign key constraint for which this table
      ** is the child table. If one cannot be found, return without 
      ** generating any VDBE code. If one can be found, then jump over
      ** the entire DELETE if there are no outstanding deferred constraints
      ** when this statement is run.  */
      FKey *p;
      for(p=pTab->pFKey; p; p=p->pNextFrom){
        if( p->isDeferred ) break;
      }
      if( !p ) return;
      iSkip = sqlite3VdbeMakeLabel(v);
      sqlite3VdbeAddOp2(v, OP_FkIfZero, 1, iSkip);
    }

    pParse->disableTriggers = 1;
    sqlite3DeleteFrom(pParse, sqlite3SrcListDup(db, pName, 0), 0);
    pParse->disableTriggers = 0;

    /* If the DELETE has generated immediate foreign key constraint 
    ** violations, halt the VDBE and return an error at this point, before
    ** any modifications to the schema are made. This is because statement
    ** transactions are not able to rollback schema changes.  */
    sqlite3VdbeAddOp2(v, OP_FkIfZero, 0, sqlite3VdbeCurrentAddr(v)+2);
    sqlite3HaltConstraint(pParse, SQLITE_CONSTRAINT_FOREIGNKEY,
        OE_Abort, "foreign key constraint failed", P4_STATIC
    );

    if( iSkip ){
      sqlite3VdbeResolveLabel(v, iSkip);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r13
testb $0x8, 0x2e(%r13)
je 0x4f960
movq %rdx, %r15
testb $0x10, 0x46(%rdx)
jne 0x4f960
cmpq $0x0, 0x18(%r15)
je 0x4f96f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r12
movq %rdi, %r14
callq 0x45b57
movq %rax, %rbx
movq %r15, %rdi
callq 0x4fce9
xorl %ecx, %ecx
testq %rax, %rax
jne 0x4f9d1
movq 0x20(%r15), %rax
xorl %ecx, %ecx
testq %rax, %rax
sete %r15b
je 0x4f9cc
cmpb $0x0, 0x2c(%rax)
jne 0x4f9a7
movq 0x8(%rax), %rax
jmp 0x4f992
movq %rbx, %rdi
callq 0x4c4bf
movl %eax, -0x2c(%rbp)
movq %rbx, %rdi
movl $0x7c, %esi
movl $0x1, %edx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movl -0x2c(%rbp), %ecx
testb %r15b, %r15b
jne 0x4f960
movb $0x1, 0x1f6(%r14)
movq %r13, %rdi
movq %r12, %rsi
movl %ecx, %r15d
xorl %edx, %edx
callq 0x4870b
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x3d966
movb $0x0, 0x1f6(%r14)
movl 0x34(%rbx), %ecx
addl $0x2, %ecx
movq %rbx, %rdi
movl $0x7c, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x45b9e
leaq 0x29e6d(%rip), %rcx     # 0x7988a
movq %r14, %rdi
movl $0x313, %esi            # imm = 0x313
movl $0x2, %edx
movl $0xfffffffe, %r8d       # imm = 0xFFFFFFFE
callq 0x4c44d
testl %r15d, %r15d
je 0x4f960
jns 0x4f960
movq 0x40(%rbx), %rax
testq %rax, %rax
je 0x4f960
notl %r15d
movl 0x34(%rbx), %ecx
movl %r15d, %edx
movl %ecx, (%rax,%rdx,4)
jmp 0x4f960
// File: /workspace/github_c_makefile_star2_O1/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:
cmpb $0x0, 0x1f6(%rdi)
je 0x4fd2c
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rax
movq 0x20(%rax), %rax
movq 0x38(%rax), %rax
movq 0x68(%rsi), %rcx
cmpq %rcx, %rax
je 0x4fdc6
movq 0x40(%rax), %rdx
testq %rdx, %rdx
je 0x4fdc6
xorl %r8d, %r8d
leaq 0x26306(%rip), %rdi     # 0x76060
movq 0x10(%rdx), %rax
cmpq %rcx, 0x30(%rax)
jne 0x4fdb6
movq 0x8(%rax), %r11
movq (%rsi), %r9
movb (%r11), %r10b
testb %r10b, %r10b
je 0x4fd95
incq %r11
movzbl %r10b, %ebx
movb (%rbx,%rdi), %bl
movzbl (%r9), %r14d
cmpb (%r14,%rdi), %bl
jne 0x4fd95
incq %r9
movb (%r11), %r10b
incq %r11
testb %r10b, %r10b
jne 0x4fd76
movzbl %r10b, %r10d
movb (%r10,%rdi), %r10b
movzbl (%r9), %r9d
cmpb (%r9,%rdi), %r10b
jne 0x4fdb6
testq %r8, %r8
jne 0x4fdb0
movq 0x60(%rsi), %r8
movq %r8, 0x40(%rax)
jmp 0x4fdb9
movq %r8, %rax
movq (%rdx), %rdx
movq %rax, %r8
testq %rdx, %rdx
jne 0x4fd5a
jmp 0x4fdc8
xorl %eax, %eax
testq %rax, %rax
popq %rbx
popq %r14
popq %rbp
je 0x4fdd2
retq
movq 0x60(%rsi), %rax
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %r12d
movl %esi, %r15d
movq %rdi, %rbx
callq 0x45b57
movb 0x1f(%rbx), %cl
testb %cl, %cl
je 0x4ffbe
decb %cl
movb %cl, 0x1f(%rbx)
movzbl %cl, %ecx
movl 0x28(%rbx,%rcx,4), %r14d
jmp 0x4ffc9
movl 0x58(%rbx), %r14d
incl %r14d
movl %r14d, 0x58(%rbx)
movq %rax, %rdi
movl $0x6c, %esi
movl %r15d, %edx
movl %r14d, %ecx
movl %r12d, %r8d
callq 0x45b9e
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 0x29f09(%rip), %rax     # 0x79f19
leaq 0x29f15(%rip), %rcx     # 0x79f2c
cmoveq %rax, %rcx
movl %r14d, (%rsp)
leaq 0x2b85d(%rip), %rsi     # 0x7b883
movq %rbx, %rdi
movl %r15d, %r8d
movl %r14d, %r9d
xorl %eax, %eax
callq 0x465b3
testl %r14d, %r14d
je 0x5006f
movzbl 0x1f(%rbx), %eax
cmpq $0x7, %rax
ja 0x5006f
xorl %ecx, %ecx
cmpl %r14d, 0x84(%rbx,%rcx)
je 0x5006a
addq $0x18, %rcx
cmpl $0xf0, %ecx
jne 0x50047
leal 0x1(%rax), %ecx
movb %cl, 0x1f(%rbx)
movl %r14d, 0x28(%rbx,%rax,4)
jmp 0x5006f
movb $0x1, 0x7c(%rbx,%rcx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movslq (%rsi), %r15
testq %r15, %r15
setle %r14b
movq %rdi, -0x30(%rbp)
movl %r15d, %esi
callq 0x35fcd
movq %rax, %r12
testq %rax, %rax
sete %al
orb %r14b, %al
jne 0x51c2a
movq 0x8(%r13), %r13
xorl %r14d, %r14d
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x4b095
testq %rax, %rax
jne 0x51c0c
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
cmpq %r14, %r15
jne 0x51bf3
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_O1/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 0x55208
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
cmpl $0x0, (%rsi)
jle 0x551fa
movq %rdi, %r14
movq 0x8(%rbx), %r12
xorl %r13d, %r13d
leaq -0x50(%rbp), %r15
movq (%r12), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x40(%rbp)
leaq 0x6a0f(%rip), %rax      # 0x5bbe2
movq %rax, -0x50(%rbp)
leaq 0x6d45(%rip), %rax      # 0x5bf23
movq %rax, -0x48(%rbp)
movq %r14, -0x30(%rbp)
movq %r15, %rdi
callq 0x470d7
incl %r13d
addq $0x20, %r12
cmpl (%rbx), %r13d
jl 0x551bd
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5526e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rdx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x10(%rbx), %r14
leaq 0x269f4(%rip), %rsi     # 0x7bc24
xorl %eax, %eax
callq 0x117e2
movq %rax, %r15
movl 0x210(%rbx), %edx
movq %r14, %rdi
movl $0x96, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl %eax, %esi
movq %r15, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11975
retq
// File: /workspace/github_c_makefile_star2_O1/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
xorl %eax, %eax
movl 0x84(%rdi,%rax), %ecx
testl %ecx, %ecx
je 0x552ac
cmpb $0x0, 0x7c(%rdi,%rax)
je 0x552a1
movzbl 0x1f(%rdi), %edx
cmpq $0x7, %rdx
ja 0x5529c
leal 0x1(%rdx), %esi
movb %sil, 0x1f(%rdi)
movl %ecx, 0x28(%rdi,%rdx,4)
movb $0x0, 0x7c(%rdi,%rax)
movl $0x0, 0x84(%rdi,%rax)
addq $0x18, %rax
cmpl $0xf0, %eax
jne 0x55275
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1b, %esi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x45b9e
addl %r15d, %ebx
subl %r15d, %r14d
xorl %eax, %eax
movl 0x84(%r12,%rax), %ecx
cmpl %r15d, %ecx
setge %dl
cmpl %ebx, %ecx
setl %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x55317
addl %r14d, %ecx
movl %ecx, 0x84(%r12,%rax)
addq $0x18, %rax
cmpl $0xf0, %eax
jne 0x552ef
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
cmpl $0x0, 0x30(%rsi)
jle 0x55677
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x10(%rdi), %r14
movq 0x28(%rsi), %r12
xorl %r13d, %r13d
movq (%r12), %rax
movq 0x20(%rax), %rax
movl $0x0, %ecx
testq %rax, %rax
je 0x55630
movl (%rax), %ecx
movl 0x10(%r12), %edx
movq 0x8(%r12), %r15
movq %r14, %rdi
movl $0x81, %esi
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl %eax, %esi
movq %r15, %rdx
movl $0xfffffffb, %ecx       # imm = 0xFFFFFFFB
callq 0x11975
incl %r13d
addq $0x18, %r12
cmpl 0x30(%rbx), %r13d
jl 0x5561c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
movl 0x30(%rsi), %eax
addl 0x20(%rsi), %eax
je 0x55790
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r13
movq 0x10(%rdi), %r15
cmpl $0x0, 0x20(%rsi)
jle 0x556d5
movl $0x14, %r14d
xorl %r12d, %r12d
movq 0x18(%rbx), %rax
movl (%rax,%r14), %ecx
movq %r15, %rdi
movl $0x18, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x45b9e
incq %r12
movslq 0x20(%rbx), %rax
addq $0x20, %r14
cmpq %rax, %r12
jl 0x556ab
cmpl $0x0, 0x30(%rbx)
jle 0x55782
movq 0x28(%rbx), %r12
addq $0x14, %r12
xorl %r14d, %r14d
movq %r13, -0x30(%rbp)
movl -0x4(%r12), %ecx
movq %r15, %rdi
movl $0x18, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x45b9e
cmpl $0x0, (%r12)
js 0x55771
movq -0x14(%r12), %rax
movq 0x20(%rax), %rsi
testq %rsi, %rsi
je 0x55758
cmpl $0x1, (%rsi)
jne 0x55758
movq %r13, %rdi
callq 0x51bb1
movq %rax, %r13
movl (%r12), %edx
movq %r15, %rdi
movl $0x33, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r15, %rdi
movl %eax, %esi
movq %r13, %rdx
movq -0x30(%rbp), %r13
movl $0xfffffff0, %ecx       # imm = 0xFFFFFFF0
callq 0x11975
jmp 0x55771
movq %r13, %rdi
leaq 0x264d9(%rip), %rsi     # 0x7bc3b
xorl %eax, %eax
callq 0x11724
movl $0xffffffff, (%r12)     # imm = 0xFFFFFFFF
incl %r14d
addq $0x18, %r12
cmpl 0x30(%rbx), %r14d
jl 0x556ee
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: isSimpleCount
static Table *isSimpleCount(Select *p, AggInfo *pAggInfo){
  Table *pTab;
  Expr *pExpr;

  assert( !p->pGroupBy );

  if( p->pWhere || p->pEList->nExpr!=1 
   || p->pSrc->nSrc!=1 || p->pSrc->a[0].pSelect
  ){
    return 0;
  }
  pTab = p->pSrc->a[0].pTab;
  pExpr = p->pEList->a[0].pExpr;
  assert( pTab && !pTab->pSelect && pExpr );

  if( IsVirtual(pTab) ) return 0;
  if( pExpr->op!=TK_AGG_FUNCTION ) return 0;
  if( NEVER(pAggInfo->nFunc==0) ) return 0;
  if( (pAggInfo->aFunc[0].pFunc->flags&SQLITE_FUNC_COUNT)==0 ) return 0;
  if( pExpr->flags&EP_Distinct ) return 0;

  return pTab;
}

// Assembly:
cmpq $0x0, 0x30(%rdi)
je 0x5579b
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
cmpl $0x1, (%rax)
jne 0x557e1
movq 0x28(%rdi), %rcx
cmpb $0x1, (%rcx)
jne 0x557e1
cmpq $0x0, 0x30(%rcx)
jne 0x557e1
movq 0x28(%rcx), %rcx
testb $0x10, 0x46(%rcx)
jne 0x557e1
movq 0x8(%rax), %rax
movq (%rax), %rdx
cmpb $-0x67, (%rdx)
jne 0x557e1
cmpl $0x0, 0x30(%rsi)
je 0x557e1
movq 0x28(%rsi), %rax
movq 0x8(%rax), %rax
testb $0x10, 0x3(%rax)
jne 0x557e5
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
testb $0x10, 0x2(%rdx)
cmoveq %rcx, %rax
jmp 0x557e3
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: explainSimpleCount
static void explainSimpleCount(
  Parse *pParse,                  /* Parse context */
  Table *pTab,                    /* Table being queried */
  Index *pIdx                     /* Index used to optimize scan, or NULL */
){
  if( pParse->explain==2 ){
    char *zEqp = sqlite3MPrintf(pParse->db, "SCAN TABLE %s%s%s",
        pTab->zName, 
        pIdx ? " USING COVERING INDEX " : "",
        pIdx ? pIdx->zName : ""
    );
    sqlite3VdbeAddOp4(
        pParse->pVdbe, OP_Explain, pParse->iSelectId, 0, 0, zEqp, P4_DYNAMIC
    );
  }
}

// Assembly:
cmpb $0x2, 0x200(%rdi)
jne 0x55873
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rax
movq %rdi, %rbx
movq (%rdi), %rdi
movq (%rsi), %rdx
leaq 0x28b49(%rip), %r8      # 0x7e360
leaq 0x26462(%rip), %rcx     # 0x7bc80
testq %rax, %rax
cmoveq %r8, %rcx
je 0x5582a
movq (%rax), %r8
leaq 0x2643d(%rip), %rsi     # 0x7bc6e
xorl %eax, %eax
callq 0x117e2
movq %rax, %r14
movq 0x10(%rbx), %r15
movl 0x210(%rbx), %edx
movq %r15, %rdi
movl $0x96, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r15, %rdi
movl %eax, %esi
movq %r14, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11975
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: minMaxQuery
static u8 minMaxQuery(AggInfo *pAggInfo, ExprList **ppMinMax){
  int eRet = WHERE_ORDERBY_NORMAL;          /* Return value */

  *ppMinMax = 0;
  if( pAggInfo->nFunc==1 ){
    Expr *pExpr = pAggInfo->aFunc[0].pExpr; /* Aggregate function */
    ExprList *pEList = pExpr->x.pList;      /* Arguments to agg function */

    assert( pExpr->op==TK_AGG_FUNCTION );
    if( pEList && pEList->nExpr==1 && pEList->a[0].pExpr->op==TK_AGG_COLUMN ){
      const char *zFunc = pExpr->u.zToken;
      if( sqlite3StrICmp(zFunc, "min")==0 ){
        eRet = WHERE_ORDERBY_MIN;
        *ppMinMax = pEList;
      }else if( sqlite3StrICmp(zFunc, "max")==0 ){
        eRet = WHERE_ORDERBY_MAX;
        *ppMinMax = pEList;
      }
    }
  }

  assert( *ppMinMax==0 || (*ppMinMax)->nExpr==1 );
  return eRet;
}

// Assembly:
movq $0x0, (%rsi)
cmpl $0x1, 0x30(%rdi)
jne 0x558f3
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq 0x28(%rdi), %rax
movq (%rax), %rax
movq 0x20(%rax), %rcx
testq %rcx, %rcx
je 0x55967
cmpl $0x1, (%rcx)
jne 0x55967
movq 0x8(%rcx), %rdx
movq (%rdx), %rdx
cmpb $-0x66, (%rdx)
jne 0x55967
movq 0x8(%rax), %rdi
movb (%rdi), %dl
testb %dl, %dl
je 0x558f6
leaq 0x1(%rdi), %r9
leaq 0x263cf(%rip), %rax     # 0x7bc97
leaq 0x20791(%rip), %r10     # 0x76060
movl %edx, %r8d
movzbl %r8b, %r11d
movb (%r11,%r10), %r11b
movzbl (%rax), %ebx
cmpb (%rbx,%r10), %r11b
jne 0x55900
incq %rax
movb (%r9), %r8b
incq %r9
testb %r8b, %r8b
jne 0x558d2
jmp 0x55900
xorl %eax, %eax
retq
leaq 0x2639a(%rip), %rax     # 0x7bc97
movl %edx, %r8d
movzbl %r8b, %r9d
leaq 0x20755(%rip), %r8      # 0x76060
movb (%r9,%r8), %r9b
movzbl (%rax), %r10d
movb $0x1, %al
cmpb (%r10,%r8), %r9b
je 0x55962
testb %dl, %dl
je 0x55949
incq %rdi
leaq 0x26372(%rip), %rax     # 0x7bc9b
movzbl %dl, %r9d
movb (%r9,%r8), %r9b
movzbl (%rax), %r10d
cmpb (%r10,%r8), %r9b
jne 0x55950
incq %rax
movb (%rdi), %dl
incq %rdi
testb %dl, %dl
jne 0x55929
jmp 0x55950
leaq 0x2634b(%rip), %rax     # 0x7bc9b
movzbl %dl, %edx
movb (%rdx,%r8), %dl
movzbl (%rax), %edi
movb $0x2, %al
cmpb (%rdi,%r8), %dl
jne 0x55967
movq %rcx, (%rsi)
jmp 0x55969
xorl %eax, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, -0x2c(%rbp)
movl %edx, %r14d
movq %rsi, %r15
movzbl (%rsi), %eax
addl %edx, %eax
movzbl 0x1(%rsi), %ecx
cmpl %ecx, %eax
jle 0x560e2
movq %rdi, %r13
imull $0x68, %eax, %edx
addl $0x8, %edx
movq %r15, %rsi
callq 0x174d4
movq %rax, %rbx
movq %r15, %r12
testq %rax, %rax
je 0x5610e
testq %r13, %r13
je 0x560e7
cmpq %rbx, 0x170(%r13)
ja 0x560e7
cmpq %rbx, 0x178(%r13)
jbe 0x560e7
movzwl 0x150(%r13), %eax
jmp 0x560f0
movq %r15, %r12
jmp 0x56117
movq %rbx, %rdi
callq *0x3e348(%rip)          # 0x94438
cltq
addq $-0x70, %rax
movabsq $0x4ec4ec4ec4ec4ec5, %rcx # imm = 0x4EC4EC4EC4EC4EC5
mulq %rcx
shrl $0x5, %edx
incb %dl
movb %dl, 0x1(%rbx)
movq %rbx, %r12
testq %rbx, %rbx
je 0x561ac
movzbl (%r12), %r8d
movl -0x2c(%rbp), %r13d
movslq %r13d, %rbx
cmpl %r13d, %r8d
jle 0x56166
movslq %r14d, %rcx
movslq %r13d, %r9
imulq $0x68, %r8, %rax
addq %r12, %rax
addq $-0x60, %rax
addq %r8, %rcx
imulq $0x68, %rcx, %rcx
leaq (%rcx,%r12), %rdx
addq $-0x60, %rdx
decq %r8
movl $0xd, %ecx
movq %rdx, %rdi
movq %rax, %rsi
rep  movsq (%rsi), %es:(%rdi)
addq $-0x68, %rax
addq $-0x68, %rdx
cmpq %r9, %r8
jg 0x56148
addb %r14b, (%r12)
imulq $0x68, %rbx, %r15
leaq (%r12,%r15), %rdi
addq $0x8, %rdi
movl %r14d, %eax
imulq $0x68, %rax, %rdx
xorl %esi, %esi
callq 0x8200
testl %r14d, %r14d
jle 0x561a9
addl %r14d, %r13d
movslq %r13d, %rax
leaq (%r15,%r12), %rcx
addq $0x44, %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
incq %rbx
addq $0x68, %rcx
cmpq %rax, %rbx
jl 0x56197
movq %r12, %r15
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testq %rsi, %rsi
je 0x56227
cmpl $0x0, (%rsi)
jle 0x56227
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movl %edx, %r12d
movq %rdi, %r15
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %rsi, -0x30(%rbp)
movq 0x8(%rsi), %rax
movq (%rax,%r13), %rsi
movq %r15, %rdi
movl %r12d, %edx
movq %r14, %rcx
callq 0x56228
movq -0x30(%rbp), %rsi
movq 0x8(%rsi), %rcx
movq %rax, (%rcx,%r13)
incq %rbx
movslq (%rsi), %rax
addq $0x20, %r13
cmpq %rax, %rbx
jl 0x561e8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x562d2
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
cmpb $-0x68, (%rsi)
jne 0x5628c
cmpl %r12d, 0x2c(%rbx)
jne 0x5628c
movswq 0x30(%rbx), %rax
testq %rax, %rax
js 0x562e7
movq 0x8(%r15), %rcx
shlq $0x5, %rax
movq (%rcx,%rax), %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x48163
movq %rax, %r15
movq %r14, %rdi
movq %rbx, %rsi
callq 0x34068
movq %r15, %rax
jmp 0x562de
movq 0x10(%rbx), %rsi
movq %r14, %rdi
movl %r12d, %edx
movq %r15, %rcx
callq 0x56228
movq %rax, 0x10(%rbx)
movq 0x18(%rbx), %rsi
movq %r14, %rdi
movl %r12d, %edx
movq %r15, %rcx
callq 0x56228
movq %rax, 0x18(%rbx)
testb $0x8, 0x3(%rbx)
movq 0x20(%rbx), %rsi
movq %r14, %rdi
movl %r12d, %edx
movq %r15, %rcx
jne 0x562d6
callq 0x561be
jmp 0x562db
xorl %ebx, %ebx
jmp 0x562db
callq 0x562ec
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x62, (%rbx)
jmp 0x562db
// File: /workspace/github_c_makefile_star2_O1/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 0x563c8
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 0x561be
movq 0x38(%r12), %rsi
movq %r15, %rdi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x561be
movq 0x48(%r12), %rsi
movq %r15, %rdi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x561be
movq 0x40(%r12), %rsi
movq %r15, %rdi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x56228
movq %rax, 0x40(%r12)
movq 0x30(%r12), %rsi
movq %r15, %rdi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x56228
movq %rax, 0x30(%r12)
movq 0x50(%r12), %rsi
movq %r15, %rdi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x562ec
movq 0x28(%r12), %r12
testq %r12, %r12
je 0x563ba
movzbl (%r12), %r13d
testl %r13d, %r13d
je 0x563ba
incl %r13d
addq $0x30, %r12
movq (%r12), %rsi
movq %r15, %rdi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x562ec
decl %r13d
addq $0x68, %r12
cmpl $0x1, %r13d
jg 0x5639b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x56412
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x10(%r14), %rbx
testl %r8d, %r8d
leaq 0x27f70(%rip), %rax     # 0x7e360
leaq 0x25690(%rip), %r8      # 0x7ba87
cmoveq %rax, %r8
addl $-0x71, %esi
cmpl $0x2, %esi
ja 0x56413
movl %esi, %eax
leaq 0x3d4ec(%rip), %rsi     # 0x938f8
movq (%rsi,%rax,8), %r9
jmp 0x5641a
retq
leaq 0x25642(%rip), %r9      # 0x7ba5c
leaq 0x25641(%rip), %rsi     # 0x7ba62
xorl %eax, %eax
callq 0x117e2
movq %rax, %r15
movl 0x210(%r14), %edx
movq %rbx, %rdi
movl $0x96, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11975
// File: /workspace/github_c_makefile_star2_O1/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 0x56489
movq %rbx, %rdi
movl %r14d, %edx
callq 0x56460
jmp 0x5648b
xorl %eax, %eax
testq %rax, %rax
jne 0x564bb
movq (%r15), %rax
cmpl %r14d, (%rax)
jle 0x564b9
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 0x4b095
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x569fe
movq %rsi, %r15
movq %rdi, %rbx
movl $0x20, %esi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
callq 0x45b9e
movl 0x10(%r15), %edx
movq %rbx, %rdi
movl $0x7f, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movl %eax, %r15d
movq %rbx, %rdi
movl $0xe, %esi
xorl %edx, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x45b9e
testl %r15d, %r15d
js 0x569fe
movl 0x34(%rbx), %eax
cmpl %r15d, %eax
jbe 0x569fe
movq 0x8(%rbx), %rcx
movl %r15d, %edx
leaq (%rdx,%rdx,2), %rdx
movl %eax, 0x8(%rcx,%rdx,8)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x56a44
cmpb %r14b, (%rbx)
jne 0x56a4d
movq 0x10(%rbx), %rsi
movq %r15, %rdi
movl %r12d, %edx
callq 0x56a09
movq 0x18(%rbx), %rbx
jmp 0x56a21
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 0x57b67