LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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), %r13d
movq 0x20(%rdi), %r15
testl %r13d, %r13d
jle 0x5b7c5
incl %r13d
addq $0x1a, %r15
movb (%r15), %al
testb $0x1, %al
je 0x5b799
movq -0x1a(%r15), %rsi
movq %rbx, %rdi
callq 0x3479d
movb (%r15), %al
testb $0x30, %al
je 0x5b7b4
movq -0xa(%r15), %r12
movq %r12, %rdi
callq 0x5b755
movq %rbx, %rdi
movq %r12, %rsi
callq 0x9ca4
decl %r13d
addq $0x38, %r15
cmpl $0x1, %r13d
ja 0x5b783
movq 0x20(%r14), %r15
addq $0x28, %r14
cmpq %r14, %r15
je 0x5b7e7
movq %rbx, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9ca4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movl %r8d, %r13d
movl %ecx, %r15d
movl %edx, %ecx
movl %esi, %edx
movq %rdi, %rbx
movq 0x10(%rdi), %r12
movb 0x1f(%rdi), %al
testb %al, %al
je 0x5b82b
decb %al
movb %al, 0x1f(%rbx)
movzbl %al, %eax
movl 0x28(%rbx,%rax,4), %r14d
jmp 0x5b836
movl 0x58(%rbx), %r14d
incl %r14d
movl %r14d, 0x58(%rbx)
movq %r12, %rdi
movl $0x3d, %esi
movl %edx, -0x2c(%rbp)
movl %r13d, %r8d
callq 0x45f15
movslq %r15d, %r15
movq %r12, %rdi
movl %eax, %esi
movq %r15, %rdx
movl $0xfffffff2, %ecx       # imm = 0xFFFFFFF2
callq 0x11a9f
movq %r12, %rdi
movl $0x2b, %esi
movl %r13d, %edx
movl %r15d, %ecx
movl %r14d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0x67, %esi
movl -0x2c(%rbp), %edx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x45f15
testl %r14d, %r14d
je 0x5b8c3
movzbl 0x1f(%rbx), %eax
cmpq $0x7, %rax
ja 0x5b8c3
xorl %ecx, %ecx
cmpl %r14d, 0x84(%rbx,%rcx)
je 0x5b8be
addq $0x18, %rcx
cmpl $0xf0, %ecx
jne 0x5b89b
leal 0x1(%rax), %ecx
movb %cl, 0x1f(%rbx)
movl %r14d, 0x28(%rbx,%rax,4)
jmp 0x5b8c3
movb $0x1, 0x7c(%rbx,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5be27
leal (%rbx,%rbx), %eax
testl %ebx, %ebx
movl $0x1, %edx
cmovnel %eax, %edx
imull %r15d, %edx
movq %r12, %rsi
callq 0x174d6
movq %rax, %r13
testq %rax, %rax
jne 0x5be2a
movq -0x30(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
jmp 0x5be4c
movq %r12, %r13
movl %ebx, %eax
imull %r15d, %eax
movslq %eax, %rdi
addq %r13, %rdi
movl %r15d, %edx
xorl %esi, %esi
callq 0x8200
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_O3/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, %r14
movq (%rdi), %rax
testb $-0x80, 0x2e(%rax)
je 0x5bedb
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %rdx
movq 0x20(%rax), %rax
movq 0x38(%rax), %rax
movzbl 0x1f6(%rdi), %esi
movq %rax, %rdi
callq 0x4fd1a
testq %rax, %rax
je 0x5bedb
movq %rax, %rbx
movq %r14, -0x30(%rbp)
xorl %r13d, %r13d
movq %rax, %r14
movzbl 0x10(%r14), %eax
cmpl %r12d, %eax
jne 0x5becc
movq 0x20(%r14), %rdi
movq %r15, %rsi
callq 0x5c928
testl %eax, %eax
je 0x5becc
movzbl 0x11(%r14), %eax
orl %eax, %r13d
movq 0x40(%r14), %r14
testq %r14, %r14
jne 0x5beaa
movq -0x30(%rbp), %r14
jmp 0x5bee0
xorl %ebx, %ebx
xorl %r13d, %r13d
testq %r14, %r14
je 0x5bee8
movl %r13d, (%r14)
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_O3/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
movb 0x46(%rsi), %al
testb $0x10, %al
je 0x5bf2f
movq (%rdi), %rcx
leaq 0x58(%rsi), %r8
movq (%r8), %r9
leaq 0x28(%r9), %r8
cmpq %rcx, (%r9)
jne 0x5bf15
movq 0x8(%r9), %rcx
movq (%rcx), %rcx
cmpq $0x0, 0x68(%rcx)
je 0x5bf58
testb $0x1, %al
je 0x5bf42
movq (%rdi), %rax
testb $0x8, 0x2d(%rax)
jne 0x5bf42
cmpb $0x0, 0x1e(%rdi)
je 0x5bf58
xorl %eax, %eax
testl %edx, %edx
jne 0x5bf71
cmpq $0x0, 0x18(%rsi)
je 0x5bf71
leaq 0x1fe00(%rip), %rax     # 0x7bd56
jmp 0x5bf5f
leaq 0x1fdda(%rip), %rax     # 0x7bd39
movq (%rsi), %rdx
movq %rax, %rsi
xorl %eax, %eax
callq 0x11842
movl $0x1, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq %rsi, %r12
movq %rdi, %r14
movq (%rdi), %rbx
movq 0x68(%rsi), %rax
testq %rax, %rax
movl %ecx, -0x2c(%rbp)
je 0x5bfc1
movl 0x28(%rbx), %edi
testl %edi, %edi
jle 0x5bfc9
movq 0x20(%rbx), %rsi
addq $0x18, %rsi
xorl %r13d, %r13d
cmpq %rax, (%rsi)
je 0x5bfcc
incq %r13
addq $0x20, %rsi
cmpq %r13, %rdi
jne 0x5bfab
movl %edi, %r13d
jmp 0x5bfcc
movl $0xfff0bdc0, %r13d      # imm = 0xFFF0BDC0
jmp 0x5bfcc
xorl %r13d, %r13d
movq %rbx, %rdi
movq %rdx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4848c
movq %rax, -0x38(%rbp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3dc99
testq %rax, %rax
je 0x5c042
movq %rax, %r15
movq (%r12), %rsi
movq %rbx, %rdi
callq 0x101fc
movq %rax, 0x18(%r15)
movq 0x20(%rbx), %rax
movslq %r13d, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rsi
movq %rbx, %rdi
callq 0x101fc
movq %rax, 0x10(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movl $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
jmp 0x5c061
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movl $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq -0x38(%rbp), %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x3d7c0
movq %rax, %r15
testq %rax, %rax
je 0x5c0b7
orb $0x1, 0xb(%r15)
leaq -0x48(%rbp), %rdx
movw $0x9, (%rdx)
movl -0x2c(%rbp), %eax
movl %eax, 0x4(%rdx)
movq $0x0, 0x8(%rdx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3bffc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x348c2
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9ca4
jmp 0x5c0cf
movl 0x214(%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x214(%r14)
movl %eax, 0x210(%r14)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 $0x18, %rsp
xorl %r13d, %r13d
testb $0x10, 0x46(%rsi)
jne 0x5c3b3
movl %edx, %r14d
movq %rdi, %rbx
movl %ecx, -0x2c(%rbp)
movq 0x68(%rsi), %rax
testq %rax, %rax
je 0x5c306
movq (%rbx), %rdx
movl 0x28(%rdx), %ecx
testl %ecx, %ecx
jle 0x5c311
movq 0x20(%rdx), %rdx
addq $0x18, %rdx
xorl %r12d, %r12d
cmpq %rax, (%rdx)
je 0x5c319
incq %r12
addq $0x20, %rdx
cmpq %r12, %rcx
jne 0x5c2ed
movq %rsi, %r13
movl %ecx, %r12d
jmp 0x5c31c
movq %rsi, %r13
movl $0xfff0bdc0, %r12d      # imm = 0xFFF0BDC0
jmp 0x5c31c
movq %rsi, %r13
xorl %r12d, %r12d
jmp 0x5c31c
movq %rsi, %r13
movq %rbx, %rdi
callq 0x45ece
movq %rax, %r15
movq %rbx, -0x40(%rbp)
movq %rbx, %rdi
movq %r14, %rbx
movl %r14d, %esi
movl %r12d, %edx
movq %r13, %rcx
movl -0x2c(%rbp), %r8d
callq 0x45fa0
movq 0x10(%r13), %r14
testq %r14, %r14
movq %rbx, -0x38(%rbp)
movl $0x1, %r13d
je 0x5c39d
movq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x4c2fa
movq %rax, %rbx
movq -0x38(%rbp), %rax
leal (%rax,%r13), %edx
movl 0x50(%r14), %ecx
movq %r15, %rdi
movl -0x2c(%rbp), %esi
movl %r12d, %r8d
callq 0x45f15
movq %r15, %rdi
movl %eax, %esi
movq %rbx, %rdx
movl $0xfffffff0, %ecx       # imm = 0xFFFFFFF0
callq 0x11a9f
incl %r13d
movq 0x28(%r14), %r14
testq %r14, %r14
jne 0x5c356
movq -0x38(%rbp), %rax
addl %r13d, %eax
movq -0x40(%rbp), %rcx
cmpl %eax, 0x54(%rcx)
jge 0x5c3b0
movl %eax, 0x54(%rcx)
decl %r13d
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x1d8(%rdi), %r15
testq %r15, %r15
cmoveq %rdi, %r15
movq %rsi, %rbx
movslq 0x204(%r15), %r12
movq 0x280(%r15), %r14
testq %r12, %r12
jle 0x5c404
xorl %eax, %eax
cmpq %rbx, (%r14,%rax,8)
je 0x5c447
incq %rax
cmpq %rax, %r12
jne 0x5c3f6
callq 0x9d86
testl %eax, %eax
je 0x5c416
movq (%r15), %rax
movb $0x1, 0x50(%rax)
jmp 0x5c447
leal 0x8(,%r12,8), %esi
movq %r14, %rdi
callq 0xa45c
testq %rax, %rax
je 0x5c40d
movq %rax, 0x280(%r15)
movslq 0x204(%r15), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x204(%r15)
movq %rbx, (%rax,%rcx,8)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %ebx
jne 0x5c97d
movslq (%rsi), %r15
testq %r15, %r15
jle 0x5c97b
movq %rdi, %r14
movq 0x8(%rsi), %r12
shlq $0x5, %r15
xorl %r13d, %r13d
movq 0x8(%r12,%r13), %rsi
movq %r14, %rdi
callq 0x4a796
testl %eax, %eax
jns 0x5c97d
addq $0x20, %r13
cmpq %r13, %r15
jne 0x5c961
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_O3/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)
movq %rdi, -0x38(%rbp)
cmpq $0x1, %rdx
movl $0x6b, %r13d
sbbl $0x0, %r13d
testq %rsi, %rsi
je 0x5ca1e
movl %r8d, %r14d
movq %rdx, %r15
movq %rsi, %r12
movl %ecx, %eax
movq %rax, -0x30(%rbp)
xorl %ebx, %ebx
movzbl 0x10(%r12), %eax
cmpl %eax, %r13d
jne 0x5ca12
movzbl 0x11(%r12), %eax
testl %r14d, %eax
je 0x5ca12
movq 0x20(%r12), %rdi
movq %r15, %rsi
callq 0x5c928
testl %eax, %eax
je 0x5ca12
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq -0x40(%rbp), %rdx
movl 0x10(%rbp), %ecx
callq 0x5d7e8
testq %rax, %rax
je 0x5ca12
movq -0x30(%rbp), %rcx
orl 0x1c(%rax,%rcx,4), %ebx
movq 0x40(%r12), %r12
testq %r12, %r12
jne 0x5c9cb
jmp 0x5ca20
xorl %ebx, %ebx
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_O3/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
pushq %rax
movq (%rdi), %rax
xorl %r15d, %r15d
testb $0x8, 0x2e(%rax)
je 0x5cb0f
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rsi), %rax
xorl %r15d, %r15d
testq %rax, %rax
je 0x5ca9e
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movslq 0x28(%rax), %rsi
testq %rsi, %rsi
jle 0x5ca95
shlq $0x4, %rsi
xorl %edi, %edi
movl 0x40(%rax,%rdi), %ecx
movl $0x1, %r8d
shll %cl, %r8d
cmpl $0x20, %ecx
cmovgel %edx, %r8d
orl %r8d, %r15d
addq $0x10, %rdi
cmpq %rdi, %rsi
jne 0x5ca75
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x5ca66
movq %rbx, %rdi
callq 0x4fce3
testq %rax, %rax
je 0x5cb0f
movq %rax, %r12
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq $0x0, -0x30(%rbp)
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
leaq -0x30(%rbp), %rcx
xorl %r8d, %r8d
callq 0x5ddac
movq -0x30(%rbp), %rcx
testq %rcx, %rcx
je 0x5cb05
movzwl 0x54(%rcx), %eax
testq %rax, %rax
je 0x5cb05
movq 0x8(%rcx), %rdx
xorl %esi, %esi
movl (%rdx,%rsi,4), %ecx
movl $0x1, %edi
shll %cl, %edi
cmpl $0x20, %ecx
cmovgel %r13d, %edi
orl %edi, %r15d
incq %rsi
cmpq %rsi, %rax
jne 0x5cae9
movq 0x18(%r12), %r12
testq %r12, %r12
jne 0x5cab4
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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)
testq %rsi, %rsi
je 0x5cb8e
movl %r8d, %r14d
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %rbx
movzbl 0x10(%r13), %eax
cmpl %r12d, %eax
jne 0x5cb85
movzbl 0x11(%r13), %eax
cmpl %r14d, %eax
jne 0x5cb85
movq 0x20(%r13), %rdi
movq %r15, %rsi
callq 0x5c928
testl %eax, %eax
je 0x5cb85
movq %rbx, %rdi
movq %r13, %rsi
movq -0x30(%rbp), %rdx
movl 0x10(%rbp), %ecx
movl 0x18(%rbp), %r8d
movl 0x20(%rbp), %r9d
callq 0x5e0bb
movq 0x40(%r13), %r13
testq %r13, %r13
jne 0x5cb47
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rdx, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
movq 0x10(%rsi), %r12
testq %r12, %r12
je 0x5d09d
movq %rcx, %r15
movq -0x38(%rbp), %rax
movq 0x10(%rax), %r13
movq -0x40(%rbp), %rax
leal 0x1(%rax), %r14d
movq %rcx, %rbx
testq %r15, %r15
je 0x5d03d
cmpl $0x0, (%rbx)
je 0x5d08c
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq -0x40(%rbp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
leaq -0x2c(%rbp), %r9
callq 0x4c389
movzwl 0x54(%r12), %r8d
incl %r8d
movq %r13, %rdi
movl $0x68, %esi
movl %r14d, %edx
movl %eax, %ecx
callq 0x45f15
movl -0x2c(%rbp), %eax
testl %eax, %eax
jns 0x5d08c
movq 0x40(%r13), %rcx
testq %rcx, %rcx
je 0x5d08c
notl %eax
movl 0x34(%r13), %edx
movl %eax, %eax
movl %edx, (%rcx,%rax,4)
movq 0x28(%r12), %r12
incl %r14d
addq $0x4, %rbx
testq %r12, %r12
jne 0x5d033
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14
movq %rdi, %r15
movq (%rdi), %rdi
leaq 0x18(%rsi), %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x3dc99
movq %rax, %rbx
testq %rax, %rax
je 0x5dd9e
movq (%r15), %rdi
movq 0x8(%r14), %rax
movq 0x28(%rax), %rcx
testq %rcx, %rcx
je 0x5dd67
movl 0x28(%rdi), %edx
testl %edx, %edx
jle 0x5dd7d
movq 0x20(%rdi), %rsi
addq $0x18, %rsi
xorl %eax, %eax
cmpq %rcx, (%rsi)
je 0x5dd6c
incq %rax
addq $0x20, %rsi
cmpq %rax, %rdx
jne 0x5dd52
movl %edx, %eax
jmp 0x5dd6c
movl $0xfff0bdc0, %eax       # imm = 0xFFF0BDC0
testl %eax, %eax
setne %cl
cmpl $0x2, %eax
setl %dl
testb %dl, %cl
je 0x5dd7f
jmp 0x5dd9e
xorl %eax, %eax
movq 0x20(%rdi), %rcx
movl %eax, %eax
shlq $0x5, %rax
movq (%rcx,%rax), %rsi
callq 0x101fc
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_O3/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 0x45ece
movq %rax, %rbx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x5d7e8
testq %rax, %rax
je 0x5e160
movq %rax, %r13
cmpq $0x0, (%r14)
je 0x5e111
movq (%r12), %rax
testb $0x4, 0x2e(%rax)
sete %r14b
jmp 0x5e114
xorl %r14d, %r14d
movl 0x58(%r12), %r8d
incl %r8d
movl %r8d, 0x58(%r12)
movq %rbx, %rdi
movl $0x79, %esi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
callq 0x45f15
movq 0x10(%r13), %rdx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffee, %ecx       # imm = 0xFFFFFFEE
callq 0x11a9f
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x5e160
movslq 0x34(%rbx), %rcx
leaq (%rcx,%rcx,2), %rcx
movb %r14b, -0x15(%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x5ee6f
movq %rsi, %r14
movq (%rbx), %r15
movswl 0x42(%rsi), %edi
incl %edi
callq 0xa38c
testq %rax, %rax
je 0x5ee88
movq %rax, %rdx
movzwl 0x42(%r14), %esi
testw %si, %si
jle 0x5ee63
movl $0x29, %eax
xorl %ecx, %ecx
movq 0x8(%r14), %rsi
movb (%rsi,%rax), %sil
movb %sil, (%rdx,%rcx)
incq %rcx
movswq 0x42(%r14), %rsi
addq $0x30, %rax
cmpq %rsi, %rcx
jl 0x5ee46
movswq %si, %rax
movb $0x0, (%rdx,%rax)
movq %rdx, 0x28(%r14)
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11a9f
movb $0x1, 0x50(%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x603cd
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 0x6038d
cmpq %r15, 0x8(%rax)
jne 0x6037a
movl 0x14(%rax), %ebx
jmp 0x603cd
movq (%rdi), %rdi
movl $0x18, %esi
callq 0x11721
testq %rax, %rax
je 0x603cd
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
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3CodeCoroutine
SQLITE_PRIVATE int sqlite3CodeCoroutine(Parse *pParse, Select *pSelect, SelectDest *pDest){
  int regYield;       /* Register holding co-routine entry-point */
  int regEof;         /* Register holding co-routine completion flag */
  int addrTop;        /* Top of the co-routine */
  int j1;             /* Jump instruction */
  int rc;             /* Result code */
  Vdbe *v;            /* VDBE under construction */

  regYield = ++pParse->nMem;
  regEof = ++pParse->nMem;
  v = sqlite3GetVdbe(pParse);
  addrTop = sqlite3VdbeCurrentAddr(v);
  sqlite3VdbeAddOp2(v, OP_Integer, addrTop+2, regYield); /* X <- A */
  VdbeComment((v, "Co-routine entry point"));
  sqlite3VdbeAddOp2(v, OP_Integer, 0, regEof);           /* EOF <- 0 */
  VdbeComment((v, "Co-routine completion flag"));
  sqlite3SelectDestInit(pDest, SRT_Coroutine, regYield);
  j1 = sqlite3VdbeAddOp2(v, OP_Goto, 0, 0);
  rc = sqlite3Select(pParse, pSelect, pDest);
  assert( pParse->nErr==0 || rc );
  if( pParse->db->mallocFailed && rc==SQLITE_OK ) rc = SQLITE_NOMEM;
  if( rc ) return rc;
  sqlite3VdbeAddOp2(v, OP_Integer, 1, regEof);            /* EOF <- 1 */
  sqlite3VdbeAddOp1(v, OP_Yield, regYield);   /* yield X */
  sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_INTERNAL, OE_Abort);
  VdbeComment((v, "End of coroutine"));
  sqlite3VdbeJumpHere(v, j1);                             /* label B: */
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, -0x38(%rbp)
movq %rdi, %r13
movl 0x58(%rdi), %r15d
leal 0x1(%r15), %r14d
addl $0x2, %r15d
movl %r15d, 0x58(%rdi)
callq 0x45ece
movq %rax, %rbx
movl 0x34(%rax), %edx
addl $0x2, %edx
movq %rax, %rdi
movl $0x15, %esi
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %rbx, %rdi
movl $0x15, %esi
xorl %edx, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movw $0xa, (%r12)
movl %r14d, 0x4(%r12)
movq $0x0, 0x8(%r12)
movq %rbx, %rdi
movl $0xe, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl %eax, -0x2c(%rbp)
movq %r13, %rdi
movq -0x38(%rbp), %rsi
movq %r12, %rdx
callq 0x3bffc
movq (%r13), %rcx
testl %eax, %eax
movl $0x7, %r13d
cmovnel %eax, %r13d
cmpb $0x0, 0x50(%rcx)
cmovel %eax, %r13d
testl %r13d, %r13d
je 0x604a3
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl $0x15, %esi
movl $0x1, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %rbx, %rdi
movl $0x11, %esi
movl %r14d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %rbx, %rdi
movl $0x14, %esi
movl $0x2, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
callq 0x45f15
cmpl $0x0, -0x2c(%rbp)
js 0x60491
movl 0x34(%rbx), %eax
cmpl -0x2c(%rbp), %eax
jbe 0x60491
movq 0x8(%rbx), %rcx
movl -0x2c(%rbp), %edx
leaq (%rdx,%rdx,2), %rdx
movl %eax, 0x8(%rcx,%rdx,8)
jmp 0x60491
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: readsTable
static int readsTable(Parse *p, int iStartAddr, int iDb, Table *pTab){
  Vdbe *v = sqlite3GetVdbe(p);
  int i;
  int iEnd = sqlite3VdbeCurrentAddr(v);
#ifndef SQLITE_OMIT_VIRTUALTABLE
  VTable *pVTab = IsVirtual(pTab) ? sqlite3GetVTable(p->db, pTab) : 0;
#endif

  for(i=iStartAddr; i<iEnd; i++){
    VdbeOp *pOp = sqlite3VdbeGetOp(v, i);
    assert( pOp!=0 );
    if( pOp->opcode==OP_OpenRead && pOp->p3==iDb ){
      Index *pIndex;
      int tnum = pOp->p2;
      if( tnum==pTab->tnum ){
        return 1;
      }
      for(pIndex=pTab->pIndex; pIndex; pIndex=pIndex->pNext){
        if( tnum==pIndex->tnum ){
          return 1;
        }
      }
    }
#ifndef SQLITE_OMIT_VIRTUALTABLE
    if( pOp->opcode==OP_VOpen && pOp->p4.pVtab==pVTab ){
      assert( pOp->p4.pVtab!=0 );
      assert( pOp->p4type==P4_VTAB );
      return 1;
    }
#endif
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
callq 0x45ece
movl 0x34(%rax), %edx
xorl %ecx, %ecx
testb $0x10, 0x46(%rbx)
je 0x60546
movq 0x58(%rbx), %rsi
testq %rsi, %rsi
je 0x60546
movq (%r15), %rdi
cmpq %rdi, (%rsi)
je 0x60548
movq 0x28(%rsi), %rsi
testq %rsi, %rsi
jne 0x60538
xorl %esi, %esi
testl %edx, %edx
jle 0x605c5
movq (%rax), %rcx
movb 0x50(%rcx), %dil
xorl %r8d, %r8d
leaq 0x35a73(%rip), %r9      # 0x95fd0
movq %r9, %rcx
testb %dil, %dil
jne 0x60571
leaq (%r8,%r8,2), %rcx
shlq $0x3, %rcx
addq 0x8(%rax), %rcx
movzbl (%rcx), %r10d
cmpl $0x89, %r10d
je 0x605ae
cmpl $0x30, %r10d
jne 0x605b4
cmpl %r14d, 0xc(%rcx)
jne 0x605b4
movl 0x8(%rcx), %r10d
movl $0x1, %ecx
cmpl 0x3c(%rbx), %r10d
je 0x605c5
movq 0x10(%rbx), %r11
testq %r11, %r11
je 0x605b4
cmpl 0x50(%r11), %r10d
je 0x605c5
movq 0x28(%r11), %r11
jmp 0x6059d
cmpq %rsi, 0x10(%rcx)
je 0x605c0
incq %r8
cmpq %rdx, %r8
jne 0x6055d
xorl %ecx, %ecx
jmp 0x605c5
movl $0x1, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCodeAndCache
SQLITE_PRIVATE int sqlite3ExprCodeAndCache(Parse *pParse, Expr *pExpr, int target){
  Vdbe *v = pParse->pVdbe;
  int inReg;
  inReg = sqlite3ExprCode(pParse, pExpr, target);
  assert( target>0 );
  /* This routine is called for terms to INSERT or UPDATE.  And the only
  ** other place where expressions can be converted into TK_REGISTER is
  ** in WHERE clause processing.  So as currently implemented, there is
  ** no way for a TK_REGISTER to exist here.  But it seems prudent to
  ** keep the ALWAYS() in case the conditions above change with future
  ** modifications or enhancements. */
  if( ALWAYS(pExpr->op!=TK_REGISTER) ){  
    int iMem;
    iMem = ++pParse->nMem;
    sqlite3VdbeAddOp2(v, OP_Copy, inReg, iMem);
    pExpr->iTable = iMem;
    pExpr->op2 = pExpr->op;
    pExpr->op = TK_REGISTER;
  }
  return inReg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
movq 0x10(%rdi), %r15
callq 0x4e50a
cmpb $-0x7c, (%r14)
je 0x60628
movl 0x58(%r12), %r13d
incl %r13d
movl %r13d, 0x58(%r12)
movq %r15, %rdi
movl $0x1c, %esi
movl %ebx, %edx
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl %r13d, 0x2c(%r14)
movb (%r14), %al
movb %al, 0x37(%r14)
movb $-0x7c, (%r14)
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_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: xferCompatibleCollation
static int xferCompatibleCollation(const char *z1, const char *z2){
  if( z1==0 ){
    return z2==0;
  }
  if( z2==0 ){
    return 0;
  }
  return sqlite3StrICmp(z1, z2)==0;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
movq %rdi, %rax
orq %rsi, %rax
sete %al
testb %cl, %cl
jne 0x606a4
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %dl
testb %dl, %dl
je 0x60689
incq %rdi
leaq 0x15a48(%rip), %rcx     # 0x760b0
xorl %eax, %eax
movzbl %dl, %edx
movb (%rdx,%rcx), %r8b
movzbl (%rsi), %r9d
cmpb (%r9,%rcx), %r8b
jne 0x6068d
incq %rsi
movb (%rdi), %dl
incq %rdi
testb %dl, %dl
jne 0x6066a
jmp 0x60690
xorl %eax, %eax
jmp 0x60690
movq %rdx, %rax
leaq 0x15a19(%rip), %rcx     # 0x760b0
movb (%rax,%rcx), %al
movzbl (%rsi), %edx
cmpb (%rdx,%rcx), %al
sete %al
popq %rbp
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: xferCompatibleIndex
static int xferCompatibleIndex(Index *pDest, Index *pSrc){
  int i;
  assert( pDest && pSrc );
  assert( pDest->pTable!=pSrc->pTable );
  if( pDest->nColumn!=pSrc->nColumn ){
    return 0;   /* Different number of columns */
  }
  if( pDest->onError!=pSrc->onError ){
    return 0;   /* Different conflict resolution strategies */
  }
  for(i=0; i<pSrc->nColumn; i++){
    if( pSrc->aiColumn[i]!=pDest->aiColumn[i] ){
      return 0;   /* Different columns indexed */
    }
    if( pSrc->aSortOrder[i]!=pDest->aSortOrder[i] ){
      return 0;   /* Different sort orders */
    }
    if( !xferCompatibleCollation(pSrc->azColl[i],pDest->azColl[i]) ){
      return 0;   /* Different collating sequences */
    }
  }
  if( sqlite3ExprCompare(pSrc->pPartIdxWhere, pDest->pPartIdxWhere, -1) ){
    return 0;     /* Different WHERE clauses */
  }

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movzwl 0x54(%rdi), %r12d
xorl %ebx, %ebx
cmpw 0x54(%rsi), %r12w
jne 0x60751
movq %rsi, %r15
movq %rdi, %r14
movb 0x56(%rdi), %al
cmpb 0x56(%rsi), %al
jne 0x60751
testq %r12, %r12
je 0x60738
movq 0x8(%r15), %rax
movq %rax, -0x38(%rbp)
movq 0x8(%r14), %rax
movq %rax, -0x30(%rbp)
xorl %ebx, %ebx
xorl %r13d, %r13d
movq -0x38(%rbp), %rax
movl (%rax,%r13,4), %eax
movq -0x30(%rbp), %rcx
cmpl (%rcx,%r13,4), %eax
jne 0x60751
movq 0x38(%r15), %rax
movb (%rax,%r13), %al
movq 0x38(%r14), %rcx
cmpb (%rcx,%r13), %al
jne 0x60751
movq 0x40(%r15), %rax
movq (%rax,%r13,8), %rdi
movq 0x40(%r14), %rax
movq (%rax,%r13,8), %rsi
callq 0x60639
testl %eax, %eax
je 0x60751
incq %r13
cmpq %r13, %r12
jne 0x606f3
movq 0x48(%r15), %rdi
movq 0x48(%r14), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4b798
xorl %ebx, %ebx
testl %eax, %eax
sete %bl
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_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: returnSingleInt
static void returnSingleInt(Parse *pParse, const char *zLabel, i64 value){
  Vdbe *v = sqlite3GetVdbe(pParse);
  int mem = ++pParse->nMem;
  i64 *pI64 = sqlite3DbMallocRaw(pParse->db, sizeof(value));
  if( pI64 ){
    memcpy(pI64, &value, sizeof(value));
  }
  sqlite3VdbeAddOp4(v, OP_Int64, 0, mem, 0, (char*)pI64, P4_INT64);
  sqlite3VdbeSetNumCols(v, 1);
  sqlite3VdbeSetColName(v, 0, COLNAME_NAME, zLabel, SQLITE_STATIC);
  sqlite3VdbeAddOp2(v, OP_ResultRow, mem, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
callq 0x45ece
movq %rax, %rbx
movl 0x58(%r13), %r14d
incl %r14d
movl %r14d, 0x58(%r13)
movq (%r13), %rdi
movl $0x8, %esi
callq 0x11721
testq %rax, %rax
je 0x607c4
movq %rax, %r13
movq %r12, (%rax)
movq %rbx, %rdi
movl $0x16, %esi
xorl %edx, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %rbx, %rdi
movl %eax, %esi
movq %r13, %rdx
jmp 0x607e0
movq %rbx, %rdi
movl $0x16, %esi
xorl %edx, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
movl $0xfffffff3, %ecx       # imm = 0xFFFFFFF3
callq 0x11a9f
movq %rbx, %rdi
movl $0x1, %esi
callq 0x3754d
movq (%rbx), %rax
cmpb $0x0, 0x50(%rax)
jne 0x60819
movq 0x20(%rbx), %rdi
movq %r15, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0xf0d7
movq %rbx, %rdi
movl $0x1e, %esi
movl %r14d, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x45f15
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeSecureDelete
SQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree *p, int newFlag){
  int b;
  if( p==0 ) return 0;
  sqlite3BtreeEnter(p);
  if( newFlag>=0 ){
    p->pBt->btsFlags &= ~BTS_SECURE_DELETE;
    if( newFlag ) p->pBt->btsFlags |= BTS_SECURE_DELETE;
  } 
  b = (p->pBt->btsFlags & BTS_SECURE_DELETE)!=0;
  sqlite3BtreeLeave(p);
  return b;
}

// Assembly:
testq %rdi, %rdi
je 0x6087b
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rax, 0x8(%rcx)
movzwl 0x26(%rcx), %edx
testl %esi, %esi
js 0x60871
movl %edx, %eax
andl $0xfffb, %eax           # imm = 0xFFFB
movw %ax, 0x26(%rcx)
testl %esi, %esi
je 0x60873
orl $0x4, %edx
movw %dx, 0x26(%rcx)
movl %edx, %eax
shrl $0x2, %eax
andl $0x1, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: getLockingMode
static int getLockingMode(const char *z){
  if( z ){
    if( 0==sqlite3StrICmp(z, "exclusive") ) return PAGER_LOCKINGMODE_EXCLUSIVE;
    if( 0==sqlite3StrICmp(z, "normal") ) return PAGER_LOCKINGMODE_NORMAL;
  }
  return PAGER_LOCKINGMODE_QUERY;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x6092c
movb (%rdi), %dl
xorl %esi, %esi
testb %dl, %dl
je 0x60909
xorl %eax, %eax
leaq 0x1b76d(%rip), %rsi     # 0x7c009
leaq 0x1580d(%rip), %rcx     # 0x760b0
movl %edx, %r8d
movzbl %r8b, %r8d
movb (%r8,%rcx), %r8b
movzbl (%rax,%rsi), %r9d
movb (%r9,%rcx), %r9b
cmpb %r9b, %r8b
jne 0x608d4
movb 0x1(%rdi,%rax), %r8b
incq %rax
testb %r8b, %r8b
jne 0x608a6
movzbl (%rax,%rsi), %eax
movb (%rax,%rcx), %r9b
xorl %r8d, %r8d
movl $0x1, %eax
cmpb %r9b, %r8b
je 0x60931
incq %rdi
leaq 0x1b71a(%rip), %rax     # 0x7c002
xorl %esi, %esi
movzbl %dl, %edx
movb (%rdx,%rcx), %r8b
movzbl (%rax), %r9d
cmpb (%r9,%rcx), %r8b
jne 0x60912
incq %rax
movb (%rdi), %dl
incq %rdi
testb %dl, %dl
jne 0x608ea
jmp 0x60915
leaq 0x1b6f2(%rip), %rax     # 0x7c002
jmp 0x60915
movq %rdx, %rsi
leaq 0x15794(%rip), %rcx     # 0x760b0
movb (%rsi,%rcx), %dl
movzbl (%rax), %esi
movl $0x0, %eax
cmpb (%rsi,%rcx), %dl
je 0x60931
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: getAutoVacuum
static int getAutoVacuum(const char *z){
  int i;
  if( 0==sqlite3StrICmp(z, "none") ) return BTREE_AUTOVACUUM_NONE;
  if( 0==sqlite3StrICmp(z, "full") ) return BTREE_AUTOVACUUM_FULL;
  if( 0==sqlite3StrICmp(z, "incremental") ) return BTREE_AUTOVACUUM_INCR;
  i = sqlite3Atoi(z);
  return (u8)((i>=0&&i<=2)?i:0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movb (%rdi), %sil
leaq 0x1b9c6(%rip), %rcx     # 0x7c30e
testb %sil, %sil
je 0x60a1a
xorl %eax, %eax
leaq 0x18ad8(%rip), %r8      # 0x79432
leaq 0x1574f(%rip), %rdx     # 0x760b0
movl %esi, %r9d
movzbl %r9b, %r9d
movb (%r9,%rdx), %r9b
movzbl (%rax,%r8), %r10d
movb (%r10,%rdx), %r10b
cmpb %r10b, %r9b
jne 0x60993
movb 0x1(%rdi,%rax), %r9b
incq %rax
testb %r9b, %r9b
jne 0x60964
movzbl (%rax,%r8), %eax
movb (%rax,%rdx), %r10b
xorl %r9d, %r9d
xorl %eax, %eax
cmpb %r10b, %r9b
je 0x60a53
leaq 0x1(%rdi), %r9
leaq 0x1c801(%rip), %rax     # 0x7d1aa
xorl %r8d, %r8d
movl %esi, %r10d
movzbl %r10b, %r10d
movb (%r10,%rdx), %r11b
movzbl (%rax), %ebx
cmpb (%rbx,%rdx), %r11b
jne 0x609d0
incq %rax
movb (%r9), %r10b
incq %r9
testb %r10b, %r10b
jne 0x609af
jmp 0x609d3
movq %r10, %r8
movb (%r8,%rdx), %r8b
movzbl (%rax), %r9d
movl $0x1, %eax
cmpb (%r9,%rdx), %r8b
je 0x60a53
testb %sil, %sil
je 0x60a1a
leaq 0x1(%rdi), %r8
leaq 0x1b918(%rip), %rcx     # 0x7c30e
xorl %eax, %eax
movzbl %sil, %esi
movb (%rsi,%rdx), %r9b
movzbl (%rcx), %r10d
cmpb (%r10,%rdx), %r9b
jne 0x60a5c
incq %rcx
movb (%r8), %sil
incq %r8
testb %sil, %sil
jne 0x609f8
jmp 0x60a1c
xorl %eax, %eax
leaq 0x1568d(%rip), %rdx     # 0x760b0
movb (%rax,%rdx), %sil
movzbl (%rcx), %ecx
movl $0x2, %eax
cmpb (%rcx,%rdx), %sil
je 0x60a53
xorl %r14d, %r14d
leaq -0x14(%rbp), %rbx
movl %r14d, (%rbx)
movq %rbx, %rsi
callq 0x33f5b
movl (%rbx), %eax
cmpl $0x3, %eax
movzbl %al, %eax
cmovael %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rsi, %rax
jmp 0x60a1c