LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprAddCollateString
SQLITE_PRIVATE Expr *sqlite3ExprAddCollateString(Parse *pParse, Expr *pExpr, const char *zC){
  Token s;
  assert( zC!=0 );
  s.z = zC;
  s.n = sqlite3Strlen30(s.z);
  return sqlite3ExprAddCollateToken(pParse, pExpr, &s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x28(%rbp), %r15
movq %rdx, (%r15)
movq %rdx, %rdi
callq 0x8f8e
movl %eax, 0x8(%r15)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x3ea95
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: dupedExprSize
static int dupedExprSize(Expr *p, int flags){
  int nByte = 0;
  if( p ){
    nByte = dupedExprNodeSize(p, flags);
    if( flags&EXPRDUP_REDUCE ){
      nByte += dupedExprSize(p->pLeft, flags) + dupedExprSize(p->pRight, flags);
    }
  }
  return nByte;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %r15
xorl %ebx, %ebx
xorl %r13d, %r13d
testq %r15, %r15
je 0x4439d
movq %r15, %rdi
movl %r14d, %esi
callq 0x4463e
movl %eax, %r12d
testb $0x1, %r14b
je 0x4439a
movq 0x10(%r15), %rdi
movl %r14d, %esi
callq 0x4434d
movq 0x18(%r15), %r15
addl %r13d, %r12d
addl %eax, %r12d
movl %r12d, %r13d
jmp 0x44366
movl %r12d, %ebx
addl %r13d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3SelectDup
SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
  Select *pNew, *pPrior;
  if( p==0 ) return 0;
  pNew = sqlite3DbMallocRaw(db, sizeof(*p) );
  if( pNew==0 ) return 0;
  pNew->pEList = sqlite3ExprListDup(db, p->pEList, flags);
  pNew->pSrc = sqlite3SrcListDup(db, p->pSrc, flags);
  pNew->pWhere = sqlite3ExprDup(db, p->pWhere, flags);
  pNew->pGroupBy = sqlite3ExprListDup(db, p->pGroupBy, flags);
  pNew->pHaving = sqlite3ExprDup(db, p->pHaving, flags);
  pNew->pOrderBy = sqlite3ExprListDup(db, p->pOrderBy, flags);
  pNew->op = p->op;
  pNew->pPrior = pPrior = sqlite3SelectDup(db, p->pPrior, flags);
  if( pPrior ) pPrior->pNext = pNew;
  pNew->pNext = 0;
  pNew->pLimit = sqlite3ExprDup(db, p->pLimit, flags);
  pNew->pOffset = sqlite3ExprDup(db, p->pOffset, flags);
  pNew->iLimit = 0;
  pNew->iOffset = 0;
  pNew->selFlags = p->selFlags & ~SF_UsesEphemeral;
  pNew->pRightmost = 0;
  pNew->addrOpenEphm[0] = -1;
  pNew->addrOpenEphm[1] = -1;
  pNew->addrOpenEphm[2] = -1;
  return pNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x444f4
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %r12
pushq $0x78
popq %rsi
callq 0x103b4
testq %rax, %rax
je 0x444f4
movq %rax, %rbx
movq (%r14), %rsi
movq %r12, %rdi
movl %r15d, %edx
callq 0x44502
movq %rax, (%rbx)
movq 0x28(%r14), %rsi
movq %r12, %rdi
movl %r15d, %edx
callq 0x4467b
movq %rax, 0x28(%rbx)
movq 0x30(%r14), %rsi
movq %r12, %rdi
movl %r15d, %edx
callq 0x440d6
movq %rax, 0x30(%rbx)
movq 0x38(%r14), %rsi
movq %r12, %rdi
movl %r15d, %edx
callq 0x44502
movq %rax, 0x38(%rbx)
movq 0x40(%r14), %rsi
movq %r12, %rdi
movl %r15d, %edx
callq 0x440d6
movq %rax, 0x40(%rbx)
movq 0x48(%r14), %rsi
movq %r12, %rdi
movl %r15d, %edx
callq 0x44502
movq %rax, 0x48(%rbx)
movb 0x8(%r14), %al
movb %al, 0x8(%rbx)
movq 0x50(%r14), %rsi
movq %r12, %rdi
movl %r15d, %edx
callq 0x443e4
movq %rax, 0x50(%rbx)
testq %rax, %rax
je 0x444a8
movq %rbx, 0x58(%rax)
andq $0x0, 0x58(%rbx)
movq 0x68(%r14), %rsi
movq %r12, %rdi
movl %r15d, %edx
callq 0x440d6
movq %rax, 0x68(%rbx)
movq 0x70(%r14), %rsi
movq %r12, %rdi
movl %r15d, %edx
callq 0x440d6
movq %rax, 0x70(%rbx)
andq $0x0, 0xc(%rbx)
movzwl 0xa(%r14), %eax
andl $-0x9, %eax
movw %ax, 0xa(%rbx)
andq $0x0, 0x60(%rbx)
orq $-0x1, 0x14(%rbx)
orl $-0x1, 0x1c(%rbx)
jmp 0x444f6
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprListDup
SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3 *db, ExprList *p, int flags){
  ExprList *pNew;
  struct ExprList_item *pItem, *pOldItem;
  int i;
  if( p==0 ) return 0;
  pNew = sqlite3DbMallocRaw(db, sizeof(*pNew) );
  if( pNew==0 ) return 0;
  pNew->iECursor = 0;
  pNew->nExpr = i = p->nExpr;
  if( (flags & EXPRDUP_REDUCE)==0 ) for(i=1; i<p->nExpr; i+=i){}
  pNew->a = pItem = sqlite3DbMallocRaw(db,  i*sizeof(p->a[0]) );
  if( pItem==0 ){
    sqlite3DbFree(db, pNew);
    return 0;
  } 
  pOldItem = p->a;
  for(i=0; i<p->nExpr; i++, pItem++, pOldItem++){
    Expr *pOldExpr = pOldItem->pExpr;
    pItem->pExpr = sqlite3ExprDup(db, pOldExpr, flags);
    pItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
    pItem->zSpan = sqlite3DbStrDup(db, pOldItem->zSpan);
    pItem->sortOrder = pOldItem->sortOrder;
    pItem->done = 0;
    pItem->bSpanIsTab = pOldItem->bSpanIsTab;
    pItem->iOrderByCol = pOldItem->iOrderByCol;
    pItem->iAlias = pOldItem->iAlias;
  }
  return pNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x2c(%rbp)
movq %rsi, -0x38(%rbp)
testq %rsi, %rsi
je 0x4462d
movq %rdi, %r14
pushq $0x10
popq %rsi
callq 0x103b4
testq %rax, %rax
je 0x4462d
movq %rax, %rbx
andl $0x0, 0x4(%rax)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, (%rbx)
testb $0x1, -0x2c(%rbp)
jne 0x4455a
pushq $0x1
popq %rcx
movl %ecx, %esi
leal (%rsi,%rsi), %ecx
cmpl %eax, %esi
jl 0x4454f
jmp 0x4455c
movl %eax, %esi
shll $0x5, %esi
movq %r14, %rdi
callq 0x103b4
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x44622
movq %rax, %r13
movq %rbx, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rbx
xorl %r15d, %r15d
xorl %r12d, %r12d
movq -0x38(%rbp), %rax
cmpl (%rax), %r12d
jge 0x4461c
movq (%rbx,%r15), %rsi
movq %r14, %rdi
movl -0x2c(%rbp), %edx
callq 0x440d6
movq %rax, (%r13,%r15)
movq 0x8(%rbx,%r15), %rsi
movq %r14, %rdi
callq 0xf173
movq %rax, 0x8(%r13,%r15)
movq 0x10(%rbx,%r15), %rsi
movq %r14, %rdi
callq 0xf173
movq %rax, 0x10(%r13,%r15)
movb 0x18(%rbx,%r15), %al
movb %al, 0x18(%r13,%r15)
movb 0x19(%r13,%r15), %al
movl %eax, %ecx
andb $-0x2, %cl
movb %cl, 0x19(%r13,%r15)
movb 0x19(%rbx,%r15), %cl
andb $0x2, %cl
andb $-0x4, %al
orb %cl, %al
movb %al, 0x19(%r13,%r15)
movzwl 0x1a(%rbx,%r15), %eax
movw %ax, 0x1a(%r13,%r15)
movzwl 0x1c(%rbx,%r15), %eax
movw %ax, 0x1c(%r13,%r15)
incl %r12d
addq $0x20, %r15
jmp 0x44589
movq -0x40(%rbp), %rax
jmp 0x4462f
movq %r14, %rdi
movq %rbx, %rsi
callq 0x968b
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: dupedExprNodeSize
static int dupedExprNodeSize(Expr *p, int flags){
  int nByte = dupedExprStructSize(p, flags) & 0xfff;
  if( !ExprHasProperty(p, EP_IntValue) && p->u.zToken ){
    nByte += sqlite3Strlen30(p->u.zToken)+1;
  }
  return ROUND8(nByte);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x443b1
movl %eax, %ebx
andl $0xfff, %ebx            # imm = 0xFFF
testb $0x4, 0x3(%r14)
jne 0x4466e
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x4466e
callq 0x8f8e
addl %eax, %ebx
incl %ebx
addl $0x7, %ebx
andl $-0x8, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3IdListDup
SQLITE_PRIVATE IdList *sqlite3IdListDup(sqlite3 *db, IdList *p){
  IdList *pNew;
  int i;
  if( p==0 ) return 0;
  pNew = sqlite3DbMallocRaw(db, sizeof(*pNew) );
  if( pNew==0 ) return 0;
  pNew->nId = p->nId;
  pNew->a = sqlite3DbMallocRaw(db, p->nId*sizeof(p->a[0]) );
  if( pNew->a==0 ){
    sqlite3DbFree(db, pNew);
    return 0;
  }
  /* Note that because the size of the allocation for p->a[] is not
  ** necessarily a power of two, sqlite3IdListAppend() may not be called
  ** on the duplicate created by this function. */
  for(i=0; i<p->nId; i++){
    struct IdList_item *pNewItem = &pNew->a[i];
    struct IdList_item *pOldItem = &p->a[i];
    pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
    pNewItem->idx = pOldItem->idx;
  }
  return pNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rsi, %rsi
je 0x448be
movq %rdi, %r14
movq %rsi, %r15
pushq $0x10
popq %rsi
callq 0x103b4
testq %rax, %rax
je 0x448be
movq %rax, %rbx
movl 0x8(%r15), %esi
movl %esi, 0x8(%rax)
shll $0x4, %esi
movq %r14, %rdi
callq 0x103b4
movq %rax, (%rbx)
testq %rax, %rax
je 0x448b3
movq %r14, -0x38(%rbp)
pushq $0x8
popq %r12
xorl %r13d, %r13d
movq %rbx, -0x30(%rbp)
movslq 0x8(%r15), %rax
cmpq %rax, %r13
jge 0x448c0
movq (%rbx), %r14
movq (%r15), %rbx
movq -0x8(%rbx,%r12), %rsi
movq -0x38(%rbp), %rdi
callq 0xf173
movq %rax, -0x8(%r14,%r12)
movl (%rbx,%r12), %eax
movq -0x30(%rbp), %rbx
movl %eax, (%r14,%r12)
incq %r13
addq $0x10, %r12
jmp 0x4487c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x968b
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3AuthReadCol
SQLITE_PRIVATE int sqlite3AuthReadCol(
  Parse *pParse,                  /* The parser context */
  const char *zTab,               /* Table name */
  const char *zCol,               /* Column name */
  int iDb                         /* Index of containing database. */
){
  sqlite3 *db = pParse->db;       /* Database handle */
  char *zDb = db->aDb[iDb].zName; /* Name of attached database */
  int rc;                         /* Auth callback return code */

  rc = db->xAuth(db->pAuthArg, SQLITE_READ, zTab,zCol,zDb,pParse->zAuthContext);
  if( rc==SQLITE_DENY ){
    if( db->nDb>2 || iDb!=0 ){
      sqlite3ErrorMsg(pParse, "access to %s.%s.%s is prohibited",zDb,zTab,zCol);
    }else{
      sqlite3ErrorMsg(pParse, "access to %s.%s is prohibited", zTab, zCol);
    }
    pParse->rc = SQLITE_AUTH;
  }else if( rc!=SQLITE_IGNORE && rc!=SQLITE_OK ){
    sqliteAuthBadReturnCode(pParse);
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r15d
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
movq (%rdi), %r12
movslq %r15d, %rax
shlq $0x5, %rax
movq 0x20(%r12), %rsi
movq 0x188(%r12), %rdi
movq (%rsi,%rax), %r13
movq 0x248(%rbx), %r9
pushq $0x14
popq %rsi
movq %rdx, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %r13, %r8
callq *0x180(%r12)
movl %eax, %r14d
cmpl $0x1, %eax
jne 0x4496a
testl %r15d, %r15d
jne 0x4497d
cmpl $0x3, 0x28(%r12)
jge 0x4497d
leaq 0x286f8(%rip), %rsi     # 0x6d04e
movq %rbx, %rdi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
xorl %eax, %eax
callq 0x104d6
jmp 0x44999
testl $0xfffffffd, %r14d      # imm = 0xFFFFFFFD
je 0x449a0
movq %rbx, %rdi
callq 0x421c6
jmp 0x449a0
leaq 0x286a9(%rip), %rsi     # 0x6d02d
movq %rbx, %rdi
movq %r13, %rdx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
xorl %eax, %eax
callq 0x104d6
movl $0x17, 0x18(%rbx)
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: exprSrcCount
static int exprSrcCount(Walker *pWalker, Expr *pExpr){
  /* The NEVER() on the second term is because sqlite3FunctionUsesThisSrc()
  ** is always called before sqlite3ExprAnalyzeAggregates() and so the
  ** TK_COLUMNs have not yet been converted into TK_AGG_COLUMN.  If
  ** sqlite3FunctionUsesThisSrc() is used differently in the future, the
  ** NEVER() will need to be removed. */
  if( pExpr->op==TK_COLUMN || NEVER(pExpr->op==TK_AGG_COLUMN) ){
    int i;
    struct SrcCount *p = pWalker->u.pSrcCount;
    SrcList *pSrc = p->pSrc;
    for(i=0; i<pSrc->nSrc; i++){
      if( pExpr->iTable==pSrc->a[i].iCursor ) break;
    }
    if( i<pSrc->nSrc ){
      p->nThis++;
    }else{
      p->nOther++;
    }
  }
  return WRC_Continue;
}

// Assembly:
movzbl (%rsi), %eax
orl $0x2, %eax
cmpl $0x9a, %eax
jne 0x449fc
pushq %rbp
movq %rsp, %rbp
movq 0x20(%rdi), %rax
movq (%rax), %rdx
movzbl (%rdx), %ecx
addq $0x44, %rdx
movabsq $-0x1, %rdi
incq %rdi
cmpq %rcx, %rdi
jae 0x449f8
leaq 0x68(%rdx), %r8
movl 0x2c(%rsi), %r9d
cmpl (%rdx), %r9d
movq %r8, %rdx
jne 0x449db
incl 0x8(%rax)
jmp 0x449fb
incl 0xc(%rax)
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3SelectPrep
SQLITE_PRIVATE void sqlite3SelectPrep(
  Parse *pParse,         /* The parser context */
  Select *p,             /* The SELECT statement being coded. */
  NameContext *pOuterNC  /* Name context for container */
){
  sqlite3 *db;
  if( NEVER(p==0) ) return;
  db = pParse->db;
  if( db->mallocFailed ) return;
  if( p->selFlags & SF_HasTypeInfo ) return;
  sqlite3SelectExpand(pParse, p);
  if( pParse->nErr || db->mallocFailed ) return;
  sqlite3ResolveSelectNames(pParse, p, pOuterNC);
  if( pParse->nErr || db->mallocFailed ) return;
  sqlite3SelectAddTypeInfo(pParse, p);
}

// Assembly:
testq %rsi, %rsi
je 0x44aed
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
movq (%rdi), %r12
cmpb $0x0, 0x50(%r12)
jne 0x44adf
movq %rsi, %rbx
testb $0x20, 0xa(%rsi)
jne 0x44adf
movq %rdx, %r15
xorps %xmm0, %xmm0
movups %xmm0, -0x48(%rbp)
movups %xmm0, -0x38(%rbp)
leaq 0x25d(%rip), %r13       # 0x44caa
movq %r13, -0x50(%rbp)
movq %r14, -0x40(%rbp)
cmpb $0x0, 0x25(%r14)
je 0x44a73
leaq 0x24f(%rip), %rax       # 0x44cb2
leaq -0x50(%rbp), %rdi
movq %rax, 0x8(%rdi)
movq %rbx, %rsi
callq 0x43d4b
leaq 0x358(%rip), %rax       # 0x44dd2
leaq -0x50(%rbp), %rdi
movq %rax, 0x8(%rdi)
movq %rbx, %rsi
callq 0x43d4b
cmpl $0x0, 0x50(%r14)
jne 0x44adf
cmpb $0x0, 0x50(%r12)
jne 0x44adf
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x44aee
cmpl $0x0, 0x50(%r14)
jne 0x44adf
cmpb $0x0, 0x50(%r12)
jne 0x44adf
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rdi
movups %xmm0, 0x18(%rdi)
leaq 0x18ac(%rip), %rax      # 0x46374
movq %rax, 0x8(%rdi)
movq %r13, (%rdi)
movq %r14, 0x10(%rdi)
movb $0x1, 0x1c(%rdi)
movq %rbx, %rsi
callq 0x43d4b
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ResolveSelectNames
SQLITE_PRIVATE void sqlite3ResolveSelectNames(
  Parse *pParse,         /* The parser context */
  Select *p,             /* The SELECT statement being coded. */
  NameContext *pOuterNC  /* Name context for parent SELECT statement */
){
  Walker w;

  assert( p!=0 );
  memset(&w, 0, sizeof(w));
  w.xExprCallback = resolveExprStep;
  w.xSelectCallback = resolveSelectStep;
  w.pParse = pParse;
  w.u.pNC = pOuterNC;
  sqlite3WalkSelect(&w, p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq -0x28(%rbp), %rax
andq $0x0, 0x18(%rax)
leaq -0x218f(%rip), %rcx     # 0x42977
movq %rcx, (%rax)
leaq -0x1de0(%rip), %rcx     # 0x42d30
movq %rcx, 0x8(%rax)
movq %rdi, 0x10(%rax)
movq %rdx, 0x20(%rax)
movq %rax, %rdi
callq 0x43d4b
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: convertCompoundSelectToSubquery
static int convertCompoundSelectToSubquery(Walker *pWalker, Select *p){
  int i;
  Select *pNew;
  Select *pX;
  sqlite3 *db;
  struct ExprList_item *a;
  SrcList *pNewSrc;
  Parse *pParse;
  Token dummy;

  if( p->pPrior==0 ) return WRC_Continue;
  if( p->pOrderBy==0 ) return WRC_Continue;
  for(pX=p; pX && (pX->op==TK_ALL || pX->op==TK_SELECT); pX=pX->pPrior){}
  if( pX==0 ) return WRC_Continue;
  a = p->pOrderBy->a;
  for(i=p->pOrderBy->nExpr-1; i>=0; i--){
    if( a[i].pExpr->flags & EP_Collate ) break;
  }
  if( i<0 ) return WRC_Continue;

  /* If we reach this point, that means the transformation is required. */

  pParse = pWalker->pParse;
  db = pParse->db;
  pNew = sqlite3DbMallocZero(db, sizeof(*pNew) );
  if( pNew==0 ) return WRC_Abort;
  memset(&dummy, 0, sizeof(dummy));
  pNewSrc = sqlite3SrcListAppendFromTerm(pParse,0,0,0,&dummy,pNew,0,0);
  if( pNewSrc==0 ) return WRC_Abort;
  *pNew = *p;
  p->pSrc = pNewSrc;
  p->pEList = sqlite3ExprListAppend(pParse, 0, sqlite3Expr(db, TK_ALL, 0));
  p->op = TK_SELECT;
  p->pWhere = 0;
  pNew->pGroupBy = 0;
  pNew->pHaving = 0;
  pNew->pOrderBy = 0;
  p->pPrior = 0;
  pNew->pLimit = 0;
  pNew->pOffset = 0;
  return WRC_Continue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %r14d, %r14d
cmpq $0x0, 0x50(%rsi)
je 0x44dc0
movq %rsi, %rbx
movq 0x48(%rsi), %rax
testq %rax, %rax
je 0x44dc0
movq %rbx, %rcx
testq %rcx, %rcx
je 0x44dc0
movzbl 0x8(%rcx), %edx
cmpl $0x74, %edx
je 0x44cfb
cmpl $0x71, %edx
jne 0x44d01
movq 0x50(%rcx), %rcx
jmp 0x44ce4
movq 0x8(%rax), %rcx
movl (%rax), %edx
leal 0x1(%rdx), %eax
shlq $0x5, %rdx
addq %rdx, %rcx
addq $-0x20, %rcx
decl %eax
testl %eax, %eax
jle 0x44dc0
movq (%rcx), %rdx
addq $-0x20, %rcx
testb $0x1, 0x3(%rdx)
je 0x44d15
movq 0x10(%rdi), %r12
movq (%r12), %r13
pushq $0x78
popq %rsi
movq %r13, %rdi
callq 0xf4ae
pushq $0x2
popq %r14
testq %rax, %rax
je 0x44dc0
movq %rax, %r15
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %r8
movaps %xmm0, (%r8)
movups %xmm0, (%rsp)
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rax, %r9
callq 0x3b602
testq %rax, %rax
je 0x44dc0
pushq $0xf
popq %rcx
movq %r15, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, 0x28(%rbx)
pushq $0x71
popq %rsi
movq %r13, %rdi
xorl %edx, %edx
callq 0x3b590
movq %r12, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x3b491
movq %rax, (%rbx)
movb $0x74, 0x8(%rbx)
andq $0x0, 0x30(%rbx)
andq $0x0, 0x48(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%r15)
andq $0x0, 0x50(%rbx)
movups %xmm0, 0x68(%r15)
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3SrcListAssignCursors
SQLITE_PRIVATE void sqlite3SrcListAssignCursors(Parse *pParse, SrcList *pList){
  int i;
  struct SrcList_item *pItem;
  assert(pList || pParse->db->mallocFailed );
  if( pList ){
    for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
      if( pItem->iCursor>=0 ) break;
      pItem->iCursor = pParse->nTab++;
      if( pItem->pSelect ){
        sqlite3SrcListAssignCursors(pParse, pItem->pSelect->pSrc);
      }
    }
  }
}

// Assembly:
testq %rsi, %rsi
je 0x45815
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb (%rsi), %al
leaq 0x44(%rsi), %r15
xorl %r12d, %r12d
movzbl %al, %ecx
cmpl %ecx, %r12d
jae 0x4580d
cmpl $0x0, (%r15)
jns 0x4580d
movl 0x54(%r14), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x54(%r14)
movl %ecx, (%r15)
movq -0x14(%r15), %rcx
testq %rcx, %rcx
je 0x45804
movq 0x28(%rcx), %rsi
movq %r14, %rdi
callq 0x457b2
movb (%rbx), %al
incl %r12d
addq $0x68, %r15
jmp 0x457d1
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3LocateTableItem
SQLITE_PRIVATE Table *sqlite3LocateTableItem(
  Parse *pParse, 
  int isView, 
  struct SrcList_item *p
){
  const char *zDb;
  assert( p->pSchema==0 || p->zDatabase==0 );
  if( p->pSchema ){
    int iDb = sqlite3SchemaToIndex(pParse->db, p->pSchema);
    zDb = pParse->db->aDb[iDb].zName;
  }else{
    zDb = p->zDatabase;
  }
  return sqlite3LocateTable(pParse, isView, p->zName, zDb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x45ab3
movq (%r15), %r12
movq %r12, %rdi
callq 0x1064e
cltq
shlq $0x5, %rax
addq 0x20(%r12), %rax
jmp 0x45ab7
leaq 0x8(%r14), %rax
movq (%rax), %rcx
movq 0x10(%r14), %rdx
movq %r15, %rdi
movl %ebx, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x10449
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3IndexedByLookup
SQLITE_PRIVATE int sqlite3IndexedByLookup(Parse *pParse, struct SrcList_item *pFrom){
  if( pFrom->pTab && pFrom->zIndex ){
    Table *pTab = pFrom->pTab;
    char *zIndex = pFrom->zIndex;
    Index *pIdx;
    for(pIdx=pTab->pIndex; 
        pIdx && sqlite3StrICmp(pIdx->zName, zIndex); 
        pIdx=pIdx->pNext
    );
    if( !pIdx ){
      sqlite3ErrorMsg(pParse, "no such index: %s", zIndex, 0);
      pParse->checkSchema = 1;
      return SQLITE_ERROR;
    }
    pFrom->pIndex = pIdx;
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x20(%rsi), %r13
xorl %r14d, %r14d
testq %r13, %r13
je 0x45d22
movq %rsi, %r15
movq 0x58(%rsi), %r12
testq %r12, %r12
je 0x45d22
movq %rdi, %rbx
addq $0x10, %r13
movq (%r13), %r13
testq %r13, %r13
je 0x45cfe
movq (%r13), %rdi
movq %r12, %rsi
callq 0xb1bf
testl %eax, %eax
je 0x45d1e
addq $0x28, %r13
jmp 0x45cdf
leaq 0x274d0(%rip), %rsi     # 0x6d1d5
movq %rbx, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x104d6
movb $0x1, 0x1d(%rbx)
pushq $0x1
popq %r14
jmp 0x45d22
movq %r13, 0x60(%r15)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: tableAndColumnIndex
static int tableAndColumnIndex(
  SrcList *pSrc,       /* Array of tables to search */
  int N,               /* Number of tables in pSrc->a[] to search */
  const char *zCol,    /* Name of the column we are looking for */
  int *piTab,          /* Write index of pSrc->a[] here */
  int *piCol           /* Write index of pSrc->a[*piTab].pTab->aCol[] here */
){
  int i;               /* For looping over tables in pSrc */
  int iCol;            /* Index of column matching zCol */

  assert( (piTab==0)==(piCol==0) );  /* Both or neither are NULL */
  for(i=0; i<N; i++){
    iCol = columnIndex(pSrc->a[i].pTab, zCol);
    if( iCol>=0 ){
      if( piTab ){
        *piTab = i;
        *piCol = iCol;
      }
      return 1;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %rdx, %r12
movl %esi, %r13d
movq %rdi, %r14
xorl %ebx, %ebx
testl %esi, %esi
cmovlel %ebx, %r13d
addq $0x28, %r14
xorl %r15d, %r15d
cmpq %r15, %r13
je 0x45d97
movq (%r14), %rdi
movq %r12, %rsi
callq 0x45f91
testl %eax, %eax
jns 0x45d82
incq %r15
addq $0x68, %r14
jmp 0x45d65
pushq $0x1
popq %rbx
movq -0x38(%rbp), %rcx
testq %rcx, %rcx
je 0x45d97
movl %r15d, (%rcx)
movq -0x30(%rbp), %rcx
movl %eax, (%rcx)
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3IdListIndex
SQLITE_PRIVATE int sqlite3IdListIndex(IdList *pList, const char *zName){
  int i;
  if( pList==0 ) return -1;
  for(i=0; i<pList->nId; i++){
    if( sqlite3StrICmp(pList->a[i].zName, zName)==0 ) return i;
  }
  return -1;
}

// Assembly:
pushq $-0x1
popq %rax
testq %rdi, %rdi
je 0x45e0a
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl 0x8(%rdi), %r12d
xorl %r13d, %r13d
testl %r12d, %r12d
cmovlel %r13d, %r12d
xorl %ebx, %ebx
cmpq %rbx, %r12
je 0x45df5
movq (%r15), %rax
movq (%rax,%r13), %rdi
movq %r14, %rsi
callq 0xb1bf
testl %eax, %eax
je 0x45dfa
incq %rbx
addq $0x10, %r13
jmp 0x45dd4
pushq $-0x1
popq %rax
jmp 0x45dfc
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/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: addWhereTerm
static void addWhereTerm(
  Parse *pParse,                  /* Parsing context */
  SrcList *pSrc,                  /* List of tables in FROM clause */
  int iLeft,                      /* Index of first table to join in pSrc */
  int iColLeft,                   /* Index of column in first table */
  int iRight,                     /* Index of second table in pSrc */
  int iColRight,                  /* Index of column in second table */
  int isOuterJoin,                /* True if this is an OUTER join */
  Expr **ppWhere                  /* IN/OUT: The WHERE clause to add to */
){
  sqlite3 *db = pParse->db;
  Expr *pE1;
  Expr *pE2;
  Expr *pEq;

  assert( iLeft<iRight );
  assert( pSrc->nSrc>iRight );
  assert( pSrc->a[iLeft].pTab );
  assert( pSrc->a[iRight].pTab );

  pE1 = sqlite3CreateColumnExpr(db, pSrc, iLeft, iColLeft);
  pE2 = sqlite3CreateColumnExpr(db, pSrc, iRight, iColRight);

  pEq = sqlite3PExpr(pParse, TK_EQ, pE1, pE2, 0);
  if( pEq && isOuterJoin ){
    ExprSetProperty(pEq, EP_FromJoin);
    assert( !ExprHasAnyProperty(pEq, EP_TokenOnly|EP_Reduced) );
    ExprSetIrreducible(pEq);
    pEq->iRightJoinTable = (i16)pE2->iTable;
  }
  *ppWhere = sqlite3ExprAnd(db, *ppWhere, pEq);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, -0x2c(%rbp)
movl %r8d, %r14d
movq %rsi, %r12
movq %rdi, %r13
movq (%rdi), %rbx
movq %rbx, %rdi
callq 0x45ff3
movq %rax, %r15
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
movl -0x2c(%rbp), %ecx
callq 0x45ff3
movq %rax, %r14
pushq $0x4c
popq %rsi
movq %r13, %rdi
movq %r15, %rdx
movq %rax, %rcx
xorl %r8d, %r8d
callq 0x36a09
testq %rax, %rax
sete %cl
cmpl $0x0, 0x10(%rbp)
sete %dl
orb %cl, %dl
jne 0x45e9b
orb $0x1, 0x2(%rax)
movzwl 0x2c(%r14), %ecx
movw %cx, 0x34(%rax)
movq 0x18(%rbp), %r14
movq (%r14), %rsi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x45ef0
movq %rax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: setJoinExpr
static void setJoinExpr(Expr *p, int iTable){
  while( p ){
    ExprSetProperty(p, EP_FromJoin);
    assert( !ExprHasAnyProperty(p, EP_TokenOnly|EP_Reduced) );
    ExprSetIrreducible(p);
    p->iRightJoinTable = (i16)iTable;
    setJoinExpr(p->pLeft, iTable);
    p = p->pRight;
  } 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
testq %r14, %r14
je 0x45eeb
orb $0x1, 0x2(%r14)
movw %bx, 0x34(%r14)
movq 0x10(%r14), %rdi
movl %ebx, %esi
callq 0x45ebf
movq 0x18(%r14), %r14
jmp 0x45ecb
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprAnd
SQLITE_PRIVATE Expr *sqlite3ExprAnd(sqlite3 *db, Expr *pLeft, Expr *pRight){
  if( pLeft==0 ){
    return pRight;
  }else if( pRight==0 ){
    return pLeft;
  }else if( exprAlwaysFalse(pLeft) || exprAlwaysFalse(pRight) ){
    sqlite3ExprDelete(db, pLeft);
    sqlite3ExprDelete(db, pRight);
    return sqlite3ExprAlloc(db, TK_INTEGER, &sqlite3IntTokens[0], 0);
  }else{
    Expr *pNew = sqlite3ExprAlloc(db, TK_AND, 0, 0);
    sqlite3ExprAttachSubtrees(db, pNew, pLeft, pRight);
    return pNew;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
testq %rsi, %rsi
je 0x45f5d
movq %rsi, %r15
testq %rbx, %rbx
je 0x45f5a
movq %rdi, %r14
movq %r15, %rdi
callq 0x46175
testl %eax, %eax
jne 0x45f26
movq %rbx, %rdi
callq 0x46175
testl %eax, %eax
je 0x45f69
movq %r14, %rdi
movq %r15, %rsi
callq 0x2f476
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2f476
leaq 0x4052d(%rip), %rdx     # 0x86470
movq %r14, %rdi
movl $0x81, %esi
xorl %ecx, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4606c
movq %r15, %rbx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x45
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4606c
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x461a6
movq %r12, %rbx
jmp 0x45f5d
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: columnIndex
static int columnIndex(Table *pTab, const char *zCol){
  int i;
  for(i=0; i<pTab->nCol; i++){
    if( sqlite3StrICmp(pTab->aCol[i].zName, zCol)==0 ) return i;
  }
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl 0x42(%rdi), %eax
xorl %r12d, %r12d
testw %ax, %ax
cmovlel %r12d, %eax
movq %rsi, %r15
movzwl %ax, %r13d
xorl %r14d, %r14d
cmpq %r14, %r13
je 0x45fdc
movq 0x8(%rbx), %rax
movq (%rax,%r12), %rdi
movq %r15, %rsi
callq 0xb1bf
testl %eax, %eax
je 0x45fe1
incq %r14
addq $0x30, %r12
jmp 0x45fba
pushq $-0x1
popq %rax
jmp 0x45fe4
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3CreateColumnExpr
SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *db, SrcList *pSrc, int iSrc, int iCol){
  Expr *p = sqlite3ExprAlloc(db, TK_COLUMN, 0, 0);
  if( p ){
    struct SrcList_item *pItem = &pSrc->a[iSrc];
    p->pTab = pItem->pTab;
    p->iTable = pItem->iCursor;
    if( p->pTab->iPKey==iCol ){
      p->iColumn = -1;
    }else{
      p->iColumn = (ynVar)iCol;
      testcase( iCol==BMS );
      testcase( iCol==BMS-1 );
      pItem->colUsed |= ((Bitmask)1)<<(iCol>=BMS ? BMS-1 : iCol);
    }
    ExprSetProperty(p, EP_Resolved);
  }
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %r15d
movq %rsi, %r14
movl $0x98, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4606c
testq %rax, %rax
je 0x46061
movslq %r15d, %rcx
imulq $0x68, %rcx, %rcx
movq 0x28(%r14,%rcx), %rdx
movq %rdx, 0x40(%rax)
movl 0x44(%r14,%rcx), %esi
movl %esi, 0x2c(%rax)
movswl 0x40(%rdx), %esi
movw $0xffff, %dx            # imm = 0xFFFF
cmpl %ebx, %esi
je 0x46059
leaq (%r14,%rcx), %rdx
addq $0x8, %rdx
cmpl $0x3f, %ebx
pushq $0x3f
popq %rcx
cmovll %ebx, %ecx
pushq $0x1
popq %rsi
shlq %cl, %rsi
orq %rsi, 0x50(%rdx)
movl %ebx, %edx
movw %dx, 0x30(%rax)
orb $0x4, 0x2(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprAlloc
SQLITE_PRIVATE Expr *sqlite3ExprAlloc(
  sqlite3 *db,            /* Handle for sqlite3DbMallocZero() (may be null) */
  int op,                 /* Expression opcode */
  const Token *pToken,    /* Token argument.  Might be NULL */
  int dequote             /* True to dequote */
){
  Expr *pNew;
  int nExtra = 0;
  int iValue = 0;

  if( pToken ){
    if( op!=TK_INTEGER || pToken->z==0
          || sqlite3GetInt32(pToken->z, &iValue)==0 ){
      nExtra = pToken->n+1;
      assert( iValue>=0 );
    }
  }
  pNew = sqlite3DbMallocZero(db, sizeof(Expr)+nExtra);
  if( pNew ){
    pNew->op = (u8)op;
    pNew->iAgg = -1;
    if( pToken ){
      if( nExtra==0 ){
        pNew->flags |= EP_IntValue;
        pNew->u.iValue = iValue;
      }else{
        int c;
        pNew->u.zToken = (char*)&pNew[1];
        assert( pToken->z!=0 || pToken->n==0 );
        if( pToken->n ) memcpy(pNew->u.zToken, pToken->z, pToken->n);
        pNew->u.zToken[pToken->n] = 0;
        if( dequote && nExtra>=3 
             && ((c = pToken->z[0])=='\'' || c=='"' || c=='[' || c=='`') ){
          sqlite3Dequote(pNew->u.zToken);
          if( c=='"' ) pNew->flags |= EP_DblQuoted;
        }
      }
    }
#if SQLITE_MAX_EXPR_DEPTH>0
    pNew->nHeight = 1;
#endif  
  }
  return pNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %rbx
andl $0x0, -0x2c(%rbp)
movl %esi, %r12d
movq %rdi, %r15
xorl %r13d, %r13d
testq %rdx, %rdx
je 0x460b7
cmpl $0x81, %r12d
jne 0x460b0
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x460b0
leaq -0x2c(%rbp), %rsi
callq 0x2ed95
testl %eax, %eax
jne 0x460b7
movl 0x8(%rbx), %r13d
incl %r13d
leal 0x48(%r13), %esi
movq %r15, %rdi
callq 0xf4ae
movq %rax, %r15
testq %rax, %rax
je 0x46163
orw $-0x1, 0x32(%r15)
movb %r12b, (%r15)
testq %rbx, %rbx
je 0x4615b
testl %r13d, %r13d
je 0x46105
movq %r15, %r12
addq $0x48, %r12
movq %r12, 0x8(%r15)
movl 0x8(%rbx), %edx
testq %rdx, %rdx
je 0x46113
movq (%rbx), %rsi
movq %r12, %rdi
callq 0x82c0
movl 0x8(%rbx), %eax
jmp 0x46115
orb $0x4, 0x3(%r15)
movl -0x2c(%rbp), %eax
movl %eax, 0x8(%r15)
jmp 0x4615b
xorl %eax, %eax
movb $0x0, (%r12,%rax)
testl %r14d, %r14d
sete %al
cmpl $0x3, %r13d
setl %cl
orb %al, %cl
jne 0x4615b
movq (%rbx), %rax
movzbl (%rax), %ebx
leal -0x22(%rbx), %eax
cmpl $0x3e, %eax
ja 0x4615b
movabsq $0x4200000000000021, %rcx # imm = 0x4200000000000021
btq %rax, %rcx
jae 0x4615b
movq %r12, %rdi
callq 0x4221d
cmpb $0x22, %bl
jne 0x4615b
orb $0x40, 0x2(%r15)
movl $0x1, 0x28(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: exprAlwaysFalse
static int exprAlwaysFalse(Expr *p){
  int v = 0;
  if( ExprHasProperty(p, EP_FromJoin) ) return 0;
  if( !sqlite3ExprIsInteger(p, &v) ) return 0;
  return v==0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
andl $0x0, -0xc(%rbp)
xorl %ebx, %ebx
testb $0x1, 0x2(%rdi)
jne 0x4619d
leaq -0xc(%rbp), %rsi
callq 0x46204
testl %eax, %eax
je 0x4619d
xorl %ebx, %ebx
cmpl $0x0, -0xc(%rbp)
sete %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprAttachSubtrees
SQLITE_PRIVATE void sqlite3ExprAttachSubtrees(
  sqlite3 *db,
  Expr *pRoot,
  Expr *pLeft,
  Expr *pRight
){
  if( pRoot==0 ){
    assert( db->mallocFailed );
    sqlite3ExprDelete(db, pLeft);
    sqlite3ExprDelete(db, pRight);
  }else{
    if( pRight ){
      pRoot->pRight = pRight;
      pRoot->flags |= EP_Collate & pRight->flags;
    }
    if( pLeft ){
      pRoot->pLeft = pLeft;
      pRoot->flags |= EP_Collate & pLeft->flags;
    }
    exprSetHeight(pRoot);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
testq %rsi, %rsi
je 0x461ea
testq %rbx, %rbx
je 0x461cb
movq %rbx, 0x18(%rsi)
movzwl 0x2(%rbx), %eax
andl $0x100, %eax            # imm = 0x100
orw %ax, 0x2(%rsi)
testq %rdx, %rdx
je 0x461e1
movq %rdx, 0x10(%rsi)
movzwl 0x2(%rdx), %eax
andl $0x100, %eax            # imm = 0x100
orw %ax, 0x2(%rsi)
movq %rsi, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x46255
movq %rdi, %r14
movq %rdx, %rsi
callq 0x2f476
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x2f476
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprIsInteger
SQLITE_PRIVATE int sqlite3ExprIsInteger(Expr *p, int *pValue){
  int rc = 0;

  /* If an expression is an integer literal that fits in a signed 32-bit
  ** integer, then the EP_IntValue flag will have already been set */
  assert( p->op!=TK_INTEGER || (p->flags & EP_IntValue)!=0
           || sqlite3GetInt32(p->u.zToken, &rc)==0 );

  if( p->flags & EP_IntValue ){
    *pValue = p->u.iValue;
    return 1;
  }
  switch( p->op ){
    case TK_UPLUS: {
      rc = sqlite3ExprIsInteger(p->pLeft, pValue);
      break;
    }
    case TK_UMINUS: {
      int v;
      if( sqlite3ExprIsInteger(p->pLeft, &v) ){
        assert( v!=-2147483648 );
        *pValue = -v;
        rc = 1;
      }
      break;
    }
    default: break;
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
testb $0x4, 0x3(%rdi)
jne 0x46246
movzbl (%rdi), %eax
cmpl $0x9d, %eax
jne 0x46223
movq 0x10(%rdi), %rdi
jmp 0x4620d
cmpl $0x9c, %eax
jne 0x46242
movq 0x10(%rdi), %rdi
leaq -0xc(%rbp), %rsi
callq 0x46204
testl %eax, %eax
je 0x46242
xorl %eax, %eax
subl -0xc(%rbp), %eax
jmp 0x46249
xorl %eax, %eax
jmp 0x4624e
movl 0x8(%rdi), %eax
movl %eax, (%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: exprSetHeight
static void exprSetHeight(Expr *p){
  int nHeight = 0;
  heightOfExpr(p->pLeft, &nHeight);
  heightOfExpr(p->pRight, &nHeight);
  if( ExprHasProperty(p, EP_xIsSelect) ){
    heightOfSelect(p->x.pSelect, &nHeight);
  }else{
    heightOfExprList(p->x.pList, &nHeight);
  }
  p->nHeight = nHeight + 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
andl $0x0, -0xc(%rbp)
movq %rdi, %rbx
movq 0x10(%rdi), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x46279
movl 0x28(%rcx), %ecx
testl %ecx, %ecx
jle 0x46279
movl %ecx, -0xc(%rbp)
movl %ecx, %eax
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x4628d
movl 0x28(%rcx), %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
movl %eax, -0xc(%rbp)
testb $0x8, 0x3(%rbx)
movq 0x20(%rbx), %rdi
leaq -0xc(%rbp), %rsi
jne 0x462a2
callq 0x4633e
jmp 0x462a7
callq 0x462b6
movl -0xc(%rbp), %eax
incl %eax
movl %eax, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: heightOfSelect
static void heightOfSelect(Select *p, int *pnHeight){
  if( p ){
    heightOfExpr(p->pWhere, pnHeight);
    heightOfExpr(p->pHaving, pnHeight);
    heightOfExpr(p->pLimit, pnHeight);
    heightOfExpr(p->pOffset, pnHeight);
    heightOfExprList(p->pEList, pnHeight);
    heightOfExprList(p->pGroupBy, pnHeight);
    heightOfExprList(p->pOrderBy, pnHeight);
    heightOfSelect(p->pPrior, pnHeight);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %r14, %r14
je 0x46339
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x462da
movl 0x28(%rax), %eax
cmpl (%rbx), %eax
jle 0x462da
movl %eax, (%rbx)
movq 0x40(%r14), %rax
testq %rax, %rax
je 0x462ec
movl 0x28(%rax), %eax
cmpl (%rbx), %eax
jle 0x462ec
movl %eax, (%rbx)
movq 0x68(%r14), %rax
testq %rax, %rax
je 0x462fe
movl 0x28(%rax), %eax
cmpl (%rbx), %eax
jle 0x462fe
movl %eax, (%rbx)
movq 0x70(%r14), %rax
testq %rax, %rax
je 0x46310
movl 0x28(%rax), %eax
cmpl (%rbx), %eax
jle 0x46310
movl %eax, (%rbx)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x4633e
movq 0x38(%r14), %rdi
movq %rbx, %rsi
callq 0x4633e
movq 0x48(%r14), %rdi
movq %rbx, %rsi
callq 0x4633e
movq 0x50(%r14), %r14
jmp 0x462c3
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: heightOfExprList
static void heightOfExprList(ExprList *p, int *pnHeight){
  if( p ){
    int i;
    for(i=0; i<p->nExpr; i++){
      heightOfExpr(p->a[i].pExpr, pnHeight);
    }
  }
}

// Assembly:
testq %rdi, %rdi
je 0x46373
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
xorl %ecx, %ecx
movslq (%rdi), %rdx
cmpq %rdx, %rcx
jge 0x46372
movq 0x8(%rdi), %rdx
movq (%rdx,%rax), %rdx
testq %rdx, %rdx
je 0x46369
movl 0x28(%rdx), %edx
cmpl (%rsi), %edx
jle 0x46369
movl %edx, (%rsi)
incq %rcx
addq $0x20, %rax
jmp 0x4634b
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: selectAddSubqueryTypeInfo
static int selectAddSubqueryTypeInfo(Walker *pWalker, Select *p){
  Parse *pParse;
  int i;
  SrcList *pTabList;
  struct SrcList_item *pFrom;

  assert( p->selFlags & SF_Resolved );
  if( (p->selFlags & SF_HasTypeInfo)==0 ){
    p->selFlags |= SF_HasTypeInfo;
    pParse = pWalker->pParse;
    pTabList = p->pSrc;
    for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
      Table *pTab = pFrom->pTab;
      if( ALWAYS(pTab!=0) && (pTab->tabFlags & TF_Ephemeral)!=0 ){
        /* A sub-query in the FROM clause of a SELECT */
        Select *pSel = pFrom->pSelect;
        assert( pSel );
        while( pSel->pPrior ) pSel = pSel->pPrior;
        selectAddColumnTypeAndCollation(pParse, pTab->nCol, pTab->aCol, pSel);
      }
    }
  }
  return WRC_Continue;
}

// Assembly:
movzwl 0xa(%rsi), %eax
testb $0x20, %al
jne 0x463e6
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
orl $0x20, %eax
movw %ax, 0xa(%rsi)
movq 0x10(%rdi), %rbx
movq 0x28(%rsi), %r14
leaq 0x8(%r14), %r15
xorl %r12d, %r12d
movzbl (%r14), %eax
cmpl %eax, %r12d
jae 0x463de
movq 0x20(%r15), %rax
testq %rax, %rax
je 0x463d5
testb $0x2, 0x46(%rax)
je 0x463d5
movq 0x28(%r15), %rdx
movq %rdx, %rcx
movq 0x50(%rdx), %rdx
testq %rdx, %rdx
jne 0x463b9
movswl 0x42(%rax), %esi
movq 0x8(%rax), %rdx
movq %rbx, %rdi
callq 0x463e9
incl %r12d
addq $0x68, %r15
jmp 0x4639d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: selectAddColumnTypeAndCollation
static void selectAddColumnTypeAndCollation(
  Parse *pParse,        /* Parsing contexts */
  int nCol,             /* Number of columns */
  Column *aCol,         /* List of columns */
  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;

  assert( pSelect!=0 );
  assert( (pSelect->selFlags & SF_Resolved)!=0 );
  assert( 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=aCol; i<nCol; i++, pCol++){
    p = a[i].pExpr;
    pCol->zType = sqlite3DbStrDup(db, columnType(&sNC, p, 0, 0, 0));
    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);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, -0x38(%rbp)
movq (%rdi), %r15
cmpb $0x0, 0x50(%r15)
je 0x46417
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %rbx
xorps %xmm0, %xmm0
leaq -0x70(%rbp), %rdx
movaps %xmm0, 0x20(%rdx)
andq $0x0, 0x30(%rdx)
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq 0x28(%rcx), %rax
movq %rax, 0x8(%rdx)
movq (%rcx), %rax
movq 0x8(%rax), %r12
xorl %r14d, %r14d
testl %esi, %esi
cmovlel %r14d, %esi
imulq $0x30, %rsi, %rax
movq %rax, -0x30(%rbp)
cmpq %r14, -0x30(%rbp)
je 0x46408
movq (%r12), %r13
leaq -0x70(%rbp), %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x464c1
movq %r15, %rdi
movq %rax, %rsi
callq 0xf173
movq %rax, 0x18(%rbx,%r14)
movq %r13, %rdi
callq 0x4667c
testb %al, %al
movzbl %al, %eax
pushq $0x62
popq %rcx
cmovel %ecx, %eax
movb %al, 0x29(%rbx,%r14)
movq -0x38(%rbp), %rdi
movq %r13, %rsi
callq 0x466ee
testq %rax, %rax
je 0x464b7
movq (%rax), %rsi
movq %r15, %rdi
callq 0xf173
movq %rax, 0x20(%rbx,%r14)
addq $0x30, %r14
addq $0x20, %r12
jmp 0x46451
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprAffinity
SQLITE_PRIVATE char sqlite3ExprAffinity(Expr *pExpr){
  int op;
  pExpr = sqlite3ExprSkipCollate(pExpr);
  op = pExpr->op;
  if( op==TK_SELECT ){
    assert( pExpr->flags&EP_xIsSelect );
    return sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].pExpr);
  }
#ifndef SQLITE_OMIT_CAST
  if( op==TK_CAST ){
    assert( !ExprHasProperty(pExpr, EP_IntValue) );
    return sqlite3AffinityType(pExpr->u.zToken);
  }
#endif
  if( (op==TK_AGG_COLUMN || op==TK_COLUMN || op==TK_REGISTER) 
   && pExpr->pTab!=0
  ){
    /* op==TK_REGISTER && pExpr->pTab!=0 happens when pExpr was originally
    ** a TK_COLUMN but was previously evaluated and cached in a register */
    int j = pExpr->iColumn;
    if( j<0 ) return SQLITE_AFF_INTEGER;
    assert( pExpr->pTab && j<pExpr->pTab->nCol );
    return pExpr->pTab->aCol[j].affinity;
  }
  return pExpr->affinity;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x45e0b
movzbl (%rax), %ecx
cmpl $0x74, %ecx
jne 0x4669d
movq 0x20(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
jmp 0x46680
cmpl $0x25, %ecx
je 0x466e0
cmpl $0x84, %ecx
je 0x466ba
cmpl $0x98, %ecx
je 0x466ba
cmpl $0x9a, %ecx
jne 0x466db
movq 0x40(%rax), %rcx
testq %rcx, %rcx
je 0x466db
movswq 0x30(%rax), %rax
testq %rax, %rax
js 0x466ea
movq 0x8(%rcx), %rcx
imulq $0x30, %rax, %rax
movb 0x29(%rcx,%rax), %al
jmp 0x466ec
movb 0x1(%rax), %al
jmp 0x466ec
movq 0x8(%rax), %rdi
popq %rbp
jmp 0x46807
movb $0x64, %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCollSeq
SQLITE_PRIVATE CollSeq *sqlite3ExprCollSeq(Parse *pParse, Expr *pExpr){
  sqlite3 *db = pParse->db;
  CollSeq *pColl = 0;
  Expr *p = pExpr;
  while( p ){
    int op = p->op;
    if( op==TK_CAST || op==TK_UPLUS ){
      p = p->pLeft;
      continue;
    }
    if( op==TK_COLLATE || (op==TK_REGISTER && p->op2==TK_COLLATE) ){
      pColl = sqlite3GetCollSeq(pParse, ENC(db), 0, p->u.zToken);
      break;
    }
    if( p->pTab!=0
     && (op==TK_AGG_COLUMN || op==TK_COLUMN
          || op==TK_REGISTER || op==TK_TRIGGER)
    ){
      /* op==TK_REGISTER && p->pTab!=0 happens when pExpr was originally
      ** a TK_COLUMN but was previously evaluated and cached in a register */
      int j = p->iColumn;
      if( j>=0 ){
        const char *zColl = p->pTab->aCol[j].zColl;
        pColl = sqlite3FindCollSeq(db, ENC(db), zColl, 0);
      }
      break;
    }
    if( p->flags & EP_Collate ){
      if( ALWAYS(p->pLeft) && (p->pLeft->flags & EP_Collate)!=0 ){
        p = p->pLeft;
      }else{
        p = p->pRight;
      }
    }else{
      break;
    }
  }
  if( sqlite3CheckCollSeq(pParse, pColl) ){ 
    pColl = 0;
  }
  return pColl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
xorl %r14d, %r14d
pushq $0x10
popq %rax
pushq $0x18
popq %rcx
movl $0x500001, %edx         # imm = 0x500001
testq %rsi, %rsi
je 0x467ff
movq %rsi, %r8
movzbl (%rsi), %esi
movq %rax, %r9
cmpl $0x25, %esi
je 0x46782
cmpl $0x84, %esi
je 0x4673a
movq %rax, %r9
cmpl $0x9d, %esi
je 0x46782
cmpl $0x5c, %esi
jne 0x46741
jmp 0x467b4
cmpb $0x5c, 0x37(%r8)
je 0x467b4
movq 0x40(%r8), %r9
testq %r9, %r9
je 0x46762
leal -0x84(%rsi), %r10d
cmpl $0x16, %r10d
ja 0x4675d
btl %r10d, %edx
jb 0x46788
cmpl $0x3c, %esi
je 0x46788
testb $0x1, 0x3(%r8)
je 0x467ff
movq 0x10(%r8), %rsi
movq %rcx, %r9
testq %rsi, %rsi
je 0x46782
testb $0x1, 0x3(%rsi)
movq %rcx, %r9
jne 0x46709
movq (%r8,%r9), %rsi
jmp 0x46709
movswq 0x30(%r8), %rax
testq %rax, %rax
js 0x467fc
movq 0x8(%r9), %rcx
imulq $0x30, %rax, %rax
movq 0x20(%rcx,%rax), %rdx
movq 0x20(%rdi), %rax
movq 0x18(%rax), %rax
movzbl 0x71(%rax), %esi
xorl %ecx, %ecx
callq 0x46a5b
jmp 0x467ce
movq 0x20(%rdi), %rax
movq 0x18(%rax), %rax
movzbl 0x71(%rax), %esi
movq 0x8(%r8), %rcx
movq %rbx, %rdi
xorl %edx, %edx
callq 0x468d4
movq %rax, %r14
testq %rax, %rax
je 0x467fc
movq (%r14), %rcx
movq (%rbx), %rax
movq 0x20(%rax), %rax
movq 0x18(%rax), %rax
movzbl 0x71(%rax), %esi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x468d4
testq %rax, %rax
cmoveq %rax, %r14
jmp 0x467ff
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq