LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3ResolveExprNames
SQLITE_PRIVATE int sqlite3ResolveExprNames( 
  NameContext *pNC,       /* Namespace to resolve expressions in. */
  Expr *pExpr             /* The expression to be analyzed. */
){
  u16 savedHasAgg;
  Walker w;

  if( pExpr==0 ) return 0;
#if SQLITE_MAX_EXPR_DEPTH>0
  {
    Parse *pParse = pNC->pParse;
    if( sqlite3ExprCheckHeight(pParse, pExpr->nHeight+pNC->pParse->nHeight) ){
      return 1;
    }
    pParse->nHeight += pExpr->nHeight;
  }
#endif
  savedHasAgg = pNC->ncFlags & (NC_HasAgg|NC_MinMaxAgg);
  pNC->ncFlags &= ~(NC_HasAgg|NC_MinMaxAgg);
  memset(&w, 0, sizeof(w));
  w.xExprCallback = resolveExprStep;
  w.xSelectCallback = resolveSelectStep;
  w.pParse = pNC->pParse;
  w.u.pNC = pNC;
  sqlite3WalkExpr(&w, pExpr);
#if SQLITE_MAX_EXPR_DEPTH>0
  pNC->pParse->nHeight -= pExpr->nHeight;
#endif
  if( pNC->nErr>0 || w.pParse->nErr>0 ){
    ExprSetProperty(pExpr, EP_Error);
  }
  if( pNC->ncFlags & NC_HasAgg ){
    ExprSetProperty(pExpr, EP_Agg);
  }
  pNC->ncFlags |= savedHasAgg;
  return ExprHasProperty(pExpr, EP_Error);
}

// Assembly:
testq %rsi, %rsi
je 0x56d1f
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movl 0x1f8(%rdi), %eax
addl 0x28(%rsi), %eax
movq (%rdi), %rcx
movl 0x74(%rcx), %edx
cmpl %eax, %edx
jge 0x56d22
leaq 0x27ff7(%rip), %rsi     # 0x7ed05
xorl %eax, %eax
callq 0x14804
movl $0x1, %eax
jmp 0x56dc0
xorl %eax, %eax
retq
movl 0x28(%rbx), %eax
addl %eax, 0x1f8(%rdi)
movzwl 0x30(%r14), %eax
movl %eax, %r15d
andl $0x1002, %r15d          # imm = 0x1002
andl $0xeffd, %eax           # imm = 0xEFFD
movw %ax, 0x30(%r14)
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rdi
movaps %xmm0, (%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
leaq 0xc6(%rip), %rax        # 0x56e23
movq %rax, (%rdi)
leaq 0x55c(%rip), %rax       # 0x572c3
movq %rax, 0x8(%rdi)
movq (%r14), %rax
movq %rax, 0x18(%rdi)
movq %r14, 0x28(%rdi)
movq %rbx, %rsi
callq 0x547bc
movl 0x28(%rbx), %eax
movq (%r14), %rcx
subl %eax, 0x1f8(%rcx)
cmpl $0x0, 0x2c(%r14)
jg 0x56d9b
movq -0x38(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
jle 0x56d9f
orb $0x8, 0x4(%rbx)
movzwl 0x30(%r14), %eax
testb $0x2, %al
je 0x56dac
orb $0x2, 0x4(%rbx)
movzwl %r15w, %ecx
orl %eax, %ecx
movw %cx, 0x30(%r14)
movl 0x4(%rbx), %eax
shrl $0x3, %eax
andl $0x1, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3ResolveExprListNames
SQLITE_PRIVATE int sqlite3ResolveExprListNames( 
  NameContext *pNC,       /* Namespace to resolve expressions in. */
  ExprList *pList         /* The expression list to be analyzed. */
){
  int i;
  if( pList ){
    for(i=0; i<pList->nExpr; i++){
      if( sqlite3ResolveExprNames(pNC, pList->a[i].pExpr) ) return WRC_Abort;
    }
  }
  return WRC_Continue;
}

// Assembly:
xorl %eax, %eax
testq %rsi, %rsi
je 0x56e22
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpl $0x0, (%rsi)
jle 0x56e1a
movq %rdi, %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%rbx), %rax
movq (%rax,%r15), %rsi
movq %r14, %rdi
callq 0x56cd9
testl %eax, %eax
jne 0x56e15
incq %r12
movslq (%rbx), %rax
addq $0x20, %r15
cmpq %rax, %r12
jl 0x56dee
xorl %eax, %eax
jmp 0x56e1a
movl $0x2, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: exprSrcCount
static int exprSrcCount(Walker *pWalker, Expr *pExpr){
  /* The NEVER() on the second term is because sqlite3FunctionUsesThisSrc()
  ** is always called before sqlite3ExprAnalyzeAggregates() and so the
  ** TK_COLUMNs have not yet been converted into TK_AGG_COLUMN.  If
  ** sqlite3FunctionUsesThisSrc() is used differently in the future, the
  ** NEVER() will need to be removed. */
  if( pExpr->op==TK_COLUMN || NEVER(pExpr->op==TK_AGG_COLUMN) ){
    int i;
    struct SrcCount *p = pWalker->u.pSrcCount;
    SrcList *pSrc = p->pSrc;
    int nSrc = pSrc ? pSrc->nSrc : 0;
    for(i=0; i<nSrc; i++){
      if( pExpr->iTable==pSrc->a[i].iCursor ) break;
    }
    if( i<nSrc ){
      p->nThis++;
    }else{
      p->nOther++;
    }
  }
  return WRC_Continue;
}

// Assembly:
movzbl (%rsi), %eax
orl $0x2, %eax
cmpl $0x9a, %eax
jne 0x58572
pushq %rbp
movq %rsp, %rbp
movq 0x28(%rdi), %rax
movq (%rax), %rcx
testq %rcx, %rcx
je 0x58549
movl (%rcx), %edi
jmp 0x5854b
xorl %edi, %edi
testl %edi, %edi
jle 0x58569
movl 0x2c(%rsi), %edx
movl %edi, %esi
imulq $0x70, %rsi, %rsi
xorl %edi, %edi
cmpl 0x4c(%rcx,%rdi), %edx
je 0x5856e
addq $0x70, %rdi
cmpq %rdi, %rsi
jne 0x5855a
incl 0xc(%rax)
jmp 0x58571
incl 0x8(%rax)
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: selectPopWith
static void selectPopWith(Walker *pWalker, Select *p){
  Parse *pParse = pWalker->pParse;
  With *pWith = findRightmost(p)->pWith;
  if( pWith!=0 ){
    assert( pParse->pWith==pWith );
    pParse->pWith = pWith->pOuter;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x18(%rdi), %rax
movq %rsi, %rcx
movq 0x58(%rsi), %rsi
testq %rsi, %rsi
jne 0x59e8d
movq 0x70(%rcx), %rcx
testq %rcx, %rcx
je 0x59ead
movq 0x8(%rcx), %rcx
movq %rcx, 0x280(%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: setJoinExpr
static void setJoinExpr(Expr *p, int iTable){
  while( p ){
    ExprSetProperty(p, EP_FromJoin);
    assert( !ExprHasProperty(p, EP_TokenOnly|EP_Reduced) );
    ExprSetVVAProperty(p, EP_NoReduce);
    p->iRightJoinTable = (i16)iTable;
    if( p->op==TK_FUNCTION && p->x.pList ){
      int i;
      for(i=0; i<p->x.pList->nExpr; i++){
        setJoinExpr(p->x.pList->a[i].pExpr, iTable);
      }
    }
    setJoinExpr(p->pLeft, iTable);
    p = p->pRight;
  } 
}

// Assembly:
testq %rdi, %rdi
je 0x5a64b
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
orb $0x1, 0x4(%r14)
movw %bx, 0x34(%r14)
cmpb $-0x69, (%r14)
jne 0x5a62f
cmpq $0x0, 0x20(%r14)
je 0x5a62f
movq 0x20(%r14), %rax
cmpl $0x0, (%rax)
jle 0x5a62f
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x8(%rax), %rax
movq (%rax,%r15), %rdi
movl %ebx, %esi
callq 0x5a5d2
incq %r12
movq 0x20(%r14), %rax
movslq (%rax), %rcx
addq $0x20, %r15
cmpq %rcx, %r12
jl 0x5a60d
movq 0x10(%r14), %rdi
movl %ebx, %esi
callq 0x5a5d2
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0x5a5e7
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3UniqueConstraint
SQLITE_PRIVATE void sqlite3UniqueConstraint(
  Parse *pParse,    /* Parsing context */
  int onError,      /* Constraint type */
  Index *pIdx       /* The index that triggers the constraint */
){
  char *zErr;
  int j;
  StrAccum errMsg;
  Table *pTab = pIdx->pTable;

  sqlite3StrAccumInit(&errMsg, pParse->db, 0, 0, 200);
  if( pIdx->aColExpr ){
    sqlite3XPrintf(&errMsg, 0, "index '%q'", pIdx->zName);
  }else{
    for(j=0; j<pIdx->nKeyCol; j++){
      char *zCol;
      assert( pIdx->aiColumn[j]>=0 );
      zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
      if( j ) sqlite3StrAccumAppend(&errMsg, ", ", 2);
      sqlite3XPrintf(&errMsg, 0, "%s.%s", pTab->zName, zCol);
    }
  }
  zErr = sqlite3StrAccumFinish(&errMsg);
  sqlite3HaltConstraint(pParse, 
    IsPrimaryKeyIndex(pIdx) ? SQLITE_CONSTRAINT_PRIMARYKEY 
                            : SQLITE_CONSTRAINT_UNIQUE,
    onError, zErr, P4_DYNAMIC, P5_ConstraintUnique);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movl %esi, -0x2c(%rbp)
movq 0x18(%rdx), %r14
movq %rdi, -0x60(%rbp)
movq (%rdi), %rax
xorps %xmm0, %xmm0
movups %xmm0, -0x50(%rbp)
movq %rax, -0x58(%rbp)
movq $0x0, -0x40(%rbp)
movl $0xc8, -0x38(%rbp)
movw $0x0, -0x34(%rbp)
cmpq $0x0, 0x50(%rdx)
je 0x5ba0c
movq (%r15), %rcx
leaq 0x23c12(%rip), %rdx     # 0x7f60c
leaq -0x58(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x3e833
jmp 0x5ba8d
cmpw $0x0, 0x5e(%r15)
je 0x5ba8d
leaq -0x58(%rbp), %r13
xorl %r12d, %r12d
movq 0x8(%r14), %rax
movq 0x8(%r15), %rcx
movswq (%rcx,%r12,2), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rbx
testq %r12, %r12
je 0x5ba67
movl -0x40(%rbp), %eax
leal 0x2(%rax), %ecx
cmpl -0x3c(%rbp), %ecx
jae 0x5ba53
movl %ecx, -0x40(%rbp)
movq -0x48(%rbp), %rcx
movw $0x202c, (%rcx,%rax)    # imm = 0x202C
jmp 0x5ba67
movq %r13, %rdi
leaq 0x23bba(%rip), %rsi     # 0x7f617
movl $0x2, %edx
callq 0x1be64
movq (%r14), %rcx
movq %r13, %rdi
xorl %esi, %esi
leaq 0x21763(%rip), %rdx     # 0x7d1d9
movq %rbx, %r8
xorl %eax, %eax
callq 0x3e833
incq %r12
movzwl 0x5e(%r15), %eax
cmpq %rax, %r12
jb 0x5ba1b
leaq -0x58(%rbp), %rdi
callq 0xda95
movb 0x63(%r15), %cl
andb $0x3, %cl
xorl %esi, %esi
cmpb $0x2, %cl
setne %sil
shll $0x9, %esi
addl $0x613, %esi            # imm = 0x613
movq -0x60(%rbp), %rdi
movl -0x2c(%rbp), %edx
movq %rax, %rcx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl $0x2, %r9d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x53d33
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3DropTriggerPtr
SQLITE_PRIVATE void sqlite3DropTriggerPtr(Parse *pParse, Trigger *pTrigger){
  Table   *pTable;
  Vdbe *v;
  sqlite3 *db = pParse->db;
  int iDb;

  iDb = sqlite3SchemaToIndex(pParse->db, pTrigger->pSchema);
  assert( iDb>=0 && iDb<db->nDb );
  pTable = tableOfTrigger(pTrigger);
  assert( pTable );
  assert( pTable->pSchema==pTrigger->pSchema || iDb==1 );
#ifndef SQLITE_OMIT_AUTHORIZATION
  {
    int code = SQLITE_DROP_TRIGGER;
    const char *zDb = db->aDb[iDb].zName;
    const char *zTab = SCHEMA_TABLE(iDb);
    if( iDb==1 ) code = SQLITE_DROP_TEMP_TRIGGER;
    if( sqlite3AuthCheck(pParse, code, pTrigger->zName, pTable->zName, zDb) ||
      sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb) ){
      return;
    }
  }
#endif

  /* Generate code to destroy the database record of the trigger.
  */
  assert( pTable!=0 );
  if( (v = sqlite3GetVdbe(pParse))!=0 ){
    sqlite3NestedParse(pParse,
       "DELETE FROM %Q.%s WHERE name=%Q AND type='trigger'",
       db->aDb[iDb].zName, SCHEMA_TABLE(iDb), pTrigger->zName
    );
    sqlite3ChangeCookie(pParse, iDb);
    sqlite3VdbeAddOp4(v, OP_DropTrigger, iDb, 0, 0, pTrigger->zName, 0);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %r14
movq %rsi, -0x30(%rbp)
movq 0x28(%rsi), %rax
testq %rax, %rax
movq %rdi, -0x40(%rbp)
je 0x5c16c
movl 0x28(%r14), %ecx
testl %ecx, %ecx
jle 0x5c174
movq 0x20(%r14), %rdx
addq $0x18, %rdx
xorl %r15d, %r15d
cmpq %rax, (%rdx)
je 0x5c177
incq %r15
addq $0x20, %rdx
cmpq %r15, %rcx
jne 0x5c156
movl %ecx, %r15d
jmp 0x5c177
movl $0xfff0bdc0, %r15d      # imm = 0xFFF0BDC0
jmp 0x5c177
xorl %r15d, %r15d
movq -0x30(%rbp), %rbx
movq 0x8(%rbx), %rsi
movq 0x30(%rbx), %rdi
addq $0x8, %rdi
leaq -0x44(%rbp), %rdx
callq 0x3d198
movq 0x10(%rax), %rax
movq %r14, -0x38(%rbp)
movq 0x20(%r14), %rcx
movslq %r15d, %rdx
movq %rdx, %r14
shlq $0x5, %r14
movq (%rcx,%r14), %r13
xorl %ecx, %ecx
cmpl $0x1, %edx
leaq 0x21b1f(%rip), %rdx     # 0x7dcd5
leaq 0x21b2b(%rip), %r12     # 0x7dce8
cmoveq %rdx, %r12
setne %cl
leal 0xe(%rcx,%rcx), %esi
movq (%rbx), %rdx
movq (%rax), %rcx
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %r13, %r8
callq 0x5605b
testl %eax, %eax
jne 0x5c1fa
movq %rbx, %rdi
movl $0x9, %esi
movq %r12, %rdx
xorl %ecx, %ecx
movq %r13, %r8
callq 0x5605b
testl %eax, %eax
je 0x5c209
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x507bf
testq %rax, %rax
je 0x5c1fa
movq %rax, %r13
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax,%r14), %rdx
movq -0x30(%rbp), %r14
movq (%r14), %r8
leaq 0x235b1(%rip), %rsi     # 0x7f7e4
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x5688b
movq %rbx, %rdi
movl %r15d, %esi
callq 0x569b9
movq (%r14), %rbx
movq %r13, %rdi
movl $0x80, %esi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3fa9e
movq %r13, %rdi
movl %eax, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x14ab9
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: pushDownWhereTerms
static int pushDownWhereTerms(
  sqlite3 *db,          /* The database connection (for malloc()) */
  Select *pSubq,        /* The subquery whose WHERE clause is to be augmented */
  Expr *pWhere,         /* The WHERE clause of the outer query */
  int iCursor           /* Cursor number of the subquery */
){
  Expr *pNew;
  int nChng = 0;
  if( pWhere==0 ) return 0;
  if( (pSubq->selFlags & (SF_Aggregate|SF_Recursive))!=0 ){
     return 0; /* restrictions (1) and (2) */
  }
  if( pSubq->pLimit!=0 ){
     return 0; /* restriction (3) */
  }
  while( pWhere->op==TK_AND ){
    nChng += pushDownWhereTerms(db, pSubq, pWhere->pRight, iCursor);
    pWhere = pWhere->pLeft;
  }
  if( ExprHasProperty(pWhere,EP_FromJoin) ) return 0; /* restriction 5 */
  if( sqlite3ExprIsTableConstant(pWhere, iCursor) ){
    nChng++;
    while( pSubq ){
      pNew = sqlite3ExprDup(db, pWhere, 0);
      pNew = substExpr(db, pNew, iCursor, pSubq->pEList);
      pSubq->pWhere = sqlite3ExprAnd(db, pSubq->pWhere, pNew);
      pSubq = pSubq->pPrior;
    }
  }
  return nChng;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, -0x2c(%rbp)
xorl %eax, %eax
testq %rdx, %rdx
je 0x5e362
movq %rsi, %r15
movzwl 0xa(%rsi), %ecx
testl $0x2008, %ecx           # imm = 0x2008
jne 0x5e362
cmpq $0x0, 0x60(%r15)
jne 0x5e362
movq %rdx, %r14
movq %rdi, %r12
cmpb $0x48, (%rdx)
jne 0x5e2c4
xorl %r13d, %r13d
movl -0x2c(%rbp), %ebx
movq 0x18(%r14), %rdx
movq %r12, %rdi
movq %r15, %rsi
movl %ebx, %ecx
callq 0x5e256
addl %eax, %r13d
movq 0x10(%r14), %r14
cmpb $0x48, (%r14)
je 0x5e2a4
jmp 0x5e2c7
xorl %r13d, %r13d
testb $0x1, 0x4(%r14)
movl $0x0, %eax
jne 0x5e362
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rbx
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, (%rbx)
movaps %xmm0, 0x10(%rbx)
movb $0x3, 0x24(%rbx)
leaq -0x9bbd(%rip), %rax     # 0x54737
movq %rax, (%rbx)
leaq -0x9b51(%rip), %rax     # 0x547ad
movq %rax, 0x8(%rbx)
movl -0x2c(%rbp), %eax
movl %eax, 0x28(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x547bc
cmpb $0x0, 0x24(%rbx)
je 0x5e35f
incl %r13d
testq %r15, %r15
je 0x5e35f
movl -0x2c(%rbp), %ebx
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x54a6f
movq (%r15), %rcx
movq %r12, %rdi
movq %rax, %rsi
movl %ebx, %edx
callq 0x61aec
movq 0x30(%r15), %rsi
movq %r12, %rdi
movq %rax, %rdx
callq 0x5a64c
movq %rax, 0x30(%r15)
movq 0x50(%r15), %r15
testq %r15, %r15
jne 0x5e324
movl %r13d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: keyInfoFromExprList
static KeyInfo *keyInfoFromExprList(
  Parse *pParse,       /* Parsing context */
  ExprList *pList,     /* Form the KeyInfo object from this ExprList */
  int iStart,          /* Begin with this column of pList */
  int nExtra           /* Add this many extra columns to the end */
){
  int nExpr;
  KeyInfo *pInfo;
  struct ExprList_item *pItem;
  sqlite3 *db = pParse->db;
  int i;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r13d
movq %rdi, %rbx
movq (%rdi), %rdi
movq %rsi, -0x30(%rbp)
movl (%rsi), %r15d
leal 0x1(%rcx), %edx
subl %r13d, %r15d
setle %r14b
movq %rdi, -0x38(%rbp)
movl %r15d, %esi
callq 0x50dad
movq %rax, %r12
testq %rax, %rax
sete %al
orb %r14b, %al
jne 0x5e3ff
movl %r13d, %r13d
shlq $0x5, %r13
movq -0x30(%rbp), %rax
addq 0x8(%rax), %r13
xorl %r14d, %r14d
movq (%r13), %rsi
movq %rbx, %rdi
callq 0x529e4
testq %rax, %rax
jne 0x5e3e1
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x20(%r12,%r14,8)
movb 0x18(%r13), %al
movq 0x18(%r12), %rcx
movb %al, (%rcx,%r14)
addq $0x20, %r13
incq %r14
cmpl %r14d, %r15d
jne 0x5e3c8
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3ExprCacheClear
SQLITE_PRIVATE void sqlite3ExprCacheClear(Parse *pParse){
  int i;
  struct yColCache *p;

#if SQLITE_DEBUG
  if( pParse->db->flags & SQLITE_VdbeAddopTrace ){
    printf("CLEAR\n");
  }
#endif
  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 0x94(%rdi,%rax), %ecx
testl %ecx, %ecx
je 0x609c3
cmpb $0x0, 0x8e(%rdi,%rax)
je 0x609b8
movzbl 0x1f(%rdi), %edx
cmpq $0x7, %rdx
ja 0x609b0
leal 0x1(%rdx), %esi
movb %sil, 0x1f(%rdi)
movl %ecx, 0x24(%rdi,%rdx,4)
movb $0x0, 0x8e(%rdi,%rax)
movl $0x0, 0x94(%rdi,%rax)
addq $0x14, %rax
cmpl $0xc8, %eax
jne 0x60986
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: resetAccumulator
static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){
  Vdbe *v = pParse->pVdbe;
  int i;
  struct AggInfo_func *pFunc;
  int nReg = pAggInfo->nFunc + pAggInfo->nColumn;
  if( nReg==0 ) return;
#ifdef SQLITE_DEBUG
  /* Verify that all AggInfo registers are within the range specified by
  ** AggInfo.mnReg..AggInfo.mxReg */
  assert( nReg==pAggInfo->mxReg-pAggInfo->mnReg+1 );
  for(i=0; i<pAggInfo->nColumn; i++){
    assert( pAggInfo->aCol[i].iMem>=pAggInfo->mnReg
         && pAggInfo->aCol[i].iMem<=pAggInfo->mxReg );
  }
  for(i=0; i<pAggInfo->nFunc; i++){
    assert( pAggInfo->aFunc[i].iMem>=pAggInfo->mnReg
         && pAggInfo->aFunc[i].iMem<=pAggInfo->mxReg );
  }
#endif
  sqlite3VdbeAddOp3(v, OP_Null, 0, pAggInfo->mnReg, pAggInfo->mxReg);
  for(pFunc=pAggInfo->aFunc, i=0; i<pAggInfo->nFunc; i++, pFunc++){
    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, 0, 0);
        sqlite3VdbeAddOp4(v, OP_OpenEphemeral, pFunc->iDistinct, 0, 0,
                          (char*)pKeyInfo, P4_KEYINFO);
      }
    }
  }
}

// Assembly:
movl 0x38(%rsi), %eax
addl 0x28(%rsi), %eax
je 0x60ed3
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rdi
movl 0x10(%rsi), %ecx
movl 0x14(%rsi), %r8d
movq %rdi, -0x30(%rbp)
movl $0x1a, %esi
xorl %edx, %edx
callq 0x3fa9e
cmpl $0x0, 0x38(%rbx)
jle 0x60ec5
movq 0x30(%rbx), %r12
addq $0x14, %r12
leaq 0x1ed5f(%rip), %r13     # 0x7fb95
xorl %r15d, %r15d
cmpl $0x0, (%r12)
js 0x60eb4
movq -0x14(%r12), %rax
movq 0x20(%rax), %rsi
testq %rsi, %rsi
je 0x60e9f
cmpl $0x1, (%rsi)
jne 0x60e9f
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5e371
movq %rax, -0x38(%rbp)
movl (%r12), %edx
movq %r14, %r13
movq -0x30(%rbp), %r14
movq %r14, %rdi
movl $0x3a, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3fa9e
movq %r14, %rdi
movq %r13, %r14
leaq 0x1ed08(%rip), %r13     # 0x7fb95
movl %eax, %esi
movq -0x38(%rbp), %rdx
movl $0xfffffffa, %ecx       # imm = 0xFFFFFFFA
callq 0x14ab9
jmp 0x60eb4
movq %r14, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x14804
movl $0xffffffff, (%r12)     # imm = 0xFFFFFFFF
incl %r15d
addq $0x18, %r12
cmpl 0x38(%rbx), %r15d
jl 0x60e39
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/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 ){
    int bCover = (pIdx!=0 && (HasRowid(pTab) || !IsPrimaryKeyIndex(pIdx)));
    char *zEqp = sqlite3MPrintf(pParse->db, "SCAN TABLE %s%s%s",
        pTab->zName,
        bCover ? " USING COVERING INDEX " : "",
        bCover ? pIdx->zName : ""
    );
    sqlite3VdbeAddOp4(
        pParse->pVdbe, OP_Explain, pParse->iSelectId, 0, 0, zEqp, P4_DYNAMIC
    );
  }
}

// Assembly:
cmpb $0x2, 0x1ed(%rdi)
jne 0x60f65
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdx, %rdx
je 0x60f66
movb $0x1, %r9b
testb $0x20, 0x46(%rsi)
je 0x60f69
movb 0x63(%rdx), %al
andb $0x3, %al
cmpb $0x2, %al
setne %r9b
jmp 0x60f69
retq
xorl %r9d, %r9d
movq (%rbx), %rdi
movq (%rsi), %rax
leaq 0x1ec64(%rip), %rcx     # 0x7fbda
leaq 0x1f114(%rip), %r8      # 0x80091
testb %r9b, %r9b
cmoveq %r8, %rcx
je 0x60f89
movq (%rdx), %r8
leaq 0x1ec38(%rip), %rsi     # 0x7fbc8
movq %rax, %rdx
xorl %eax, %eax
callq 0x148c2
movq %rax, %r14
movq 0x10(%rbx), %r15
movl 0x1fc(%rbx), %edx
movq %r15, %rdi
movl $0xa2, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3fa9e
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 0x14ab9
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/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 */
  int doPrior          /* Do substitutes on p->pPrior too */
){
  SrcList *pSrc;
  struct SrcList_item *pItem;
  int i;
  if( !p ) return;
  do{
    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);
    pSrc = p->pSrc;
    assert( pSrc!=0 );
    for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){
      substSelect(db, pItem->pSelect, iTable, pEList, 1);
      if( pItem->fg.isTabFunc ){
        substExprList(db, pItem->u1.pFuncArg, iTable, pEList);
      }
    }
  }while( doPrior && (p = p->pPrior)!=0 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, -0x2c(%rbp)
testq %rsi, %rsi
je 0x61a73
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %rbx
movq %rdi, %r13
movq (%rbx), %rsi
movq %r13, %rdi
movl %r15d, %edx
movq %r14, %rcx
callq 0x61a82
movq 0x38(%rbx), %rsi
movq %r13, %rdi
movl %r15d, %edx
movq %r14, %rcx
callq 0x61a82
movq 0x48(%rbx), %rsi
movq %r13, %rdi
movl %r15d, %edx
movq %r14, %rcx
callq 0x61a82
movq 0x40(%rbx), %rsi
movq %r13, %rdi
movl %r15d, %edx
movq %r14, %rcx
callq 0x61aec
movq %rax, 0x40(%rbx)
movq 0x30(%rbx), %rsi
movq %r13, %rdi
movl %r15d, %edx
movq %r14, %rcx
callq 0x61aec
movq %rax, 0x30(%rbx)
movq %rbx, -0x38(%rbp)
movq 0x28(%rbx), %rbx
movl (%rbx), %r12d
testl %r12d, %r12d
jle 0x61a5c
incl %r12d
addq $0x30, %rbx
movq (%rbx), %rsi
movq %r13, %rdi
movl %r15d, %edx
movq %r14, %rcx
movl $0x1, %r8d
callq 0x6197e
testb $0x4, 0x15(%rbx)
je 0x61a4f
movq 0x38(%rbx), %rsi
movq %r13, %rdi
movl %r15d, %edx
movq %r14, %rcx
callq 0x61a82
decl %r12d
addq $0x70, %rbx
cmpl $0x1, %r12d
jg 0x61a20
cmpl $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %rbx
je 0x61a73
movq 0x50(%rbx), %rbx
testq %rbx, %rbx
jne 0x619a8
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: whereInfoFree
static void whereInfoFree(sqlite3 *db, WhereInfo *pWInfo){
  if( ALWAYS(pWInfo) ){
    int i;
    for(i=0; i<pWInfo->nLevel; i++){
      WhereLevel *pLevel = &pWInfo->a[i];
      if( pLevel->pWLoop && (pLevel->pWLoop->wsFlags & WHERE_IN_ABLE) ){
        sqlite3DbFree(db, pLevel->u.in.aInLoop);
      }
    }
    sqlite3WhereClauseClear(&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 %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, 0x39(%rsi)
je 0x654f1
leaq 0x388(%rbx), %r15
xorl %r12d, %r12d
movq (%r15), %rax
testq %rax, %rax
je 0x654e1
testb $0x8, 0x29(%rax)
je 0x654e1
movq -0x8(%r15), %rsi
movq %r14, %rdi
callq 0xb6df
incq %r12
movzbl 0x39(%rbx), %eax
addq $0x58, %r15
cmpq %rax, %r12
jb 0x654c7
leaq 0x158(%rbx), %rdi
callq 0x6a35d
movq 0x20(%rbx), %r15
testq %r15, %r15
je 0x65526
movq 0x40(%r15), %rax
movq %rax, 0x20(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x685da
movq %r14, %rdi
movq %r15, %rsi
callq 0xb6df
jmp 0x654fd
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb6df
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3WhereExprUsage
SQLITE_PRIVATE Bitmask sqlite3WhereExprUsage(WhereMaskSet *pMaskSet, Expr *p){
  Bitmask mask = 0;
  if( p==0 ) return 0;
  if( p->op==TK_COLUMN ){
    mask = sqlite3WhereGetMask(pMaskSet, p->iTable);
    return mask;
  }
  mask = sqlite3WhereExprUsage(pMaskSet, p->pRight);
  mask |= sqlite3WhereExprUsage(pMaskSet, p->pLeft);
  if( ExprHasProperty(p, EP_xIsSelect) ){
    mask |= exprSelectUsage(pMaskSet, p->x.pSelect);
  }else{
    mask |= sqlite3WhereExprListUsage(pMaskSet, p->x.pList);
  }
  return mask;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x66bdc
movq %rsi, %r15
movq %rdi, %r14
cmpb $-0x68, (%rsi)
jne 0x66be0
movslq (%r14), %rax
testq %rax, %rax
jle 0x66bdc
movl 0x2c(%r15), %edx
xorl %ebx, %ebx
xorl %ecx, %ecx
cmpl %edx, 0x4(%r14,%rcx,4)
je 0x66c20
incq %rcx
cmpq %rcx, %rax
jne 0x66bcb
jmp 0x66c28
xorl %ebx, %ebx
jmp 0x66c28
movq 0x18(%r15), %rsi
movq %r14, %rdi
callq 0x66ba0
movq %rax, %r12
movq 0x10(%r15), %rsi
movq %r14, %rdi
callq 0x66ba0
movq %rax, %rbx
orq %r12, %rbx
testb $0x8, 0x5(%r15)
movq 0x20(%r15), %rsi
movq %r14, %rdi
jne 0x66c16
callq 0x62b04
jmp 0x66c1b
callq 0x66c34
orq %rax, %rbx
jmp 0x66c28
movl $0x1, %ebx
shlq %cl, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: exprSelectUsage
static Bitmask exprSelectUsage(WhereMaskSet *pMaskSet, Select *pS){
  Bitmask mask = 0;
  while( pS ){
    SrcList *pSrc = pS->pSrc;
    mask |= sqlite3WhereExprListUsage(pMaskSet, pS->pEList);
    mask |= sqlite3WhereExprListUsage(pMaskSet, pS->pGroupBy);
    mask |= sqlite3WhereExprListUsage(pMaskSet, pS->pOrderBy);
    mask |= sqlite3WhereExprUsage(pMaskSet, pS->pWhere);
    mask |= sqlite3WhereExprUsage(pMaskSet, pS->pHaving);
    if( ALWAYS(pSrc!=0) ){
      int i;
      for(i=0; i<pSrc->nSrc; i++){
        mask |= exprSelectUsage(pMaskSet, pSrc->a[i].pSelect);
        mask |= sqlite3WhereExprUsage(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
testq %rsi, %rsi
je 0x66d28
movq %rsi, %r12
movq %rdi, %r14
xorl %r15d, %r15d
movq (%r12), %rsi
movq 0x28(%r12), %rbx
movq %r14, %rdi
callq 0x62b04
movq %rax, -0x30(%rbp)
movq 0x38(%r12), %rsi
movq %r14, %rdi
callq 0x62b04
movq %rax, -0x40(%rbp)
movq 0x48(%r12), %rsi
movq %r14, %rdi
callq 0x62b04
movq %rax, %r13
movq 0x30(%r12), %rsi
movq %r14, %rdi
callq 0x66ba0
movq %rax, -0x38(%rbp)
movq %r12, -0x48(%rbp)
movq 0x40(%r12), %rsi
movq %r14, %rdi
callq 0x66ba0
movq %rax, %r12
movq -0x30(%rbp), %rax
orq %r15, %rax
orq -0x40(%rbp), %r13
orq %rax, %r13
orq -0x38(%rbp), %r12
orq %r13, %r12
testq %rbx, %rbx
je 0x66d11
movslq (%rbx), %rax
testq %rax, %rax
jle 0x66d11
imulq $0x70, %rax, %rax
movq %rax, -0x30(%rbp)
xorl %r13d, %r13d
movq 0x30(%rbx,%r13), %rsi
movq %r14, %rdi
callq 0x66c34
movq %rax, %r15
movq 0x50(%rbx,%r13), %rsi
movq %r14, %rdi
callq 0x66ba0
orq %r12, %r15
orq %rax, %r15
addq $0x70, %r13
movq %r15, %r12
cmpq %r13, -0x30(%rbp)
jne 0x66cdf
jmp 0x66d14
movq %r12, %r15
movq -0x48(%rbp), %r12
movq 0x50(%r12), %r12
testq %r12, %r12
jne 0x66c57
jmp 0x66d2b
xorl %r15d, %r15d
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: exprMightBeIndexed
static int exprMightBeIndexed(
  SrcList *pFrom,        /* The FROM clause */
  Bitmask mPrereq,       /* Bitmask of FROM clause terms referenced by pExpr */
  Expr *pExpr,           /* An operand of a comparison operator */
  int *piCur,            /* Write the referenced table cursor number here */
  int *piColumn          /* Write the referenced table column number here */
){
  Index *pIdx;
  int i;
  int iCur;
  if( pExpr->op==TK_COLUMN ){
    *piCur = pExpr->iTable;
    *piColumn = pExpr->iColumn;
    return 1;
  }
  if( mPrereq==0 ) return 0;                 /* No table references */
  if( (mPrereq&(mPrereq-1))!=0 ) return 0;   /* Refs more than one table */
  for(i=0; mPrereq>1; i++, mPrereq>>=1){}
  iCur = pFrom->a[i].iCursor;
  for(pIdx=pFrom->a[i].pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    if( pIdx->aColExpr==0 ) continue;
    for(i=0; i<pIdx->nKeyCol; i++){
      if( pIdx->aiColumn[i]!=(-2) ) continue;
      if( sqlite3ExprCompare(pExpr, pIdx->aColExpr->a[i].pExpr, iCur)==0 ){
        *piCur = iCur;
        *piColumn = -2;
        return 1;
      }
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
cmpb $-0x68, (%rdx)
jne 0x66d64
movl 0x2c(%rbx), %eax
movl %eax, (%rcx)
movswl 0x30(%rbx), %eax
jmp 0x66e26
movq %rcx, -0x38(%rbp)
movq %r8, -0x40(%rbp)
leaq -0x1(%rsi), %rcx
movq %rsi, %rdx
xorq %rcx, %rdx
xorl %eax, %eax
cmpq %rcx, %rdx
jbe 0x66e2e
xorl %eax, %eax
xorl %ecx, %ecx
cmpq $0x2, %rsi
jb 0x66d9d
movq %rsi, %rdx
shrq %rdx
incq %rcx
cmpq $0x3, %rsi
movq %rdx, %rsi
ja 0x66d8e
imulq $0x70, %rcx, %rcx
movq 0x28(%rdi,%rcx), %rdx
movq 0x10(%rdx), %r13
testq %r13, %r13
je 0x66e2e
movl 0x4c(%rdi,%rcx), %eax
movl %eax, -0x2c(%rbp)
movq 0x50(%r13), %rax
movq %rax, -0x48(%rbp)
testq %rax, %rax
je 0x66e07
movzwl 0x5e(%r13), %r14d
testq %r14, %r14
je 0x66e07
movq 0x8(%r13), %r15
shll $0x5, %r14d
xorl %r12d, %r12d
cmpw $-0x2, (%r15)
jne 0x66dfa
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax,%r12), %rsi
movq %rbx, %rdi
movl -0x2c(%rbp), %edx
callq 0x544b5
testl %eax, %eax
je 0x66e14
addq $0x20, %r12
addq $0x2, %r15
cmpq %r12, %r14
jne 0x66dd8
movq 0x28(%r13), %r13
xorl %eax, %eax
testq %r13, %r13
jne 0x66db6
jmp 0x66e2e
movq -0x38(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, (%rax)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movq -0x40(%rbp), %r8
movl %eax, (%r8)
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: termIsEquivalence
static int termIsEquivalence(Parse *pParse, Expr *pExpr){
  char aff1, aff2;
  CollSeq *pColl;
  const char *zColl1, *zColl2;
  if( !OptimizationEnabled(pParse->db, SQLITE_Transitive) ) return 0;
  if( pExpr->op!=TK_EQ && pExpr->op!=TK_IS ) return 0;
  if( ExprHasProperty(pExpr, EP_FromJoin) ) return 0;
  aff1 = sqlite3ExprAffinity(pExpr->pLeft);
  aff2 = sqlite3ExprAffinity(pExpr->pRight);
  if( aff1!=aff2
   && (!sqlite3IsNumericAffinity(aff1) || !sqlite3IsNumericAffinity(aff2))
  ){
    return 0;
  }
  pColl = sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft, pExpr->pRight);
  if( pColl==0 || sqlite3StrICmp(pColl->zName, "BINARY")==0 ) return 1;
  pColl = sqlite3ExprCollSeq(pParse, pExpr->pLeft);
  /* Since pLeft and pRight are both a column references, their collating
  ** sequence should always be defined. */
  zColl1 = ALWAYS(pColl) ? pColl->zName : 0;
  pColl = sqlite3ExprCollSeq(pParse, pExpr->pRight);
  zColl2 = ALWAYS(pColl) ? pColl->zName : 0;
  return sqlite3StrICmp(zColl1, zColl2)==0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdi), %rax
xorl %r15d, %r15d
testb $0x2, 0x4d(%rax)
jne 0x66f14
movq %rsi, %r14
movq %rdi, %rbx
movzbl (%rsi), %eax
cmpl $0x4f, %eax
je 0x66e6f
cmpl $0x49, %eax
jne 0x66f14
testb $0x1, 0x4(%r14)
jne 0x66f14
movq 0x10(%r14), %rdi
callq 0x5534e
movl %eax, %r12d
movq 0x18(%r14), %rdi
callq 0x5534e
cmpb %al, %r12b
je 0x66ea4
cmpb $0x43, %r12b
setl %cl
cmpb $0x43, %al
setl %al
orb %cl, %al
jne 0x66f14
movq 0x10(%r14), %rsi
movq 0x18(%r14), %rdx
movq %rbx, %rdi
callq 0x5530a
movl $0x1, %r15d
testq %rax, %rax
je 0x66f14
movq (%rax), %rdi
leaq 0x13897(%rip), %rsi     # 0x7a760
callq 0xa3f0
testl %eax, %eax
je 0x66f14
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x529e4
testq %rax, %rax
je 0x66ee8
movq (%rax), %r15
jmp 0x66eeb
xorl %r15d, %r15d
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x529e4
testq %rax, %rax
je 0x66f01
movq (%rax), %rsi
jmp 0x66f03
xorl %esi, %esi
movq %r15, %rdi
callq 0xa3f0
xorl %r15d, %r15d
testl %eax, %eax
sete %r15b
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: whereScanInit
static WhereTerm *whereScanInit(
  WhereScan *pScan,       /* The WhereScan object being initialized */
  WhereClause *pWC,       /* The WHERE clause to be scanned */
  int iCur,               /* Cursor to scan for */
  int iColumn,            /* Column to scan for */
  u32 opMask,             /* Operator(s) to scan for */
  Index *pIdx             /* Must be compatible with this index */
){
  int j = 0;

  /* memset(pScan, 0, sizeof(*pScan)); */
  pScan->pOrigWC = pWC;
  pScan->pWC = pWC;
  pScan->pIdxExpr = 0;
  if( pIdx ){
    j = iColumn;
    iColumn = pIdx->aiColumn[j];
    if( iColumn==XN_EXPR ) pScan->pIdxExpr = pIdx->aColExpr->a[j].pExpr;
  }
  if( pIdx && iColumn>=0 ){
    pScan->idxaff = pIdx->pTable->aCol[iColumn].affinity;
    pScan->zCollName = pIdx->azColl[j];
  }else{
    pScan->idxaff = 0;
    pScan->zCollName = 0;
  }
  pScan->opMask = opMask;
  pScan->k = 0;
  pScan->aiCur[0] = iCur;
  pScan->aiColumn[0] = iColumn;
  pScan->nEquiv = 1;
  pScan->iEquiv = 1;
  return whereScanNext(pScan);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, (%rdi)
movq %rsi, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
testq %r9, %r9
je 0x67070
movq 0x8(%r9), %rax
movslq %ecx, %rsi
movswl (%rax,%rsi,2), %eax
cmpl $-0x2, %eax
jne 0x67074
movq 0x50(%r9), %rax
movq 0x8(%rax), %rax
shlq $0x5, %rsi
movq (%rax,%rsi), %rax
movq %rax, 0x18(%rdi)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
jmp 0x67074
movl %ecx, %eax
xorl %ecx, %ecx
testq %r9, %r9
je 0x670a6
testl %eax, %eax
js 0x670a6
movq 0x18(%r9), %rsi
movq 0x8(%rsi), %rsi
movl %eax, %r10d
leaq (%r10,%r10,2), %r10
shlq $0x4, %r10
movb 0x29(%rsi,%r10), %sil
movb %sil, 0x20(%rdi)
movq 0x40(%r9), %rsi
movslq %ecx, %rcx
movq (%rsi,%rcx,8), %rcx
jmp 0x670ac
movb $0x0, 0x20(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movl %r8d, 0x24(%rdi)
movl $0x0, 0x28(%rdi)
movl %edx, 0x2c(%rdi)
movw %ax, 0x58(%rdi)
movw $0x101, 0x21(%rdi)      # imm = 0x101
popq %rbp
jmp 0x670cb
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: whereLoopCheaperProperSubset
static int whereLoopCheaperProperSubset(
  const WhereLoop *pX,       /* First WhereLoop to compare */
  const WhereLoop *pY        /* Compare against this WhereLoop */
){
  int i, j;
  if( pX->nLTerm-pX->nSkip >= pY->nLTerm-pY->nSkip ){
    return 0; /* X is not a subset of Y */
  }
  if( pY->nSkip > pX->nSkip ) return 0;
  if( pX->rRun >= pY->rRun ){
    if( pX->rRun > pY->rRun ) return 0;    /* X costs more than Y */
    if( pX->nOut > pY->nOut ) return 0;    /* X costs more than Y */
  }
  for(i=pX->nLTerm-1; i>=0; i--){
    if( pX->aLTerm[i]==0 ) continue;
    for(j=pY->nLTerm-1; j>=0; j--){
      if( pY->aLTerm[j]==pX->aLTerm[i] ) break;
    }
    if( j<0 ) return 0;  /* X not a subset of Y since term X[i] not used by Y */
  }
  return 1;  /* All conditions meet */
}

// Assembly:
movzwl 0x2e(%rdi), %edx
movzwl 0x2e(%rsi), %r8d
xorl %eax, %eax
cmpw %dx, %r8w
ja 0x68ada
movzwl 0x2c(%rdi), %ecx
movl %ecx, %r9d
subl %edx, %r9d
movzwl 0x2c(%rsi), %edx
movl %edx, %r10d
subl %r8d, %r10d
cmpl %r10d, %r9d
jge 0x68ada
movzwl 0x14(%rsi), %r8d
cmpw %r8w, 0x14(%rdi)
jge 0x68acc
testq %rcx, %rcx
je 0x68adb
pushq %rbp
movq %rsp, %rbp
movq 0x38(%rdi), %rdi
movq -0x8(%rdi,%rcx,8), %r8
testq %r8, %r8
je 0x68ab8
movq %rdx, %r10
xorl %eax, %eax
testq %r10, %r10
jle 0x68ab0
leaq -0x1(%r10), %r9
movq 0x38(%rsi), %r11
cmpq %r8, -0x8(%r11,%r10,8)
movq %r9, %r10
jne 0x68a92
incl %r9d
jmp 0x68ab3
xorl %r9d, %r9d
testl %r9d, %r9d
jle 0x68aca
leaq -0x1(%rcx), %rax
cmpq $0x1, %rcx
movq %rax, %rcx
jg 0x68a85
movl $0x1, %eax
popq %rbp
retq
jg 0x68ada
movzwl 0x16(%rdi), %r8d
cmpw 0x16(%rsi), %r8w
jle 0x68a78
retq
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: termCanDriveIndex
static int termCanDriveIndex(
  WhereTerm *pTerm,              /* WHERE clause term to check */
  struct SrcList_item *pSrc,     /* Table we are trying to access */
  Bitmask notReady               /* Tables in outer loops of the join */
){
  char aff;
  if( pTerm->leftCursor!=pSrc->iCursor ) return 0;
  if( (pTerm->eOperator & (WO_EQ|WO_IS))==0 ) return 0;
  if( (pTerm->prereqRight & notReady)!=0 ) return 0;
  if( pTerm->u.leftColumn<0 ) return 0;
  aff = pSrc->pTab->aCol[pTerm->u.leftColumn].affinity;
  if( !sqlite3IndexAffinityOk(pTerm->pExpr, aff) ) return 0;
  testcase( pTerm->pExpr->op==TK_IS );
  return 1;
}

// Assembly:
movl 0xc(%rdi), %ecx
xorl %eax, %eax
cmpl 0x44(%rsi), %ecx
jne 0x68b66
testb $-0x7e, 0x1a(%rdi)
je 0x68b66
testq %rdx, 0x28(%rdi)
je 0x68b67
retq
movslq 0x10(%rdi), %rcx
testq %rcx, %rcx
js 0x68b66
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x20(%rsi), %rax
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movb 0x29(%rax,%rcx), %bl
movq (%rdi), %rdi
callq 0x55a85
cmpb $0x41, %al
je 0x68ba6
movzbl %al, %eax
cmpl $0x42, %eax
jne 0x68baa
cmpb $0x42, %bl
sete %al
jmp 0x68bb0
movb $0x1, %al
jmp 0x68bb0
cmpb $0x43, %bl
setge %al
movzbl %al, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: whereUsablePartialIndex
static int whereUsablePartialIndex(int iTab, WhereClause *pWC, Expr *pWhere){
  int i;
  WhereTerm *pTerm;
  while( pWhere->op==TK_AND ){
    if( !whereUsablePartialIndex(iTab,pWC,pWhere->pLeft) ) return 0;
    pWhere = pWhere->pRight;
  }
  for(i=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
    Expr *pExpr = pTerm->pExpr;
    if( sqlite3ExprImpliesExpr(pExpr, pWhere, iTab) 
     && (!ExprHasProperty(pExpr, EP_FromJoin) || pExpr->iRightJoinTable==iTab)
    ){
      return 1;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movl %edi, %r14d
cmpb $0x48, (%rdx)
jne 0x68c52
movq 0x10(%rbx), %rdx
movl %r14d, %edi
movq %r15, %rsi
callq 0x68c1a
testl %eax, %eax
je 0x68c94
movq 0x18(%rbx), %rbx
cmpb $0x48, (%rbx)
je 0x68c36
movl 0x14(%r15), %r12d
testl %r12d, %r12d
jle 0x68c94
movq 0x20(%r15), %r13
movq (%r13), %r15
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x694df
testl %eax, %eax
je 0x68c8b
movl $0x1, %eax
testb $0x1, 0x4(%r15)
je 0x68c96
movswl 0x34(%r15), %ecx
cmpl %r14d, %ecx
je 0x68c96
addq $0x38, %r13
decl %r12d
jne 0x68c5f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: translateColumnToCopy
static void translateColumnToCopy(
  Vdbe *v,            /* The VDBE containing code to translate */
  int iStart,         /* Translate from this opcode to the end */
  int iTabCur,        /* OP_Column/OP_Rowid references to this table */
  int iRegister,      /* The first column is in this register */
  int bIncrRowid      /* If non-zero, transform OP_rowid to OP_AddImm(1) */
){
  VdbeOp *pOp = sqlite3VdbeGetOp(v, iStart);
  int iEnd = sqlite3VdbeCurrentAddr(v);
  for(; iStart<iEnd; iStart++, pOp++){
    if( pOp->p1!=iTabCur ) continue;
    if( pOp->opcode==OP_Column ){
      pOp->opcode = OP_Copy;
      pOp->p1 = pOp->p2 + iRegister;
      pOp->p2 = pOp->p3;
      pOp->p3 = 0;
    }else if( pOp->opcode==OP_Rowid ){
      if( bIncrRowid ){
        /* Increment the value stored in the P2 operand of the OP_Rowid. */
        pOp->opcode = OP_AddImm;
        pOp->p1 = pOp->p2;
        pOp->p2 = 1;
      }else{
        pOp->opcode = OP_Null;
        pOp->p1 = 0;
        pOp->p3 = 0;
      }
    }
  }
}

// Assembly:
movl %esi, %eax
testl %esi, %esi
jns 0x69d90
movl 0x3c(%rdi), %eax
decl %eax
movq (%rdi), %r9
cmpb $0x0, 0x51(%r9)
je 0x69da3
leaq 0x2b747(%rip), %rax     # 0x954e8
jmp 0x69db1
cltq
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
addq 0x8(%rdi), %rax
pushq %rbp
movq %rsp, %rbp
movl 0x3c(%rdi), %edi
subl %esi, %edi
jle 0x69e21
addq $0xc, %rax
xorl %esi, %esi
cmpl %edx, -0x8(%rax)
jne 0x69e19
movzbl -0xc(%rax), %r9d
cmpl $0x69, %r9d
je 0x69df6
cmpl $0x30, %r9d
jne 0x69e19
movb $0x1f, -0xc(%rax)
movl -0x4(%rax), %r9d
addl %ecx, %r9d
movl %r9d, -0x8(%rax)
movl (%rax), %r9d
movl %r9d, -0x4(%rax)
movl $0x0, (%rax)
jmp 0x69e19
testl %r8d, %r8d
je 0x69e10
movb $0x26, -0xc(%rax)
movl -0x4(%rax), %r9d
movl %r9d, -0x8(%rax)
movl $0x1, -0x4(%rax)
jmp 0x69e19
movb $0x1a, -0xc(%rax)
movl %esi, -0x8(%rax)
movl %esi, (%rax)
addq $0x18, %rax
decl %edi
jne 0x69dc2
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: explainAppendTerm
static void explainAppendTerm(
  StrAccum *pStr,             /* The text expression being built */
  int iTerm,                  /* Index of this term.  First is zero */
  const char *zColumn,        /* Name of the column */
  const char *zOp             /* Name of the operator */
){
  if( iTerm ) sqlite3StrAccumAppend(pStr, " AND ", 5);
  sqlite3StrAccumAppendAll(pStr, zColumn);
  sqlite3StrAccumAppend(pStr, zOp, 1);
  sqlite3StrAccumAppend(pStr, "?", 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
testl %esi, %esi
je 0x69e6e
movl 0x18(%rbx), %eax
leal 0x5(%rax), %ecx
cmpl 0x1c(%rbx), %ecx
jae 0x69e5a
movl %ecx, 0x18(%rbx)
movq 0x10(%rbx), %rcx
movb $0x20, 0x4(%rcx,%rax)
movl $0x444e4120, (%rcx,%rax) # imm = 0x444E4120
jmp 0x69e6e
leaq 0x15d03(%rip), %rsi     # 0x7fb64
movq %rbx, %rdi
movl $0x5, %edx
callq 0x1be64
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1be10
movl 0x18(%rbx), %eax
leal 0x1(%rax), %ecx
cmpl 0x1c(%rbx), %ecx
jae 0x69e93
movl %ecx, 0x18(%rbx)
movq 0x10(%rbx), %rcx
movb (%r14), %dl
movb %dl, (%rcx,%rax)
jmp 0x69ea3
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x1be64
movl 0x18(%rbx), %eax
leal 0x1(%rax), %ecx
cmpl 0x1c(%rbx), %ecx
jae 0x69ec4
movl %ecx, 0x18(%rbx)
movq 0x10(%rbx), %rcx
movb $0x3f, (%rcx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15ca2(%rip), %rsi     # 0x7fb6d
movq %rbx, %rdi
movl $0x1, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1be64
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: disableTerm
static void disableTerm(WhereLevel *pLevel, WhereTerm *pTerm){
  int nLoop = 0;
  while( pTerm
      && (pTerm->wtFlags & TERM_CODED)==0
      && (pLevel->iLeftJoin==0 || ExprHasProperty(pTerm->pExpr, EP_FromJoin))
      && (pLevel->notReady & pTerm->prereqAll)==0
  ){
    if( nLoop && (pTerm->wtFlags & TERM_LIKE)!=0 ){
      pTerm->wtFlags |= TERM_LIKECOND;
    }else{
      pTerm->wtFlags |= TERM_CODED;
    }
    if( pTerm->iParent<0 ) break;
    pTerm = &pTerm->pWC->a[pTerm->iParent];
    pTerm->nChild--;
    if( pTerm->nChild!=0 ) break;
    nLoop++;
  }
}

// Assembly:
testq %rsi, %rsi
je 0x6a10d
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0x4, %ecx
movzwl 0x1c(%rsi), %edx
testb $0x4, %dl
jne 0x6a10c
cmpl $0x0, (%rdi)
je 0x6a0c2
movq (%rsi), %r8
testb $0x1, 0x4(%r8)
je 0x6a10c
movq 0x30(%rsi), %r8
testq %r8, 0x50(%rdi)
jne 0x6a10c
btl $0xa, %edx
movl $0x200, %r8d            # imm = 0x200
cmovael %ecx, %r8d
subl $0x1, %eax
cmovbl %ecx, %r8d
orl %edx, %r8d
movw %r8w, 0x1c(%rsi)
movslq 0x8(%rsi), %r8
testq %r8, %r8
js 0x6a10c
movq 0x20(%rsi), %rdx
movq 0x20(%rdx), %rdx
imulq $0x38, %r8, %rsi
decb 0x1e(%rdx,%rsi)
jne 0x6a10c
addq %rdx, %rsi
testq %rdx, %rdx
jne 0x6a0aa
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: codeApplyAffinity
static void codeApplyAffinity(Parse *pParse, int base, int n, char *zAff){
  Vdbe *v = pParse->pVdbe;
  if( zAff==0 ){
    assert( pParse->db->mallocFailed );
    return;
  }
  assert( v!=0 );

  /* Adjust base and n to skip over SQLITE_AFF_BLOB entries at the beginning
  ** and end of the affinity string.
  */
  while( n>0 && zAff[0]==SQLITE_AFF_BLOB ){
    n--;
    base++;
    zAff++;
  }
  while( n>1 && zAff[n-1]==SQLITE_AFF_BLOB ){
    n--;
  }

  /* Code the OP_Affinity opcode if there is anything left to do. */
  if( n>0 ){
    sqlite3VdbeAddOp2(v, OP_Affinity, base, n);
    sqlite3VdbeChangeP4(v, -1, zAff, n);
    sqlite3ExprCacheAffinityChange(pParse, base, n);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rcx, %rcx
je 0x6a275
movl %edx, %r14d
movq %rdi, %rbx
testl %edx, %edx
jle 0x6a1f6
movl %r14d, %r15d
addq %rcx, %r15
leal (%r14,%rsi), %r12d
cmpb $0x41, (%rcx)
jne 0x6a1f6
leal -0x1(%r14), %eax
incl %esi
incq %rcx
cmpl $0x1, %r14d
movl %eax, %r14d
jg 0x6a1da
xorl %r14d, %r14d
jmp 0x6a1fc
movq %rcx, %r15
movl %esi, %r12d
movq 0x10(%rbx), %r13
movl %r14d, %ecx
testl %r14d, %r14d
movl $0x1, %eax
cmovlel %r14d, %eax
incl %r14d
cmpl $0x2, %ecx
jl 0x6a228
decl %r14d
cmpb $0x41, -0x1(%r15,%rcx)
leaq -0x1(%rcx), %rcx
je 0x6a212
jmp 0x6a22b
movl %eax, %r14d
testl %r14d, %r14d
jle 0x6a275
movq %r13, %rdi
movl $0x31, %esi
movl %r12d, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x3fa9e
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %r15, %rdx
movl %r14d, %ecx
callq 0x14ab9
movq %rbx, %rdi
movl %r12d, %esi
movl %r14d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5291f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq