LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3FixSelect
SQLITE_PRIVATE int sqlite3FixSelect(
  DbFixer *pFix,       /* Context of the fixation */
  Select *pSelect      /* The SELECT statement to be fixed to one database */
){
  while( pSelect ){
    if( sqlite3FixExprList(pFix, pSelect->pEList) ){
      return 1;
    }
    if( sqlite3FixSrcList(pFix, pSelect->pSrc) ){
      return 1;
    }
    if( sqlite3FixExpr(pFix, pSelect->pWhere) ){
      return 1;
    }
    if( sqlite3FixExprList(pFix, pSelect->pGroupBy) ){
      return 1;
    }
    if( sqlite3FixExpr(pFix, pSelect->pHaving) ){
      return 1;
    }
    if( sqlite3FixExprList(pFix, pSelect->pOrderBy) ){
      return 1;
    }
    if( sqlite3FixExpr(pFix, pSelect->pLimit) ){
      return 1;
    }
    if( pSelect->pWith ){
      int i;
      for(i=0; i<pSelect->pWith->nCte; i++){
        if( sqlite3FixSelect(pFix, pSelect->pWith->a[i].pSelect) ){
          return 1;
        }
      }
    }
    pSelect = pSelect->pPrior;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rbx
pushq $-0x1
popq %r13
testq %r14, %r14
je 0x26ff57
movq 0x20(%r14), %rsi
movq %r15, %rdi
callq 0x26fffa
testl %eax, %eax
jne 0x26ff59
movq 0x28(%r14), %rsi
movq %r15, %rdi
callq 0x26f99b
testl %eax, %eax
jne 0x26ff59
movq 0x30(%r14), %rsi
movq %r15, %rdi
callq 0x26ff6a
testl %eax, %eax
jne 0x26ff59
movq 0x38(%r14), %rsi
movq %r15, %rdi
callq 0x26fffa
testl %eax, %eax
jne 0x26ff59
movq 0x40(%r14), %rsi
movq %r15, %rdi
callq 0x26ff6a
testl %eax, %eax
jne 0x26ff59
movq 0x48(%r14), %rsi
movq %r15, %rdi
callq 0x26fffa
testl %eax, %eax
jne 0x26ff59
movq 0x60(%r14), %rsi
movq %r15, %rdi
callq 0x26ff6a
testl %eax, %eax
jne 0x26ff59
cmpq $0x0, 0x68(%r14)
je 0x26ff4e
movq %r13, %rbp
pushq $0x20
popq %r12
movq 0x68(%r14), %rax
movslq (%rax), %rcx
incq %rbp
cmpq %rcx, %rbp
jge 0x26ff4e
movq (%rax,%r12), %rsi
addq $0x20, %r12
movq %r15, %rdi
callq 0x26fe82
testl %eax, %eax
je 0x26ff29
jmp 0x26ff59
movq 0x50(%r14), %r14
jmp 0x26fe9a
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/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,
                      pParse->db->aLimit[SQLITE_LIMIT_LENGTH]);
  if( pIdx->aColExpr ){
    sqlite3_str_appendf(&errMsg, "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 ) sqlite3_str_append(&errMsg, ", ", 2);
      sqlite3_str_appendall(&errMsg, pTab->zName);
      sqlite3_str_append(&errMsg, ".", 1);
      sqlite3_str_appendall(&errMsg, zCol);
    }
  }
  zErr = sqlite3StrAccumFinish(&errMsg);
  sqlite3HaltConstraint(pParse,
    IsPrimaryKeyIndex(pIdx) ? SQLITE_CONSTRAINT_PRIMARYKEY
                            : SQLITE_CONSTRAINT_UNIQUE,
    onError, zErr, P4_DYNAMIC, P5_ConstraintUnique);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq 0x18(%rdx), %rbx
movq %rdi, 0x30(%rsp)
movq (%rdi), %rax
movl 0x7c(%rax), %ecx
andq $0x0, 0x18(%rsp)
movq %rax, 0x10(%rsp)
andl $0x0, 0x20(%rsp)
movl %ecx, 0x24(%rsp)
andl $0x0, 0x28(%rsp)
andw $0x0, 0x2c(%rsp)
movl %esi, 0xc(%rsp)
cmpq $0x0, 0x50(%rdx)
je 0x2702e8
movq (%r14), %rdx
leaq 0x1085b6(%rip), %rsi    # 0x378846
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x221594
leaq 0x10(%rsp), %rdi
callq 0x221200
movzwl 0x63(%r14), %ecx
andl $0x3, %ecx
xorl %esi, %esi
cmpw $0x2, %cx
setne %sil
shll $0x9, %esi
addl $0x613, %esi            # imm = 0x613
pushq $-0x7
popq %r8
pushq $0x2
popq %r9
movq 0x30(%rsp), %rdi
movl 0xc(%rsp), %edx
movq %rax, %rcx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2675ca
xorl %r12d, %r12d
leaq 0x10(%rsp), %r15
pushq $0x1
popq %r13
movzwl 0x5e(%r14), %eax
cmpq %rax, %r12
jae 0x27029c
movq 0x8(%rbx), %rax
movq 0x8(%r14), %rcx
movswq (%rcx,%r12,2), %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rbp
testq %r12, %r12
je 0x27032a
movq %r15, %rdi
leaq 0xd565f(%rip), %rsi     # 0x345981
pushq $0x2
popq %rdx
callq 0x220f53
movq (%rbx), %rsi
movq %r15, %rdi
callq 0x221073
movq %r15, %rdi
leaq 0xf4277(%rip), %rsi     # 0x3645b6
movl %r13d, %edx
callq 0x220f53
movq %r15, %rdi
movq %rbp, %rsi
callq 0x221073
incq %r12
jmp 0x2702f4
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ExprIfFalseDup
SQLITE_PRIVATE void sqlite3ExprIfFalseDup(Parse *pParse, Expr *pExpr, int dest,int jumpIfNull){
  sqlite3 *db = pParse->db;
  Expr *pCopy = sqlite3ExprDup(db, pExpr, 0);
  if( db->mallocFailed==0 ){
    sqlite3ExprIfFalse(pParse, pCopy, dest, jumpIfNull);
  }
  sqlite3ExprDelete(db, pCopy);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %r15
movq (%rdi), %rbx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x267197
movq %rax, %r14
cmpb $0x0, 0x61(%rbx)
jne 0x270389
pushq $0x10
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x26726e
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x24b639
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3IndexAffinityStr
SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(sqlite3 *db, Index *pIdx){
  if( !pIdx->zColAff ){
    /* The first time a column affinity string for a particular index is
    ** required, it is allocated and populated here. It is then stored as
    ** a member of the Index structure for subsequent use.
    **
    ** The column affinity string will eventually be deleted by
    ** sqliteDeleteIndex() when the Index structure itself is cleaned
    ** up.
    */
    int n;
    Table *pTab = pIdx->pTable;
    pIdx->zColAff = (char *)sqlite3DbMallocRaw(0, pIdx->nColumn+1);
    if( !pIdx->zColAff ){
      sqlite3OomFault(db);
      return 0;
    }
    for(n=0; n<pIdx->nColumn; n++){
      i16 x = pIdx->aiColumn[n];
      char aff;
      if( x>=0 ){
        aff = pTab->aCol[x].affinity;
      }else if( x==XN_ROWID ){
        aff = SQLITE_AFF_INTEGER;
      }else{
        assert( x==XN_EXPR );
        assert( pIdx->aColExpr!=0 );
        aff = sqlite3ExprAffinity(pIdx->aColExpr->a[n].pExpr);
      }
      if( aff<SQLITE_AFF_BLOB ) aff = SQLITE_AFF_BLOB;
      if( aff>SQLITE_AFF_NUMERIC) aff = SQLITE_AFF_NUMERIC;
      pIdx->zColAff[n] = aff;
    }
    pIdx->zColAff[n] = 0;
  }

  return pIdx->zColAff;
}

// Assembly:
movq 0x20(%rsi), %rax
testq %rax, %rax
je 0x2703a8
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rsi), %r15
movzwl 0x60(%rsi), %edi
incq %rdi
callq 0x21f6df
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x27044e
pushq $0x4
popq %r12
xorl %r14d, %r14d
pushq $0x41
popq %rbp
pushq $0x43
popq %r13
movzwl 0x60(%rbx), %eax
cmpq %rax, %r14
jae 0x27043f
movq 0x8(%rbx), %rax
movswq (%rax,%r14,2), %rax
testq %rax, %rax
js 0x270405
movq 0x8(%r15), %rcx
shlq $0x5, %rax
movb 0x19(%rcx,%rax), %al
jmp 0x27041c
cmpw $-0x1, %ax
je 0x27041a
movq 0x50(%rbx), %rax
movq (%rax,%r12,2), %rdi
callq 0x267d81
jmp 0x27041c
movb $0x44, %al
cmpb $0x42, %al
jge 0x270424
movl %ebp, %eax
jmp 0x270427
movzbl %al, %eax
cmpb $0x43, %al
jl 0x27042e
movl %r13d, %eax
movq 0x20(%rbx), %rcx
movb %al, (%rcx,%r14)
incq %r14
addq $0xc, %r12
jmp 0x2703e0
movq 0x20(%rbx), %rax
movb $0x0, (%rax,%r14)
movq 0x20(%rbx), %rax
jmp 0x270458
movq %r14, %rdi
callq 0x224bb1
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_O2/genometools[P]genometools/src/external/sqlite-3.33.0/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 && pTable->pSchema==pTrigger->pSchema) || iDb==1 );
#ifndef SQLITE_OMIT_AUTHORIZATION
  if( pTable ){
    int code = SQLITE_DROP_TRIGGER;
    const char *zDb = db->aDb[iDb].zDbSName;
    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.
  */
  if( (v = sqlite3GetVdbe(pParse))!=0 ){
    sqlite3NestedParse(pParse,
       "DELETE FROM %Q." DFLT_SCHEMA_TABLE " WHERE name=%Q AND type='trigger'",
       db->aDb[iDb].zDbSName, pTrigger->zName
    );
    sqlite3ChangeCookie(pParse, iDb);
    sqlite3VdbeAddOp4(v, OP_DropTrigger, iDb, 0, 0, pTrigger->zName, 0);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r12
movq 0x28(%rsi), %rsi
movq %r12, %rdi
callq 0x226e9e
movl %eax, %ebp
movq %rbx, %rdi
callq 0x24ba47
movslq %ebp, %r15
testq %rax, %rax
je 0x270677
movq 0x20(%r12), %rcx
movq %r15, %rdx
shlq $0x5, %rdx
movq (%rcx,%rdx), %r13
xorl %ecx, %ecx
cmpl $0x1, %r15d
setne %cl
leal 0xe(%rcx,%rcx), %esi
movq (%rbx), %rdx
movq (%rax), %rcx
movq %r14, %rdi
movq %r13, %r8
callq 0x26a651
testl %eax, %eax
jne 0x2706d2
cmpl $0x1, %ebp
leaq 0x1063dc(%rip), %rax    # 0x376a34
leaq 0x1062f4(%rip), %rdx    # 0x376953
cmoveq %rax, %rdx
pushq $0x9
popq %rsi
movq %r14, %rdi
xorl %ecx, %ecx
movq %r13, %r8
callq 0x26a651
testl %eax, %eax
jne 0x2706d2
movq %r14, %rdi
callq 0x2645be
testq %rax, %rax
je 0x2706d2
movq %rax, %r13
movq 0x20(%r12), %rax
movq %r15, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rdx
movq (%rbx), %rcx
leaq 0x1083c7(%rip), %rsi    # 0x378a68
movq %r14, %rdi
xorl %eax, %eax
callq 0x26ac90
movq %r14, %rdi
movl %r15d, %esi
callq 0x26add3
movq (%rbx), %r9
andl $0x0, (%rsp)
movq %r13, %rdi
movl $0x91, %esi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x264609
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: destroyRootPage
static void destroyRootPage(Parse *pParse, int iTable, int iDb){
  Vdbe *v = sqlite3GetVdbe(pParse);
  int r1 = sqlite3GetTempReg(pParse);
  if( iTable<2 ) sqlite3ErrorMsg(pParse, "corrupt schema");
  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_schema 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." DFLT_SCHEMA_TABLE
     " SET rootpage=%d WHERE #%d AND rootpage=#%d",
     pParse->db->aDb[iDb].zDbSName, iTable, r1, r1);
#endif
  sqlite3ReleaseTempReg(pParse, r1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movl %esi, %r14d
movq %rdi, %rbx
callq 0x2645be
movq %rax, %r12
movq %rbx, %rdi
callq 0x267d61
movl %eax, %ebp
cmpl $0x1, %r14d
jg 0x27071b
leaq 0x108395(%rip), %rsi    # 0x378aa6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x226dce
movq %r12, %rdi
movl $0x88, %esi
movl %r14d, %edx
movl %ebp, %ecx
movl %r15d, %r8d
callq 0x24d51f
movq 0xa0(%rbx), %rax
testq %rax, %rax
cmoveq %rbx, %rax
movb $0x1, 0x21(%rax)
movq (%rbx), %rax
movq 0x20(%rax), %rax
movslq %r15d, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rdx
leaq 0x10835a(%rip), %rsi    # 0x378ab5
movq %rbx, %rdi
movl %r14d, %ecx
movl %ebp, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x26ac90
testl %ebp, %ebp
je 0x270789
movzbl 0x1f(%rbx), %eax
cmpq $0x7, %rax
ja 0x270789
leal 0x1(%rax), %ecx
movb %cl, 0x1f(%rbx)
movl %ebp, 0xd4(%rbx,%rax,4)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: unsetJoinExpr
static void unsetJoinExpr(Expr *p, int iTable){
  while( p ){
    if( ExprHasProperty(p, EP_FromJoin)
     && (iTable<0 || p->iRightJoinTable==iTable) ){
      ExprClearProperty(p, EP_FromJoin);
    }
    if( p->op==TK_FUNCTION && p->x.pList ){
      int i;
      for(i=0; i<p->x.pList->nExpr; i++){
        unsetJoinExpr(p->x.pList->a[i].pExpr, iTable);
      }
    }
    unsetJoinExpr(p->pLeft, iTable);
    p = p->pRight;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
pushq $0x8
popq %r15
testq %r14, %r14
je 0x27080b
movl 0x4(%r14), %eax
testb $0x1, %al
je 0x2707c5
testl %ebx, %ebx
js 0x2707be
movswl 0x34(%r14), %ecx
cmpl %ebx, %ecx
jne 0x2707c5
andl $-0x2, %eax
movl %eax, 0x4(%r14)
cmpb $-0x57, (%r14)
jne 0x2707fa
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x2707fa
movq %r15, %r12
xorl %r13d, %r13d
movslq (%rax), %rcx
cmpq %rcx, %r13
jge 0x2707fa
movq (%rax,%r12), %rdi
movl %ebx, %esi
callq 0x270792
incq %r13
movq 0x20(%r14), %rax
addq $0x18, %r12
jmp 0x2707da
movq 0x10(%r14), %rdi
movl %ebx, %esi
callq 0x270792
movq 0x18(%r14), %r14
jmp 0x2707a4
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3KeyInfoFromExprList
SQLITE_PRIVATE KeyInfo *sqlite3KeyInfoFromExprList(
  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++){
      pInfo->aColl[i-iStart] = sqlite3ExprNNCollSeq(pParse, pItem->pExpr);
      pInfo->aSortFlags[i-iStart] = pItem->sortFlags;
    }
  }
  return pInfo;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movq (%rdi), %rdi
movslq (%rsi), %r12
movl %r12d, %esi
subl %edx, %esi
leal 0x1(%rcx), %edx
callq 0x264994
movq %rax, %r14
testq %rax, %rax
je 0x2709ef
movl %ebp, %eax
imulq $0x18, %rax, %rax
addq %rax, %r15
addq $0x8, %r15
movslq %ebp, %r13
xorl %ebp, %ebp
movq %r13, %rax
addq %rbp, %rax
cmpq %r12, %rax
jge 0x2709ef
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x2765b9
movq %rax, 0x20(%r14,%rbp,8)
movb 0x10(%r15), %al
movq 0x18(%r14), %rcx
movb %al, (%rcx,%rbp)
addq $0x18, %r15
incq %rbp
jmp 0x2709c0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3WhereOrderByLimitOptLabel
SQLITE_PRIVATE int sqlite3WhereOrderByLimitOptLabel(WhereInfo *pWInfo){
  WhereLevel *pInner;
  if( !pWInfo->bOrderedInnerLoop ){
    /* The ORDER BY LIMIT optimization does not apply.  Jump to the
    ** continuation of the inner-most loop. */
    return pWInfo->iContinue;
  }
  pInner = &pWInfo->a[pWInfo->nLevel-1];
  assert( pInner->addrNxt!=0 );
  return pInner->addrNxt;
}

// Assembly:
testb $0x4, 0x44(%rdi)
jne 0x274241
addq $0x30, %rdi
jmp 0x274253
movzbl 0x40(%rdi), %eax
imulq $0x60, %rax, %rax
addq %rax, %rdi
addq $0x348, %rdi            # imm = 0x348
movl (%rdi), %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ExprAnalyzeAggregates
SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext *pNC, Expr *pExpr){
  Walker w;
  w.xExprCallback = analyzeAggregate;
  w.xSelectCallback = sqlite3WalkerDepthIncrease;
  w.xSelectCallback2 = sqlite3WalkerDepthDecrease;
  w.walkerDepth = 0;
  w.u.pNC = pNC;
  w.pParse = 0;
  assert( pNC->pSrcList!=0 );
  sqlite3WalkExpr(&w, pExpr);
}

// Assembly:
subq $0x38, %rsp
leaq 0x93f8(%rip), %rcx      # 0x27e603
leaq 0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
leaq 0x5a6(%rip), %rcx       # 0x2757c1
movq %rcx, 0x10(%rax)
leaq 0x5a1(%rip), %rcx       # 0x2757c7
movq %rcx, 0x18(%rax)
andl $0x0, 0x20(%rax)
movq %rdi, 0x28(%rax)
andq $0x0, (%rax)
movq %rax, %rdi
callq 0x267f87
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/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->pFExpr->x.pList;
    assert( !ExprHasProperty(pF->pFExpr, EP_xIsSelect) );
    sqlite3VdbeAddOp2(v, OP_AggFinal, pF->iMem, pList ? pList->nExpr : 0);
    sqlite3VdbeAppendP4(v, pF->pFunc, P4_FUNCDEF);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq 0x10(%rdi), %r14
movq 0x30(%rsi), %r15
xorl %r12d, %r12d
pushq $-0x8
popq %rbp
cmpl 0x38(%rbx), %r12d
jge 0x27556f
movq (%r15), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x275545
movl (%rax), %ecx
jmp 0x275547
xorl %ecx, %ecx
movl 0x10(%r15), %edx
movq %r14, %rdi
movl $0x9d, %esi
callq 0x24d51a
movq 0x8(%r15), %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x26495f
incl %r12d
addq $0x18, %r15
jmp 0x27552f
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/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;
  if( pParse->nErr || pParse->db->mallocFailed ) 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->pFExpr;
      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 = sqlite3KeyInfoFromExprList(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 0x2755ab
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
cmpl $0x0, 0x30(%rdi)
jne 0x27559d
movq (%r14), %rax
cmpb $0x0, 0x61(%rax)
je 0x2755ac
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movq 0x10(%r14), %r15
movl 0x10(%rsi), %ecx
movl 0x14(%rsi), %r8d
pushq $0x48
popq %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0x24d51f
movq 0x30(%rbx), %r13
addq $0x14, %r13
leaq 0x103a23(%rip), %r12    # 0x378ff9
xorl %ebp, %ebp
cmpl 0x38(%rbx), %ebp
jge 0x27559d
cmpl $0x0, (%r13)
js 0x275634
movq -0x14(%r13), %rax
movq 0x20(%rax), %rsi
testq %rsi, %rsi
je 0x275622
cmpl $0x1, (%rsi)
jne 0x275622
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x270980
movl (%r13), %edx
movl $0xfffffff7, (%rsp)     # imm = 0xFFFFFFF7
movq %r15, %rdi
pushq $0x64
popq %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x264609
jmp 0x275634
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x226dce
orl $-0x1, (%r13)
incl %ebp
addq $0x18, %r13
jmp 0x2755d8
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: exprListAppendList
static ExprList *exprListAppendList(
  Parse *pParse,          /* Parsing context */
  ExprList *pList,        /* List to which to append. Might be NULL */
  ExprList *pAppend,      /* List of values to append. Might be NULL */
  int bIntToNull
){
  if( pAppend ){
    int i;
    int nInit = pList ? pList->nExpr : 0;
    for(i=0; i<pAppend->nExpr; i++){
      Expr *pDup = sqlite3ExprDup(pParse->db, pAppend->a[i].pExpr, 0);
      assert( pDup==0 || !ExprHasProperty(pDup, EP_MemToken) );
      if( bIntToNull && pDup ){
        int iDummy;
        Expr *pSub;
        for(pSub=pDup; ExprHasProperty(pSub, EP_Skip); pSub=pSub->pLeft){
          assert( pSub );
        }
        if( sqlite3ExprIsInteger(pSub, &iDummy) ){
          pSub->op = TK_NULL;
          pSub->flags &= ~(EP_IntValue|EP_IsTrue|EP_IsFalse);
          pSub->u.zToken = 0;
        }
      }
      pList = sqlite3ExprListAppend(pParse, pList, pDup);
      if( pList ) pList->a[nInit+i].sortFlags = pAppend->a[i].sortFlags;
    }
  }
  return pList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
testq %rdx, %rdx
je 0x275732
movl %ecx, %r13d
movq %rdx, %r15
testq %rbx, %rbx
je 0x27566f
movslq (%rbx), %rax
movq %rax, (%rsp)
jmp 0x275677
movq $0x0, (%rsp)
leaq 0x8(%r15), %rax
movq %rax, 0x8(%rsp)
xorl %r14d, %r14d
movq %r15, 0x18(%rsp)
movslq (%r15), %rax
cmpq %rax, %r14
jge 0x275732
movq 0x10(%rsp), %rax
movq (%rax), %rdi
imulq $0x18, %r14, %rbp
movq 0x8(%rsp), %rax
movq (%rax,%rbp), %rsi
xorl %edx, %edx
callq 0x267197
movq %rax, %r12
testl %r13d, %r13d
je 0x2756fb
testq %r12, %r12
je 0x2756fb
movl %r13d, %r15d
movq %r12, %r13
testb $0x10, 0x5(%r13)
je 0x2756d0
movq 0x10(%r13), %r13
jmp 0x2756c3
movq %r13, %rdi
leaq 0x24(%rsp), %rsi
callq 0x26f334
testl %eax, %eax
je 0x2756f3
movb $0x77, (%r13)
andl $0xcffffbff, 0x4(%r13)  # imm = 0xCFFFFBFF
andq $0x0, 0x8(%r13)
movl %r15d, %r13d
movq 0x18(%rsp), %r15
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x25bc95
movq %rax, %rbx
testq %rax, %rax
je 0x27572a
addq 0x8(%rsp), %rbp
movb 0x10(%rbp), %al
movq (%rsp), %rcx
addq %r14, %rcx
imulq $0x18, %rcx, %rcx
movb %al, 0x18(%rbx,%rcx)
incq %r14
jmp 0x275688
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: selectWindowRewriteEList
static void selectWindowRewriteEList(
  Parse *pParse,
  Window *pWin,
  SrcList *pSrc,
  ExprList *pEList,               /* Rewrite expressions in this list */
  Table *pTab,
  ExprList **ppSub                /* IN/OUT: Sub-select expression-list */
){
  Walker sWalker;
  WindowRewrite sRewrite;

  assert( pWin!=0 );
  memset(&sWalker, 0, sizeof(Walker));
  memset(&sRewrite, 0, sizeof(WindowRewrite));

  sRewrite.pSub = *ppSub;
  sRewrite.pWin = pWin;
  sRewrite.pSrc = pSrc;
  sRewrite.pTab = pTab;

  sWalker.pParse = pParse;
  sWalker.xExprCallback = selectWindowRewriteExprCb;
  sWalker.xSelectCallback = selectWindowRewriteSelectCb;
  sWalker.u.pRewrite = &sRewrite;

  (void)sqlite3WalkExprList(&sWalker, pEList);

  *ppSub = sRewrite.pSub;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbx
xorps %xmm0, %xmm0
leaq 0x28(%rsp), %rax
movq %rsp, %r14
andq $0x0, 0x20(%r14)
movups %xmm0, 0x18(%rax)
movq (%r9), %r9
movq %r9, 0x10(%r14)
movq %rsi, (%r14)
movq %rdx, 0x8(%r14)
movq %r8, 0x18(%r14)
movq %rdi, (%rax)
leaq 0xd4(%rip), %rdx        # 0x275852
movq %rdx, 0x8(%rax)
leaq 0x26c(%rip), %rdx       # 0x2759f5
movq %rdx, 0x10(%rax)
movq %r14, 0x28(%rax)
movq %rax, %rdi
movq %rcx, %rsi
callq 0x268181
movq 0x10(%r14), %rax
movq %rax, (%rbx)
addq $0x58, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3WindowExtraAggFuncDepth
static int sqlite3WindowExtraAggFuncDepth(Walker *pWalker, Expr *pExpr){
  if( pExpr->op==TK_AGG_FUNCTION
   && pExpr->op2>=pWalker->walkerDepth
  ){
    pExpr->op2++;
  }
  return WRC_Continue;
}

// Assembly:
cmpb $-0x5b, (%rsi)
jne 0x2757be
movzbl 0x2(%rsi), %eax
cmpl %eax, 0x20(%rdi)
jg 0x2757be
incb %al
movb %al, 0x2(%rsi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: agginfoPersistExprCb
static int agginfoPersistExprCb(Walker *pWalker, Expr *pExpr){
  if( ALWAYS(!ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced))
   && pExpr->pAggInfo!=0
  ){
    AggInfo *pAggInfo = pExpr->pAggInfo;
    int iAgg = pExpr->iAgg;
    Parse *pParse = pWalker->pParse;
    sqlite3 *db = pParse->db;
    assert( pExpr->op==TK_AGG_COLUMN || pExpr->op==TK_AGG_FUNCTION );
    if( pExpr->op==TK_AGG_COLUMN ){
      assert( iAgg>=0 && iAgg<pAggInfo->nColumn );
      if( pAggInfo->aCol[iAgg].pCExpr==pExpr ){
        pExpr = sqlite3ExprDup(db, pExpr, 0);
        if( pExpr ){
          pAggInfo->aCol[iAgg].pCExpr = pExpr;
          pParse->pConstExpr =
             sqlite3ExprListAppend(pParse, pParse->pConstExpr, pExpr);
        }
      }
    }else{
      assert( iAgg>=0 && iAgg<pAggInfo->nFunc );
      if( pAggInfo->aFunc[iAgg].pFExpr==pExpr ){
        pExpr = sqlite3ExprDup(db, pExpr, 0);
        if( pExpr ){
          pAggInfo->aFunc[iAgg].pFExpr = pExpr;
          pParse->pConstExpr =
             sqlite3ExprListAppend(pParse, pParse->pConstExpr, pExpr);
        }
      }
    }
  }
  return WRC_Continue;
}

// Assembly:
testb $0x60, 0x5(%rsi)
jne 0x27584f
pushq %r15
pushq %r14
pushq %rbx
movq 0x38(%rsi), %r14
testq %r14, %r14
je 0x27584a
movswq 0x32(%rsi), %r15
movq (%rdi), %rbx
movq (%rbx), %rdi
cmpb $-0x5a, (%rsi)
jne 0x275815
movq 0x20(%r14), %rax
shlq $0x5, %r15
cmpq %rsi, 0x8(%rax,%r15)
jne 0x27584a
xorl %edx, %edx
callq 0x267197
testq %rax, %rax
je 0x27584a
movq 0x20(%r14), %rcx
movq %rax, 0x8(%rcx,%r15)
jmp 0x275837
movq 0x30(%r14), %rax
imulq $0x18, %r15, %r15
cmpq %rsi, (%rax,%r15)
jne 0x27584a
xorl %edx, %edx
callq 0x267197
testq %rax, %rax
je 0x27584a
movq 0x30(%r14), %rcx
movq %rax, (%rcx,%r15)
movq 0x58(%rbx), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x25bc95
movq %rax, 0x58(%rbx)
popq %rbx
popq %r14
popq %r15
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: selectWindowRewriteSelectCb
static int selectWindowRewriteSelectCb(Walker *pWalker, Select *pSelect){
  struct WindowRewrite *p = pWalker->u.pRewrite;
  Select *pSave = p->pSubSelect;
  if( pSave==pSelect ){
    return WRC_Continue;
  }else{
    p->pSubSelect = pSelect;
    sqlite3WalkSelect(pWalker, pSelect);
    p->pSubSelect = pSave;
  }
  return WRC_Prune;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x28(%rdi), %rbx
movq 0x20(%rbx), %r14
cmpq %rsi, %r14
je 0x275a18
movq %rsi, 0x20(%rbx)
callq 0x268025
movq %r14, 0x20(%rbx)
pushq $0x1
popq %rax
jmp 0x275a1a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3SrcListEnlarge
SQLITE_PRIVATE SrcList *sqlite3SrcListEnlarge(
  Parse *pParse,     /* Parsing context into which errors are reported */
  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( (u32)pSrc->nSrc+nExtra>pSrc->nAlloc ){
    SrcList *pNew;
    sqlite3_int64 nAlloc = 2*(sqlite3_int64)pSrc->nSrc+nExtra;
    sqlite3 *db = pParse->db;

    if( pSrc->nSrc+nExtra>=SQLITE_MAX_SRCLIST ){
      sqlite3ErrorMsg(pParse, "too many FROM clause terms, max: %d",
                      SQLITE_MAX_SRCLIST);
      return 0;
    }
    if( nAlloc>SQLITE_MAX_SRCLIST ) nAlloc = SQLITE_MAX_SRCLIST;
    pNew = sqlite3DbRealloc(db, pSrc,
               sizeof(*pSrc) + (nAlloc-1)*sizeof(pSrc->a[0]) );
    if( pNew==0 ){
      assert( db->mallocFailed );
      return 0;
    }
    pSrc = pNew;
    pSrc->nAlloc = nAlloc;
  }

  /* 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 += 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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
movl (%rsi), %ecx
leal (%rcx,%r14), %eax
cmpl 0x4(%rsi), %eax
jbe 0x275a5e
cmpl $0xc8, %eax
jl 0x275a63
leaq 0x103175(%rip), %rsi    # 0x378bc0
xorl %ebx, %ebx
movl $0xc8, %edx
xorl %eax, %eax
callq 0x226dce
jmp 0x275b0a
movslq %r14d, %r12
jmp 0x275a9b
movslq %ecx, %rax
movq (%rdi), %rdi
movslq %r14d, %r12
leaq (%r12,%rax,2), %rax
movl $0xc8, %r15d
cmpq %r15, %rax
cmovlq %rax, %r15
imulq $0x70, %r15, %rdx
orq $0x8, %rdx
movq %rbx, %rsi
callq 0x22d1b5
testq %rax, %rax
je 0x275b08
movq %rax, %rbx
movl %r15d, 0x4(%rax)
movl (%rax), %ecx
leaq 0x8(%rbx), %rax
movslq %ecx, %r9
movslq %ebp, %r15
imulq $0x70, %r9, %r10
addq $-0x68, %r10
imulq $0x70, %r12, %rdx
leaq (%rbx,%rdx), %r11
pushq $0xe
popq %r8
cmpq %r15, %r9
jle 0x275ad5
decq %r9
leaq (%r11,%r10), %rdi
leaq (%rbx,%r10), %rsi
movq %r8, %rcx
rep  movsq (%rsi), %es:(%rdi)
addq $-0x70, %r10
jmp 0x275ab9
addl %r14d, (%rbx)
imulq $0x70, %r15, %r12
addq %r12, %rax
movq %rax, %rdi
xorl %esi, %esi
callq 0x17380
addl %r15d, %r14d
movslq %r14d, %rax
leaq (%r12,%rbx), %rcx
addq $0x48, %rcx
cmpq %rax, %r15
jge 0x275b0a
orl $-0x1, (%rcx)
incq %r15
addq $0x70, %rcx
jmp 0x275af7
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: substSelect
static void substSelect(
  SubstContext *pSubst, /* Description of the substitution */
  Select *p,            /* SELECT statement in which to make substitutions */
  int doPrior           /* Do substitutes on p->pPrior too */
){
  SrcList *pSrc;
  struct SrcList_item *pItem;
  int i;
  if( !p ) return;
  do{
    substExprList(pSubst, p->pEList);
    substExprList(pSubst, p->pGroupBy);
    substExprList(pSubst, p->pOrderBy);
    p->pHaving = substExpr(pSubst, p->pHaving);
    p->pWhere = substExpr(pSubst, p->pWhere);
    pSrc = p->pSrc;
    assert( pSrc!=0 );
    for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){
      substSelect(pSubst, pItem->pSelect, 1);
      if( pItem->fg.isTabFunc ){
        substExprList(pSubst, pItem->u1.pFuncArg);
      }
    }
  }while( doPrior && (p = p->pPrior)!=0 );
}

// Assembly:
testq %rsi, %rsi
je 0x275bd5
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rbp
movq 0x20(%r14), %rsi
movq %r15, %rdi
callq 0x275bd6
movq 0x38(%r14), %rsi
movq %r15, %rdi
callq 0x275bd6
movq 0x48(%r14), %rsi
movq %r15, %rdi
callq 0x275bd6
movq 0x40(%r14), %rsi
movq %r15, %rdi
callq 0x275c1b
movq %rax, 0x40(%r14)
movq 0x30(%r14), %rsi
movq %r15, %rdi
callq 0x275c1b
movq %rax, 0x30(%r14)
movq 0x28(%r14), %r12
movl (%r12), %r13d
addq $0x30, %r12
testl %r13d, %r13d
jle 0x275bb6
movq (%r12), %rsi
movq %r15, %rdi
movl %ebp, %edx
callq 0x275b16
testb $0x4, 0x15(%r12)
je 0x275bad
movq 0x38(%r12), %rsi
movq %r15, %rdi
callq 0x275bd6
decl %r13d
addq $0x70, %r12
jmp 0x275b85
testl %ebx, %ebx
je 0x275bc7
movq 0x50(%r14), %r14
testq %r14, %r14
jne 0x275b35
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: substExprList
static void substExprList(
  SubstContext *pSubst, /* Description of the substitution */
  ExprList *pList       /* List to scan and in which to make substitutes */
){
  int i;
  if( pList==0 ) return;
  for(i=0; i<pList->nExpr; i++){
    pList->a[i].pExpr = substExpr(pSubst, pList->a[i].pExpr);
  }
}

// Assembly:
testq %rsi, %rsi
je 0x275c1a
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsi), %r15
xorl %r12d, %r12d
movslq (%rbx), %rax
cmpq %rax, %r12
jge 0x275c0f
movq (%r15), %rsi
movq %r14, %rdi
callq 0x275c1b
movq %rax, (%r15)
incq %r12
addq $0x18, %r15
jmp 0x275bf0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: recomputeColumnsUsedExpr
static int recomputeColumnsUsedExpr(Walker *pWalker, Expr *pExpr){
  struct SrcList_item *pItem;
  if( pExpr->op!=TK_COLUMN ) return WRC_Continue;
  pItem = pWalker->u.pSrcItem;
  if( pItem->iCursor!=pExpr->iTable ) return WRC_Continue;
  if( pExpr->iColumn<0 ) return WRC_Continue;
  pItem->colUsed |= sqlite3ExprColUsed(pExpr);
  return WRC_Continue;
}

// Assembly:
cmpb $-0x5c, (%rsi)
jne 0x275e44
pushq %rbx
movq 0x28(%rdi), %rbx
movl 0x40(%rbx), %eax
cmpl 0x2c(%rsi), %eax
jne 0x275e43
cmpw $0x0, 0x30(%rsi)
js 0x275e43
movq %rsi, %rdi
callq 0x26d17b
orq %rax, 0x58(%rbx)
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/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 );
  /* iCol must be less than p->pEList->nExpr.  Otherwise an error would
  ** have been thrown during name resolution and we would not have gotten
  ** this far */
  if( pRet==0 && ALWAYS(iCol<p->pEList->nExpr) ){
    pRet = sqlite3ExprCollSeq(pParse, p->pEList->a[iCol].pExpr);
  }
  return pRet;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x50(%rsi), %rsi
testq %rsi, %rsi
je 0x275ec2
movq %rbx, %rdi
movl %ebp, %edx
callq 0x275e9e
testq %rax, %rax
jne 0x275ee4
movq 0x20(%r14), %rax
cmpl %ebp, (%rax)
jle 0x275ee2
movslq %ebp, %rcx
imulq $0x18, %rcx, %rcx
movq 0x8(%rax,%rcx), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x24e541
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: multiSelectOrderByKeyInfo
static KeyInfo *multiSelectOrderByKeyInfo(Parse *pParse, Select *p, int nExtra){
  ExprList *pOrderBy = p->pOrderBy;
  int nOrderBy = p->pOrderBy->nExpr;
  sqlite3 *db = pParse->db;
  KeyInfo *pRet = sqlite3KeyInfoAlloc(db, nOrderBy+nExtra, 1);
  if( pRet ){
    int i;
    for(i=0; i<nOrderBy; i++){
      struct ExprList_item *pItem = &pOrderBy->a[i];
      Expr *pTerm = pItem->pExpr;
      CollSeq *pColl;

      if( pTerm->flags & EP_Collate ){
        pColl = sqlite3ExprCollSeq(pParse, pTerm);
      }else{
        pColl = multiSelectCollSeq(pParse, p, pItem->u.x.iOrderByCol-1);
        if( pColl==0 ) pColl = db->pDfltColl;
        pOrderBy->a[i].pExpr =
          sqlite3ExprAddCollateString(pParse, pTerm, pColl->zName);
      }
      assert( sqlite3KeyInfoIsWriteable(pRet) );
      pRet->aColl[i] = pColl;
      pRet->aSortFlags[i] = pOrderBy->a[i].sortFlags;
    }
  }

  return pRet;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
movq %rsi, 0x8(%rsp)
movq 0x48(%rsi), %r15
movl (%r15), %eax
movq (%rdi), %rdi
movq %rax, %r13
leal 0x1(%rax), %esi
pushq $0x1
popq %rdx
movq %rdi, (%rsp)
callq 0x264994
movq %rax, %r12
testq %rax, %rax
je 0x275faa
addq $0x8, %r15
xorl %ebx, %ebx
testl %r13d, %r13d
cmovlel %ebx, %r13d
movq %r13, 0x10(%rsp)
cmpq %rbx, 0x10(%rsp)
je 0x275faa
movq (%r15), %r13
testb $0x1, 0x5(%r13)
jne 0x275f82
movzwl 0x14(%r15), %edx
decl %edx
movq %r14, %rdi
movq 0x8(%rsp), %rsi
callq 0x275e9e
movq %rax, %rbp
testq %rax, %rax
jne 0x275f6e
movq (%rsp), %rax
movq 0x10(%rax), %rbp
movq (%rbp), %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0x26d1c6
movq %rax, (%r15)
jmp 0x275f90
movq %r14, %rdi
movq %r13, %rsi
callq 0x24e541
movq %rax, %rbp
movq %rbp, 0x20(%r12,%rbx,8)
movb 0x10(%r15), %al
movq 0x18(%r12), %rcx
movb %al, (%rcx,%rbx)
incq %rbx
addq $0x18, %r15
jmp 0x275f39
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_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: findConstInWhere
static void findConstInWhere(WhereConst *pConst, Expr *pExpr){
  Expr *pRight, *pLeft;
  if( pExpr==0 ) return;
  if( ExprHasProperty(pExpr, EP_FromJoin) ) return;
  if( pExpr->op==TK_AND ){
    findConstInWhere(pConst, pExpr->pRight);
    findConstInWhere(pConst, pExpr->pLeft);
    return;
  }
  if( pExpr->op!=TK_EQ ) return;
  pRight = pExpr->pRight;
  pLeft = pExpr->pLeft;
  assert( pRight!=0 );
  assert( pLeft!=0 );
  if( pRight->op==TK_COLUMN && sqlite3ExprIsConstant(pLeft) ){
    constInsert(pConst,pRight,pLeft,pExpr);
  }
  if( pLeft->op==TK_COLUMN && sqlite3ExprIsConstant(pRight) ){
    constInsert(pConst,pLeft,pRight,pExpr);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rbx, %rbx
je 0x27638b
testb $0x1, 0x4(%rbx)
jne 0x27638b
movzbl (%rbx), %eax
cmpl $0x2c, %eax
jne 0x27632c
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x2762f9
movq 0x10(%rbx), %rbx
jmp 0x276307
cmpl $0x35, %eax
jne 0x27638b
movq 0x10(%rbx), %r12
movq 0x18(%rbx), %r15
cmpb $-0x5c, (%r15)
jne 0x27635c
movq %r12, %rdi
callq 0x261298
testl %eax, %eax
je 0x27635c
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x27641b
cmpb $-0x5c, (%r12)
jne 0x27638b
movq %r15, %rdi
callq 0x261298
testl %eax, %eax
je 0x27638b
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x27641b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: propagateConstantExprRewrite
static int propagateConstantExprRewrite(Walker *pWalker, Expr *pExpr){
  int i;
  WhereConst *pConst;
  if( pExpr->op!=TK_COLUMN ) return WRC_Continue;
  if( ExprHasProperty(pExpr, EP_FixedCol|EP_FromJoin) ){
    testcase( ExprHasProperty(pExpr, EP_FixedCol) );
    testcase( ExprHasProperty(pExpr, EP_FromJoin) );
    return WRC_Continue;
  }
  pConst = pWalker->u.pConst;
  for(i=0; i<pConst->nConst; i++){
    Expr *pColumn = pConst->apExpr[i*2];
    if( pColumn==pExpr ) continue;
    if( pColumn->iTable!=pExpr->iTable ) continue;
    if( pColumn->iColumn!=pExpr->iColumn ) continue;
    /* A match is found.  Add the EP_FixedCol property */
    pConst->nChng++;
    ExprClearProperty(pExpr, EP_Leaf);
    ExprSetProperty(pExpr, EP_FixedCol);
    assert( pExpr->pLeft==0 );
    pExpr->pLeft = sqlite3ExprDup(pConst->pParse->db, pConst->apExpr[i*2+1], 0);
    break;
  }
  return WRC_Prune;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
xorl %ebp, %ebp
cmpb $-0x5c, (%rsi)
jne 0x2763ab
movq %rsi, %rbx
movl 0x4(%rsi), %eax
testb $0x9, %al
je 0x2763b4
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x28(%rdi), %rcx
movl 0x8(%rcx), %esi
xorl %edx, %edx
testl %esi, %esi
cmovlel %edx, %esi
shlq $0x4, %rsi
pushq $0x1
popq %rbp
cmpq %rdx, %rsi
je 0x2763ab
movq 0x10(%rcx), %r8
movq (%r8,%rdx), %rdi
cmpq %rbx, %rdi
je 0x2763ef
movl 0x2c(%rdi), %r9d
cmpl 0x2c(%rbx), %r9d
jne 0x2763ef
movzwl 0x30(%rdi), %edi
cmpw 0x30(%rbx), %di
je 0x2763f5
addq $0x10, %rdx
jmp 0x2763c9
incl 0xc(%rcx)
andl $0xff7ffff6, %eax       # imm = 0xFF7FFFF6
orl $0x8, %eax
movl %eax, 0x4(%rbx)
movq (%rcx), %rax
movq (%rax), %rdi
movq 0x8(%r8,%rdx), %rsi
xorl %edx, %edx
callq 0x267197
movq %rax, 0x10(%rbx)
jmp 0x2763ab
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: constInsert
static void constInsert(
  WhereConst *pConst,  /* The WhereConst into which we are inserting */
  Expr *pColumn,       /* The COLUMN part of the constraint */
  Expr *pValue,        /* The VALUE part of the constraint */
  Expr *pExpr          /* Overall expression: COLUMN=VALUE or VALUE=COLUMN */
){
  int i;
  assert( pColumn->op==TK_COLUMN );
  assert( sqlite3ExprIsConstant(pValue) );

  if( ExprHasProperty(pColumn, EP_FixedCol) ) return;
  if( sqlite3ExprAffinity(pValue)!=0 ) return;
  if( !sqlite3IsBinary(sqlite3ExprCompareCollSeq(pConst->pParse,pExpr)) ){
    return;
  }

  /* 2018-10-25 ticket [cf5ed20f]
  ** Make sure the same pColumn is not inserted more than once */
  for(i=0; i<pConst->nConst; i++){
    const Expr *pE2 = pConst->apExpr[i*2];
    assert( pE2->op==TK_COLUMN );
    if( pE2->iTable==pColumn->iTable
     && pE2->iColumn==pColumn->iColumn
    ){
      return;  /* Already present.  Return without doing anything. */
    }
  }

  pConst->nConst++;
  pConst->apExpr = sqlite3DbReallocOrFree(pConst->pParse->db, pConst->apExpr,
                         pConst->nConst*2*sizeof(Expr*));
  if( pConst->apExpr==0 ){
    pConst->nConst = 0;
  }else{
    pConst->apExpr[pConst->nConst*2-2] = pColumn;
    pConst->apExpr[pConst->nConst*2-1] = pValue;
  }
}

// Assembly:
testb $0x8, 0x4(%rsi)
jne 0x27644c
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rdi
callq 0x267d81
testb %al, %al
je 0x27644d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq (%r14), %rdi
movq %r12, %rsi
callq 0x22953c
testq %rax, %rax
je 0x27646a
leaq 0x89(%rip), %rcx        # 0x2764ed
cmpq %rcx, 0x18(%rax)
jne 0x276441
movslq 0x8(%r14), %rdx
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %ecx
cmovgl %edx, %ecx
shlq $0x4, %rcx
cmpq %rax, %rcx
je 0x2764a5
movq 0x10(%r14), %rsi
movq (%rsi,%rax), %rsi
movl 0x2c(%rsi), %edi
cmpl 0x2c(%r15), %edi
jne 0x27649f
movzwl 0x30(%rsi), %esi
cmpw 0x30(%r15), %si
je 0x276441
addq $0x10, %rax
jmp 0x27647e
incq %rdx
movl %edx, 0x8(%r14)
movq (%r14), %rax
movq 0x10(%r14), %rsi
movq (%rax), %rdi
shlq $0x4, %rdx
callq 0x23a149
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x2764e3
movslq 0x8(%r14), %rcx
shlq $0x4, %rcx
movq %r15, -0x10(%rax,%rcx)
movq 0x10(%r14), %rax
movq %rbx, -0x8(%rax,%rcx)
jmp 0x276441
andl $0x0, 0x8(%r14)
jmp 0x276441
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: heightOfSelect
static void heightOfSelect(Select *pSelect, int *pnHeight){
  Select *p;
  for(p=pSelect; p; p=p->pPrior){
    heightOfExpr(p->pWhere, pnHeight);
    heightOfExpr(p->pHaving, pnHeight);
    heightOfExpr(p->pLimit, pnHeight);
    heightOfExprList(p->pEList, pnHeight);
    heightOfExprList(p->pGroupBy, pnHeight);
    heightOfExprList(p->pOrderBy, pnHeight);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %r14, %r14
je 0x276579
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x27652b
movl 0x28(%rax), %eax
cmpl (%rbx), %eax
jle 0x27652b
movl %eax, (%rbx)
movq 0x40(%r14), %rax
testq %rax, %rax
je 0x27653d
movl 0x28(%rax), %eax
cmpl (%rbx), %eax
jle 0x27653d
movl %eax, (%rbx)
movq 0x60(%r14), %rax
testq %rax, %rax
je 0x27654f
movl 0x28(%rax), %eax
cmpl (%rbx), %eax
jle 0x27654f
movl %eax, (%rbx)
movq 0x20(%r14), %rdi
movq %rbx, %rsi
callq 0x276581
movq 0x38(%r14), %rdi
movq %rbx, %rsi
callq 0x276581
movq 0x48(%r14), %rdi
movq %rbx, %rsi
callq 0x276581
movq 0x50(%r14), %r14
jmp 0x276514
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ExprNNCollSeq
SQLITE_PRIVATE CollSeq *sqlite3ExprNNCollSeq(Parse *pParse, const Expr *pExpr){
  CollSeq *p = sqlite3ExprCollSeq(pParse, pExpr);
  if( p==0 ) p = pParse->db->pDfltColl;
  assert( p!=0 );
  return p;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x24e541
testq %rax, %rax
jne 0x2765ce
movq (%rbx), %rax
movq 0x10(%rax), %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3WhereSplit
SQLITE_PRIVATE void sqlite3WhereSplit(WhereClause *pWC, Expr *pExpr, u8 op){
  Expr *pE2 = sqlite3ExprSkipCollateAndLikely(pExpr);
  pWC->op = op;
  if( pE2==0 ) return;
  if( pE2->op!=op ){
    whereClauseInsert(pWC, pExpr, 0);
  }else{
    sqlite3WhereSplit(pWC, pE2->pLeft, op);
    sqlite3WhereSplit(pWC, pE2->pRight, op);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movzbl %bl, %ebp
movq %r15, %rdi
callq 0x267d34
movb %bl, 0x10(%r14)
testq %rax, %rax
je 0x276611
movq %rax, %r12
cmpb %bl, (%rax)
jne 0x27661a
movq 0x10(%r12), %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x2765d0
movq 0x18(%r12), %r15
jmp 0x2765e3
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2772a8
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3WhereExprListUsage
SQLITE_PRIVATE Bitmask sqlite3WhereExprListUsage(WhereMaskSet *pMaskSet, ExprList *pList){
  int i;
  Bitmask mask = 0;
  if( pList ){
    for(i=0; i<pList->nExpr; i++){
      mask |= sqlite3WhereExprUsage(pMaskSet, pList->a[i].pExpr);
    }
  }
  return mask;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x276e88
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsi), %r12
xorl %r13d, %r13d
xorl %r15d, %r15d
movslq (%rbx), %rax
cmpq %rax, %r13
jge 0x276e8b
movq (%r12), %rsi
movq %r14, %rdi
callq 0x278aa4
orq %rax, %r15
incq %r13
addq $0x18, %r12
jmp 0x276e68
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: whereInfoFree
static void whereInfoFree(sqlite3 *db, WhereInfo *pWInfo){
  int i;
  assert( pWInfo!=0 );
  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);
  }
  assert( pWInfo->pExprMods==0 );
  sqlite3DbFreeNN(db, pWInfo);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x3e8(%rsi), %r15
xorl %r12d, %r12d
movzbl 0x40(%rbx), %eax
cmpq %rax, %r12
jae 0x27726e
movq (%r15), %rax
testq %rax, %rax
je 0x277265
testb $0x8, 0x29(%rax)
je 0x277265
movq -0x8(%r15), %rsi
movq %r14, %rdi
callq 0x21f26b
incq %r12
addq $0x60, %r15
jmp 0x277242
leaq 0x68(%rbx), %rdi
callq 0x27cb91
movq 0x50(%rbx), %rsi
testq %rsi, %rsi
je 0x277292
movq 0x40(%rsi), %rax
movq %rax, 0x50(%rbx)
movq %r14, %rdi
callq 0x27ab24
jmp 0x277277
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x22d0fc