LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: whereScanInit
static WhereTerm *whereScanInit(
  WhereScan *pScan,       /* The WhereScan object being initialized */
  WhereClause *pWC,       /* The WHERE clause to be scanned */
  int iCur,               /* Cursor to scan for */
  int iColumn,            /* Column to scan for */
  u32 opMask,             /* Operator(s) to scan for */
  Index *pIdx             /* Must be compatible with this index */
){
  int j;

  /* memset(pScan, 0, sizeof(*pScan)); */
  pScan->pOrigWC = pWC;
  pScan->pWC = pWC;
  if( pIdx && iColumn>=0 ){
    pScan->idxaff = pIdx->pTable->aCol[iColumn].affinity;
    for(j=0; pIdx->aiColumn[j]!=iColumn; j++){
      if( NEVER(j>=pIdx->nColumn) ) return 0;
    }
    pScan->zCollName = pIdx->azColl[j];
  }else{
    pScan->idxaff = 0;
    pScan->zCollName = 0;
  }
  pScan->opMask = opMask;
  pScan->k = 0;
  pScan->aEquiv[0] = iCur;
  pScan->aEquiv[1] = iColumn;
  pScan->nEquiv = 2;
  pScan->iEquiv = 2;
  return whereScanNext(pScan);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rsi, (%rdi)
movq %rsi, 0x8(%rdi)
testq %r9, %r9
sete %al
testl %ecx, %ecx
sets %sil
orb %al, %sil
jne 0x5059d
movq 0x18(%r9), %rax
movq 0x8(%rax), %rax
movl %ecx, %esi
imulq $0x30, %rsi, %rsi
movb 0x29(%rax,%rsi), %al
movb %al, 0x18(%rdi)
movq 0x8(%r9), %rsi
movabsq $-0x1, %rax
cmpl %ecx, 0x4(%rsi,%rax,4)
je 0x505a5
movzwl 0x54(%r9), %r10d
incq %rax
cmpq %r10, %rax
jb 0x50586
xorl %eax, %eax
popq %rbp
retq
movb $0x0, 0x18(%rdi)
xorl %eax, %eax
jmp 0x505ae
movq 0x40(%r9), %rsi
movq 0x8(%rsi,%rax,8), %rax
movq %rax, 0x10(%rdi)
movl %r8d, 0x1c(%rdi)
andl $0x0, 0x20(%rdi)
movl %edx, 0x24(%rdi)
movl %ecx, 0x28(%rdi)
movw $0x202, 0x19(%rdi)      # imm = 0x202
popq %rbp
jmp 0x505c9
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: columnsInIndex
static Bitmask columnsInIndex(Index *pIdx){
  Bitmask m = 0;
  int j;
  for(j=pIdx->nColumn-1; j>=0; j--){
    int x = pIdx->aiColumn[j];
    assert( x>=0 );
    testcase( x==BMS-1 );
    testcase( x==BMS-2 );
    if( x<BMS-1 ) m |= MASKBIT(x);
  }
  return m;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl 0x54(%rdi), %edx
xorl %esi, %esi
movabsq $0x1, %r8
xorl %eax, %eax
testq %rdx, %rdx
jle 0x507d3
movq 0x8(%rdi), %rcx
movl -0x4(%rcx,%rdx,4), %ecx
decq %rdx
movq %r8, %r9
shlq %cl, %r9
cmpl $0x3f, %ecx
cmovgeq %rsi, %r9
orq %r9, %rax
jmp 0x507b1
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: whereLoopResize
static int whereLoopResize(sqlite3 *db, WhereLoop *p, int n){
  WhereTerm **paNew;
  if( p->nLSlot>=n ) return SQLITE_OK;
  n = (n+7)&~7;
  paNew = sqlite3DbMallocRaw(db, sizeof(p->aLTerm[0])*n);
  if( paNew==0 ) return SQLITE_NOMEM;
  memcpy(paNew, p->aLTerm, sizeof(p->aLTerm[0])*p->nLSlot);
  if( p->aLTerm!=p->aLTermSpace ) sqlite3DbFree(db, p->aLTerm);
  p->aLTerm = paNew;
  p->nLSlot = n;
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movzwl 0x2e(%rsi), %eax
xorl %ebx, %ebx
cmpl %edx, %eax
jge 0x5136a
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %r12
addl $0x7, %r14d
andl $-0x8, %r14d
leal (,%r14,8), %esi
callq 0x103b4
testq %rax, %rax
je 0x51367
movq %rax, %r13
movq 0x30(%r15), %rsi
movzwl 0x2e(%r15), %edx
shll $0x3, %edx
movq %rax, %rdi
callq 0x82c0
movq 0x30(%r15), %rsi
leaq 0x40(%r15), %rax
cmpq %rax, %rsi
je 0x5135c
movq %r12, %rdi
callq 0x968b
movq %r13, 0x30(%r15)
movw %r14w, 0x2e(%r15)
jmp 0x5136a
pushq $0x7
popq %rbx
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: whereCost
static WhereCost whereCost(tRowcnt x){
  static WhereCost a[] = { 0, 2, 3, 5, 6, 7, 8, 9 };
  WhereCost y = 40;
  if( x<8 ){
    if( x<2 ) return 0;
    while( x<8 ){  y -= 10; x <<= 1; }
  }else{
    while( x>255 ){ y += 40; x >>= 4; }
    while( x>15 ){  y += 10; x >>= 1; }
  }
  return a[x&7] + y - 10;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x8, %edi
jae 0x5155d
cmpl $0x2, %edi
jae 0x5158e
xorl %eax, %eax
jmp 0x5158c
movw $0x28, %ax
cmpl $0xff, %edi
jbe 0x51576
addl $0x28, %eax
shrl $0x4, %edi
jmp 0x51561
addl $0xa, %eax
shrl %edi
cmpl $0x10, %edi
jae 0x51571
andl $0x7, %edi
leaq 0x19e9b(%rip), %rcx     # 0x6b420
addw (%rcx,%rdi,2), %ax
addl $-0xa, %eax
popq %rbp
retq
movw $0x28, %ax
cmpl $0x7, %edi
ja 0x5157b
addl $-0xa, %eax
addl %edi, %edi
jmp 0x51592
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: whereOrInsert
static int whereOrInsert(
  WhereOrSet *pSet,      /* The WhereOrSet to be updated */
  Bitmask prereq,        /* Prerequisites of the new entry */
  WhereCost rRun,        /* Run-cost of the new entry */
  WhereCost nOut         /* Number of outputs for the new entry */
){
  u16 i;
  WhereOrCost *p;
  for(i=pSet->n, p=pSet->a; i>0; i--, p++){
    if( rRun<=p->rRun && (prereq & p->prereq)==prereq ){
      goto whereOrInsert_done;
    }
    if( p->rRun<=rRun && (p->prereq & prereq)==p->prereq ){
      return 0;
    }
  }
  if( pSet->n<N_OR_COST ){
    p = &pSet->a[pSet->n++];
    p->nOut = nOut;
  }else{
    p = pSet->a;
    for(i=1; i<pSet->n; i++){
      if( p->rRun>pSet->a[i].rRun ) p = pSet->a + i;
    }
    if( p->rRun<=rRun ) return 0;
  }
whereOrInsert_done:
  p->prereq = prereq;
  p->rRun = rRun;
  if( p->nOut>nOut ) p->nOut = nOut;
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movzwl (%rdi), %r9d
movzwl %r9w, %r8d
leaq 0x8(%rdi), %rax
movq %rsi, %r10
notq %r10
movl %r9d, %ebx
movq %rax, %r11
subw $0x1, %bx
jb 0x515ec
movzwl 0x8(%r11), %r14d
cmpw %dx, %r14w
jb 0x515db
movq (%r11), %r15
notq %r15
testq %r15, %rsi
je 0x51639
cmpw %dx, %r14w
ja 0x515e6
testq %r10, (%r11)
je 0x5164d
addq $0x10, %r11
jmp 0x515bf
cmpw $0x3, %r9w
jae 0x51609
incl %r9d
movw %r9w, (%rdi)
shll $0x4, %r8d
movw %cx, 0xa(%rax,%r8)
addq %r8, %rax
jmp 0x5163c
decq %r8
addq $0x18, %rdi
movzwl 0x8(%rax), %r10d
subq $0x1, %r8
jb 0x51631
movq %rdi, %r9
cmpw 0x8(%rdi), %r10w
ja 0x51628
movq %rax, %r9
addq $0x10, %rdi
movq %r9, %rax
jmp 0x51610
cmpw %dx, %r10w
ja 0x5163c
jmp 0x5164d
movq %r11, %rax
movq %rsi, (%rax)
movw %dx, 0x8(%rax)
cmpw %cx, 0xa(%rax)
jbe 0x5164d
movw %cx, 0xa(%rax)
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: whereLoopClearUnion
static void whereLoopClearUnion(sqlite3 *db, WhereLoop *p){
  if( p->wsFlags & (WHERE_VIRTUALTABLE|WHERE_AUTO_INDEX) ){
    if( (p->wsFlags & WHERE_VIRTUALTABLE)!=0 && p->u.vtab.needFree ){
      sqlite3_free(p->u.vtab.idxStr);
      p->u.vtab.needFree = 0;
      p->u.vtab.idxStr = 0;
    }else if( (p->wsFlags & WHERE_AUTO_INDEX)!=0 && p->u.btree.pIndex!=0 ){
      sqlite3DbFree(db, p->u.btree.pIndex->zColAff);
      sqlite3DbFree(db, p->u.btree.pIndex);
      p->u.btree.pIndex = 0;
    }
  }
}

// Assembly:
movl 0x28(%rsi), %eax
testw $0x4400, %ax            # imm = 0x4400
je 0x516be
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
btl $0xa, %eax
jae 0x51689
cmpb $0x0, 0x1c(%rbx)
je 0x51689
leaq 0x20(%rbx), %r14
movq 0x20(%rbx), %rdi
callq 0x9c7b
movb $0x0, 0x1c(%rbx)
jmp 0x516b6
btl $0xe, %eax
jae 0x516ba
movq 0x20(%rbx), %rax
testq %rax, %rax
je 0x516ba
addq $0x20, %rbx
movq 0x20(%rax), %rsi
movq %r14, %rdi
callq 0x968b
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x968b
movq %rbx, %r14
andq $0x0, (%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: termCanDriveIndex
static int termCanDriveIndex(
  WhereTerm *pTerm,              /* WHERE clause term to check */
  struct SrcList_item *pSrc,     /* Table we are trying to access */
  Bitmask notReady               /* Tables in outer loops of the join */
){
  char aff;
  if( pTerm->leftCursor!=pSrc->iCursor ) return 0;
  if( (pTerm->eOperator & WO_EQ)==0 ) return 0;
  if( (pTerm->prereqRight & notReady)!=0 ) return 0;
  if( pTerm->u.leftColumn<0 ) return 0;
  aff = pSrc->pTab->aCol[pTerm->u.leftColumn].affinity;
  if( !sqlite3IndexAffinityOk(pTerm->pExpr, aff) ) return 0;
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0xc(%rdi), %eax
cmpl 0x3c(%rsi), %eax
jne 0x516eb
testb $0x2, 0x18(%rdi)
je 0x516eb
testq %rdx, 0x28(%rdi)
je 0x516ef
xorl %eax, %eax
popq %rbp
retq
movslq 0x10(%rdi), %rax
testq %rax, %rax
js 0x516eb
movq 0x20(%rsi), %rcx
movq 0x8(%rcx), %rcx
imulq $0x30, %rax, %rax
movsbl 0x29(%rcx,%rax), %esi
movq (%rdi), %rdi
popq %rbp
jmp 0x4a030
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: whereCostAdd
static WhereCost whereCostAdd(WhereCost a, WhereCost 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:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
cmpw %si, %ax
jae 0x51728
leal 0x31(%rax), %ecx
cmpl %esi, %ecx
jae 0x5173a
movl %esi, %eax
jmp 0x51770
leal 0x31(%rsi), %ecx
cmpl %eax, %ecx
jb 0x51770
leal 0x1f(%rsi), %ecx
cmpl %eax, %ecx
jae 0x51746
incl %eax
jmp 0x51770
leal 0x1f(%rax), %ecx
cmpl %esi, %ecx
jae 0x5175c
leal 0x1(%rsi), %eax
jmp 0x51770
movl %eax, %ecx
subl %esi, %ecx
movslq %ecx, %rcx
leaq 0x1dd5c(%rip), %rdx     # 0x6f4b0
movzbl (%rcx,%rdx), %ecx
addl %ecx, %eax
jmp 0x51770
movl %esi, %ecx
subl %eax, %ecx
movslq %ecx, %rax
leaq 0x1dd46(%rip), %rcx     # 0x6f4b0
movzbl (%rax,%rcx), %eax
addl %esi, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprImpliesExpr
SQLITE_PRIVATE int sqlite3ExprImpliesExpr(Expr *pE1, Expr *pE2, int iTab){
  if( sqlite3ExprCompare(pE1, pE2, iTab)==0 ){
    return 1;
  }
  if( pE2->op==TK_OR
   && (sqlite3ExprImpliesExpr(pE1, pE2->pLeft, iTab)
             || sqlite3ExprImpliesExpr(pE1, pE2->pRight, iTab) )
  ){
    return 1;
  }
  if( pE2->op==TK_NOTNULL
   && sqlite3ExprCompare(pE1->pLeft, pE2->pLeft, iTab)==0
   && (pE1->op!=TK_ISNULL && pE1->op!=TK_IS)
  ){
    return 1;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r14
pushq $0x1
popq %rbx
movq %r14, %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x46bdc
testl %eax, %eax
je 0x51ca9
movzbl (%r12), %eax
cmpl $0x44, %eax
jne 0x51c7b
movq 0x10(%r12), %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x51c2d
testl %eax, %eax
jne 0x51ca9
movq 0x18(%r12), %r12
jmp 0x51c44
xorl %ebx, %ebx
cmpl $0x4a, %eax
jne 0x51ca9
movq 0x10(%r14), %rdi
movq 0x10(%r12), %rsi
movl %r15d, %edx
callq 0x46bdc
testl %eax, %eax
jne 0x51ca9
movb (%r14), %al
cmpb $0x49, %al
setne %cl
cmpb $0x46, %al
setne %al
andb %cl, %al
movzbl %al, %ebx
movl %ebx, %eax
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: explainAppendTerm
static void explainAppendTerm(
  StrAccum *pStr,             /* The text expression being built */
  int iTerm,                  /* Index of this term.  First is zero */
  const char *zColumn,        /* Name of the column */
  const char *zOp             /* Name of the operator */
){
  if( iTerm ) sqlite3StrAccumAppend(pStr, " AND ", 5);
  sqlite3StrAccumAppend(pStr, zColumn, -1);
  sqlite3StrAccumAppend(pStr, zOp, 1);
  sqlite3StrAccumAppend(pStr, "?", 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
testl %esi, %esi
je 0x52366
leaq 0x1b8e3(%rip), %rsi     # 0x6dc3e
pushq $0x5
popq %rdx
movq %rbx, %rdi
callq 0x155e3
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x155e3
pushq $0x1
popq %r15
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x155e3
leaq 0x195a9(%rip), %rsi     # 0x6b936
movq %rbx, %rdi
movl %r15d, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x155e3
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/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))
  ){
    pTerm->wtFlags |= TERM_CODED;
    if( pTerm->iParent>=0 ){
      WhereTerm *pOther = &pTerm->pWC->a[pTerm->iParent];
      if( (--pOther->nChild)==0 ){
        disableTerm(pLevel, pOther);
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rsi, %rsi
je 0x5259a
movb 0x1a(%rsi), %al
testb $0x4, %al
jne 0x5259a
cmpl $0x0, (%rdi)
je 0x52576
movq (%rsi), %rcx
testb $0x1, 0x2(%rcx)
je 0x5259a
orb $0x4, %al
movb %al, 0x1a(%rsi)
movslq 0x8(%rsi), %rax
testq %rax, %rax
js 0x5259a
movq 0x20(%rsi), %rcx
movq 0x20(%rcx), %rcx
imulq $0x38, %rax, %rax
leaq (%rcx,%rax), %rsi
decb 0x1b(%rcx,%rax)
je 0x5255c
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprNeedsNoAffinityChange
SQLITE_PRIVATE int sqlite3ExprNeedsNoAffinityChange(const Expr *p, char aff){
  u8 op;
  if( aff==SQLITE_AFF_NONE ) return 1;
  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: {
      return aff==SQLITE_AFF_INTEGER || aff==SQLITE_AFF_NUMERIC;
    }
    case TK_FLOAT: {
      return aff==SQLITE_AFF_REAL || aff==SQLITE_AFF_NUMERIC;
    }
    case TK_STRING: {
      return aff==SQLITE_AFF_TEXT;
    }
    case TK_BLOB: {
      return 1;
    }
    case TK_COLUMN: {
      assert( p->iTable>=0 );  /* p cannot be part of a CHECK constraint */
      return p->iColumn<0
          && (aff==SQLITE_AFF_INTEGER || aff==SQLITE_AFF_NUMERIC);
    }
    default: {
      return 0;
    }
  }
}

// Assembly:
movb $0x1, %al
cmpb $0x62, %sil
je 0x52682
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %cl
movzbl %cl, %edx
leal -0x9c(%rdx), %r8d
cmpl $0x2, %r8d
jae 0x52615
movq 0x10(%rdi), %rdi
jmp 0x525fd
cmpl $0x84, %edx
jne 0x52620
movb 0x37(%rdi), %cl
cmpb $0x5e, %cl
je 0x5267a
movzbl %cl, %ecx
cmpl $0x98, %ecx
je 0x52655
cmpl $0x82, %ecx
je 0x5266c
cmpl $0x83, %ecx
je 0x52681
cmpl $0x81, %ecx
jne 0x52676
addb $-0x63, %sil
cmpb $0x2, %sil
setb %al
jmp 0x52681
cmpw $0x0, 0x30(%rdi)
sets %cl
addb $-0x63, %sil
cmpb $0x2, %sil
setb %al
andb %cl, %al
jmp 0x52681
addb $-0x63, %sil
testb $-0x3, %sil
jmp 0x5267e
xorl %eax, %eax
jmp 0x52681
cmpb $0x61, %sil
sete %al
popq %rbp
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: codeApplyAffinity
static void codeApplyAffinity(Parse *pParse, int base, int n, char *zAff){
  Vdbe *v = pParse->pVdbe;
  if( zAff==0 ){
    assert( pParse->db->mallocFailed );
    return;
  }
  assert( v!=0 );

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rcx, %rcx
je 0x52720
movq %rcx, %r15
movl %esi, %ebx
movq %rdi, %r14
movq 0x10(%rdi), %r12
movl %edx, %eax
sarl $0x1f, %eax
andl %edx, %eax
testl %edx, %edx
jle 0x526c5
cmpb $0x62, (%r15)
jne 0x526c3
decl %edx
incl %ebx
incq %r15
jmp 0x526b0
movl %edx, %eax
movl %eax, %eax
movq %rax, %r13
cmpl $0x2, %r13d
jl 0x526de
leaq -0x1(%r13), %rax
cmpb $0x62, -0x1(%r15,%r13)
je 0x526c7
jmp 0x526e4
cmpq $0x1, %r13
jne 0x52720
pushq $0x2a
popq %rsi
movq %r12, %rdi
movl %ebx, %edx
movl %r13d, %ecx
callq 0x41f42
pushq $-0x1
popq %rsi
movq %r12, %rdi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x1074b
movq %r14, %rdi
movl %ebx, %esi
movl %r13d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x49537
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: whereClauseClear
static void whereClauseClear(WhereClause *pWC){
  int i;
  WhereTerm *a;
  sqlite3 *db = pWC->pWInfo->pParse->db;
  for(i=pWC->nTerm-1, a=pWC->a; i>=0; i--, a++){
    if( a->wtFlags & TERM_DYNAMIC ){
      sqlite3ExprDelete(db, a->pExpr);
    }
    if( a->wtFlags & TERM_ORINFO ){
      whereOrInfoDelete(db, a->u.pOrInfo);
    }else if( a->wtFlags & TERM_ANDINFO ){
      whereAndInfoDelete(db, a->u.pAndInfo);
    }
  }
  if( pWC->a!=pWC->aStatic ){
    sqlite3DbFree(db, pWC->a);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rax
movq (%rax), %rax
movq (%rax), %rbx
movl 0x14(%rdi), %r12d
movq 0x20(%rdi), %r13
addq $0x1a, %r13
testl %r12d, %r12d
jle 0x52796
movb (%r13), %al
testb $0x1, %al
je 0x52772
movq -0x1a(%r13), %rsi
movq %rbx, %rdi
callq 0x2f476
movb (%r13), %al
testb $0x30, %al
je 0x5278d
movq -0xa(%r13), %r15
movq %r15, %rdi
callq 0x5272f
movq %rbx, %rdi
movq %r15, %rsi
callq 0x968b
addq $0x38, %r13
decl %r12d
jmp 0x52755
movq 0x20(%r14), %rsi
addq $0x28, %r14
cmpq %r14, %rsi
je 0x527b9
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x968b
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: codeDistinct
static void codeDistinct(
  Parse *pParse,     /* Parsing and code generating context */
  int iTab,          /* A sorting index used to test for distinctness */
  int addrRepeat,    /* Jump to here if not distinct */
  int N,             /* Number of elements */
  int iMem           /* First element */
){
  Vdbe *v;
  int r1;

  v = pParse->pVdbe;
  r1 = sqlite3GetTempReg(pParse);
  sqlite3VdbeAddOp4Int(v, OP_Found, iTab, addrRepeat, iMem, N);
  sqlite3VdbeAddOp3(v, OP_MakeRecord, iMem, N, r1);
  sqlite3VdbeAddOp2(v, OP_IdxInsert, iTab, r1);
  sqlite3ReleaseTempReg(pParse, r1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, -0x30(%rbp)
movl %ecx, %r13d
movl %edx, -0x2c(%rbp)
movl %esi, %r12d
movl %esi, -0x34(%rbp)
movq %rdi, %rbx
movq 0x10(%rdi), %r14
callq 0x46ff9
movl %eax, %r15d
pushq $0x3d
popq %rsi
movq %r14, %rdi
movl %r12d, %edx
movl -0x2c(%rbp), %ecx
movl -0x30(%rbp), %r12d
movl %r12d, %r8d
movl %r13d, %r9d
callq 0x49ffa
pushq $0x2b
popq %rsi
movq %r14, %rdi
movl %r12d, %edx
movl %r13d, %ecx
movl %r15d, %r8d
callq 0x41f4c
pushq $0x67
popq %rsi
movq %r14, %rdi
movl -0x34(%rbp), %edx
movl %r15d, %ecx
callq 0x41f42
movq %rbx, %rdi
movl %r15d, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4701c
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ArrayAllocate
SQLITE_PRIVATE void *sqlite3ArrayAllocate(
  sqlite3 *db,      /* Connection to notify of malloc failures */
  void *pArray,     /* Array of objects.  Might be reallocated */
  int szEntry,      /* Size of each object in the array */
  int *pnEntry,     /* Number of objects currently in use */
  int *pIdx         /* Write the index of a new slot here */
){
  char *z;
  int n = *pnEntry;
  if( (n & (n-1))==0 ){
    int sz = (n==0) ? 1 : 2*n;
    void *pNew = sqlite3DbRealloc(db, pArray, sz*szEntry);
    if( pNew==0 ){
      *pIdx = -1;
      return pArray;
    }
    pArray = pNew;
  }
  z = (char*)pArray;
  memset(&z[n * szEntry], 0, szEntry);
  *pIdx = n;
  ++*pnEntry;
  return pArray;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, -0x30(%rbp)
movq %rcx, %r14
movl %edx, %r15d
movq %rsi, %r12
movl (%rcx), %ebx
leal -0x1(%rbx), %eax
testl %eax, %ebx
jne 0x52cfd
leal (%rbx,%rbx), %eax
testl %ebx, %ebx
pushq $0x1
popq %rdx
cmovnel %eax, %edx
imull %r15d, %edx
movq %r12, %rsi
callq 0x157c3
movq %rax, %r13
testq %rax, %rax
jne 0x52d00
movq -0x30(%rbp), %rax
orl $-0x1, (%rax)
jmp 0x52d22
movq %r12, %r13
movl %ebx, %eax
imull %r15d, %eax
movslq %eax, %rdi
addq %r13, %rdi
movl %r15d, %edx
xorl %esi, %esi
callq 0x81e0
movq -0x30(%rbp), %rax
movl %ebx, (%rax)
incl (%r14)
movq %r13, %r12
movq %r12, %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: sqlite3TriggersExist
SQLITE_PRIVATE Trigger *sqlite3TriggersExist(
  Parse *pParse,          /* Parse context */
  Table *pTab,            /* The table the contains the triggers */
  int op,                 /* one of TK_DELETE, TK_INSERT, TK_UPDATE */
  ExprList *pChanges,     /* Columns that change in an UPDATE statement */
  int *pMask              /* OUT: Mask of TRIGGER_BEFORE|TRIGGER_AFTER */
){
  int mask = 0;
  Trigger *pList = 0;
  Trigger *p;

  if( (pParse->db->flags & SQLITE_EnableTrigger)!=0 ){
    pList = sqlite3TriggerList(pParse, pTab);
  }
  assert( pList==0 || IsVirtual(pTab)==0 );
  for(p=pList; p; p=p->pNext){
    if( p->op==op && checkColumnOverlap(p->pColumns, pChanges) ){
      mask |= p->tr_tm;
    }
  }
  if( pMask ){
    *pMask = mask;
  }
  return (mask ? pList : 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, -0x30(%rbp)
movq %rcx, %r14
movl %edx, %r15d
movq (%rdi), %rax
xorl %r13d, %r13d
testb $-0x80, 0x2e(%rax)
jne 0x52d5c
xorl %ebx, %ebx
jmp 0x52d64
callq 0x4a45f
movq %rax, %rbx
movq %rbx, %r12
testq %r12, %r12
je 0x52d98
movzbl 0x10(%r12), %eax
cmpl %r15d, %eax
jne 0x52d91
movq 0x20(%r12), %rdi
movq %r14, %rsi
callq 0x53642
testl %eax, %eax
je 0x52d91
movzbl 0x11(%r12), %eax
orl %eax, %r13d
movq 0x40(%r12), %r12
jmp 0x52d67
movq -0x30(%rbp), %rax
testq %rax, %rax
je 0x52da4
movl %r13d, (%rax)
xorl %eax, %eax
testl %r13d, %r13d
cmoveq %rax, %rbx
movq %rbx, %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: sqlite3IsReadOnly
SQLITE_PRIVATE int sqlite3IsReadOnly(Parse *pParse, Table *pTab, int viewOk){
  /* A table is not writable under the following circumstances:
  **
  **   1) It is a virtual table and no implementation of the xUpdate method
  **      has been provided, or
  **   2) It is a system table (i.e. sqlite_master), this call is not
  **      part of a nested parse and writable_schema pragma has not 
  **      been specified.
  **
  ** In either case leave an error message in pParse and return non-zero.
  */
  if( ( IsVirtual(pTab) 
     && sqlite3GetVTable(pParse->db, pTab)->pMod->pModule->xUpdate==0 )
   || ( (pTab->tabFlags & TF_Readonly)!=0
     && (pParse->db->flags & SQLITE_WriteSchema)==0
     && pParse->nested==0 )
  ){
    sqlite3ErrorMsg(pParse, "table %s may not be modified", pTab->zName);
    return 1;
  }

#ifndef SQLITE_OMIT_VIEW
  if( !viewOk && pTab->pSelect ){
    sqlite3ErrorMsg(pParse,"cannot modify %s because it is a view",pTab->zName);
    return 1;
  }
#endif
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movb 0x46(%rsi), %r12b
testb $0x10, %r12b
je 0x52df6
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x3095c
movq 0x8(%rax), %rax
movq (%rax), %rax
cmpq $0x0, 0x68(%rax)
je 0x52e25
testb $0x1, %r12b
je 0x52e0b
movq (%rbx), %rax
testb $0x8, 0x2d(%rax)
jne 0x52e0b
cmpb $0x0, 0x1e(%rbx)
je 0x52e25
xorl %eax, %eax
testl %r15d, %r15d
jne 0x52e3c
cmpq $0x0, 0x18(%r14)
je 0x52e3c
movq (%r14), %rdx
leaq 0x1af53(%rip), %rsi     # 0x6dd76
jmp 0x52e2f
movq (%r14), %rdx
leaq 0x1af2a(%rip), %rsi     # 0x6dd59
movq %rbx, %rdi
xorl %eax, %eax
callq 0x104d6
pushq $0x1
popq %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: sqlite3MaterializeView
SQLITE_PRIVATE void sqlite3MaterializeView(
  Parse *pParse,       /* Parsing context */
  Table *pView,        /* View definition */
  Expr *pWhere,        /* Optional WHERE clause to be added */
  int iCur             /* Cursor number for ephemerial table */
){
  SelectDest dest;
  Select *pSel;
  SrcList *pFrom;
  sqlite3 *db = pParse->db;
  int iDb = sqlite3SchemaToIndex(db, pView->pSchema);

  pWhere = sqlite3ExprDup(db, pWhere, 0);
  pFrom = sqlite3SrcListAppend(db, 0, 0, 0);

  if( pFrom ){
    assert( pFrom->nSrc==1 );
    pFrom->a[0].zName = sqlite3DbStrDup(db, pView->zName);
    pFrom->a[0].zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zName);
    assert( pFrom->a[0].pOn==0 );
    assert( pFrom->a[0].pUsing==0 );
  }

  pSel = sqlite3SelectNew(pParse, 0, pFrom, pWhere, 0, 0, 0, 0, 0, 0);
  if( pSel ) pSel->selFlags |= SF_Materialize;

  sqlite3SelectDestInit(&dest, SRT_EphemTab, iCur);
  sqlite3Select(pParse, pSel, &dest);
  sqlite3SelectDelete(db, pSel);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, -0x2c(%rbp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x68(%rsi), %rsi
movq %rbx, %rdi
callq 0x1064e
movl %eax, %r12d
movq %rbx, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x440d6
movq %rax, -0x38(%rbp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3b730
movq %rax, %r13
testq %rax, %rax
je 0x52ec5
movq (%r15), %rsi
movq %rbx, %rdi
callq 0xf173
movq %rax, 0x18(%r13)
movq 0x20(%rbx), %rax
movslq %r12d, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rsi
movq %rbx, %rdi
callq 0xf173
movq %rax, 0x10(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
andl $0x0, 0x8(%rsp)
andq $0x0, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq -0x38(%rbp), %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3b357
movq %rax, %r15
testq %rax, %rax
je 0x52efb
orb $0x1, 0xb(%r15)
leaq -0x48(%rbp), %rdx
movw $0x9, (%rdx)
movl -0x2c(%rbp), %eax
movl %eax, 0x4(%rdx)
andq $0x0, 0x8(%rdx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x380ad
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2f500
addq $0x48, %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: sqlite3OpenTableAndIndices
SQLITE_PRIVATE int sqlite3OpenTableAndIndices(
  Parse *pParse,   /* Parsing context */
  Table *pTab,     /* Table to be opened */
  int baseCur,     /* Cursor number assigned to the table */
  int op           /* OP_OpenRead or OP_OpenWrite */
){
  int i;
  int iDb;
  Index *pIdx;
  Vdbe *v;

  if( IsVirtual(pTab) ) return 0;
  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
  v = sqlite3GetVdbe(pParse);
  assert( v!=0 );
  sqlite3OpenTable(pParse, baseCur, iDb, pTab, op);
  for(i=1, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
    KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
    assert( pIdx->pSchema==pTab->pSchema );
    sqlite3VdbeAddOp4(v, op, i+baseCur, pIdx->tnum, iDb,
                      (char*)pKey, P4_KEYINFO_HANDOFF);
    VdbeComment((v, "%s", pIdx->zName));
  }
  if( pParse->nTab<baseCur+i ){
    pParse->nTab = baseCur+i;
  }
  return i-1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
xorl %r14d, %r14d
testb $0x10, 0x46(%rsi)
jne 0x53191
movl %edx, %r13d
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x68(%rsi), %rsi
movl %ecx, -0x2c(%rbp)
callq 0x1064e
movl %eax, %r15d
movq %rbx, %rdi
callq 0x41ef4
movq %r13, %r14
movq %rax, -0x48(%rbp)
movq %rbx, -0x38(%rbp)
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %r13d
movl %r15d, %edx
movq %r12, %rcx
movl -0x2c(%rbp), %r8d
movl %r8d, %r15d
callq 0x4200b
addq $0x10, %r12
movq %r14, -0x40(%rbp)
leal 0x1(%r14), %ebx
xorl %r14d, %r14d
movq (%r12), %r12
testq %r12, %r12
je 0x5317a
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x476ae
leal (%rbx,%r14), %edx
movl 0x50(%r12), %ecx
movl $0xfffffff0, (%rsp)     # imm = 0xFFFFFFF0
movq -0x48(%rbp), %rdi
movl %r15d, %esi
movl %r13d, %r8d
movq %rax, %r9
callq 0x41fd2
addq $0x28, %r12
incl %r14d
jmp 0x5313a
movq -0x40(%rbp), %rax
addl %r14d, %eax
incl %eax
movq -0x38(%rbp), %r13
cmpl %eax, 0x54(%r13)
jge 0x53191
movl %eax, 0x54(%r13)
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: sqlite3VtabMakeWritable
SQLITE_PRIVATE void sqlite3VtabMakeWritable(Parse *pParse, Table *pTab){
  Parse *pToplevel = sqlite3ParseToplevel(pParse);
  int i, n;
  Table **apVtabLock;

  assert( IsVirtual(pTab) );
  for(i=0; i<pToplevel->nVtabLock; i++){
    if( pTab==pToplevel->apVtabLock[i] ) return;
  }
  n = (pToplevel->nVtabLock+1)*sizeof(pToplevel->apVtabLock[0]);
  apVtabLock = sqlite3_realloc(pToplevel->apVtabLock, n);
  if( apVtabLock ){
    pToplevel->apVtabLock = apVtabLock;
    pToplevel->apVtabLock[pToplevel->nVtabLock++] = pTab;
  }else{
    pToplevel->db->mallocFailed = 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x1d8(%rdi), %r14
testq %r14, %r14
cmoveq %rdi, %r14
movl 0x204(%r14), %eax
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
cmpq %rcx, %rdx
je 0x531e9
movq 0x280(%r14), %rsi
leaq 0x1(%rcx), %rdi
cmpq %rbx, (%rsi,%rcx,8)
movq %rdi, %rcx
jne 0x531ce
jmp 0x53226
leal 0x8(,%rax,8), %esi
movq 0x280(%r14), %rdi
callq 0x9ce9
testq %rax, %rax
je 0x5321f
movq %rax, 0x280(%r14)
movslq 0x204(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x204(%r14)
movq %rbx, (%rax,%rcx,8)
jmp 0x53226
movq (%r14), %rax
movb $0x1, 0x50(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: checkColumnOverlap
static int checkColumnOverlap(IdList *pIdList, ExprList *pEList){
  int e;
  if( pIdList==0 || NEVER(pEList==0) ) return 1;
  for(e=0; e<pEList->nExpr; e++){
    if( sqlite3IdListIndex(pIdList, pEList->a[e].zName)>=0 ) return 1;
  }
  return 0; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
pushq $0x1
popq %rbx
jne 0x536a2
movq %rsi, %r14
movq %rdi, %r15
movl (%rsi), %r12d
xorl %ecx, %ecx
testl %r12d, %r12d
cmovlel %ecx, %r12d
shlq $0x5, %r12
addq $0x20, %r12
leaq 0x20(%rcx), %r13
cmpq %r13, %r12
je 0x536a0
movq 0x8(%r14), %rax
movq 0x8(%rax,%rcx), %rsi
movq %r15, %rdi
callq 0x45da8
movq %r13, %rcx
testl %eax, %eax
js 0x5367d
jmp 0x536a2
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3TriggerColmask
SQLITE_PRIVATE u32 sqlite3TriggerColmask(
  Parse *pParse,       /* Parse context */
  Trigger *pTrigger,   /* List of triggers on table pTab */
  ExprList *pChanges,  /* Changes list for any UPDATE OF triggers */
  int isNew,           /* 1 for new.* ref mask, 0 for old.* ref mask */
  int tr_tm,           /* Mask of TRIGGER_BEFORE|TRIGGER_AFTER */
  Table *pTab,         /* The table to code triggers from */
  int orconf           /* Default ON CONFLICT policy for trigger steps */
){
  const int op = pChanges ? TK_UPDATE : TK_DELETE;
  u32 mask = 0;
  Trigger *p;

  assert( isNew==1 || isNew==0 );
  for(p=pTrigger; p; p=p->pNext){
    if( p->op==op && (tr_tm&p->tr_tm)
     && checkColumnOverlap(p->pColumns,pChanges)
    ){
      TriggerPrg *pPrg;
      pPrg = getRowTrigger(pParse, p, pTab, orconf);
      if( pPrg ){
        mask |= pPrg->aColmask[isNew];
      }
    }
  }

  return mask;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, -0x40(%rbp)
movl %r8d, %r14d
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, -0x38(%rbp)
cmpq $0x1, %rdx
pushq $0x6b
popq %r13
sbbl $0x0, %r13d
movl %ecx, %eax
movq %rax, -0x30(%rbp)
xorl %ebx, %ebx
testq %r12, %r12
je 0x5373c
movzbl 0x10(%r12), %eax
cmpl %eax, %r13d
jne 0x53735
movzbl 0x11(%r12), %eax
testl %r14d, %eax
je 0x53735
movq 0x20(%r12), %rdi
movq %r15, %rsi
callq 0x53642
testl %eax, %eax
je 0x53735
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq -0x40(%rbp), %rdx
movl 0x10(%rbp), %ecx
callq 0x543a2
testq %rax, %rax
je 0x53735
movq -0x30(%rbp), %rcx
orl 0x1c(%rax,%rcx,4), %ebx
movq 0x40(%r12), %r12
jmp 0x536e9
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: sqlite3FkOldmask
SQLITE_PRIVATE u32 sqlite3FkOldmask(
  Parse *pParse,                  /* Parse context */
  Table *pTab                     /* Table being modified */
){
  u32 mask = 0;
  if( pParse->db->flags&SQLITE_ForeignKeys ){
    FKey *p;
    int i;
    for(p=pTab->pFKey; p; p=p->pNextFrom){
      for(i=0; i<p->nCol; i++) mask |= COLUMN_MASK(p->aCol[i].iFrom);
    }
    for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
      Index *pIdx = 0;
      sqlite3FkLocateIndex(pParse, pTab, p, &pIdx, 0);
      if( pIdx ){
        for(i=0; i<pIdx->nColumn; i++) mask |= COLUMN_MASK(pIdx->aiColumn[i]);
      }
    }
  }
  return mask;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x38(%rbp)
movq (%rdi), %rax
xorl %r15d, %r15d
testb $0x8, 0x2e(%rax)
jne 0x53780
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x20(%rsi), %rax
xorl %edx, %edx
pushq $0x1
popq %r13
pushq $-0x1
popq %rbx
xorl %r15d, %r15d
movq (%rax), %rax
testq %rax, %rax
je 0x537ce
movl 0x28(%rax), %r9d
testl %r9d, %r9d
cmovlel %edx, %r9d
shlq $0x4, %r9
xorl %edi, %edi
cmpq %rdi, %r9
je 0x537c8
movl 0x40(%rax,%rdi), %ecx
movl %r13d, %r8d
shll %cl, %r8d
cmpl $0x20, %ecx
cmovgel %ebx, %r8d
orl %r8d, %r15d
addq $0x10, %rdi
jmp 0x537a9
addq $0x8, %rax
jmp 0x53790
movq %rsi, %r14
movq %rsi, %rdi
callq 0x4a434
movq %rax, %r12
testq %r12, %r12
je 0x5376e
andq $0x0, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movq %r14, %rsi
movq %r12, %rdx
leaq -0x30(%rbp), %rcx
xorl %r8d, %r8d
callq 0x548cc
movq -0x30(%rbp), %rax
testq %rax, %rax
je 0x5382a
movzwl 0x54(%rax), %edx
xorl %esi, %esi
cmpq %rsi, %rdx
je 0x5382a
movq 0x8(%rax), %rcx
movl (%rcx,%rsi,4), %ecx
movl %r13d, %edi
shll %cl, %edi
cmpl $0x20, %ecx
cmovgel %ebx, %edi
orl %edi, %r15d
incq %rsi
jmp 0x5380b
movq 0x18(%r12), %r12
jmp 0x537dc
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3CodeRowTrigger
SQLITE_PRIVATE void sqlite3CodeRowTrigger(
  Parse *pParse,       /* Parse context */
  Trigger *pTrigger,   /* List of triggers on table pTab */
  int op,              /* One of TK_UPDATE, TK_INSERT, TK_DELETE */
  ExprList *pChanges,  /* Changes list for any UPDATE OF triggers */
  int tr_tm,           /* One of TRIGGER_BEFORE, TRIGGER_AFTER */
  Table *pTab,         /* The table to code triggers from */
  int reg,             /* The first in an array of registers (see above) */
  int orconf,          /* ON CONFLICT policy */
  int ignoreJump       /* Instruction to jump to for RAISE(IGNORE) */
){
  Trigger *p;          /* Used to iterate through pTrigger list */

  assert( op==TK_UPDATE || op==TK_INSERT || op==TK_DELETE );
  assert( tr_tm==TRIGGER_BEFORE || tr_tm==TRIGGER_AFTER );
  assert( (op==TK_UPDATE)==(pChanges!=0) );

  for(p=pTrigger; p; p=p->pNext){

    /* Sanity checking:  The schema for the trigger and for the table are
    ** always defined.  The trigger must be in the same schema as the table
    ** or else it must be a TEMP trigger. */
    assert( p->pSchema!=0 );
    assert( p->pTabSchema!=0 );
    assert( p->pSchema==p->pTabSchema 
         || p->pSchema==pParse->db->aDb[1].pSchema );

    /* Determine whether we should code this trigger */
    if( p->op==op 
     && p->tr_tm==tr_tm 
     && checkColumnOverlap(p->pColumns, pChanges)
    ){
      sqlite3CodeRowTriggerDirect(pParse, p, pTab, reg, orconf, ignoreJump);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, -0x30(%rbp)
movl %r8d, %r14d
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %rbx
testq %r13, %r13
je 0x5389b
movzbl 0x10(%r13), %eax
cmpl %r12d, %eax
jne 0x53895
movzbl 0x11(%r13), %eax
cmpl %r14d, %eax
jne 0x53895
movq 0x20(%r13), %rdi
movq %r15, %rsi
callq 0x53642
testl %eax, %eax
je 0x53895
movq %rbx, %rdi
movq %r13, %rsi
movq -0x30(%rbp), %rdx
movl 0x10(%rbp), %ecx
movl 0x18(%rbp), %r8d
movl 0x20(%rbp), %r9d
callq 0x54b2e
movq 0x40(%r13), %r13
jmp 0x53852
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: sqlite3GenerateRowIndexDelete
SQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(
  Parse *pParse,     /* Parsing and code generating context */
  Table *pTab,       /* Table containing the row to be deleted */
  int iCur,          /* Cursor number for the table */
  int *aRegIdx       /* Only delete if aRegIdx!=0 && aRegIdx[i]>0 */
){
  int i;
  Index *pIdx;
  int r1;
  int iPartIdxLabel;
  Vdbe *v = pParse->pVdbe;

  for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){
    if( aRegIdx!=0 && aRegIdx[i-1]==0 ) continue;
    r1 = sqlite3GenerateIndexKey(pParse, pIdx, iCur, 0, 0, &iPartIdxLabel);
    sqlite3VdbeAddOp3(v, OP_IdxDelete, iCur+i, r1, pIdx->nColumn+1);
    sqlite3VdbeResolveLabel(v, iPartIdxLabel);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r12
movq %rsi, %r15
movq %rdi, -0x38(%rbp)
movq 0x10(%rdi), %r13
addq $0x10, %r15
movq %rdx, -0x40(%rbp)
leal 0x1(%rdx), %r14d
movq %rcx, %rbx
movq (%r15), %r15
testq %r15, %r15
je 0x53d1f
testq %r12, %r12
je 0x53cc6
cmpl $0x0, (%rbx)
je 0x53d12
movq -0x38(%rbp), %rdi
movq %r15, %rsi
movq -0x40(%rbp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
leaq -0x2c(%rbp), %r9
callq 0x47732
movzwl 0x54(%r15), %r8d
incl %r8d
movq %r13, %rdi
pushq $0x68
popq %rsi
movl %r14d, %edx
movl %eax, %ecx
callq 0x41f4c
movl -0x2c(%rbp), %eax
testl %eax, %eax
jns 0x53d12
movq 0x40(%r13), %rcx
testq %rcx, %rcx
je 0x53d12
notl %eax
movl 0x34(%r13), %edx
movl %eax, %eax
movl %edx, (%rcx,%rax,4)
addq $0x28, %r15
incl %r14d
addq $0x4, %rbx
jmp 0x53cb4
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: targetSrcList
static SrcList *targetSrcList(
  Parse *pParse,       /* The parsing context */
  TriggerStep *pStep   /* The trigger containing the target token */
){
  int iDb;             /* Index of the database to use */
  SrcList *pSrc;       /* SrcList to be returned */

  pSrc = sqlite3SrcListAppend(pParse->db, 0, &pStep->target, 0);
  if( pSrc ){
    assert( pSrc->nSrc>0 );
    assert( pSrc->a!=0 );
    iDb = sqlite3SchemaToIndex(pParse->db, pStep->pTrig->pSchema);
    if( iDb==0 || iDb>=2 ){
      sqlite3 *db = pParse->db;
      assert( iDb<pParse->db->nDb );
      pSrc->a[pSrc->nSrc-1].zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zName);
    }
  }
  return pSrc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rdi
leaq 0x18(%rsi), %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x3b730
movq %rax, %rbx
testq %rax, %rax
je 0x548be
movq (%r14), %r14
movq 0x8(%r15), %rax
movq 0x28(%rax), %rsi
movq %r14, %rdi
callq 0x1064e
testl %eax, %eax
setne %cl
cmpl $0x2, %eax
setl %dl
testb %dl, %cl
jne 0x548be
movq 0x20(%r14), %rcx
movl %eax, %eax
shlq $0x5, %rax
movq (%rcx,%rax), %rsi
movq %r14, %rdi
callq 0xf173
movzbl (%rbx), %ecx
imulq $0x68, %rcx, %rcx
movq %rax, -0x58(%rbx,%rcx)
movq %rbx, %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: sqlite3CodeRowTriggerDirect
SQLITE_PRIVATE void sqlite3CodeRowTriggerDirect(
  Parse *pParse,       /* Parse context */
  Trigger *p,          /* Trigger to code */
  Table *pTab,         /* The table to code triggers from */
  int reg,             /* Reg array containing OLD.* and NEW.* values */
  int orconf,          /* ON CONFLICT policy */
  int ignoreJump       /* Instruction to jump to for RAISE(IGNORE) */
){
  Vdbe *v = sqlite3GetVdbe(pParse); /* Main VM */
  TriggerPrg *pPrg;
  pPrg = getRowTrigger(pParse, p, pTab, orconf);
  assert( pPrg || pParse->nErr || pParse->db->mallocFailed );

  /* Code the OP_Program opcode in the parent VDBE. P4 of the OP_Program 
  ** is a pointer to the sub-vdbe containing the trigger program.  */
  if( pPrg ){
    int bRecursive = (p->zName && 0==(pParse->db->flags&SQLITE_RecTriggers));

    sqlite3VdbeAddOp3(v, OP_Program, reg, ignoreJump, ++pParse->nMem);
    sqlite3VdbeChangeP4(v, -1, (const char *)pPrg->pProgram, P4_SUBPROGRAM);
    VdbeComment(
        (v, "Call: %s.%s", (p->zName?p->zName:"fkey"), onErrorText(orconf)));

    /* Set the P5 operand of the OP_Program instruction to non-zero if
    ** recursive invocation of this trigger program is disallowed. Recursive
    ** invocation is disallowed if (a) the sub-program is really a trigger,
    ** not a foreign key action, and (b) the flag to enable recursive triggers
    ** is clear.  */
    sqlite3VdbeChangeP5(v, (u8)bRecursive);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, -0x30(%rbp)
movl %r8d, %r13d
movl %ecx, -0x2c(%rbp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
callq 0x41ef4
movq %rax, %rbx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x543a2
testq %rax, %rax
je 0x54bcd
movq %rax, %r13
cmpq $0x0, (%r14)
je 0x54b84
movq (%r12), %rax
testb $0x4, 0x2e(%rax)
sete %r14b
jmp 0x54b87
xorl %r14d, %r14d
movl 0x58(%r12), %r8d
incl %r8d
movl %r8d, 0x58(%r12)
pushq $0x79
popq %rsi
movq %rbx, %rdi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
callq 0x41f4c
movq 0x10(%r13), %rdx
pushq $-0x1
popq %rsi
pushq $-0x12
popq %rcx
movq %rbx, %rdi
callq 0x1074b
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x54bcd
movslq 0x34(%rbx), %rcx
imulq $0x18, %rcx, %rcx
movb %r14b, -0x15(%rax,%rcx)
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: sqlite3TableAffinityStr
SQLITE_PRIVATE void sqlite3TableAffinityStr(Vdbe *v, Table *pTab){
  /* The first time a column affinity string for a particular table
  ** is required, it is allocated and populated here. It is then 
  ** stored as a member of the Table structure for subsequent use.
  **
  ** The column affinity string will eventually be deleted by
  ** sqlite3DeleteTable() when the Table structure itself is cleaned up.
  */
  if( !pTab->zColAff ){
    char *zColAff;
    int i;
    sqlite3 *db = sqlite3VdbeDb(v);

    zColAff = (char *)sqlite3DbMallocRaw(0, pTab->nCol+1);
    if( !zColAff ){
      db->mallocFailed = 1;
      return;
    }

    for(i=0; i<pTab->nCol; i++){
      zColAff[i] = pTab->aCol[i].affinity;
    }
    zColAff[pTab->nCol] = '\0';

    pTab->zColAff = zColAff;
  }

  sqlite3VdbeChangeP4(v, -1, pTab->zColAff, P4_TRANSIENT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rsi), %rdx
testq %rdx, %rdx
jne 0x552fd
movq %rsi, %r14
movq (%rbx), %r15
movswl 0x42(%rsi), %edi
incl %edi
callq 0x9c40
testq %rax, %rax
je 0x55314
movq %rax, %rdx
pushq $0x29
popq %rax
xorl %ecx, %ecx
movswq 0x42(%r14), %rsi
cmpq %rsi, %rcx
jge 0x552f5
movq 0x8(%r14), %rsi
movb (%rsi,%rax), %sil
movb %sil, (%rdx,%rcx)
incq %rcx
addq $0x30, %rax
jmp 0x552d6
movb $0x0, (%rdx,%rsi)
movq %rdx, 0x28(%r14)
pushq $-0x1
popq %rsi
movq %rbx, %rdi
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1074b
movb $0x1, 0x50(%r15)
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: autoIncBegin
static int autoIncBegin(
  Parse *pParse,      /* Parsing context */
  int iDb,            /* Index of the database holding pTab */
  Table *pTab         /* The table we are writing to */
){
  int memId = 0;      /* Register holding maximum rowid */
  if( pTab->tabFlags & TF_Autoincrement ){
    Parse *pToplevel = sqlite3ParseToplevel(pParse);
    AutoincInfo *pInfo;

    pInfo = pToplevel->pAinc;
    while( pInfo && pInfo->pTab!=pTab ){ pInfo = pInfo->pNext; }
    if( pInfo==0 ){
      pInfo = sqlite3DbMallocRaw(pParse->db, sizeof(*pInfo));
      if( pInfo==0 ) return 0;
      pInfo->pNext = pToplevel->pAinc;
      pToplevel->pAinc = pInfo;
      pInfo->pTab = pTab;
      pInfo->iDb = iDb;
      pToplevel->nMem++;                  /* Register to hold name of table */
      pInfo->regCtr = ++pToplevel->nMem;  /* Max rowid register */
      pToplevel->nMem++;                  /* Rowid in sqlite_sequence */
    }
    memId = pInfo->regCtr;
  }
  return memId;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %ebx, %ebx
testb $0x8, 0x46(%rdx)
je 0x55e43
movq %rdx, %r15
movl %esi, %r14d
movq 0x1d8(%rdi), %r12
testq %r12, %r12
cmoveq %rdi, %r12
leaq 0x1d0(%r12), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x55e05
cmpq %r15, 0x8(%rax)
jne 0x55df2
movl 0x14(%rax), %ebx
jmp 0x55e43
movq (%rdi), %rdi
pushq $0x18
popq %rsi
callq 0x103b4
testq %rax, %rax
je 0x55e43
movq 0x1d0(%r12), %rcx
movq %rcx, (%rax)
movq %rax, 0x1d0(%r12)
movq %r15, 0x8(%rax)
movl %r14d, 0x10(%rax)
movl 0x58(%r12), %ecx
leal 0x2(%rcx), %ebx
movl %ebx, 0x14(%rax)
addl $0x3, %ecx
movl %ecx, 0x58(%r12)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq