LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: selectAddColumnTypeAndCollation
static void selectAddColumnTypeAndCollation(
  Parse *pParse,        /* Parsing contexts */
  Table *pTab,          /* Add column type information to this table */
  Select *pSelect       /* SELECT used to determine types and collations */
){
  sqlite3 *db = pParse->db;
  NameContext sNC;
  Column *pCol;
  CollSeq *pColl;
  int i;
  Expr *p;
  struct ExprList_item *a;
  u64 szAll = 0;

  assert( pSelect!=0 );
  assert( (pSelect->selFlags & SF_Resolved)!=0 );
  assert( pTab->nCol==pSelect->pEList->nExpr || db->mallocFailed );
  if( db->mallocFailed ) return;
  memset(&sNC, 0, sizeof(sNC));
  sNC.pSrcList = pSelect->pSrc;
  a = pSelect->pEList->a;
  for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){
    p = a[i].pExpr;
    pCol->zType = sqlite3DbStrDup(db, columnType(&sNC, p,0,0,0, &pCol->szEst));
    szAll += pCol->szEst;
    pCol->affinity = sqlite3ExprAffinity(p);
    if( pCol->affinity==0 ) pCol->affinity = SQLITE_AFF_NONE;
    pColl = sqlite3ExprCollSeq(pParse, p);
    if( pColl ){
      pCol->zColl = sqlite3DbStrDup(db, pColl->zName);
    }
  }
  pTab->szTabRow = sqlite3LogEst(szAll*4);
}

// Assembly:
movq (%rdi), %rax
cmpb $0x0, 0x50(%rax)
je 0x4b8a5
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
movq %rax, (%rsp)
movq %rdi, 0x10(%rsp)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rcx
movaps %xmm0, 0x20(%rcx)
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, (%rcx)
andq $0x0, 0x30(%rcx)
movq 0x28(%rdx), %rax
movq %rax, 0x8(%rcx)
movq (%rdx), %rax
movq 0x8(%rax), %rbx
movq 0x8(%rsi), %r13
addq $0x2a, %r13
xorl %r14d, %r14d
xorl %edi, %edi
movq %rsi, 0x8(%rsp)
movq (%rsp), %rbp
movswq 0x42(%r15), %rax
cmpq %rax, %r14
jge 0x4b98b
movq %rdi, 0x18(%rsp)
movq (%rbx), %r12
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x4b9a8
movq %rbp, %rdi
movq %rax, %rsi
callq 0xf7f4
movq %rax, -0x12(%r13)
movzbl (%r13), %r15d
movq %r12, %rdi
callq 0x47815
testb %al, %al
movzbl %al, %eax
pushq $0x62
popq %rcx
cmovel %ecx, %eax
movb %al, -0x1(%r13)
movq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x45a44
testq %rax, %rax
je 0x4b96e
movq (%rax), %rsi
movq %rbp, %rdi
callq 0xf7f4
movq %rax, -0xa(%r13)
movq 0x18(%rsp), %rdi
addq %r15, %rdi
incq %r14
addq $0x20, %rbx
addq $0x30, %r13
movq 0x8(%rsp), %r15
jmp 0x4b8fc
shlq $0x2, %rdi
callq 0x30110
movw %ax, 0x46(%r15)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: sqlite3ResolveOrderGroupBy
SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(
  Parse *pParse,        /* Parsing context.  Leave error messages here */
  Select *pSelect,      /* The SELECT statement containing the clause */
  ExprList *pOrderBy,   /* The ORDER BY or GROUP BY clause to be processed */
  const char *zType     /* "ORDER" or "GROUP" */
){
  int i;
  sqlite3 *db = pParse->db;
  ExprList *pEList;
  struct ExprList_item *pItem;

  if( pOrderBy==0 || pParse->db->mallocFailed ) return 0;
#if SQLITE_MAX_COLUMN
  if( pOrderBy->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){
    sqlite3ErrorMsg(pParse, "too many terms in %s BY clause", zType);
    return 1;
  }
#endif
  pEList = pSelect->pEList;
  assert( pEList!=0 );  /* sqlite3SelectNew() guarantees this */
  for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
    if( pItem->u.x.iOrderByCol ){
      if( pItem->u.x.iOrderByCol>pEList->nExpr ){
        resolveOutOfRangeError(pParse, zType, i+1, pEList->nExpr);
        return 1;
      }
      resolveAlias(pParse, pEList, pItem->u.x.iOrderByCol-1, pItem->pExpr, zType,0);
    }
  }
  return 0;
}

// Assembly:
xorl %eax, %eax
testq %rdx, %rdx
je 0x4bc11
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
movq (%rdi), %rcx
cmpb $0x0, 0x50(%rcx)
jne 0x4bc03
movq %rdx, %r15
movl (%rdx), %eax
cmpl 0x70(%rcx), %eax
jle 0x4bba7
leaq 0x19711(%rip), %rsi     # 0x652a9
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10b53
jmp 0x4bc00
movq (%rsi), %r13
movq 0x8(%r15), %rbp
pushq $0x1
popq %r12
leal -0x1(%r12), %ecx
cmpl %eax, %ecx
jge 0x4bbee
movzwl 0x1c(%rbp), %edx
testl %edx, %edx
je 0x4bbe5
movl (%r13), %ecx
cmpl %edx, %ecx
jl 0x4bbf2
decl %edx
movq (%rbp), %rcx
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %r8
xorl %r9d, %r9d
callq 0x49d55
movl (%r15), %eax
addq $0x20, %rbp
incl %r12d
jmp 0x4bbb2
xorl %eax, %eax
jmp 0x4bc03
movq %r14, %rdi
movq %rbx, %rsi
movl %r12d, %edx
callq 0x4bb4e
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: sqlite3AllocateIndexObject
SQLITE_PRIVATE Index *sqlite3AllocateIndexObject(
  sqlite3 *db,         /* Database connection */
  i16 nCol,            /* Total number of columns in the index */
  int nExtra,          /* Number of bytes of extra space to alloc */
  char **ppExtra       /* Pointer to the "extra" space */
){
  Index *p;            /* Allocated index object */
  int nByte;           /* Bytes of space for Index object + arrays */

  nByte = ROUND8(sizeof(Index)) +              /* Index structure  */
          ROUND8(sizeof(char*)*nCol) +         /* Index.azColl     */
          ROUND8(sizeof(tRowcnt)*(nCol+1) +    /* Index.aiRowEst   */
                 sizeof(i16)*nCol +            /* Index.aiColumn   */
                 sizeof(u8)*nCol);             /* Index.aSortOrder */
  p = sqlite3DbMallocZero(db, nByte + nExtra);
  if( p ){
    char *pExtra = ((char*)p)+ROUND8(sizeof(Index));
    p->azColl = (char**)pExtra;      pExtra += ROUND8(sizeof(char*)*nCol);
    p->aiRowEst = (tRowcnt*)pExtra;  pExtra += sizeof(tRowcnt)*(nCol+1);
    p->aiColumn = (i16*)pExtra;      pExtra += sizeof(i16)*nCol;
    p->aSortOrder = (u8*)pExtra;
    p->nColumn = nCol;
    p->nKeyCol = nCol - 1;
    *ppExtra = ((char*)p) + nByte;
  }
  return p;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movslq %esi, %r14
leaq 0x4(,%r14,4), %r15
leaq (%r14,%r14), %r12
leal (%r14,%r12), %eax
addl %r15d, %eax
addl $0x7, %eax
andl $-0x8, %eax
leaq (%rax,%r14,8), %r13
addq $0x68, %r13
leal (%rdx,%r13), %esi
callq 0xfabf
testq %rax, %rax
je 0x4be85
movq %r14, %rcx
shlq $0x3, %rcx
leaq 0x68(%rax), %rdx
movq %rdx, 0x40(%rax)
addq %rax, %rcx
addq $0x68, %rcx
movq %rcx, 0x10(%rax)
addq %rcx, %r15
movq %r15, 0x8(%rax)
addq %r12, %r15
movq %r15, 0x38(%rax)
movw %r14w, 0x60(%rax)
leal -0x1(%r14), %ecx
movw %cx, 0x5e(%rax)
movslq %r13d, %rcx
addq %rax, %rcx
movq %rcx, (%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/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( sqlite3FixExpr(pFix, pSelect->pOffset) ){
      return 1;
    }
    pSelect = pSelect->pPrior;
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rbx
testq %r14, %r14
je 0x4c268
movq (%r14), %rsi
movq %r15, %rdi
callq 0x4c2f5
testl %eax, %eax
jne 0x4c26a
movq 0x28(%r14), %rsi
movq %r15, %rdi
callq 0x4bd46
testl %eax, %eax
jne 0x4c26a
movq 0x30(%r14), %rsi
movq %r15, %rdi
callq 0x4c272
testl %eax, %eax
jne 0x4c26a
movq 0x38(%r14), %rsi
movq %r15, %rdi
callq 0x4c2f5
testl %eax, %eax
jne 0x4c26a
movq 0x40(%r14), %rsi
movq %r15, %rdi
callq 0x4c272
testl %eax, %eax
jne 0x4c26a
movq 0x48(%r14), %rsi
movq %r15, %rdi
callq 0x4c2f5
testl %eax, %eax
jne 0x4c26a
movq 0x68(%r14), %rsi
movq %r15, %rdi
callq 0x4c272
testl %eax, %eax
jne 0x4c26a
movq 0x70(%r14), %rsi
movq %r15, %rdi
callq 0x4c272
testl %eax, %eax
jne 0x4c26a
movq 0x50(%r14), %r14
jmp 0x4c1d7
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: sqlite3FixExpr
SQLITE_PRIVATE int sqlite3FixExpr(
  DbFixer *pFix,     /* Context of the fixation */
  Expr *pExpr        /* The expression to be fixed to one database */
){
  while( pExpr ){
    if( pExpr->op==TK_VARIABLE ){
      if( pFix->pParse->db->init.busy ){
        pExpr->op = TK_NULL;
      }else{
        sqlite3ErrorMsg(pFix->pParse, "%s cannot use variables", pFix->zType);
        return 1;
      }
    }
    if( ExprHasProperty(pExpr, EP_TokenOnly) ) break;
    if( ExprHasProperty(pExpr, EP_xIsSelect) ){
      if( sqlite3FixSelect(pFix, pExpr->x.pSelect) ) return 1;
    }else{
      if( sqlite3FixExprList(pFix, pExpr->x.pList) ) return 1;
    }
    if( sqlite3FixExpr(pFix, pExpr->pRight) ){
      return 1;
    }
    pExpr = pExpr->pLeft;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x1
popq %rbp
xorl %eax, %eax
testq %r14, %r14
je 0x4c2f0
cmpb $-0x7a, (%r14)
jne 0x4c29f
movq (%rbx), %rdi
movq (%rdi), %rcx
cmpb $0x0, 0x99(%rcx)
je 0x4c2dc
movb $0x63, (%r14)
movl 0x4(%r14), %ecx
btl $0xe, %ecx
jb 0x4c2f0
btl $0xb, %ecx
movq 0x20(%r14), %rsi
movq %rbx, %rdi
jb 0x4c2bd
callq 0x4c2f5
jmp 0x4c2c2
callq 0x4c1c9
testl %eax, %eax
jne 0x4c2ee
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x4c272
testl %eax, %eax
jne 0x4c2ee
movq 0x10(%r14), %r14
jmp 0x4c27f
movq 0x20(%rbx), %rdx
leaq 0x192f0(%rip), %rsi     # 0x655d7
xorl %eax, %eax
callq 0x10b53
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/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, 0, 0, 200);
  errMsg.db = pParse->db;
  for(j=0; j<pIdx->nKeyCol; j++){
    char *zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
    if( j ) sqlite3StrAccumAppend(&errMsg, ", ", 2);
    sqlite3StrAccumAppend(&errMsg, pTab->zName, -1);
    sqlite3StrAccumAppend(&errMsg, ".", 1);
    sqlite3StrAccumAppend(&errMsg, zCol, -1);
  }
  zErr = sqlite3StrAccumFinish(&errMsg);
  sqlite3HaltConstraint(pParse, 
    (pIdx->autoIndex==2)?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, %r15
movl %esi, 0x4(%rsp)
movq 0x18(%rdx), %r13
leaq 0x10(%rsp), %r12
andq $0x0, 0x18(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r12)
movl $0xc8, 0x20(%r12)
movw $0x1, 0x24(%r12)
movq %rdi, 0x8(%rsp)
movq (%rdi), %rax
movq %rax, (%r12)
xorl %ebx, %ebx
pushq $-0x1
popq %rbp
movzwl 0x5e(%r15), %eax
cmpq %rax, %rbx
jae 0x4c5ac
movq 0x8(%r13), %rax
movq 0x8(%r15), %rcx
movswq (%rcx,%rbx,2), %rcx
imulq $0x30, %rcx, %rcx
movq (%rax,%rcx), %r14
testq %rbx, %rbx
je 0x4c57a
movq %r12, %rdi
leaq 0x1907d(%rip), %rsi     # 0x655ef
pushq $0x2
popq %rdx
callq 0x168c7
movq (%r13), %rsi
movq %r12, %rdi
movl %ebp, %edx
callq 0x168c7
movq %r12, %rdi
leaq 0x12b26(%rip), %rsi     # 0x5f0b8
pushq $0x1
popq %rdx
callq 0x168c7
movq %r12, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x168c7
incq %rbx
jmp 0x4c544
leaq 0x10(%rsp), %rdi
callq 0xb2b5
movb 0x63(%r15), %cl
andb $0x3, %cl
xorl %esi, %esi
cmpb $0x2, %cl
setne %sil
shll $0x9, %esi
addl $0x613, %esi            # imm = 0x613
pushq $-0x1
popq %r8
pushq $0x2
popq %r9
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %edx
movq %rax, %rcx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x465e2
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: sqlite3IndexAffinityStr
SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *v, 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;
    sqlite3 *db = sqlite3VdbeDb(v);
    pIdx->zColAff = (char *)sqlite3DbMallocRaw(0, pIdx->nColumn+1);
    if( !pIdx->zColAff ){
      db->mallocFailed = 1;
      return 0;
    }
    for(n=0; n<pIdx->nColumn; n++){
      i16 x = pIdx->aiColumn[n];
      pIdx->zColAff[n] = x<0 ? SQLITE_AFF_INTEGER : pTab->aCol[x].affinity;
    }
    pIdx->zColAff[n] = 0;
  }
 
  return pIdx->zColAff;
}

// Assembly:
movq 0x20(%rsi), %rax
testq %rax, %rax
je 0x4c600
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x18(%rsi), %r14
movq (%rdi), %r15
movzwl 0x60(%rsi), %edi
incl %edi
callq 0xa047
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x4c666
xorl %eax, %eax
movzwl 0x60(%rbx), %ecx
cmpq %rcx, %rax
jae 0x4c658
movq 0x8(%rbx), %rcx
movswq (%rcx,%rax,2), %rcx
testq %rcx, %rcx
js 0x4c64a
movq 0x8(%r14), %rdx
imulq $0x30, %rcx, %rcx
movb 0x29(%rdx,%rcx), %cl
jmp 0x4c64c
movb $0x64, %cl
movq 0x20(%rbx), %rdx
movb %cl, (%rdx,%rax)
incq %rax
jmp 0x4c625
movq 0x20(%rbx), %rcx
movb $0x0, (%rcx,%rax)
movq 0x20(%rbx), %rax
jmp 0x4c66d
movb $0x1, 0x50(%r15)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: whereClauseInsert
static int whereClauseInsert(WhereClause *pWC, Expr *p, u8 wtFlags){
  WhereTerm *pTerm;
  int idx;
  testcase( wtFlags & TERM_VIRTUAL );
  if( pWC->nTerm>=pWC->nSlot ){
    WhereTerm *pOld = pWC->a;
    sqlite3 *db = pWC->pWInfo->pParse->db;
    pWC->a = sqlite3DbMallocRaw(db, sizeof(pWC->a[0])*pWC->nSlot*2 );
    if( pWC->a==0 ){
      if( wtFlags & TERM_DYNAMIC ){
        sqlite3ExprDelete(db, p);
      }
      pWC->a = pOld;
      return 0;
    }
    memcpy(pWC->a, pOld, sizeof(pWC->a[0])*pWC->nTerm);
    if( pOld!=pWC->aStatic ){
      sqlite3DbFree(db, pOld);
    }
    pWC->nSlot = sqlite3DbMallocSize(db, pWC->a)/sizeof(pWC->a[0]);
  }
  pTerm = &pWC->a[idx = pWC->nTerm++];
  if( p && ExprHasProperty(p, EP_Unlikely) ){
    pTerm->truthProb = sqlite3LogEst(p->iTable) - 99;
  }else{
    pTerm->truthProb = -1;
  }
  pTerm->pExpr = sqlite3ExprSkipCollate(p);
  pTerm->wtFlags = wtFlags;
  pTerm->pWC = pWC;
  pTerm->iParent = -1;
  return idx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x14(%rdi), %r15d
movl 0x18(%rdi), %eax
cmpl %eax, %r15d
jl 0x519b8
movq (%rbx), %rcx
movq 0x20(%rbx), %r15
movq (%rcx), %rcx
movq (%rcx), %r12
imull $0x70, %eax, %esi
movq %r12, %rdi
callq 0x10a37
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x51a14
movslq 0x14(%rbx), %rcx
imulq $0x38, %rcx, %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x7240
leaq 0x28(%rbx), %rax
cmpq %rax, %r15
je 0x5199b
movq %r12, %rdi
movq %r15, %rsi
callq 0x9805
movq 0x20(%rbx), %rsi
movq %r12, %rdi
callq 0x16894
cltq
pushq $0x38
popq %rcx
xorl %edx, %edx
divq %rcx
movl %eax, 0x18(%rbx)
movl 0x14(%rbx), %r15d
leal 0x1(%r15), %eax
movl %eax, 0x14(%rbx)
movslq %r15d, %rax
imulq $0x38, %rax, %r12
addq 0x20(%rbx), %r12
movw $0xffff, %ax            # imm = 0xFFFF
testq %r14, %r14
je 0x519e6
testb $0x4, 0x6(%r14)
je 0x519e6
movslq 0x2c(%r14), %rdi
callq 0x30110
addl $-0x63, %eax
movw %ax, 0x18(%r12)
movq %r14, %rdi
callq 0x46b5d
movq %rax, (%r12)
movb %bpl, 0x1c(%r12)
movq %rbx, 0x20(%r12)
orl $-0x1, 0x8(%r12)
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testb $0x1, %bpl
je 0x51a25
movq %r12, %rdi
movq %r14, %rsi
callq 0x3044f
movq %r15, 0x20(%rbx)
xorl %r15d, %r15d
jmp 0x51a08
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: sqlite3LogEstAdd
SQLITE_PRIVATE LogEst sqlite3LogEstAdd(LogEst a, LogEst b){
  static const unsigned char x[] = {
     10, 10,                         /* 0,1 */
      9, 9,                          /* 2,3 */
      8, 8,                          /* 4,5 */
      7, 7, 7,                       /* 6,7,8 */
      6, 6, 6,                       /* 9,10,11 */
      5, 5, 5,                       /* 12-14 */
      4, 4, 4, 4,                    /* 15-18 */
      3, 3, 3, 3, 3, 3,              /* 19-24 */
      2, 2, 2, 2, 2, 2, 2,           /* 25-31 */
  };
  if( a>=b ){
    if( a>b+49 ) return a;
    if( a>b+31 ) return a+1;
    return a+x[a-b];
  }else{
    if( b>a+49 ) return b;
    if( b>a+31 ) return b+1;
    return b+x[b-a];
  }
}

// Assembly:
movl %edi, %eax
cmpw %si, %ax
jge 0x53d0f
leal 0x31(%rax), %ecx
cmpl %esi, %ecx
jge 0x53d20
movl %esi, %eax
retq
leal 0x31(%rsi), %ecx
cmpl %eax, %ecx
jl 0x53d0e
leal 0x1f(%rsi), %ecx
cmpl %eax, %ecx
jge 0x53d2b
incl %eax
retq
leal 0x1f(%rax), %ecx
cmpl %esi, %ecx
jge 0x53d40
leal 0x1(%rsi), %eax
retq
movl %eax, %ecx
subl %esi, %ecx
movslq %ecx, %rcx
leaq 0x136c7(%rip), %rdx     # 0x67400
movzbl (%rcx,%rdx), %ecx
addl %ecx, %eax
retq
movl %esi, %ecx
subl %eax, %ecx
movslq %ecx, %rax
leaq 0x136b2(%rip), %rcx     # 0x67400
movzbl (%rax,%rcx), %eax
addl %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: whereLoopOutputAdjust
static void whereLoopOutputAdjust(WhereClause *pWC, WhereLoop *pLoop){
  WhereTerm *pTerm, *pX;
  Bitmask notAllowed = ~(pLoop->prereq|pLoop->maskSelf);
  int i, j;

  if( !OptimizationEnabled(pWC->pWInfo->pParse->db, SQLITE_AdjustOutEst) ){
    return;
  }
  for(i=pWC->nTerm, pTerm=pWC->a; i>0; i--, pTerm++){
    if( (pTerm->wtFlags & TERM_VIRTUAL)!=0 ) break;
    if( (pTerm->prereqAll & pLoop->maskSelf)==0 ) continue;
    if( (pTerm->prereqAll & notAllowed)!=0 ) continue;
    for(j=pLoop->nLTerm-1; j>=0; j--){
      pX = pLoop->aLTerm[j];
      if( pX==0 ) continue;
      if( pX==pTerm ) break;
      if( pX->iParent>=0 && (&pWC->a[pX->iParent])==pTerm ) break;
    }
    if( j<0 ) pLoop->nOut += pTerm->truthProb;
  }
}

// Assembly:
movq (%rdi), %rax
movq (%rax), %rax
movq (%rax), %rax
testb $0x10, 0x4d(%rax)
jne 0x53dea
movq 0x8(%rsi), %rax
movq (%rsi), %rcx
orq %rax, %rcx
notq %rcx
movl 0x14(%rdi), %edx
movq 0x20(%rdi), %rdi
movq %rdi, %r8
testl %edx, %edx
jle 0x53dea
testb $0x2, 0x1c(%r8)
jne 0x53dea
movq 0x30(%r8), %r9
testq %rax, %r9
je 0x53de2
andq %rcx, %r9
jne 0x53de2
movzwl 0x2c(%rsi), %r9d
subq $0x1, %r9
jb 0x53dd8
movq 0x30(%rsi), %r10
movq (%r10,%r9,8), %r10
testq %r10, %r10
je 0x53d9d
cmpq %r8, %r10
je 0x53de2
movl 0x8(%r10), %r10d
testl %r10d, %r10d
setns %r11b
movl %r10d, %r10d
imulq $0x38, %r10, %r10
addq %rdi, %r10
cmpq %r8, %r10
sete %r10b
testb %r10b, %r11b
je 0x53d9d
jmp 0x53de2
movzwl 0x18(%r8), %r9d
addw %r9w, 0x16(%rsi)
decl %edx
addq $0x38, %r8
jmp 0x53d7f
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: disableTerm
static void disableTerm(WhereLevel *pLevel, WhereTerm *pTerm){
  if( pTerm
      && (pTerm->wtFlags & TERM_CODED)==0
      && (pLevel->iLeftJoin==0 || ExprHasProperty(pTerm->pExpr, EP_FromJoin))
      && (pLevel->notReady & pTerm->prereqAll)==0
  ){
    pTerm->wtFlags |= TERM_CODED;
    if( pTerm->iParent>=0 ){
      WhereTerm *pOther = &pTerm->pWC->a[pTerm->iParent];
      if( (--pOther->nChild)==0 ){
        disableTerm(pLevel, pOther);
      }
    }
  }
}

// Assembly:
testq %rsi, %rsi
je 0x54cfa
movb 0x1c(%rsi), %al
testb $0x4, %al
jne 0x54cfa
cmpl $0x0, (%rdi)
je 0x54ccc
movq (%rsi), %rcx
testb $0x1, 0x4(%rcx)
je 0x54cfa
movq 0x30(%rsi), %rcx
testq %rcx, 0x48(%rdi)
jne 0x54cfa
orb $0x4, %al
movb %al, 0x1c(%rsi)
movslq 0x8(%rsi), %rax
testq %rax, %rax
js 0x54cfa
movq 0x20(%rsi), %rcx
movq 0x20(%rcx), %rcx
imulq $0x38, %rax, %rax
leaq (%rcx,%rax), %rsi
decb 0x1d(%rcx,%rax)
je 0x54cb2
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: sqlite3ExprCodeIsNullJump
SQLITE_PRIVATE int sqlite3ExprCanBeNull(const Expr *p){
  u8 op;
  while( p->op==TK_UPLUS || p->op==TK_UMINUS ){ p = p->pLeft; }
  op = p->op;
  if( op==TK_REGISTER ) op = p->op2;
  switch( op ){
    case TK_INTEGER:
    case TK_STRING:
    case TK_FLOAT:
    case TK_BLOB:
      return 0;
    default:
      return 1;
  }
}

// Assembly:
movb (%rsi), %al
movzbl %al, %r8d
leal -0x9c(%r8), %r9d
cmpl $0x2, %r9d
jae 0x54d14
movq 0x10(%rsi), %rsi
jmp 0x54cfb
cmpl $0x85, %r8d
jne 0x54d20
movb 0x36(%rsi), %al
movzbl %al, %eax
addl $-0x5f, %eax
cmpl $0x25, %eax
ja 0x54d3c
movabsq $0x3800000001, %rsi     # imm = 0x3800000001
btq %rax, %rsi
jae 0x54d3c
retq
pushq $0x4a
popq %rsi
jmp 0x43f64
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: sqlite3LogEstToInt
SQLITE_PRIVATE u64 sqlite3LogEstToInt(LogEst x){
  u64 n;
  if( x<10 ) return 1;
  n = x%10;
  x /= 10;
  if( n>=5 ) n -= 2;
  else if( n>=1 ) n -= 1;
  if( x>=3 ){
    return x>60 ? (u64)LARGEST_INT64 : (n+8)<<(x-3);
  }
  return (n+8)>>(3-x);
}

// Assembly:
cmpw $0xa, %di
jge 0x54efe
pushq $0x1
popq %rax
retq
movw $0xa, %cx
movl %edi, %eax
xorl %edx, %edx
divw %cx
xorl %esi, %esi
movzwl %dx, %ecx
leaq -0x1(%rcx), %rdx
testw %cx, %cx
cmovneq %rdx, %rsi
leaq -0x2(%rcx), %rdx
cmpw $0x5, %cx
cmovaeq %rdx, %rsi
movzwl %ax, %ecx
addq $0x8, %rsi
cmpw $0x1e, %di
jb 0x54f4c
addb $-0x3, %cl
shlq %cl, %rsi
cmpw $0x262, %di             # imm = 0x262
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmovbq %rsi, %rax
retq
movb $0x3, %al
subb %cl, %al
movl %eax, %ecx
shrq %cl, %rsi
movq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: sqlite3FkRequired
SQLITE_PRIVATE int sqlite3FkRequired(
  Parse *pParse,                  /* Parse context */
  Table *pTab,                    /* Table being modified */
  int *aChange,                   /* Non-NULL for UPDATE operations */
  int chngRowid                   /* True for UPDATE that affects rowid */
){
  if( pParse->db->flags&SQLITE_ForeignKeys ){
    if( !aChange ){
      /* A DELETE operation. Foreign key processing is required if the 
      ** table in question is either the child or parent table for any 
      ** foreign key constraint.  */
      return (sqlite3FkReferences(pTab) || pTab->pFKey);
    }else{
      /* This is an UPDATE. Foreign key processing is only required if the
      ** operation modifies one or more child or parent key columns. */
      FKey *p;

      /* Check if any child key columns are being modified. */
      for(p=pTab->pFKey; p; p=p->pNextFrom){
        if( fkChildIsModified(pTab, p, aChange, chngRowid) ) return 1;
      }

      /* Check if any parent key columns are being modified. */
      for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
        if( fkParentIsModified(pTab, p, aChange, chngRowid) ) return 1;
      }
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
xorl %ebx, %ebx
testb $0x8, 0x2e(%rax)
je 0x556ed
movq %rdx, %r15
movq %rsi, %r14
testq %rdx, %rdx
je 0x556a9
movl %ecx, %ebp
leaq 0x20(%r14), %r12
pushq $0x1
popq %r13
movq (%r12), %r12
movq %r14, %rdi
testq %r12, %r12
je 0x556bb
movq %r12, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x55da6
addq $0x8, %r12
testl %eax, %eax
je 0x55683
movl %r13d, %ebx
jmp 0x556ed
movq %r14, %rdi
callq 0x4c763
testq %rax, %rax
je 0x556e3
pushq $0x1
popq %rbx
jmp 0x556ed
callq 0x4c763
movq %rax, %r12
testq %r12, %r12
je 0x556ed
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
movl %ebp, %ecx
callq 0x55df3
testl %eax, %eax
jne 0x556a4
movq 0x18(%r12), %r12
jmp 0x556c3
xorl %ebx, %ebx
cmpq $0x0, 0x20(%r14)
setne %bl
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/skeeto[P]flappy/sqlite3.c
// Function: fkParentIsModified
static int fkParentIsModified(
  Table *pTab, 
  FKey *p, 
  int *aChange, 
  int bChngRowid
){
  int i;
  for(i=0; i<p->nCol; i++){
    char *zKey = p->aCol[i].zCol;
    int iKey;
    for(iKey=0; iKey<pTab->nCol; iKey++){
      if( aChange[iKey]>=0 || (iKey==pTab->iPKey && bChngRowid) ){
        Column *pCol = &pTab->aCol[iKey];
        if( zKey ){
          if( 0==sqlite3StrICmp(pCol->zName, zKey) ) return 1;
        }else if( pCol->colFlags & COLFLAG_PRIMKEY ){
          return 1;
        }
      }
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, 0xc(%rsp)
movq %rdx, %r14
movq %rdi, %r12
movl 0x28(%rsi), %ecx
addq $0x40, %rsi
movq %rsi, 0x18(%rsp)
xorl %eax, %eax
testl %ecx, %ecx
cmovlel %eax, %ecx
xorl %edx, %edx
movq %rcx, 0x10(%rsp)
cmpq %rcx, %rdx
je 0x55eb9
movq %rdx, 0x20(%rsp)
shlq $0x4, %rdx
movzwl 0x42(%r12), %ecx
testw %cx, %cx
cmovlel %eax, %ecx
movq 0x18(%rsp), %rax
movq 0x8(%rax,%rdx), %r13
movzwl %cx, %ebx
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpq %rbp, %rbx
je 0x55ea2
cmpl $0x0, (%r14,%rbp,4)
jns 0x55e75
cmpl $0x0, 0xc(%rsp)
je 0x55e99
movswq 0x40(%r12), %rax
movl %eax, %eax
cmpq %rax, %rbp
jne 0x55e99
movq 0x8(%r12), %rax
testq %r13, %r13
je 0x55e91
movq (%rax,%r15), %rdi
movq %r13, %rsi
callq 0xb6e4
testl %eax, %eax
jne 0x55e99
jmp 0x55eb6
testb $0x1, 0x2b(%rax,%r15)
jne 0x55eb6
incq %rbp
addq $0x30, %r15
jmp 0x55e55
movq 0x20(%rsp), %rdx
incq %rdx
xorl %eax, %eax
movq 0x10(%rsp), %rcx
jmp 0x55e25
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: sqlite3GenerateRowIndexDelete
SQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(
  Parse *pParse,     /* Parsing and code generating context */
  Table *pTab,       /* Table containing the row to be deleted */
  int iDataCur,      /* Cursor of table holding data. */
  int iIdxCur,       /* First index cursor */
  int *aRegIdx       /* Only delete if aRegIdx!=0 && aRegIdx[i]>0 */
){
  int i;             /* Index loop counter */
  int r1;            /* Register holding an index key */
  int iPartIdxLabel; /* Jump destination for skipping partial index entries */
  Index *pIdx;       /* Current index */
  Vdbe *v;           /* The prepared statement under construction */
  Index *pPk;        /* PRIMARY KEY index, or NULL for rowid tables */

  v = pParse->pVdbe;
  pPk = HasRowid(pTab) ? 0 : sqlite3PrimaryKeyIndex(pTab);
  for(i=0, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){
    assert( iIdxCur+i!=iDataCur || pPk==pIdx );
    if( aRegIdx!=0 && aRegIdx[i]==0 ) continue;
    if( pIdx==pPk ) continue;
    VdbeModuleComment((v, "GenRowIdxDel for %s", pIdx->zName));
    r1 = sqlite3GenerateIndexKey(pParse, pIdx, iDataCur, 0, 1, &iPartIdxLabel);
    sqlite3VdbeAddOp3(v, OP_IdxDelete, iIdxCur+i, r1,
                      pIdx->uniqNotNull ? pIdx->nKeyCol : pIdx->nColumn);
    sqlite3VdbeResolveLabel(v, iPartIdxLabel);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movl %ecx, %ebp
movl %edx, 0x8(%rsp)
movq %rsi, %r15
movq %rdi, 0x10(%rsp)
movq 0x10(%rdi), %r13
testb $0x20, 0x48(%rsi)
jne 0x56561
xorl %r14d, %r14d
jmp 0x5656c
movq %r15, %rdi
callq 0x30033
movq %rax, %r14
addq $0x10, %r15
movq %r12, %rbx
movq (%r15), %r15
testq %r15, %r15
je 0x56601
testq %r12, %r12
je 0x56596
cmpl $0x0, (%rbx)
sete %al
cmpq %r14, %r15
sete %cl
orb %al, %cl
je 0x5659b
jmp 0x565f2
cmpq %r14, %r15
je 0x565f2
movq 0x10(%rsp), %rdi
movq %r15, %rsi
movl 0x8(%rsp), %edx
xorl %ecx, %ecx
pushq $0x1
popq %r8
leaq 0xc(%rsp), %r9
callq 0x4c34c
xorl %ecx, %ecx
testb $0x8, 0x63(%r15)
sete %cl
movzwl 0x5e(%r15,%rcx,2), %r8d
movq %r13, %rdi
pushq $0x6a
popq %rsi
movl %ebp, %edx
movl %eax, %ecx
callq 0x43f69
movl 0xc(%rsp), %eax
testl %eax, %eax
jns 0x565f2
movq 0x40(%r13), %rcx
testq %rcx, %rcx
je 0x565f2
notl %eax
movl 0x34(%r13), %edx
movl %eax, %eax
movl %edx, (%rcx,%rax,4)
addq $0x28, %r15
incl %ebp
addq $0x4, %rbx
jmp 0x56573
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: exprTableRegister
static Expr *exprTableRegister(
  Parse *pParse,     /* Parsing and code generating context */
  Table *pTab,       /* The table whose content is at r[regBase]... */
  int regBase,       /* Contents of table pTab */
  i16 iCol           /* Which column of pTab is desired */
){
  Expr *pExpr;
  Column *pCol;
  const char *zColl;
  sqlite3 *db = pParse->db;

  pExpr = sqlite3Expr(db, TK_REGISTER, 0);
  if( pExpr ){
    if( iCol>=0 && iCol!=pTab->iPKey ){
      pCol = &pTab->aCol[iCol];
      pExpr->iTable = regBase + iCol + 1;
      pExpr->affinity = pCol->affinity;
      zColl = pCol->zColl;
      if( zColl==0 ) zColl = db->pDfltColl->zName;
      pExpr = sqlite3ExprAddCollateString(pParse, pExpr, zColl);
    }else{
      pExpr->iTable = regBase;
      pExpr->affinity = SQLITE_AFF_INTEGER;
    }
  }
  return pExpr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdi), %r14
xorl %r13d, %r13d
movq %r14, %rdi
movl $0x85, %esi
xorl %edx, %edx
callq 0x3cb67
testq %rax, %rax
je 0x57cd8
testw %bp, %bp
js 0x57ccd
cmpw %bp, 0x40(%r12)
jne 0x57cea
movl %r15d, 0x2c(%rax)
movb $0x64, 0x1(%rax)
movq %rax, %r13
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movswl %bp, %ecx
movq 0x8(%r12), %rdx
movzwl %bp, %esi
imulq $0x30, %rsi, %rsi
addl %r15d, %ecx
incl %ecx
movl %ecx, 0x2c(%rax)
movb 0x29(%rdx,%rsi), %cl
movb %cl, 0x1(%rax)
movq 0x20(%rdx,%rsi), %rdx
testq %rdx, %rdx
jne 0x57d19
movq 0x10(%r14), %rcx
movq (%rcx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x49ebb
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: exprTableColumn
static Expr *exprTableColumn(
  sqlite3 *db,      /* The database connection */
  Table *pTab,      /* The table whose column is desired */
  int iCursor,      /* The open cursor on the table */
  i16 iCol          /* The column that is wanted */
){
  Expr *pExpr = sqlite3Expr(db, TK_COLUMN, 0);
  if( pExpr ){
    pExpr->pTab = pTab;
    pExpr->iTable = iCursor;
    pExpr->iColumn = iCol;
  }
  return pExpr;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movl $0x99, %esi
xorl %edx, %edx
callq 0x3cb67
testq %rax, %rax
je 0x57d59
movq %r14, 0x40(%rax)
movl %ebp, 0x2c(%rax)
movw %bx, 0x30(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: sqlite3RowidConstraint
SQLITE_PRIVATE void sqlite3RowidConstraint(
  Parse *pParse,    /* Parsing context */
  int onError,      /* Conflict resolution algorithm */
  Table *pTab       /* The table with the non-unique rowid */ 
){
  char *zMsg;
  int rc;
  if( pTab->iPKey>=0 ){
    zMsg = sqlite3MPrintf(pParse->db, "%s.%s", pTab->zName,
                          pTab->aCol[pTab->iPKey].zName);
    rc = SQLITE_CONSTRAINT_PRIMARYKEY;
  }else{
    zMsg = sqlite3MPrintf(pParse->db, "%s.rowid", pTab->zName);
    rc = SQLITE_CONSTRAINT_ROWID;
  }
  sqlite3HaltConstraint(pParse, rc, onError, zMsg, P4_DYNAMIC,
                        P5_ConstraintUnique);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rax
movl %esi, %ebx
movq %rdi, %r14
movswq 0x40(%rdx), %rcx
movq (%rdi), %rdi
movq (%rdx), %rdx
testq %rcx, %rcx
js 0x58b01
movq 0x8(%rax), %rax
imulq $0x30, %rcx, %rcx
movq (%rax,%rcx), %rcx
leaq 0xbd12(%rip), %rsi      # 0x64805
xorl %eax, %eax
callq 0x10c1b
movl $0x613, %esi            # imm = 0x613
jmp 0x58b14
leaq 0xd233(%rip), %rsi      # 0x65d3b
xorl %eax, %eax
callq 0x10c1b
movl $0xa13, %esi            # imm = 0xA13
pushq $-0x1
popq %r8
pushq $0x2
popq %r9
movq %r14, %rdi
movl %ebx, %edx
movq %rax, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x465e2
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: xferCompatibleIndex
static int xferCompatibleIndex(Index *pDest, Index *pSrc){
  int i;
  assert( pDest && pSrc );
  assert( pDest->pTable!=pSrc->pTable );
  if( pDest->nKeyCol!=pSrc->nKeyCol ){
    return 0;   /* Different number of columns */
  }
  if( pDest->onError!=pSrc->onError ){
    return 0;   /* Different conflict resolution strategies */
  }
  for(i=0; i<pSrc->nKeyCol; i++){
    if( pSrc->aiColumn[i]!=pDest->aiColumn[i] ){
      return 0;   /* Different columns indexed */
    }
    if( pSrc->aSortOrder[i]!=pDest->aSortOrder[i] ){
      return 0;   /* Different sort orders */
    }
    if( !xferCompatibleCollation(pSrc->azColl[i],pDest->azColl[i]) ){
      return 0;   /* Different collating sequences */
    }
  }
  if( sqlite3ExprCompare(pSrc->pPartIdxWhere, pDest->pPartIdxWhere, -1) ){
    return 0;     /* Different WHERE clauses */
  }

  /* If no test above fails then the indices must be compatible */
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movzwl 0x5e(%rdi), %r15d
xorl %ebp, %ebp
cmpw 0x5e(%rsi), %r15w
jne 0x58c7f
movq %rsi, %r14
movq %rdi, %rbx
movb 0x62(%rdi), %al
cmpb 0x62(%rsi), %al
jne 0x58c7f
xorl %r12d, %r12d
xorl %ebp, %ebp
cmpq %r12, %r15
je 0x58c67
movq 0x8(%r14), %rax
movzwl (%rax,%r12,2), %eax
movq 0x8(%rbx), %rcx
cmpw (%rcx,%r12,2), %ax
jne 0x58c7f
movq 0x38(%r14), %rax
movb (%rax,%r12), %al
movq 0x38(%rbx), %rcx
cmpb (%rcx,%r12), %al
jne 0x58c7f
movq 0x40(%r14), %rax
movq (%rax,%r12,8), %rdi
movq 0x40(%rbx), %rax
movq (%rax,%r12,8), %rsi
callq 0x58bc7
incq %r12
testl %eax, %eax
jne 0x58c1e
jmp 0x58c7f
movq 0x48(%r14), %rdi
movq 0x48(%rbx), %rsi
pushq $-0x1
popq %rdx
callq 0x46b90
xorl %ebp, %ebp
testl %eax, %eax
sete %bpl
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: setLikeOptFlag
static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){
  FuncDef *pDef;
  pDef = sqlite3FindFunction(db, zName, sqlite3Strlen30(zName),
                             2, SQLITE_UTF8, 0);
  if( ALWAYS(pDef) ){
    pDef->funcFlags |= flagVal;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x90a2
pushq $0x2
popq %rcx
pushq $0x1
popq %r8
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
xorl %r9d, %r9d
callq 0x14804
testq %rax, %rax
je 0x590c4
movzbl %bl, %ecx
orw %cx, 0x2(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: loadExt
static void loadExt(sqlite3_context *context, int argc, sqlite3_value **argv){
  const char *zFile = (const char *)sqlite3_value_text(argv[0]);
  const char *zProc;
  sqlite3 *db = sqlite3_context_db_handle(context);
  char *zErrMsg = 0;

  if( argc==2 ){
    zProc = (const char *)sqlite3_value_text(argv[1]);
  }else{
    zProc = 0;
  }
  if( zFile && sqlite3_load_extension(db, zFile, zProc, &zErrMsg) ){
    sqlite3_result_error(context, zErrMsg, -1);
    sqlite3_free(zErrMsg);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdx), %rdi
callq 0xe652
movq %rax, %r14
movq 0x8(%rbx), %r15
andq $0x0, 0x8(%rsp)
cmpl $0x2, %ebp
jne 0x5c055
movq 0x8(%r12), %rdi
callq 0xe652
movq %rax, %rdx
jmp 0x5c057
xorl %edx, %edx
testq %r14, %r14
je 0x5c08a
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x11ef7
testl %eax, %eax
je 0x5c08a
movq 0x8(%rsp), %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0xe87f
movq 0x8(%rsp), %rdi
callq 0xa0b5
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: setDateTimeToCurrent
static int setDateTimeToCurrent(sqlite3_context *context, DateTime *p){
  p->iJD = sqlite3StmtCurrentTime(context);
  if( p->iJD>0 ){
    p->validJD = 1;
    return 0;
  }else{
    return 1;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x50(%rdi), %r14
movq 0xc8(%r14), %rax
testq %rax, %rax
je 0x5d450
movq %rax, (%rbx)
testq %rax, %rax
jle 0x5d472
movb $0x1, 0x2a(%rbx)
xorl %eax, %eax
jmp 0x5d475
addq $0xc8, %r14
movq 0x8(%rdi), %rax
movq (%rax), %rdi
movq %r14, %rsi
callq 0x22e3c
testl %eax, %eax
je 0x5d47d
andq $0x0, (%r14)
andq $0x0, (%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r14), %rax
jmp 0x5d440
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: pcache1Create
static sqlite3_pcache *pcache1Create(int szPage, int szExtra, int bPurgeable){
  PCache1 *pCache;      /* The newly created page cache */
  PGroup *pGroup;       /* The group the new page cache will belong to */
  int sz;               /* Bytes of memory required to allocate the new cache */

  /*
  ** The separateCache variable is true if each PCache has its own private
  ** PGroup.  In other words, separateCache is true for mode (1) where no
  ** mutexing is required.
  **
  **   *  Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT
  **
  **   *  Always use a unified cache in single-threaded applications
  **
  **   *  Otherwise (if multi-threaded and ENABLE_MEMORY_MANAGEMENT is off)
  **      use separate caches (mode-1)
  */
#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
  const int separateCache = 0;
#else
  int separateCache = sqlite3GlobalConfig.bCoreMutex>0;
#endif

  assert( (szPage & (szPage-1))==0 && szPage>=512 && szPage<=65536 );
  assert( szExtra < 300 );

  sz = sizeof(PCache1) + sizeof(PGroup)*separateCache;
  pCache = (PCache1 *)sqlite3MallocZero(sz);
  if( pCache ){
    if( separateCache ){
      pGroup = (PGroup*)&pCache[1];
      pGroup->mxPinned = 10;
    }else{
      pGroup = &pcache1.grp;
    }
    pCache->pGroup = pGroup;
    pCache->szPage = szPage;
    pCache->szExtra = szExtra;
    pCache->bPurgeable = (bPurgeable ? 1 : 0);
    if( bPurgeable ){
      pCache->nMin = 10;
      pcache1EnterMutex(pGroup);
      pGroup->nMinPage += pCache->nMin;
      pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
      pcache1LeaveMutex(pGroup);
    }
  }
  return (sqlite3_pcache *)pCache;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
movl 0x2224d(%rip), %r12d    # 0x802a4
testl %r12d, %r12d
pushq $0x60
popq %rax
pushq $0x38
popq %rdi
cmovgl %eax, %edi
callq 0xc40b
movq %rax, %rbx
testq %rax, %rax
je 0x5e0eb
testl %r12d, %r12d
jle 0x5e085
movq %rbx, %r12
addq $0x38, %r12
movl $0xa, 0x48(%rbx)
jmp 0x5e08c
leaq 0x23ec4(%rip), %r12     # 0x81f50
movq %r12, (%rbx)
movl %r15d, 0x8(%rbx)
movl %r14d, 0xc(%rbx)
xorl %eax, %eax
testl %ebp, %ebp
setne %al
movl %eax, 0x10(%rbx)
je 0x5e0eb
movl $0xa, 0x14(%rbx)
movq (%r12), %rdi
testq %rdi, %rdi
je 0x5e0c2
callq *0x2226f(%rip)          # 0x80328
movl 0x14(%rbx), %eax
movq (%r12), %rdi
jmp 0x5e0c7
pushq $0xa
popq %rax
xorl %edi, %edi
addl 0xc(%r12), %eax
movl %eax, 0xc(%r12)
movl 0x8(%r12), %ecx
subl %eax, %ecx
addl $0xa, %ecx
movl %ecx, 0x10(%r12)
testq %rdi, %rdi
je 0x5e0eb
callq *0x2224d(%rip)          # 0x80338
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: pcache1Pagecount
static int pcache1Pagecount(sqlite3_pcache *p){
  int n;
  PCache1 *pCache = (PCache1*)p;
  pcache1EnterMutex(pCache->pGroup);
  n = pCache->nPage;
  pcache1LeaveMutex(pCache->pGroup);
  return n;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x5e18e
callq *0x221b0(%rip)          # 0x80328
movq (%rbx), %rax
movq (%rax), %rdi
movl 0x28(%rbx), %ebx
testq %rdi, %rdi
je 0x5e191
callq *0x221ac(%rip)          # 0x80338
jmp 0x5e191
movl 0x28(%rbx), %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: pcache1Unpin
static void pcache1Unpin(
  sqlite3_pcache *p, 
  sqlite3_pcache_page *pPg, 
  int reuseUnlikely
){
  PCache1 *pCache = (PCache1 *)p;
  PgHdr1 *pPage = (PgHdr1 *)pPg;
  PGroup *pGroup = pCache->pGroup;
 
  assert( pPage->pCache==pCache );
  pcache1EnterMutex(pGroup);

  /* It is an error to call this function if the page is already 
  ** part of the PGroup LRU list.
  */
  assert( pPage->pLruPrev==0 && pPage->pLruNext==0 );
  assert( pGroup->pLruHead!=pPage && pGroup->pLruTail!=pPage );

  if( reuseUnlikely || pGroup->nCurrentPage>pGroup->nMaxPage ){
    pcache1RemoveFromHash(pPage);
    pcache1FreePage(pPage);
  }else{
    /* Add the page to the PGroup LRU list. */
    if( pGroup->pLruHead ){
      pGroup->pLruHead->pLruPrev = pPage;
      pPage->pLruNext = pGroup->pLruHead;
      pGroup->pLruHead = pPage;
    }else{
      pGroup->pLruTail = pPage;
      pGroup->pLruHead = pPage;
    }
    pCache->nRecyclable++;
  }

  pcache1LeaveMutex(pCache->pGroup);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %r15
movq (%r15), %rdi
testq %rdi, %rdi
je 0x5e4ae
callq *0x21e7a(%rip)          # 0x80328
testl %ebp, %ebp
jne 0x5e4bc
movl 0x14(%r15), %eax
cmpl 0x8(%r15), %eax
jbe 0x5e4ee
movq %r14, %rdi
callq 0x5e730
movq %r14, %rdi
callq 0x5e75d
movq (%rbx), %rax
movq (%rax), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x5e4e7
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *0x21e51(%rip)          # 0x80338
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%r15), %rax
testq %rax, %rax
je 0x5e501
movq %r14, 0x30(%rax)
movq %rax, 0x28(%r14)
jmp 0x5e505
movq %r14, 0x20(%r15)
movq %r14, 0x18(%r15)
incl 0x24(%rbx)
jmp 0x5e4cc
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: pcache1Rekey
static void pcache1Rekey(
  sqlite3_pcache *p,
  sqlite3_pcache_page *pPg,
  unsigned int iOld,
  unsigned int iNew
){
  PCache1 *pCache = (PCache1 *)p;
  PgHdr1 *pPage = (PgHdr1 *)pPg;
  PgHdr1 **pp;
  unsigned int h; 
  assert( pPage->iKey==iOld );
  assert( pPage->pCache==pCache );

  pcache1EnterMutex(pCache->pGroup);

  h = iOld%pCache->nHash;
  pp = &pCache->apHash[h];
  while( (*pp)!=pPage ){
    pp = &(*pp)->pNext;
  }
  *pp = pPage->pNext;

  h = iNew%pCache->nHash;
  pPage->iKey = iNew;
  pPage->pNext = pCache->apHash[h];
  pCache->apHash[h] = pPage;
  if( iNew>pCache->iMaxKey ){
    pCache->iMaxKey = iNew;
  }

  pcache1LeaveMutex(pCache->pGroup);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x5e530
callq *0x21df8(%rip)          # 0x80328
movl 0x2c(%r14), %ecx
movl %ebp, %eax
xorl %edx, %edx
divl %ecx
shlq $0x3, %rdx
addq 0x30(%r14), %rdx
movq %rdx, %rax
movq (%rdx), %rsi
leaq 0x18(%rsi), %rdx
cmpq %r15, %rsi
jne 0x5e542
movq 0x18(%r15), %rdx
movq %rdx, (%rax)
movl %ebx, %eax
xorl %edx, %edx
divl %ecx
movl %ebx, 0x10(%r15)
movq 0x30(%r14), %rax
movq (%rax,%rdx,8), %rcx
movq %rcx, 0x18(%r15)
movq %r15, (%rax,%rdx,8)
cmpl %ebx, 0x20(%r14)
jae 0x5e57c
movl %ebx, 0x20(%r14)
movq (%r14), %rax
movq (%rax), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x5e597
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *0x21da1(%rip)          # 0x80338
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/sqlite3.c
// Function: pcache1Truncate
static void pcache1Truncate(sqlite3_pcache *p, unsigned int iLimit){
  PCache1 *pCache = (PCache1 *)p;
  pcache1EnterMutex(pCache->pGroup);
  if( iLimit<=pCache->iMaxKey ){
    pcache1TruncateUnsafe(pCache, iLimit);
    pCache->iMaxKey = iLimit-1;
  }
  pcache1LeaveMutex(pCache->pGroup);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x5e5b7
callq *0x21d71(%rip)          # 0x80328
cmpl %ebp, 0x20(%rbx)
jb 0x5e5cb
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5e7aa
decl %ebp
movl %ebp, 0x20(%rbx)
movq (%rbx), %rax
movq (%rax), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x5e5e2
popq %rbx
popq %rbp
jmpq *0x21d56(%rip)          # 0x80338
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/main.c
// Function: updateWindow
void
updateWindow()
{
	glXSwapBuffers(dpy, window);
	while(XPending(dpy)) {
		XEvent xev;
		XNextEvent(dpy, &xev);
		switch(xev.type) {
		case ClientMessage:
			if(xev.xclient.data.l[0] == wmDeleteWindow)
				running = 0;
			break;
		case ConfigureNotify:
			if(windowWidth != xev.xconfigure.width || windowHeight != xev.xconfigure.height) {
				windowWidth = xev.xconfigure.width;
				windowHeight = xev.xconfigure.height;

				resizeRenderingSystem(windowWidth, windowHeight);
			}
			break;

		case KeyPress:
			processKeyState(&xev, 1);
			break;
		case KeyRelease:
			processKeyState(&xev, 0);
			break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq 0x8f11(%rip), %rdi      # 0xb5a0
movq 0x8f3a(%rip), %rsi      # 0xb5d0
callq 0x21d0
leaq -0xd0(%rbp), %rbx
pushq $0x1
popq %r14
movq 0x8ef3(%rip), %rdi      # 0xb5a0
callq 0x22a0
testl %eax, %eax
je 0x2745
movq 0x8edf(%rip), %rdi      # 0xb5a0
movq %rbx, %rsi
callq 0x2200
movl -0xd0(%rbp), %eax
cmpl $0x2, %eax
je 0x2735
cmpl $0x3, %eax
je 0x26fc
cmpl $0x16, %eax
je 0x2703
cmpl $0x21, %eax
jne 0x26a6
movq -0x98(%rbp), %rax
cmpq 0x8ecf(%rip), %rax      # 0xb5c0
jne 0x26a6
movb $0x0, 0x8ee6(%rip)      # 0xb5e0
jmp 0x26a6
movq %rbx, %rdi
xorl %esi, %esi
jmp 0x273b
movl -0x98(%rbp), %edi
movl -0x94(%rbp), %esi
cmpl %edi, 0x8eb3(%rip)      # 0xb5c8
jne 0x271f
cmpl %esi, 0x8eaf(%rip)      # 0xb5cc
je 0x26a6
movl %edi, 0x8ea3(%rip)      # 0xb5c8
movl %esi, 0x8ea1(%rip)      # 0xb5cc
callq 0x5226
jmp 0x26a6
movq %rbx, %rdi
movl %r14d, %esi
callq 0x2751
jmp 0x26a6
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/k0n10pl4tr[P]minimal_crafter/main.c
// Function: processKeyState
void
processKeyState(XEvent *xev, unsigned char state)
{
	if(XLookupKeysym(&xev->xkey, 0) == XK_Left)   keyLeft = state;
	if(XLookupKeysym(&xev->xkey, 0) == XK_Right)  keyRight = state;
	if(XLookupKeysym(&xev->xkey, 0) == XK_Up)     keyUp = state;
	if(XLookupKeysym(&xev->xkey, 0) == XK_Down)   keyDown = state;
	if(XLookupKeysym(&xev->xkey, 0) == XK_w)      keyFront = state;
	if(XLookupKeysym(&xev->xkey, 0) == XK_s)      keyBack = state;
	if(XLookupKeysym(&xev->xkey, 0) == XK_space)  keySpace = state;
	if(XLookupKeysym(&xev->xkey, 0) == XK_Shift_L) keyShift = state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
xorl %esi, %esi
callq 0x2030
cmpq $0xff51, %rax           # imm = 0xFF51
jne 0x2774
movb %r14b, 0x8e6d(%rip)     # 0xb5e1
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2030
cmpq $0xff53, %rax           # imm = 0xFF53
jne 0x278d
movb %r14b, 0x8e55(%rip)     # 0xb5e2
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2030
cmpq $0xff52, %rax           # imm = 0xFF52
jne 0x27a6
movb %r14b, 0x8e3d(%rip)     # 0xb5e3
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2030
cmpq $0xff54, %rax           # imm = 0xFF54
jne 0x27bf
movb %r14b, 0x8e25(%rip)     # 0xb5e4
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2030
cmpq $0x77, %rax
jne 0x27d6
movb %r14b, 0x8e0f(%rip)     # 0xb5e5
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2030
cmpq $0x73, %rax
jne 0x27ed
movb %r14b, 0x8df9(%rip)     # 0xb5e6
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2030
cmpq $0x20, %rax
jne 0x2804
movb %r14b, 0x8de3(%rip)     # 0xb5e7
movq %rbx, %rdi
xorl %esi, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x2030