LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]flappy/sqlite3.c
// Function: resizeIndexObject
static int resizeIndexObject(sqlite3 *db, Index *pIdx, int N){
  char *zExtra;
  int nByte;
  if( pIdx->nColumn>=N ) return SQLITE_OK;
  assert( pIdx->isResized==0 );
  nByte = (sizeof(char*) + sizeof(i16) + 1)*N;
  zExtra = sqlite3DbMallocZero(db, nByte);
  if( zExtra==0 ) return SQLITE_NOMEM;
  memcpy(zExtra, pIdx->azColl, sizeof(char*)*pIdx->nColumn);
  pIdx->azColl = (char**)zExtra;
  zExtra += sizeof(char*)*N;
  memcpy(zExtra, pIdx->aiColumn, sizeof(i16)*pIdx->nColumn);
  pIdx->aiColumn = (i16*)zExtra;
  zExtra += sizeof(i16)*N;
  memcpy(zExtra, pIdx->aSortOrder, pIdx->nColumn);
  pIdx->aSortOrder = (u8*)zExtra;
  pIdx->nColumn = N;
  pIdx->isResized = 1;
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movzwl 0x60(%rsi), %eax
xorl %ebp, %ebp
cmpl %edx, %eax
jge 0x4d8ee
movl %edx, %r14d
movq %rsi, %rbx
leal (%r14,%r14,4), %eax
leal (%r14,%rax,2), %ebp
movl %ebp, %esi
callq 0x11af4
testq %rax, %rax
je 0x4d8e9
movq %rax, %r15
movslq %ebp, %rdx
xorl %ebp, %ebp
movq %rax, %rdi
xorl %esi, %esi
callq 0x7180
movl %r14d, %r12d
movq 0x40(%rbx), %rsi
movzwl 0x60(%rbx), %edx
shll $0x3, %edx
movq %r15, %rdi
callq 0x7230
movq %r15, 0x40(%rbx)
leaq (%r15,%r12,8), %r15
movq 0x8(%rbx), %rsi
movzwl 0x60(%rbx), %edx
addl %edx, %edx
movq %r15, %rdi
callq 0x7230
movq %r15, 0x8(%rbx)
leaq (%r15,%r12,2), %r15
movq 0x38(%rbx), %rsi
movzwl 0x60(%rbx), %edx
movq %r15, %rdi
callq 0x7230
movq %r15, 0x38(%rbx)
movw %r14w, 0x60(%rbx)
orb $0x10, 0x63(%rbx)
jmp 0x4d8ee
movl $0x7, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]flappy/sqlite3.c
// Function: exprProbability
static int exprProbability(Expr *p){
  double r = -1.0;
  if( p->op!=TK_FLOAT ) return -1;
  sqlite3AtoF(p->u.zToken, &r, sqlite3Strlen30(p->u.zToken), SQLITE_UTF8);
  assert( r>=0.0 );
  if( r>1.0 ) return -1;
  return (int)(r*1000.0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, (%rsp)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpb $-0x7d, (%rdi)
jne 0x4ed81
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x4ed54
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rdi, %rax
incl %edx
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x4ed41
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
jmp 0x4ed56
xorl %edx, %edx
movq %rsp, %r14
movq %r14, %rsi
movl $0x1, %ecx
callq 0x25ff4
movsd (%r14), %xmm0
ucomisd 0x212ad(%rip), %xmm0    # 0x70020
ja 0x4ed81
mulsd 0x212ab(%rip), %xmm0    # 0x70028
cvttsd2si %xmm0, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]flappy/sqlite3.c
// Function: setJoinExpr
static void setJoinExpr(Expr *p, int iTable){
  while( p ){
    ExprSetProperty(p, EP_FromJoin);
    assert( !ExprHasProperty(p, EP_TokenOnly|EP_Reduced) );
    ExprSetVVAProperty(p, EP_NoReduce);
    p->iRightJoinTable = (i16)iTable;
    setJoinExpr(p->pLeft, iTable);
    p = p->pRight;
  } 
}

// Assembly:
testq %rdi, %rdi
je 0x50efc
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
orb $0x1, 0x4(%r14)
movw %bx, 0x34(%r14)
movq 0x10(%r14), %rdi
movl %ebx, %esi
callq 0x50ec9
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0x50ed7
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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), %rcx
cmpb $0x0, 0x50(%rcx)
je 0x5146b
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x28(%rdx), %rax
movq %rax, 0x28(%rsp)
cmpw $0x0, 0x42(%rsi)
jle 0x51561
movq %rcx, (%rsp)
movq %rdi, 0x8(%rsp)
movq (%rdx), %rax
movq 0x8(%rax), %rbx
movq 0x8(%r15), %r13
addq $0x2a, %r13
xorl %r14d, %r14d
xorl %r12d, %r12d
movq %r15, 0x10(%rsp)
movq (%rbx), %rbp
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x51580
movq (%rsp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x104cc
movq %rax, -0x12(%r13)
movzbl (%r13), %eax
movq %rax, 0x18(%rsp)
movq %rbp, %rdi
callq 0x4c0a0
testb %al, %al
movzbl %al, %eax
movl $0x62, %ecx
cmovel %ecx, %eax
movb %al, -0x1(%r13)
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x49db7
testq %rax, %rax
je 0x51538
movq (%rax), %rsi
movq %r15, %rdi
callq 0x104cc
movq %rax, -0xa(%r13)
addq 0x18(%rsp), %r12
incq %r14
movq 0x10(%rsp), %r15
movswq 0x42(%r15), %rax
addq $0x20, %rbx
addq $0x30, %r13
cmpq %rax, %r14
jl 0x514ce
shlq $0x2, %r12
jmp 0x51564
xorl %r12d, %r12d
movq %r12, %rdi
callq 0x3530e
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_O1/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 0x51866
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 0x51858
movq %rdx, %r15
movl (%rdx), %edx
cmpl 0x70(%rcx), %edx
jle 0x5180a
leaq 0x20a93(%rip), %rsi     # 0x72289
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x11c1f
movl $0x1, %eax
jmp 0x51858
cmpl $0x0, (%r15)
jle 0x51858
movq (%rsi), %r13
movq 0x8(%r15), %rbp
movl $0x1, %r12d
movzwl 0x1c(%rbp), %edx
testl %edx, %edx
je 0x51845
movl (%r13), %r8d
cmpl %edx, %r8d
jl 0x51867
decl %edx
movq (%rbp), %rcx
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %r8
xorl %r9d, %r9d
callq 0x4ef6f
addq $0x20, %rbp
leal 0x1(%r12), %eax
cmpl (%r15), %r12d
movl %eax, %r12d
jl 0x5181d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x209e3(%rip), %rsi     # 0x72251
movq %r14, %rdi
movl %r12d, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x11c1f
jmp 0x51803
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r13
movl %edx, %ebp
movslq %esi, %r15
leaq 0x4(,%r15,4), %r12
leaq (%r15,%r15), %rax
movq %rax, 0x10(%rsp)
addl %r15d, %eax
addl %r12d, %eax
addl $0x7, %eax
andl $-0x8, %eax
leaq (%rax,%r15,8), %rbx
addq $0x68, %rbx
addl %ebx, %ebp
movl %ebp, %esi
callq 0x11af4
movq %rax, %r14
testq %rax, %rax
je 0x51b75
movq %r13, 0x8(%rsp)
movq %r15, %r13
shlq $0x3, %r13
movslq %ebp, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x7180
leaq 0x68(%r14), %rax
movq %rax, 0x40(%r14)
leaq (%r14,%r13), %rax
addq $0x68, %rax
movq %rax, 0x10(%r14)
addq %rax, %r12
movq %r12, 0x8(%r14)
addq 0x10(%rsp), %r12
movq %r12, 0x38(%r14)
movw %r15w, 0x60(%r14)
leal -0x1(%r15), %eax
movw %ax, 0x5e(%r14)
movslq %ebx, %rax
addq %r14, %rax
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
testq %rsi, %rsi
je 0x52046
movq %rsi, %r14
movq %rdi, %r15
movl $0x1, %ebx
movq (%r14), %rsi
movq %r15, %rdi
callq 0x520dc
testl %eax, %eax
jne 0x52048
movq 0x28(%r14), %rsi
movq %r15, %rdi
callq 0x519b7
testl %eax, %eax
jne 0x52048
movq 0x30(%r14), %rsi
movq %r15, %rdi
callq 0x52050
testl %eax, %eax
jne 0x52048
movq 0x38(%r14), %rsi
movq %r15, %rdi
callq 0x520dc
testl %eax, %eax
jne 0x52048
movq 0x40(%r14), %rsi
movq %r15, %rdi
callq 0x52050
testl %eax, %eax
jne 0x52048
movq 0x48(%r14), %rsi
movq %r15, %rdi
callq 0x520dc
testl %eax, %eax
jne 0x52048
movq 0x68(%r14), %rsi
movq %r15, %rdi
callq 0x52050
testl %eax, %eax
jne 0x52048
movq 0x70(%r14), %rsi
movq %r15, %rdi
callq 0x52050
testl %eax, %eax
jne 0x52048
movq 0x50(%r14), %r14
testq %r14, %r14
jne 0x51fba
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x520d4
movq %rsi, %r15
movq %rdi, %r14
cmpb $-0x7a, (%r15)
jne 0x5207b
movq (%r14), %rdi
movq (%rdi), %rax
cmpb $0x0, 0x99(%rax)
je 0x520bd
movb $0x63, (%r15)
movl 0x4(%r15), %eax
btl $0xe, %eax
jb 0x520d4
btl $0xb, %eax
movq 0x20(%r15), %rsi
movq %r14, %rdi
jb 0x52099
callq 0x520dc
jmp 0x5209e
callq 0x51fa1
testl %eax, %eax
jne 0x520cf
movq 0x18(%r15), %rsi
movq %r14, %rdi
callq 0x52050
testl %eax, %eax
jne 0x520cf
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x52062
jmp 0x520d4
movq 0x20(%r14), %rdx
leaq 0x204ef(%rip), %rsi     # 0x725b7
xorl %eax, %eax
callq 0x11c1f
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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), %r14
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movl $0xc8, 0x30(%rsp)
movw $0x1, 0x34(%rsp)
movq %rdi, 0x8(%rsp)
movq (%rdi), %rax
movq %rax, 0x10(%rsp)
cmpw $0x0, 0x5e(%rdx)
je 0x5241f
xorl %ebp, %ebp
leaq 0x10(%rsp), %r12
leaq 0x19d08(%rip), %r13     # 0x6c0b8
movq 0x8(%r14), %rax
movq 0x8(%r15), %rcx
movswq (%rcx,%rbp,2), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rbx
testq %rbp, %rbp
je 0x523e2
movq %r12, %rdi
leaq 0x201f7(%rip), %rsi     # 0x725cf
movl $0x2, %edx
callq 0x186e8
movq (%r14), %rsi
movq %r12, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x186e8
movq %r12, %rdi
movq %r13, %rsi
movl $0x1, %edx
callq 0x186e8
movq %r12, %rdi
movq %rbx, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x186e8
incq %rbp
movzwl 0x5e(%r15), %eax
cmpq %rax, %rbp
jb 0x523b0
leaq 0x10(%rsp), %rdi
callq 0xb75e
movb 0x63(%r15), %cl
andb $0x3, %cl
xorl %esi, %esi
cmpb $0x2, %cl
setne %sil
shll $0x9, %esi
addl $0x613, %esi            # imm = 0x613
movq 0x8(%rsp), %rdi
movl 0x4(%rsp), %edx
movq %rax, %rcx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl $0x2, %r9d
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4ad4b
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpq $0x0, 0x20(%rsi)
jne 0x524ed
movq 0x18(%rbx), %r14
movq (%rdi), %r15
movzwl 0x60(%rbx), %edi
incl %edi
callq 0xa35e
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x524d7
cmpw $0x0, 0x60(%rbx)
je 0x524de
xorl %ecx, %ecx
movq 0x8(%rbx), %rdx
movswq (%rdx,%rcx,2), %rdx
testq %rdx, %rdx
js 0x524c0
movq 0x8(%r14), %rsi
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
movb 0x29(%rsi,%rdx), %dl
jmp 0x524c2
movb $0x64, %dl
movq 0x20(%rbx), %rsi
movb %dl, (%rsi,%rcx)
incq %rcx
movzwl 0x60(%rbx), %edx
cmpq %rdx, %rcx
jb 0x524a0
jmp 0x524e0
movb $0x1, 0x50(%r15)
jmp 0x524e8
xorl %ecx, %ecx
movq 0x20(%rbx), %rdx
movb $0x0, (%rdx,%rcx)
testq %rax, %rax
je 0x524f7
movq 0x20(%rbx), %rax
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
jmp 0x524f1
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl 0x18(%rdi), %eax
cmpl %eax, 0x14(%rdi)
jl 0x5aaa5
movq (%r14), %rcx
movq 0x20(%r14), %rbp
movq (%rcx), %rcx
movq (%rcx), %r13
imull $0x70, %eax, %esi
movq %r13, %rdi
callq 0x11af4
movq %rax, %r12
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0x5aa88
movslq 0x14(%r14), %rax
imulq $0x38, %rax, %rdx
movq %r12, %rdi
movq %rbp, %rsi
callq 0x7230
leaq 0x28(%r14), %rax
cmpq %rax, %rbp
je 0x5aa39
movq %r13, %rdi
movq %rbp, %rsi
callq 0x9b58
movq 0x20(%r14), %rdi
testq %r13, %r13
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x5aa69
cmpq %rdi, 0x160(%r13)
ja 0x5aa69
cmpq %rdi, 0x168(%r13)
jbe 0x5aa69
movzwl 0x140(%r13), %eax
jmp 0x5aa6f
callq *0x2e861(%rip)          # 0x892d0
cltq
shrq $0x3, %rax
movabsq $0x2492492492492493, %rcx # imm = 0x2492492492492493
mulq %rcx
movl %edx, 0x18(%r14)
jmp 0x5aa9c
testb $0x1, %bl
je 0x5aa98
movq %r13, %rdi
movq %r15, %rsi
callq 0x3572a
movq %rbp, 0x20(%r14)
testq %r12, %r12
je 0x5ab30
movslq 0x14(%r14), %r12
leal 0x1(%r12), %eax
movl %eax, 0x14(%r14)
imulq $0x38, %r12, %r13
addq 0x20(%r14), %r13
testq %r15, %r15
je 0x5ab03
movw $0xffff, %ax            # imm = 0xFFFF
testb $0x4, 0x6(%r15)
je 0x5aad6
movslq 0x2c(%r15), %rdi
callq 0x3530e
addl $-0x63, %eax
movw %ax, 0x18(%r13)
testq %r15, %r15
je 0x5ab0a
movl 0x4(%r15), %eax
btl $0xc, %eax
jae 0x5ab0a
btl $0x12, %eax
jb 0x5aaf6
addq $0x10, %r15
jmp 0x5aafe
movq 0x20(%r15), %rax
movq 0x8(%rax), %r15
movq (%r15), %r15
jmp 0x5aadb
movw $0xffff, 0x18(%r13)     # imm = 0xFFFF
movq %r15, (%r13)
movb %bl, 0x1c(%r13)
movq %r14, 0x20(%r13)
movl $0xffffffff, 0x8(%r13)  # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r12d, %r12d
jmp 0x5ab1e
// File: /workspace/github_c_makefile_star2_O1/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 0x5d45f
leal 0x31(%rax), %ecx
cmpl %esi, %ecx
jge 0x5d470
movl %esi, %eax
retq
leal 0x31(%rsi), %ecx
cmpl %eax, %ecx
jl 0x5d45e
leal 0x1f(%rsi), %ecx
cmpl %eax, %ecx
jge 0x5d47b
incl %eax
retq
leal 0x1f(%rax), %ecx
cmpl %esi, %ecx
jge 0x5d490
leal 0x1(%rsi), %eax
retq
movl %eax, %ecx
subl %esi, %ecx
movslq %ecx, %rcx
leaq 0x16f57(%rip), %rdx     # 0x743e0
movzbl (%rcx,%rdx), %ecx
addl %ecx, %eax
retq
movl %esi, %ecx
subl %eax, %ecx
movslq %ecx, %rax
leaq 0x16f42(%rip), %rcx     # 0x743e0
movzbl (%rax,%rcx), %eax
addl %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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:
pushq %rbx
movq (%rdi), %rax
movq (%rax), %rax
movq (%rax), %rax
testb $0x10, 0x4d(%rax)
jne 0x5d564
movl 0x14(%rdi), %eax
testl %eax, %eax
jle 0x5d564
movq 0x8(%rsi), %rcx
movq (%rsi), %rdx
orq %rcx, %rdx
notq %rdx
movq 0x20(%rdi), %rdi
movq %rdi, %r8
testb $0x2, 0x1c(%r8)
jne 0x5d564
movq 0x30(%r8), %r9
testq %rcx, %r9
je 0x5d550
andq %rdx, %r9
jne 0x5d550
movzwl 0x2c(%rsi), %r9d
testl %r9d, %r9d
je 0x5d541
movq 0x30(%rsi), %r10
movl %r9d, %r9d
movq -0x8(%r10,%r9,8), %r11
testq %r11, %r11
je 0x5d531
cmpq %r8, %r11
je 0x5d541
movl 0x8(%r11), %r11d
testl %r11d, %r11d
setns %bl
movl %r11d, %r11d
imulq $0x38, %r11, %r11
addq %rdi, %r11
cmpq %r8, %r11
sete %r11b
testb %r11b, %bl
jne 0x5d541
decq %r9
leaq 0x1(%r9), %r11
cmpq $0x1, %r11
jg 0x5d502
xorl %r9d, %r9d
testl %r9d, %r9d
jg 0x5d550
movzwl 0x18(%r8), %r9d
addw %r9w, 0x16(%rsi)
leal -0x1(%rax), %r9d
addq $0x38, %r8
cmpl $0x1, %eax
movl %r9d, %eax
jg 0x5d4d8
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e562
movb 0x1c(%rsi), %al
testb $0x4, %al
jne 0x5e562
cmpl $0x0, (%rdi)
je 0x5e534
movq (%rsi), %rcx
testb $0x1, 0x4(%rcx)
je 0x5e562
movq 0x30(%rsi), %rcx
testq %rcx, 0x48(%rdi)
jne 0x5e562
orb $0x4, %al
movb %al, 0x1c(%rsi)
movslq 0x8(%rsi), %rax
testq %rax, %rax
js 0x5e562
movq 0x20(%rsi), %rcx
movq 0x20(%rcx), %rcx
imulq $0x38, %rax, %rax
leaq (%rcx,%rax), %rsi
decb 0x1d(%rcx,%rax)
je 0x5e51a
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5e809
movq 0x10(%rsi), %rsi
jmp 0x5e7f0
cmpl $0x85, %r8d
jne 0x5e815
movb 0x36(%rsi), %al
movzbl %al, %eax
addl $-0x5f, %eax
cmpl $0x25, %eax
ja 0x5e831
movabsq $0x3800000001, %rsi     # imm = 0x3800000001
btq %rax, %rsi
jae 0x5e831
retq
movl $0x4a, %esi
xorl %r8d, %r8d
jmp 0x47fb1
// File: /workspace/github_c_makefile_star2_O1/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:
movl $0x1, %eax
cmpw $0xa, %di
jl 0x5ea90
movzwl %di, %eax
imull $0xcccd, %eax, %ecx     # imm = 0xCCCD
shrl $0x13, %ecx
leal (%rcx,%rcx), %edx
leal (%rdx,%rdx,4), %edx
movl %edi, %esi
subl %edx, %esi
movzwl %si, %esi
leaq -0x2(%rsi), %r8
leaq -0x1(%rsi), %r9
xorl %edx, %edx
testw %si, %si
cmovneq %r9, %rdx
cmpw $0x5, %si
cmovaeq %r8, %rdx
addq $0x8, %rdx
cmpw $0x1e, %di
jb 0x5ea84
addb $-0x3, %cl
shlq %cl, %rdx
cmpl $0x262, %eax            # imm = 0x262
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmovbq %rdx, %rax
retq
movb $0x3, %al
subb %cl, %al
movl %eax, %ecx
shrq %cl, %rdx
movq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
pushq %rax
movq (%rdi), %rax
testb $0x8, 0x2e(%rax)
jne 0x5f39b
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
movq %rsi, %rbx
testq %rdx, %rdx
je 0x5f423
movl %ecx, %ebp
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x5f3f1
movl $0x1, %eax
movslq 0x28(%rcx), %rdx
testq %rdx, %rdx
jle 0x5f3e8
shlq $0x4, %rdx
xorl %esi, %esi
movslq 0x40(%rcx,%rsi), %rdi
cmpl $0x0, (%r14,%rdi,4)
jns 0x5f390
testl %ebp, %ebp
je 0x5f3df
movswl 0x40(%rbx), %r8d
cmpl %r8d, %edi
je 0x5f390
addq $0x10, %rsi
cmpq %rsi, %rdx
jne 0x5f3c5
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x5f3b6
movq %rbx, %rdi
callq 0x529ef
testq %rax, %rax
je 0x5f38e
movq %rax, %r15
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebp, %ecx
callq 0x5fc5b
testl %eax, %eax
jne 0x5f44b
movq 0x18(%r15), %r15
testq %r15, %r15
jne 0x5f401
jmp 0x5f38e
movq %rbx, %rdi
callq 0x529ef
movq %rax, %rcx
movl $0x1, %eax
testq %rcx, %rcx
jne 0x5f390
xorl %eax, %eax
cmpq $0x0, 0x20(%rbx)
setne %al
jmp 0x5f390
movl $0x1, %eax
jmp 0x5f390
// File: /workspace/github_c_makefile_star2_O1/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:
movslq 0x28(%rsi), %rax
testq %rax, %rax
jle 0x5fd43
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
addq $0x40, %rsi
movswq 0x42(%rdi), %r8
xorl %r9d, %r9d
leaq 0xd70b(%rip), %r10      # 0x6d390
testw %r8w, %r8w
jle 0x5fd23
movq %r9, %r11
shlq $0x4, %r11
movq 0x8(%rsi,%r11), %r11
xorl %ebx, %ebx
cmpl $0x0, (%rdx,%rbx,4)
jns 0x5fcb4
testl %ecx, %ecx
je 0x5fd17
movswq 0x40(%rdi), %r14
movl %r14d, %r14d
cmpq %r14, %rbx
jne 0x5fd17
leaq (%rbx,%rbx,2), %r14
shlq $0x4, %r14
addq 0x8(%rdi), %r14
testq %r11, %r11
je 0x5fcf9
movq (%r14), %r15
movb (%r15), %bpl
testb %bpl, %bpl
je 0x5fd02
incq %r15
movq %r11, %r14
movzbl %bpl, %r12d
movb (%r12,%r10), %r12b
movzbl (%r14), %r13d
cmpb (%r13,%r10), %r12b
jne 0x5fd05
incq %r14
movb (%r15), %bpl
incq %r15
testb %bpl, %bpl
jne 0x5fcd6
jmp 0x5fd05
testb $0x1, 0x2b(%r14)
je 0x5fd17
jmp 0x5fd33
movq %r11, %r14
movzbl %bpl, %r15d
movb (%r15,%r10), %bpl
movzbl (%r14), %r14d
cmpb (%r14,%r10), %bpl
je 0x5fd33
incq %rbx
cmpq %r8, %rbx
jne 0x5fc9d
incq %r9
cmpq %rax, %r9
jne 0x5fc85
xorl %eax, %eax
jmp 0x5fd38
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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, %r15
movl %ecx, %ebp
movl %edx, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
testb $0x20, 0x48(%rsi)
jne 0x60627
xorl %r14d, %r14d
movq 0x10(%rsi), %r12
testq %r12, %r12
je 0x60618
movq 0x10(%rsp), %rax
movq 0x10(%rax), %r13
movq %r15, %rbx
testq %r15, %r15
je 0x605a3
cmpq %r14, %r12
je 0x60604
cmpl $0x0, (%rbx)
jne 0x605a8
jmp 0x60604
cmpq %r14, %r12
je 0x60604
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movl 0x8(%rsp), %edx
xorl %ecx, %ecx
movl $0x1, %r8d
leaq 0xc(%rsp), %r9
callq 0x52128
xorl %ecx, %ecx
testb $0x8, 0x63(%r12)
sete %cl
movzwl 0x5e(%r12,%rcx,2), %r8d
movq %r13, %rdi
movl $0x6a, %esi
movl %ebp, %edx
movl %eax, %ecx
callq 0x47fb1
movl 0xc(%rsp), %eax
testl %eax, %eax
jns 0x60604
movq 0x40(%r13), %rcx
testq %rcx, %rcx
je 0x60604
notl %eax
movl 0x34(%r13), %edx
movl %eax, %eax
movl %edx, (%rcx,%rax,4)
movq 0x28(%r12), %r12
incl %ebp
addq $0x4, %rbx
testq %r12, %r12
jne 0x60592
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsi), %r14
testq %r14, %r14
je 0x60579
movb 0x63(%r14), %al
andb $0x3, %al
cmpb $0x2, %al
je 0x60579
movq 0x28(%r14), %r14
jmp 0x6062b
// File: /workspace/github_c_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdi), %r14
movq %rsp, %rdx
movq $0x0, (%rdx)
movl $0x0, 0x8(%rdx)
movq %r14, %rdi
movl $0x85, %esi
xorl %ecx, %ecx
callq 0x510f7
testq %rax, %rax
je 0x621b1
testw %bp, %bp
js 0x621a7
cmpw %bp, 0x40(%r12)
jne 0x621b5
movl %r15d, 0x2c(%rax)
movb $0x64, 0x1(%rax)
jmp 0x621f2
xorl %eax, %eax
jmp 0x621f2
movswl %bp, %ecx
movq 0x8(%r12), %rdx
movzwl %bp, %esi
leaq (%rsi,%rsi,2), %rsi
shll $0x4, %esi
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 0x621e7
movq 0x10(%r14), %rcx
movq (%rcx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4f114
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x63537
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq (%rax,%rcx), %rcx
leaq 0xe2bc(%rip), %rsi      # 0x717e5
xorl %eax, %eax
callq 0x11ce7
movl $0x613, %esi            # imm = 0x613
jmp 0x6354a
leaq 0xf7dd(%rip), %rsi      # 0x72d1b
xorl %eax, %eax
callq 0x11ce7
movl $0xa13, %esi            # imm = 0xA13
movq %r14, %rdi
movl %ebx, %edx
movq %rax, %rcx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl $0x2, %r9d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4ad4b
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]flappy/sqlite3.c
// Function: sqlite3ExprCodeAndCache
SQLITE_PRIVATE int sqlite3ExprCodeAndCache(Parse *pParse, Expr *pExpr, int target){
  Vdbe *v = pParse->pVdbe;
  int inReg;
  inReg = sqlite3ExprCode(pParse, pExpr, target);
  assert( target>0 );
  /* The only place, other than this routine, where expressions can be
  ** converted to TK_REGISTER is internal subexpressions in BETWEEN and
  ** CASE operators.  Neither ever calls this routine.  And this routine
  ** is never called twice on the same expression.  Hence it is impossible
  ** for the input to this routine to already be a register.  Nevertheless,
  ** it seems prudent to keep the ALWAYS() in case the conditions above
  ** change with future modifications or enhancements. */
  if( ALWAYS(pExpr->op!=TK_REGISTER) ){  
    int iMem;
    iMem = ++pParse->nMem;
    sqlite3VdbeAddOp2(v, OP_Copy, inReg, iMem);
    exprToRegister(pExpr, iMem);
  }
  return inReg;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
movq 0x10(%rdi), %r15
callq 0x4802e
cmpb $-0x7b, (%r14)
je 0x6411a
movl 0x58(%r12), %ebp
incl %ebp
movl %ebp, 0x58(%r12)
movq %r15, %rdi
movl $0x1e, %esi
movl %ebx, %edx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x47fb1
movb (%r14), %al
movb %al, 0x36(%r14)
movb $-0x7b, (%r14)
movl %ebp, 0x2c(%r14)
andb $-0x11, 0x5(%r14)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movzwl 0x5e(%rsi), %r12d
xorl %ebx, %ebx
cmpw %r12w, 0x5e(%rdi)
jne 0x64224
movq %rsi, %r15
movq %rdi, %r14
movb 0x62(%rdi), %al
cmpb 0x62(%rsi), %al
jne 0x64224
testq %r12, %r12
je 0x6420b
movq 0x8(%r15), %rax
movq %rax, (%rsp)
movq 0x8(%r14), %rbp
xorl %ebx, %ebx
xorl %r13d, %r13d
movq (%rsp), %rax
movzwl (%rax,%r13,2), %eax
cmpw (%rbp,%r13,2), %ax
jne 0x64224
movq 0x38(%r15), %rax
movb (%rax,%r13), %al
movq 0x38(%r14), %rcx
cmpb (%rcx,%r13), %al
jne 0x64224
movq 0x40(%r15), %rax
movq (%rax,%r13,8), %rdi
movq 0x40(%r14), %rax
movq (%rax,%r13,8), %rsi
callq 0x64125
testl %eax, %eax
je 0x64224
incq %r13
cmpq %r13, %r12
jne 0x641c7
movq 0x48(%r15), %rdi
movq 0x48(%r14), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4b3cb
xorl %ebx, %ebx
testl %eax, %eax
sete %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_O1/skeeto[P]flappy/sqlite3.c
// Function: sqlite3BtreeSetMmapLimit
SQLITE_PRIVATE int sqlite3BtreeSetMmapLimit(Btree *p, sqlite3_int64 szMmap){
  BtShared *pBt = p->pBt;
  assert( sqlite3_mutex_held(p->db->mutex) );
  sqlite3BtreeEnter(p);
  sqlite3PagerSetMmapLimit(pBt->pPager, szMmap);
  sqlite3BtreeLeave(p);
  return SQLITE_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %r15
callq 0xd284
movq (%r15), %rdi
movq %r14, 0xa0(%rdi)
callq 0x1e4f9
cmpb $0x0, 0x11(%rbx)
je 0x6456f
decl 0x14(%rbx)
jne 0x6456f
movq 0x8(%rbx), %rax
movq 0x50(%rax), %rdi
testq %rdi, %rdi
je 0x6456b
callq *0x24dbd(%rip)          # 0x89328
movb $0x0, 0x12(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movl %edx, %ebx
testq %rsi, %rsi
je 0x64b1c
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rsi, %rax
incl %edx
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x64b09
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
jmp 0x64b1e
xorl %edx, %edx
movl $0x2, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x162c0
testq %rax, %rax
je 0x64b3d
movzbl %bl, %ecx
orw %cx, 0x2(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/skeeto[P]flappy/sqlite3.c
// Function: pthreadMutexAlloc
static sqlite3_mutex *pthreadMutexAlloc(int iType){
  static sqlite3_mutex staticMutexes[] = {
    SQLITE3_MUTEX_INITIALIZER,
    SQLITE3_MUTEX_INITIALIZER,
    SQLITE3_MUTEX_INITIALIZER,
    SQLITE3_MUTEX_INITIALIZER,
    SQLITE3_MUTEX_INITIALIZER,
    SQLITE3_MUTEX_INITIALIZER
  };
  sqlite3_mutex *p;
  switch( iType ){
    case SQLITE_MUTEX_RECURSIVE: {
      p = sqlite3MallocZero( sizeof(*p) );
      if( p ){
#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
        /* If recursive mutexes are not available, we will have to
        ** build our own.  See below. */
        pthread_mutex_init(&p->mutex, 0);
#else
        /* Use a recursive mutex if it is available */
        pthread_mutexattr_t recursiveAttr;
        pthread_mutexattr_init(&recursiveAttr);
        pthread_mutexattr_settype(&recursiveAttr, PTHREAD_MUTEX_RECURSIVE);
        pthread_mutex_init(&p->mutex, &recursiveAttr);
        pthread_mutexattr_destroy(&recursiveAttr);
#endif
#if SQLITE_MUTEX_NREF
        p->id = iType;
#endif
      }
      break;
    }
    case SQLITE_MUTEX_FAST: {
      p = sqlite3MallocZero( sizeof(*p) );
      if( p ){
#if SQLITE_MUTEX_NREF
        p->id = iType;
#endif
        pthread_mutex_init(&p->mutex, 0);
      }
      break;
    }
    default: {
      assert( iType-2 >= 0 );
      assert( iType-2 < ArraySize(staticMutexes) );
      p = &staticMutexes[iType-2];
#if SQLITE_MUTEX_NREF
      p->id = iType;
#endif
      break;
    }
  }
  return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testl %edi, %edi
je 0x6715e
cmpl $0x1, %edi
jne 0x6718e
movl $0x28, %edi
callq 0xa35e
testq %rax, %rax
je 0x671a5
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x20(%rax)
leaq 0x4(%rsp), %r14
movq %r14, %rdi
callq 0x7040
movq %r14, %rdi
movl $0x1, %esi
callq 0x7400
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7430
movq %r14, %rdi
callq 0x7420
jmp 0x671a7
movl $0x28, %edi
callq 0xa35e
testq %rax, %rax
je 0x671a5
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x20(%rax)
movq %rax, %rdi
xorl %esi, %esi
callq 0x7430
jmp 0x671a7
addl $-0x2, %edi
movslq %edi, %rax
leaq (%rax,%rax,4), %rax
leaq 0x23e21(%rip), %rcx     # 0x8afc0
leaq (%rcx,%rax,8), %rbx
jmp 0x671a7
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
movl $0x1, %esi
callq 0xf281
movq %rax, %r14
movq 0x8(%rbx), %r15
movq $0x0, 0x8(%rsp)
cmpl $0x2, %ebp
jne 0x6883d
movq 0x8(%r12), %rdi
movl $0x1, %esi
callq 0xf281
movq %rax, %rdx
jmp 0x6883f
xorl %edx, %edx
testq %r14, %r14
je 0x6888c
leaq 0x8(%rsp), %rcx
movq %r15, %rdi
movq %r14, %rsi
callq 0x13291
testl %eax, %eax
je 0x6888c
leaq 0x8(%rbx), %rdi
movq 0x8(%rsp), %rsi
movl $0x1, 0x5c(%rbx)
movb $0x1, 0x61(%rbx)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
callq 0xf40a
movq 0x8(%rsp), %rdi
callq 0xa3cf
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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), %rax
leaq 0xc8(%rax), %r14
cmpq $0x0, 0xc8(%rax)
jne 0x6a186
movq 0x8(%rdi), %rax
movq (%rax), %rdi
movq %r14, %rsi
callq 0x26c80
testl %eax, %eax
je 0x6a186
movq $0x0, (%r14)
movq (%r14), %rax
movq %rax, (%rbx)
testq %rax, %rax
jle 0x6a199
movb $0x1, 0x2a(%rbx)
xorl %eax, %eax
jmp 0x6a19e
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq