LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3SrcListShiftJoinType
SQLITE_PRIVATE void sqlite3SrcListShiftJoinType(SrcList *p){
  if( p ){
    int i;
    assert( p->a || p->nSrc==0 );
    for(i=p->nSrc-1; i>0; i--){
      p->a[i].jointype = p->a[i-1].jointype;
    }
    p->a[0].jointype = 0;
  }
}

// Assembly:
testq %rdi, %rdi
je 0x3b601
pushq %rbp
movq %rsp, %rbp
movzbl (%rdi), %eax
imulq $0x68, %rax, %rcx
addq %rdi, %rcx
addq $-0x28, %rcx
cmpq $0x2, %rax
jl 0x3b5fc
decq %rax
movb -0x68(%rcx), %dl
movb %dl, (%rcx)
addq $-0x68, %rcx
jmp 0x3b5e8
movb $0x0, 0x40(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3SrcListAppendFromTerm
SQLITE_PRIVATE SrcList *sqlite3SrcListAppendFromTerm(
  Parse *pParse,          /* Parsing context */
  SrcList *p,             /* The left part of the FROM clause already seen */
  Token *pTable,          /* Name of the table to add to the FROM clause */
  Token *pDatabase,       /* Name of the database containing pTable */
  Token *pAlias,          /* The right-hand side of the AS subexpression */
  Select *pSubquery,      /* A subquery used in place of a table name */
  Expr *pOn,              /* The ON clause of a join */
  IdList *pUsing          /* The USING clause of a join */
){
  struct SrcList_item *pItem;
  sqlite3 *db = pParse->db;
  if( !p && (pOn || pUsing) ){
    sqlite3ErrorMsg(pParse, "a JOIN clause is required before %s", 
      (pOn ? "ON" : "USING")
    );
    goto append_from_error;
  }
  p = sqlite3SrcListAppend(db, p, pTable, pDatabase);
  if( p==0 || NEVER(p->nSrc==0) ){
    goto append_from_error;
  }
  pItem = &p->a[p->nSrc-1];
  assert( pAlias!=0 );
  if( pAlias->n ){
    pItem->zAlias = sqlite3NameFromToken(db, pAlias);
  }
  pItem->pSelect = pSubquery;
  pItem->pOn = pOn;
  pItem->pUsing = pUsing;
  return p;

 append_from_error:
  assert( p==0 );
  sqlite3ExprDelete(db, pOn);
  sqlite3IdListDelete(db, pUsing);
  sqlite3SelectDelete(db, pSubquery);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, -0x30(%rbp)
movq %r8, %r13
movq 0x18(%rbp), %r12
movq 0x10(%rbp), %r8
movq (%rdi), %r15
testq %rsi, %rsi
jne 0x3b657
movq %r8, %rax
orq %r12, %rax
je 0x3b657
movq %r8, %rbx
testq %r8, %r8
leaq 0x32443(%rip), %rax     # 0x6da7f
leaq 0x326a0(%rip), %rdx     # 0x6dce3
cmovneq %rax, %rdx
leaq 0x32671(%rip), %rsi     # 0x6dcbf
xorl %eax, %eax
callq 0x104d6
jmp 0x3b6b0
movq %r8, %rbx
movq %r15, %rdi
callq 0x3b730
testq %rax, %rax
je 0x3b6b0
movq %rax, %r14
movzbl (%rax), %eax
testq %rax, %rax
je 0x3b6b0
decl %eax
imulq $0x68, %rax, %rax
leaq (%r14,%rax), %r12
addq $0x8, %r12
cmpl $0x0, 0x8(%r13)
je 0x3b697
movq %r15, %rdi
movq %r13, %rsi
callq 0x421eb
movq %rax, 0x18(%r12)
movq -0x30(%rbp), %rax
movq %rax, 0x28(%r12)
movq %rbx, 0x40(%r12)
movq 0x18(%rbp), %rax
movq %rax, 0x48(%r12)
jmp 0x3b6d5
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2f476
movq %r15, %rdi
movq %r12, %rsi
callq 0x2f6b3
movq %r15, %rdi
movq -0x30(%rbp), %rsi
callq 0x2f500
xorl %r14d, %r14d
movq %r14, %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: sqlite3SrcListIndexedBy
SQLITE_PRIVATE void sqlite3SrcListIndexedBy(Parse *pParse, SrcList *p, Token *pIndexedBy){
  assert( pIndexedBy!=0 );
  if( p && ALWAYS(p->nSrc>0) ){
    struct SrcList_item *pItem = &p->a[p->nSrc-1];
    assert( pItem->notIndexed==0 && pItem->zIndex==0 );
    if( pIndexedBy->n==1 && !pIndexedBy->z ){
      /* A "NOT INDEXED" clause was supplied. See parse.y 
      ** construct "indexed_opt" for details. */
      pItem->notIndexed = 1;
    }else{
      pItem->zIndex = sqlite3NameFromToken(pParse->db, pIndexedBy);
    }
  }
}

// Assembly:
testq %rsi, %rsi
je 0x3b729
movzbl (%rsi), %eax
testq %rax, %rax
je 0x3b729
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
decl %eax
imulq $0x68, %rax, %rax
leaq (%rsi,%rax), %rbx
addq $0x8, %rbx
cmpl $0x1, 0x8(%rdx)
jne 0x3b714
cmpq $0x0, (%rdx)
je 0x3b72a
movq (%rdi), %rdi
movq %rdx, %rsi
callq 0x421eb
movq %rax, 0x58(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
orb $0x1, 0x39(%rbx)
jmp 0x3b723
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3SrcListAppend
SQLITE_PRIVATE SrcList *sqlite3SrcListAppend(
  sqlite3 *db,        /* Connection to notify of malloc failures */
  SrcList *pList,     /* Append to this SrcList. NULL creates a new SrcList */
  Token *pTable,      /* Table to append */
  Token *pDatabase    /* Database of the table */
){
  struct SrcList_item *pItem;
  assert( pDatabase==0 || pTable!=0 );  /* Cannot have C without B */
  if( pList==0 ){
    pList = sqlite3DbMallocZero(db, sizeof(SrcList) );
    if( pList==0 ) return 0;
    pList->nAlloc = 1;
  }
  pList = sqlite3SrcListEnlarge(db, pList, 1, pList->nSrc);
  if( db->mallocFailed ){
    sqlite3SrcListDelete(db, pList);
    return 0;
  }
  pItem = &pList->a[pList->nSrc-1];
  if( pDatabase && pDatabase->z==0 ){
    pDatabase = 0;
  }
  if( pDatabase ){
    Token *pTemp = pDatabase;
    pDatabase = pTable;
    pTable = pTemp;
  }
  pItem->zName = sqlite3NameFromToken(db, pTable);
  pItem->zDatabase = sqlite3NameFromToken(db, pDatabase);
  return pList;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %rbx
movq %rdi, %r14
testq %rsi, %rsi
jne 0x3b763
pushq $0x70
popq %rsi
movq %r14, %rdi
callq 0xf4ae
testq %rax, %rax
je 0x3b786
movq %rax, %rsi
movb $0x1, 0x1(%rax)
movzbl (%rsi), %ecx
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x4e0ac
movq %rax, %r12
cmpb $0x0, 0x50(%r14)
je 0x3b78b
movq %r14, %rdi
movq %r12, %rsi
callq 0x2f60e
xorl %r12d, %r12d
jmp 0x3b7d9
movzbl (%r12), %eax
imulq $0x68, %rax, %rax
leaq (%rax,%r12), %r13
addq $-0x60, %r13
testq %r15, %r15
je 0x3b7ad
movq (%r15), %rax
testq %rax, %rax
cmoveq %rax, %r15
jmp 0x3b7b0
xorl %r15d, %r15d
testq %r15, %r15
movq %r15, %rsi
cmoveq %rbx, %rsi
cmoveq %r15, %rbx
movq %r14, %rdi
callq 0x421eb
movq %rax, 0x10(%r13)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x421eb
movq %rax, 0x8(%r13)
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: sqlite3ExprListCheckLength
SQLITE_PRIVATE void sqlite3ExprListCheckLength(
  Parse *pParse,
  ExprList *pEList,
  const char *zObject
){
  int mx = pParse->db->aLimit[SQLITE_LIMIT_COLUMN];
  testcase( pEList && pEList->nExpr==mx );
  testcase( pEList && pEList->nExpr==mx+1 );
  if( pEList && pEList->nExpr>mx ){
    sqlite3ErrorMsg(pParse, "too many columns in %s", zObject);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rsi, %rsi
je 0x3be79
movq (%rdi), %rax
movl (%rsi), %ecx
cmpl 0x70(%rax), %ecx
jle 0x3be79
leaq 0x31f6a(%rip), %rsi     # 0x6dddb
xorl %eax, %eax
popq %rbp
jmp 0x104d6
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3IdListAppend
SQLITE_PRIVATE IdList *sqlite3IdListAppend(sqlite3 *db, IdList *pList, Token *pToken){
  int i;
  if( pList==0 ){
    pList = sqlite3DbMallocZero(db, sizeof(IdList) );
    if( pList==0 ) return 0;
  }
  pList->a = sqlite3ArrayAllocate(
      db,
      pList->a,
      sizeof(pList->a[0]),
      &pList->nId,
      &i
  );
  if( i<0 ){
    sqlite3IdListDelete(db, pList);
    return 0;
  }
  pList->a[i].zName = sqlite3NameFromToken(db, pToken);
  return pList;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
testq %rsi, %rsi
jne 0x3ea3e
pushq $0x10
popq %rsi
movq %r15, %rdi
callq 0xf4ae
movq %rax, %rbx
testq %rax, %rax
je 0x3ea83
movq (%rbx), %rsi
leaq 0x8(%rbx), %rcx
pushq $0x10
popq %rdx
leaq -0x24(%rbp), %r12
movq %r15, %rdi
movq %r12, %r8
callq 0x52cb1
movq %rax, (%rbx)
movslq (%r12), %r12
movq %r15, %rdi
testq %r12, %r12
js 0x3ea7b
movq %r14, %rsi
callq 0x421eb
movq (%rbx), %rcx
shlq $0x4, %r12
movq %rax, (%rcx,%r12)
jmp 0x3ea85
movq %rbx, %rsi
callq 0x2f6b3
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x10, %rsp
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: sqlite3ExprAddCollateToken
SQLITE_PRIVATE Expr *sqlite3ExprAddCollateToken(Parse *pParse, Expr *pExpr, Token *pCollName){
  if( pCollName->n>0 ){
    Expr *pNew = sqlite3ExprAlloc(pParse->db, TK_COLLATE, pCollName, 1);
    if( pNew ){
      pNew->pLeft = pExpr;
      pNew->flags |= EP_Collate;
      pExpr = pNew;
    }
  }
  return pExpr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x0, 0x8(%rdx)
je 0x3eac2
movq (%rdi), %rdi
pushq $0x5c
popq %rsi
pushq $0x1
popq %rcx
callq 0x4606c
testq %rax, %rax
je 0x3eac2
movq %rbx, 0x10(%rax)
orb $0x1, 0x3(%rax)
movq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprFunction
SQLITE_PRIVATE Expr *sqlite3ExprFunction(Parse *pParse, ExprList *pList, Token *pToken){
  Expr *pNew;
  sqlite3 *db = pParse->db;
  assert( pToken );
  pNew = sqlite3ExprAlloc(db, TK_FUNCTION, pToken, 1);
  if( pNew==0 ){
    sqlite3ExprListDelete(db, pList); /* Avoid memory leak when malloc fails */
    return 0;
  }
  pNew->x.pList = pList;
  assert( !ExprHasProperty(pNew, EP_xIsSelect) );
  sqlite3ExprSetHeight(pParse, pNew);
  return pNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %r12
pushq $0x1
popq %rcx
movq %r12, %rdi
movl $0x97, %esi
callq 0x4606c
movq %rax, %r14
testq %rax, %rax
je 0x3eb09
movq %rbx, 0x20(%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x3ec23
jmp 0x3eb14
movq %r12, %rdi
movq %rbx, %rsi
callq 0x2f527
movq %r14, %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: binaryToUnaryIfNull
static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){
    sqlite3 *db = pParse->db;
    if( db->mallocFailed==0 && pY->op==TK_NULL ){
      pA->op = (u8)op;
      sqlite3ExprDelete(db, pA->pRight);
      pA->pRight = 0;
    }
  }

// Assembly:
movq (%rdi), %rdi
cmpb $0x0, 0x50(%rdi)
je 0x3ebb9
retq
cmpb $0x62, (%rsi)
jne 0x3ebb8
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rbx
movb %cl, (%rdx)
movq 0x18(%rdx), %rsi
callq 0x2f476
andq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3TriggerInsertStep
SQLITE_PRIVATE TriggerStep *sqlite3TriggerInsertStep(
  sqlite3 *db,        /* The database connection */
  Token *pTableName,  /* Name of the table into which we insert */
  IdList *pColumn,    /* List of columns in pTableName to insert into */
  ExprList *pEList,   /* The VALUE clause: a list of values to be inserted */
  Select *pSelect,    /* A SELECT statement that supplies values */
  u8 orconf           /* The conflict algorithm (OE_Abort, OE_Replace, etc.) */
){
  TriggerStep *pTriggerStep;

  assert(pEList == 0 || pSelect == 0);
  assert(pEList != 0 || pSelect != 0 || db->mallocFailed);

  pTriggerStep = triggerStepAllocate(db, TK_INSERT, pTableName);
  if( pTriggerStep ){
    pTriggerStep->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);
    pTriggerStep->pIdList = pColumn;
    pTriggerStep->pExprList = sqlite3ExprListDup(db, pEList, EXPRDUP_REDUCE);
    pTriggerStep->orconf = orconf;
  }else{
    sqlite3IdListDelete(db, pColumn);
  }
  sqlite3ExprListDelete(db, pEList);
  sqlite3SelectDelete(db, pSelect);

  return pTriggerStep;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, -0x2c(%rbp)
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %rdx
movq %rdi, %r14
pushq $0x69
popq %rsi
callq 0x5638e
movq %rax, %r12
testq %rax, %rax
je 0x41a3f
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x443e4
movq %rax, 0x10(%r12)
movq %r13, 0x38(%r12)
movq %r14, %rdi
movq %r15, %rsi
pushq $0x1
popq %rdx
callq 0x44502
movq %rax, 0x30(%r12)
movl -0x2c(%rbp), %eax
movb %al, 0x1(%r12)
jmp 0x41a4a
movq %r14, %rdi
movq %r13, %rsi
callq 0x2f6b3
movq %r14, %rdi
movq %r15, %rsi
callq 0x2f527
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2f500
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: sqlite3GetVdbe
SQLITE_PRIVATE Vdbe *sqlite3GetVdbe(Parse *pParse){
  Vdbe *v = pParse->pVdbe;
  if( v==0 ){
    v = pParse->pVdbe = sqlite3VdbeCreate(pParse->db);
#ifndef SQLITE_OMIT_TRACE
    if( v ){
      sqlite3VdbeAddOp0(v, OP_Trace);
    }
#endif
  }
  return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x10(%rdi), %rbx
testq %rbx, %rbx
jne 0x41f2c
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x1060b
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x41f2a
movq %rax, %rbx
movq %rax, %rdi
movl $0x94, %esi
callq 0x41f34
jmp 0x41f2c
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VdbeAddOp3
SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe *p, int op, int p1, int p2, int p3){
  int i;
  VdbeOp *pOp;

  i = p->nOp;
  assert( p->magic==VDBE_MAGIC_INIT );
  assert( op>0 && op<0xff );
  if( p->nOpAlloc<=i ){
    if( growOpArray(p) ){
      return 1;
    }
  }
  p->nOp++;
  pOp = &p->aOp[i];
  pOp->opcode = (u8)op;
  pOp->p5 = 0;
  pOp->p1 = p1;
  pOp->p2 = p2;
  pOp->p3 = p3;
  pOp->p4.p = 0;
  pOp->p4type = P4_NOTUSED;
#ifdef SQLITE_DEBUG
  pOp->zComment = 0;
  if( p->db->flags & SQLITE_VdbeAddopTrace ){
    sqlite3VdbePrintOp(0, i, &p->aOp[i]);
  }
#endif
#ifdef VDBE_PROFILE
  pOp->cycles = 0;
  pOp->cnt = 0;
#endif
  return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %r14
movl 0x34(%rdi), %ebx
movl %ebx, %eax
cmpl %ebx, 0x38(%rdi)
jg 0x41f8d
movl %r8d, -0x2c(%rbp)
movq %r14, %rdi
callq 0x31024
testl %eax, %eax
je 0x41f85
pushq $0x1
popq %rbx
jmp 0x41fc1
movl 0x34(%r14), %eax
movl -0x2c(%rbp), %r8d
movslq %ebx, %rcx
incl %eax
movl %eax, 0x34(%r14)
movq 0x8(%r14), %rax
imulq $0x18, %rcx, %rcx
movb %r13b, (%rax,%rcx)
xorl %edx, %edx
movb %dl, 0x3(%rax,%rcx)
movl %r12d, 0x4(%rax,%rcx)
movl %r15d, 0x8(%rax,%rcx)
movl %r8d, 0xc(%rax,%rcx)
andq $0x0, 0x10(%rax,%rcx)
movb %dl, 0x1(%rax,%rcx)
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: sqlite3OpenTable
SQLITE_PRIVATE void sqlite3OpenTable(
  Parse *p,       /* Generate code into this VDBE */
  int iCur,       /* The cursor number of the table */
  int iDb,        /* The database index in sqlite3.aDb[] */
  Table *pTab,    /* The table to be opened */
  int opcode      /* OP_OpenRead or OP_OpenWrite */
){
  Vdbe *v;
  assert( !IsVirtual(pTab) );
  v = sqlite3GetVdbe(p);
  assert( opcode==OP_OpenWrite || opcode==OP_OpenRead );
  sqlite3TableLock(p, iDb, pTab->tnum, (opcode==OP_OpenWrite)?1:0, pTab->zName);
  sqlite3VdbeAddOp3(v, opcode, iCur, pTab->tnum, iDb);
  sqlite3VdbeChangeP4(v, -1, SQLITE_INT_TO_PTR(pTab->nCol), P4_INT32);
  VdbeComment((v, "%s", pTab->zName));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r15d
movq %rcx, %rbx
movl %edx, %r14d
movl %esi, -0x2c(%rbp)
movq %rdi, %r13
callq 0x41ef4
movq %rax, %r12
movl 0x3c(%rbx), %edx
xorl %ecx, %ecx
cmpl $0x31, %r15d
sete %cl
movq (%rbx), %r8
movq %r13, %rdi
movl %r14d, %esi
callq 0x4207f
movl 0x3c(%rbx), %ecx
movq %r12, %rdi
movl %r15d, %esi
movl -0x2c(%rbp), %edx
movl %r14d, %r8d
callq 0x41f4c
movswq 0x42(%rbx), %rdx
pushq $-0x1
popq %rsi
pushq $-0xe
popq %rcx
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1074b
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3TableLock
SQLITE_PRIVATE void sqlite3TableLock(
  Parse *pParse,     /* Parsing context */
  int iDb,           /* Index of the database containing the table to lock */
  int iTab,          /* Root page number of the table to be locked */
  u8 isWriteLock,    /* True for a write lock */
  const char *zName  /* Name of the table to be locked */
){
  Parse *pToplevel = sqlite3ParseToplevel(pParse);
  int i;
  int nBytes;
  TableLock *p;
  assert( iDb>=0 );

  for(i=0; i<pToplevel->nTableLock; i++){
    p = &pToplevel->aTableLock[i];
    if( p->iDb==iDb && p->iTab==iTab ){
      p->isWriteLock = (p->isWriteLock || isWriteLock);
      return;
    }
  }

  nBytes = sizeof(TableLock) * (pToplevel->nTableLock+1);
  pToplevel->aTableLock =
      sqlite3DbReallocOrFree(pToplevel->db, pToplevel->aTableLock, nBytes);
  if( pToplevel->aTableLock ){
    p = &pToplevel->aTableLock[pToplevel->nTableLock++];
    p->iDb = iDb;
    p->iTab = iTab;
    p->isWriteLock = isWriteLock;
    p->zName = zName;
  }else{
    pToplevel->nTableLock = 0;
    pToplevel->db->mallocFailed = 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, %ebx
movl %edx, %r15d
movq 0x1d8(%rdi), %r13
testq %r13, %r13
cmoveq %rdi, %r13
movl %esi, %r12d
movl 0x1c0(%r13), %ecx
xorl %eax, %eax
testl %ecx, %ecx
movl $0x0, %edx
cmovgl %ecx, %edx
imulq $0x18, %rdx, %rdx
cmpq %rax, %rdx
je 0x420dc
movq 0x1c8(%r13), %rsi
cmpl %r12d, (%rsi,%rax)
jne 0x420d6
cmpl %r15d, 0x4(%rsi,%rax)
je 0x42127
addq $0x18, %rax
jmp 0x420bd
imull $0x18, %ecx, %edx
addl $0x18, %edx
movq (%r13), %rdi
movq 0x1c8(%r13), %rsi
callq 0x2eac1
movq %rax, 0x1c8(%r13)
testq %rax, %rax
je 0x42132
movslq 0x1c0(%r13), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x1c0(%r13)
imulq $0x18, %rcx, %rcx
movl %r12d, (%rax,%rcx)
movl %r15d, 0x4(%rax,%rcx)
movb %bl, 0x8(%rax,%rcx)
movq %r14, 0x10(%rax,%rcx)
jmp 0x42142
orb 0x8(%rsi,%rax), %bl
setne 0x8(%rsi,%rax)
jmp 0x42142
andl $0x0, 0x1c0(%r13)
movq (%r13), %rax
movb $0x1, 0x50(%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: sqlite3AuthCheck
SQLITE_PRIVATE int sqlite3AuthCheck(
  Parse *pParse,
  int code,
  const char *zArg1,
  const char *zArg2,
  const char *zArg3
){
  sqlite3 *db = pParse->db;
  int rc;

  /* Don't do any authorization checks if the database is initialising
  ** or if the parser is being invoked from within sqlite3_declare_vtab.
  */
  if( db->init.busy || IN_DECLARE_VTAB ){
    return SQLITE_OK;
  }

  if( db->xAuth==0 ){
    return SQLITE_OK;
  }
  rc = db->xAuth(db->pAuthArg, code, zArg1, zArg2, zArg3, pParse->zAuthContext);
  if( rc==SQLITE_DENY ){
    sqlite3ErrorMsg(pParse, "not authorized");
    pParse->rc = SQLITE_AUTH;
  }else if( rc!=SQLITE_OK && rc!=SQLITE_IGNORE ){
    rc = SQLITE_DENY;
    sqliteAuthBadReturnCode(pParse);
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
xorl %eax, %eax
cmpb $0x0, 0x99(%rdi)
jne 0x421bf
cmpb $0x0, 0x201(%rbx)
jne 0x421bf
movq 0x180(%rdi), %r10
testq %r10, %r10
je 0x421bf
movq 0x188(%rdi), %rdi
movq 0x248(%rbx), %r9
callq *%r10
cmpl $0x1, %eax
jne 0x421ad
leaq 0x2aba4(%rip), %rsi     # 0x6cd3e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x104d6
movl $0x17, 0x18(%rbx)
jmp 0x421bc
testl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
je 0x421bf
movq %rbx, %rdi
callq 0x421c6
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3NameFromToken
SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3 *db, Token *pName){
  char *zName;
  if( pName ){
    zName = sqlite3DbStrNDup(db, (char*)pName->z, pName->n);
    sqlite3Dequote(zName);
  }else{
    zName = 0;
  }
  return zName;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x42211
movq (%rsi), %rax
movl 0x8(%rsi), %edx
movq %rax, %rsi
callq 0x310c8
movq %rax, %rbx
movq %rax, %rdi
callq 0x4221d
jmp 0x42213
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3Dequote
SQLITE_PRIVATE int sqlite3Dequote(char *z){
  char quote;
  int i, j;
  if( z==0 ) return -1;
  quote = z[0];
  switch( quote ){
    case '\'':  break;
    case '"':   break;
    case '`':   break;                /* For MySQL compatibility */
    case '[':   quote = ']';  break;  /* For MS SqlServer compatibility */
    default:    return -1;
  }
  for(i=1, j=0; ALWAYS(z[i]); i++){
    if( z[i]==quote ){
      if( z[i+1]==quote ){
        z[j++] = quote;
        i++;
      }else{
        break;
      }
    }else{
      z[j++] = z[i];
    }
  }
  z[j] = 0;
  return j;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x42276
movzbl (%rdi), %eax
cmpl $0x22, %eax
je 0x4223f
cmpl $0x27, %eax
je 0x4223f
cmpl $0x60, %eax
je 0x4223f
cmpl $0x5b, %eax
jne 0x42276
movb $0x5d, %al
movl $0x1, %edx
xorl %ecx, %ecx
movslq %edx, %rsi
movb (%rdi,%rsi), %r8b
testb %r8b, %r8b
je 0x42270
cmpb %al, %r8b
jne 0x42265
cmpb %al, 0x1(%rdi,%rsi)
jne 0x42270
incq %rsi
movl %eax, %r8d
movl %esi, %edx
movb %r8b, (%rdi,%rcx)
incq %rcx
incl %edx
jmp 0x42246
movl %ecx, %eax
movb $0x0, (%rdi,%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3TwoPartName
SQLITE_PRIVATE int sqlite3TwoPartName(
  Parse *pParse,      /* Parsing and code generating context */
  Token *pName1,      /* The "xxx" in the name "xxx.yyy" or "xxx" */
  Token *pName2,      /* The "yyy" in the name "xxx.yyy" */
  Token **pUnqual     /* Write the unqualified object name here */
){
  int iDb;                    /* Database holding the object */
  sqlite3 *db = pParse->db;

  if( ALWAYS(pName2!=0) && pName2->n>0 ){
    if( db->init.busy ) {
      sqlite3ErrorMsg(pParse, "corrupt database");
      pParse->nErr++;
      return -1;
    }
    *pUnqual = pName2;
    iDb = sqlite3FindDb(db, pName1);
    if( iDb<0 ){
      sqlite3ErrorMsg(pParse, "unknown database %T", pName1);
      pParse->nErr++;
      return -1;
    }
  }else{
    assert( db->init.iDb==0 || db->init.busy );
    iDb = db->init.iDb;
    *pUnqual = pName1;
  }
  return iDb;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdx, %rdx
je 0x422b5
cmpl $0x0, 0x8(%rdx)
je 0x422b5
cmpb $0x0, 0x99(%rdi)
je 0x422c4
leaq 0x2ab44(%rip), %rsi     # 0x6cde7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x104d6
incl 0x50(%rbx)
pushq $-0x1
popq %rax
jmp 0x422bf
movzbl 0x98(%rdi), %eax
movq %r14, (%rcx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rdx, (%rcx)
movq %r14, %rsi
callq 0x424c3
testl %eax, %eax
jns 0x422bf
leaq 0x2ab1e(%rip), %rsi     # 0x6cdf8
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x104d6
jmp 0x422ad
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3CheckObjectName
SQLITE_PRIVATE int sqlite3CheckObjectName(Parse *pParse, const char *zName){
  if( !pParse->db->init.busy && pParse->nested==0 
          && (pParse->db->flags & SQLITE_WriteSchema)==0
          && 0==sqlite3StrNICmp(zName, "sqlite_", 7) ){
    sqlite3ErrorMsg(pParse, "object name reserved for internal use: %s", zName);
    return SQLITE_ERROR;
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
xorl %ebx, %ebx
cmpb $0x0, 0x99(%rax)
jne 0x42340
movq %rdi, %r15
cmpb $0x0, 0x1e(%rdi)
jne 0x42340
testb $0x8, 0x2d(%rax)
jne 0x42340
movq %rsi, %r14
leaq 0x2aaf2(%rip), %rsi     # 0x6ce0c
pushq $0x7
popq %rdx
movq %r14, %rdi
callq 0x8f45
testl %eax, %eax
jne 0x42340
leaq 0x2aae4(%rip), %rsi     # 0x6ce14
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x104d6
pushq $0x1
popq %rbx
movl %ebx, %eax
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: sqlite3CodeVerifySchema
SQLITE_PRIVATE void sqlite3CodeVerifySchema(Parse *pParse, int iDb){
  Parse *pToplevel = sqlite3ParseToplevel(pParse);

#ifndef SQLITE_OMIT_TRIGGER
  if( pToplevel!=pParse ){
    /* This branch is taken if a trigger is currently being coded. In this
    ** case, set cookieGoto to a non-zero value to show that this function
    ** has been called. This is used by the sqlite3ExprCodeConstants()
    ** function. */
    pParse->cookieGoto = -1;
  }
#endif
  if( pToplevel->cookieGoto==0 ){
    Vdbe *v = sqlite3GetVdbe(pToplevel);
    if( v==0 ) return;  /* This only happens if there was a prior error */
    pToplevel->cookieGoto = sqlite3VdbeAddOp2(v, OP_Goto, 0, 0)+1;
  }
  if( iDb>=0 ){
    sqlite3 *db = pToplevel->db;
    yDbMask mask;

    assert( iDb<db->nDb );
    assert( db->aDb[iDb].pBt!=0 || iDb==1 );
    assert( iDb<SQLITE_MAX_ATTACHED+2 );
    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
    mask = ((yDbMask)1)<<iDb;
    if( (pToplevel->cookieMask & mask)==0 ){
      pToplevel->cookieMask |= mask;
      pToplevel->cookieValue[iDb] = db->aDb[iDb].pSchema->schema_cookie;
      if( !OMIT_TEMPDB && iDb==1 ){
        sqlite3OpenTempDatabase(pToplevel);
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq 0x1d8(%rdi), %rbx
testq %rbx, %rbx
cmoveq %rdi, %rbx
cmpq %rdi, %rbx
je 0x42371
orl $-0x1, 0x16c(%rdi)
cmpl $0x0, 0x16c(%rbx)
jne 0x4239e
movq %rbx, %rdi
callq 0x41ef4
testq %rax, %rax
je 0x423f0
pushq $0xe
popq %rsi
movq %rax, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x41f42
incl %eax
movl %eax, 0x16c(%rbx)
testl %r14d, %r14d
js 0x423f0
pushq $0x1
popq %rax
movl %r14d, %ecx
shll %cl, %eax
movl 0x168(%rbx), %ecx
btl %r14d, %ecx
jb 0x423f0
movq (%rbx), %rdx
orl %eax, %ecx
movl %ecx, 0x168(%rbx)
movq 0x20(%rdx), %rax
movl %r14d, %ecx
movq %rcx, %rdx
shlq $0x5, %rdx
movq 0x18(%rax,%rdx), %rax
movl (%rax), %eax
movl %eax, 0x170(%rbx,%rcx,4)
cmpl $0x1, %r14d
jne 0x423f0
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x17523
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BeginWriteOperation
SQLITE_PRIVATE void sqlite3BeginWriteOperation(Parse *pParse, int setStatement, int iDb){
  Parse *pToplevel = sqlite3ParseToplevel(pParse);
  sqlite3CodeVerifySchema(pParse, iDb);
  pToplevel->writeMask |= ((yDbMask)1)<<iDb;
  pToplevel->isMultiWrite |= setStatement;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq 0x1d8(%rdi), %r15
testq %r15, %r15
cmoveq %rdi, %r15
movl %edx, %esi
callq 0x4234d
pushq $0x1
popq %rax
movl %ebx, %ecx
shll %cl, %eax
orl %eax, 0x164(%r15)
orb %r14b, 0x23(%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: sqlite3OpenMasterTable
SQLITE_PRIVATE void sqlite3OpenMasterTable(Parse *p, int iDb){
  Vdbe *v = sqlite3GetVdbe(p);
  sqlite3TableLock(p, iDb, MASTER_ROOT, 1, SCHEMA_TABLE(iDb));
  sqlite3VdbeAddOp3(v, OP_OpenWrite, 0, MASTER_ROOT, iDb);
  sqlite3VdbeChangeP4(v, -1, (char *)5, P4_INT32);  /* 5 column table */
  if( p->nTab==0 ){
    p->nTab = 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
callq 0x41ef4
movq %rax, %r15
cmpl $0x1, %r14d
leaq 0x29ad0(%rip), %rax     # 0x6bf39
leaq 0x29adc(%rip), %r8      # 0x6bf4c
cmoveq %rax, %r8
pushq $0x1
popq %r12
movq %rbx, %rdi
movl %r14d, %esi
movl %r12d, %edx
movl %r12d, %ecx
callq 0x4207f
pushq $0x31
popq %rsi
movq %r15, %rdi
xorl %edx, %edx
movl %r12d, %ecx
movl %r14d, %r8d
callq 0x41f4c
pushq $-0x1
popq %rsi
pushq $0x5
popq %rdx
pushq $-0xe
popq %rcx
movq %r15, %rdi
callq 0x1074b
cmpl $0x0, 0x54(%rbx)
jne 0x424ba
movl $0x1, 0x54(%rbx)
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: sqlite3FindDb
SQLITE_PRIVATE int sqlite3FindDb(sqlite3 *db, Token *pName){
  int i;                               /* Database number */
  char *zName;                         /* Name we are searching for */
  zName = sqlite3NameFromToken(db, pName);
  i = sqlite3FindDbName(db, zName);
  sqlite3DbFree(db, zName);
  return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x421eb
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x13dd2
movl %eax, %r15d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x968b
movl %r15d, %eax
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: sqlite3ResolveSelfReference
SQLITE_PRIVATE void sqlite3ResolveSelfReference(
  Parse *pParse,      /* Parsing context */
  Table *pTab,        /* The table being referenced */
  int type,           /* NC_IsCheck or NC_PartIdx */
  Expr *pExpr,        /* Expression to resolve.  May be NULL. */
  ExprList *pList     /* Expression list to resolve.  May be NUL. */
){
  SrcList sSrc;                   /* Fake SrcList for pParse->pNewTable */
  NameContext sNC;                /* Name context for pParse->pNewTable */
  int i;                          /* Loop counter */

  assert( type==NC_IsCheck || type==NC_PartIdx );
  memset(&sNC, 0, sizeof(sNC));
  memset(&sSrc, 0, sizeof(sSrc));
  sSrc.nSrc = 1;
  sSrc.a[0].zName = pTab->zName;
  sSrc.a[0].pTab = pTab;
  sSrc.a[0].iCursor = -1;
  sNC.pParse = pParse;
  sNC.pSrcList = &sSrc;
  sNC.ncFlags = type;
  if( sqlite3ResolveExprNames(&sNC, pExpr) ) return;
  if( pList ){
    for(i=0; i<pList->nExpr; i++){
      if( sqlite3ResolveExprNames(&sNC, pList->a[i].pExpr) ){
        return;
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %r8, %rbx
xorps %xmm0, %xmm0
leaq -0x58(%rbp), %rax
movups %xmm0, 0x20(%rax)
andq $0x0, 0x30(%rax)
movups %xmm0, 0x10(%rax)
leaq -0xd0(%rbp), %r8
movaps %xmm0, (%r8)
movaps %xmm0, 0x10(%r8)
movaps %xmm0, 0x20(%r8)
movaps %xmm0, 0x30(%r8)
movaps %xmm0, 0x40(%r8)
movaps %xmm0, 0x50(%r8)
movaps %xmm0, 0x60(%r8)
movb $0x1, (%r8)
movq (%rsi), %r9
movq %r9, 0x18(%r8)
movq %rsi, 0x28(%r8)
orl $-0x1, 0x44(%r8)
movq %rdi, (%rax)
movq %r8, 0x8(%rax)
movb %dl, 0x30(%rax)
movq %rax, %rdi
movq %rcx, %rsi
callq 0x42880
testq %rbx, %rbx
je 0x425b1
testl %eax, %eax
jne 0x425b1
pushq $-0x1
popq %r15
xorl %r12d, %r12d
leaq -0x58(%rbp), %r14
movslq (%rbx), %rax
incq %r15
cmpq %rax, %r15
jge 0x425b1
movq 0x8(%rbx), %rax
movq (%rax,%r12), %rsi
addq $0x20, %r12
movq %r14, %rdi
callq 0x42880
testl %eax, %eax
je 0x4258e
addq $0xb0, %rsp
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: sqlite3ResultSetOfSelect
SQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse *pParse, Select *pSelect){
  Table *pTab;
  sqlite3 *db = pParse->db;
  int savedFlags;

  savedFlags = db->flags;
  db->flags &= ~SQLITE_FullColNames;
  db->flags |= SQLITE_ShortColNames;
  sqlite3SelectPrep(pParse, pSelect, 0);
  if( pParse->nErr ) return 0;
  while( pSelect->pPrior ) pSelect = pSelect->pPrior;
  db->flags = savedFlags;
  pTab = sqlite3DbMallocZero(db, sizeof(Table) );
  if( pTab==0 ){
    return 0;
  }
  /* The sqlite3ResultSetOfSelect() is only used n contexts where lookaside
  ** is disabled */
  assert( db->lookaside.bEnabled==0 );
  pTab->nRef = 1;
  pTab->zName = 0;
  pTab->nRowEst = 1000000;
  selectColumnsFromExprList(pParse, pSelect->pEList, &pTab->nCol, &pTab->aCol);
  selectAddColumnTypeAndCollation(pParse, pTab->nCol, pTab->aCol, pSelect);
  pTab->iPKey = -1;
  if( db->mallocFailed ){
    sqlite3DeleteTable(db, pTab);
    return 0;
  }
  return pTab;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r13
movq %rdi, %r14
movq (%rdi), %r12
movl 0x2c(%r12), %ebx
movl %ebx, %eax
andl $-0x61, %eax
orl $0x40, %eax
movl %eax, 0x2c(%r12)
xorl %r15d, %r15d
xorl %edx, %edx
callq 0x449ff
cmpl $0x0, 0x50(%r14)
jne 0x4267a
movq %r12, %rax
movq %r13, %r12
movq 0x50(%r13), %r13
testq %r13, %r13
jne 0x425fe
movq %rax, %r13
movl %ebx, 0x2c(%rax)
pushq $0x78
popq %rsi
movq %rax, %rdi
callq 0xf4ae
testq %rax, %rax
je 0x42677
movq %rax, %r15
movw $0x1, 0x44(%rax)
andq $0x0, (%rax)
movl $0xf4240, 0x38(%rax)    # imm = 0xF4240
movq (%r12), %rsi
leaq 0x42(%rax), %rdx
movq %rax, %rcx
addq $0x8, %rcx
movq %r14, %rdi
callq 0x45816
movswl 0x42(%r15), %esi
movq 0x8(%r15), %rdx
movq %r14, %rdi
movq %r12, %rcx
callq 0x463e9
orw $-0x1, 0x40(%r15)
cmpb $0x0, 0x50(%r13)
je 0x4267a
movq %r13, %rdi
movq %r15, %rsi
callq 0x93dc
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3NestedParse
SQLITE_PRIVATE void sqlite3NestedParse(Parse *pParse, const char *zFormat, ...){
  va_list ap;
  char *zSql;
  char *zErrMsg = 0;
  sqlite3 *db = pParse->db;
# define SAVE_SZ  (sizeof(Parse) - offsetof(Parse,nVar))
  char saveBuf[SAVE_SZ];

  if( pParse->nErr ) return;
  assert( pParse->nested<10 );  /* Nesting should only be of limited depth */
  va_start(ap, zFormat);
  zSql = sqlite3VMPrintf(db, zFormat, ap);
  va_end(ap);
  if( zSql==0 ){
    return;   /* A malloc must have failed */
  }
  pParse->nested++;
  memcpy(saveBuf, &pParse->nVar, SAVE_SZ);
  memset(&pParse->nVar, 0, SAVE_SZ);
  sqlite3RunParser(pParse, zSql, &zErrMsg);
  sqlite3DbFree(db, zErrMsg);
  sqlite3DbFree(db, zSql);
  memcpy(&pParse->nVar, saveBuf, SAVE_SZ);
  pParse->nested--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rdx, -0xf0(%rbp)
movq %rcx, -0xe8(%rbp)
movq %r8, -0xe0(%rbp)
movq %r9, -0xd8(%rbp)
testb %al, %al
je 0x426ef
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
andq $0x0, -0x30(%rbp)
cmpl $0x0, 0x50(%rdi)
jne 0x427a5
movq %rdi, %rbx
movq (%rdi), %r14
leaq -0x100(%rbp), %rax
leaq -0x50(%rbp), %rdx
movq %rax, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
movq %r14, %rdi
callq 0x174b9
testq %rax, %rax
je 0x427a5
movq %rax, %r15
incb 0x1e(%rbx)
leaq 0x1f8(%rbx), %r12
leaq -0x1a0(%rbp), %rdi
movl $0xa0, %edx
movq %r12, %rsi
callq 0x82c0
movl $0xa0, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x81e0
leaq -0x30(%rbp), %r13
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x1211e
movq (%r13), %rsi
movq %r14, %rdi
callq 0x968b
movq %r14, %rdi
movq %r15, %rsi
callq 0x968b
movl $0xa0, %edx
movq %r12, %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x82c0
decb 0x1e(%rbx)
addq $0x178, %rsp            # imm = 0x178
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: sqlite3ChangeCookie
SQLITE_PRIVATE void sqlite3ChangeCookie(Parse *pParse, int iDb){
  int r1 = sqlite3GetTempReg(pParse);
  sqlite3 *db = pParse->db;
  Vdbe *v = pParse->pVdbe;
  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
  sqlite3VdbeAddOp2(v, OP_Integer, db->aDb[iDb].pSchema->schema_cookie+1, r1);
  sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_SCHEMA_VERSION, r1);
  sqlite3ReleaseTempReg(pParse, r1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r15d
movq %rdi, %rbx
callq 0x46ff9
movl %eax, %r14d
movq (%rbx), %rax
movq 0x10(%rbx), %r12
movq 0x20(%rax), %rax
movslq %r15d, %r15
movq %r15, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rax
movl (%rax), %edx
incl %edx
pushq $0x15
popq %rsi
movq %r12, %rdi
movl %r14d, %ecx
callq 0x41f42
pushq $0x2e
popq %rsi
pushq $0x1
popq %rcx
movq %r12, %rdi
movl %r15d, %edx
movl %r14d, %r8d
callq 0x41f4c
movq %rbx, %rdi
movl %r14d, %esi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4701c
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VdbeAddParseSchemaOp
SQLITE_PRIVATE void sqlite3VdbeAddParseSchemaOp(Vdbe *p, int iDb, char *zWhere){
  int j;
  int addr = sqlite3VdbeAddOp3(p, OP_ParseSchema, iDb, 0, 0);
  sqlite3VdbeChangeP4(p, addr, zWhere, P4_DYNAMIC);
  for(j=0; j<p->db->nDb; j++) sqlite3VdbeUsesBtree(p, j);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movl %esi, %edx
movq %rdi, %rbx
pushq $0x70
popq %rsi
xorl %r14d, %r14d
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x41f4c
pushq $-0x1
popq %rcx
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
callq 0x1074b
movq (%rbx), %rax
movl 0x28(%rax), %eax
pushq $0x1
popq %rdx
cmpl %eax, %r14d
jge 0x42875
movl %edx, %esi
movl %r14d, %ecx
shll %cl, %esi
orl %esi, 0xa0(%rbx)
incl %r14d
jmp 0x4285e
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: sqlite3ResolveExprNames
SQLITE_PRIVATE int sqlite3ResolveExprNames( 
  NameContext *pNC,       /* Namespace to resolve expressions in. */
  Expr *pExpr             /* The expression to be analyzed. */
){
  u8 savedHasAgg;
  Walker w;

  if( pExpr==0 ) return 0;
#if SQLITE_MAX_EXPR_DEPTH>0
  {
    Parse *pParse = pNC->pParse;
    if( sqlite3ExprCheckHeight(pParse, pExpr->nHeight+pNC->pParse->nHeight) ){
      return 1;
    }
    pParse->nHeight += pExpr->nHeight;
  }
#endif
  savedHasAgg = pNC->ncFlags & NC_HasAgg;
  pNC->ncFlags &= ~NC_HasAgg;
  memset(&w, 0, sizeof(w));
  w.xExprCallback = resolveExprStep;
  w.xSelectCallback = resolveSelectStep;
  w.pParse = pNC->pParse;
  w.u.pNC = pNC;
  sqlite3WalkExpr(&w, pExpr);
#if SQLITE_MAX_EXPR_DEPTH>0
  pNC->pParse->nHeight -= pExpr->nHeight;
#endif
  if( pNC->nErr>0 || w.pParse->nErr>0 ){
    ExprSetProperty(pExpr, EP_Error);
  }
  if( pNC->ncFlags & NC_HasAgg ){
    ExprSetProperty(pExpr, EP_Agg);
  }else if( savedHasAgg ){
    pNC->ncFlags |= NC_HasAgg;
  }
  return ExprHasProperty(pExpr, EP_Error);
}

// Assembly:
testq %rsi, %rsi
je 0x428b9
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
movl 0x20c(%r15), %esi
addl 0x28(%rbx), %esi
movq %r15, %rdi
callq 0x42954
testl %eax, %eax
je 0x428bc
pushq $0x1
popq %rax
jmp 0x42949
xorl %eax, %eax
retq
movl 0x28(%rbx), %eax
addl %eax, 0x20c(%r15)
movb 0x30(%r14), %r15b
movl %r15d, %eax
andb $-0x3, %al
movb %al, 0x30(%r14)
leaq -0x40(%rbp), %rdi
andq $0x0, 0x18(%rdi)
leaq 0x94(%rip), %rax        # 0x42977
movq %rax, (%rdi)
leaq 0x443(%rip), %rax       # 0x42d30
movq %rax, 0x8(%rdi)
movq (%r14), %rax
movq %rax, 0x10(%rdi)
movq %r14, 0x20(%rdi)
movq %rbx, %rsi
callq 0x4336b
movl 0x28(%rbx), %eax
movq (%r14), %rcx
subl %eax, 0x20c(%rcx)
cmpl $0x0, 0x2c(%r14)
jg 0x42921
movq -0x30(%rbp), %rax
cmpl $0x0, 0x50(%rax)
jle 0x42925
orb $0x8, 0x2(%rbx)
movb 0x30(%r14), %al
testb $0x2, %al
jne 0x4293b
testb $0x2, %r15b
je 0x4293f
orb $0x2, %al
movb %al, 0x30(%r14)
jmp 0x4293f
orb $0x2, 0x2(%rbx)
movzwl 0x2(%rbx), %eax
shrl $0x3, %eax
andl $0x1, %eax
addq $0x28, %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: sqlite3ExprCheckHeight
SQLITE_PRIVATE int sqlite3ExprCheckHeight(Parse *pParse, int nHeight){
  int rc = SQLITE_OK;
  int mxHeight = pParse->db->aLimit[SQLITE_LIMIT_EXPR_DEPTH];
  if( nHeight>mxHeight ){
    sqlite3ErrorMsg(pParse, 
       "Expression tree is too large (maximum depth %d)", mxHeight
    );
    rc = SQLITE_ERROR;
  }
  return rc;
}

// Assembly:
movq (%rdi), %rax
movl 0x74(%rax), %edx
xorl %eax, %eax
cmpl %esi, %edx
jge 0x42976
pushq %rbp
movq %rsp, %rbp
leaq 0x2a57c(%rip), %rsi     # 0x6cee7
xorl %eax, %eax
callq 0x104d6
pushq $0x1
popq %rax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3WalkExpr
SQLITE_PRIVATE int sqlite3WalkExpr(Walker *pWalker, Expr *pExpr){
  int rc;
  if( pExpr==0 ) return WRC_Continue;
  testcase( ExprHasProperty(pExpr, EP_TokenOnly) );
  testcase( ExprHasProperty(pExpr, EP_Reduced) );
  rc = pWalker->xExprCallback(pWalker, pExpr);
  if( rc==WRC_Continue
              && !ExprHasAnyProperty(pExpr,EP_TokenOnly) ){
    if( sqlite3WalkExpr(pWalker, pExpr->pLeft) ) return WRC_Abort;
    if( sqlite3WalkExpr(pWalker, pExpr->pRight) ) return WRC_Abort;
    if( ExprHasProperty(pExpr, EP_xIsSelect) ){
      if( sqlite3WalkSelect(pWalker, pExpr->x.pSelect) ) return WRC_Abort;
    }else{
      if( sqlite3WalkExprList(pWalker, pExpr->x.pList) ) return WRC_Abort;
    }
  }
  return rc & WRC_Abort;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x433ce
movq %rsi, %r12
movq %rdi, %r15
callq *(%rdi)
movl %eax, %ebx
testl %eax, %eax
jne 0x433dc
testb $0x40, 0x3(%r12)
jne 0x433dc
movq 0x10(%r12), %rsi
movq %r15, %rdi
callq 0x4336b
pushq $0x2
popq %r14
testl %eax, %eax
jne 0x433e2
movq 0x18(%r12), %rsi
movq %r15, %rdi
callq 0x4336b
testl %eax, %eax
jne 0x433e2
testb $0x8, 0x3(%r12)
movq 0x20(%r12), %rsi
movq %r15, %rdi
jne 0x433d3
callq 0x43cdb
jmp 0x433d8
xorl %r14d, %r14d
jmp 0x433e2
callq 0x43d4b
testl %eax, %eax
jne 0x433e2
andl $0x2, %ebx
movl %ebx, %r14d
movl %r14d, %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: sqlite3WalkExprList
SQLITE_PRIVATE int sqlite3WalkExprList(Walker *pWalker, ExprList *p){
  int i;
  struct ExprList_item *pItem;
  if( p ){
    for(i=p->nExpr, pItem=p->a; i>0; i--, pItem++){
      if( sqlite3WalkExpr(pWalker, pItem->pExpr) ) return WRC_Abort;
    }
  }
  return WRC_Continue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x43d1f
movq %rdi, %r14
movl (%rsi), %r15d
movq 0x8(%rsi), %r13
pushq $0x2
popq %r12
testl %r15d, %r15d
jle 0x43d1f
movq (%r13), %rsi
movq %r14, %rdi
callq 0x4336b
testl %eax, %eax
jne 0x43d1c
decl %r15d
addq $0x20, %r13
jmp 0x43cfe
movl %r12d, %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: sqlite3WalkSelect
SQLITE_PRIVATE int sqlite3WalkSelect(Walker *pWalker, Select *p){
  int rc;
  if( p==0 || pWalker->xSelectCallback==0 ) return WRC_Continue;
  rc = WRC_Continue;
  pWalker->walkerDepth++;
  while( p ){
    if( !pWalker->bSelectDepthFirst ){
       rc = pWalker->xSelectCallback(pWalker, p);
       if( rc ) break;
    }
    if( sqlite3WalkSelectExpr(pWalker, p)
     || sqlite3WalkSelectFrom(pWalker, p)
    ){
      pWalker->walkerDepth--;
      return WRC_Abort;
    }
    if( pWalker->bSelectDepthFirst ){
      rc = pWalker->xSelectCallback(pWalker, p);
      /* Depth-first search is currently only used for
      ** selectAddSubqueryTypeInfo() and that routine always returns
      ** WRC_Continue (0).  So the following branch is never taken. */
      if( NEVER(rc) ) break;
    }
    p = p->pPrior;
  }
  pWalker->walkerDepth--;
  return rc & WRC_Abort;
}

// Assembly:
xorl %eax, %eax
testq %rsi, %rsi
je 0x43e68
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
je 0x43e60
movq %rsi, %r14
incl 0x18(%rbx)
testq %r14, %r14
je 0x43e69
cmpb $0x0, 0x1c(%rbx)
jne 0x43d95
movq %rbx, %rdi
movq %r14, %rsi
callq *0x8(%rbx)
testl %eax, %eax
jne 0x43e6b
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x43cdb
testl %eax, %eax
jne 0x43e5a
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x4336b
testl %eax, %eax
jne 0x43e5a
movq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0x43cdb
testl %eax, %eax
jne 0x43e5a
movq 0x40(%r14), %rsi
movq %rbx, %rdi
callq 0x4336b
testl %eax, %eax
jne 0x43e5a
movq 0x48(%r14), %rsi
movq %rbx, %rdi
callq 0x43cdb
testl %eax, %eax
jne 0x43e5a
movq 0x68(%r14), %rsi
movq %rbx, %rdi
callq 0x4336b
testl %eax, %eax
jne 0x43e5a
movq 0x70(%r14), %rsi
movq %rbx, %rdi
callq 0x4336b
testl %eax, %eax
jne 0x43e5a
movq 0x28(%r14), %r15
testq %r15, %r15
je 0x43e3e
movzbl (%r15), %r12d
addq $0x30, %r15
testl %r12d, %r12d
jle 0x43e3e
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x43d4b
testl %eax, %eax
jne 0x43e5a
decl %r12d
addq $0x68, %r15
jmp 0x43e21
cmpb $0x0, 0x1c(%rbx)
je 0x43e51
movq %rbx, %rdi
movq %r14, %rsi
callq *0x8(%rbx)
testl %eax, %eax
jne 0x43e6b
movq 0x50(%r14), %r14
jmp 0x43d75
decl 0x18(%rbx)
pushq $0x2
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
decl 0x18(%rbx)
andl $0x2, %eax
jmp 0x43e60
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3MatchSpanName
SQLITE_PRIVATE int sqlite3MatchSpanName(
  const char *zSpan,
  const char *zCol,
  const char *zTab,
  const char *zDb
){
  int n;
  for(n=0; ALWAYS(zSpan[n]) && zSpan[n]!='.'; n++){}
  if( zDb && (sqlite3StrNICmp(zSpan, zDb, n)!=0 || zDb[n]!=0) ){
    return 0;
  }
  zSpan += n+1;
  for(n=0; ALWAYS(zSpan[n]) && zSpan[n]!='.'; n++){}
  if( zTab && (sqlite3StrNICmp(zSpan, zTab, n)!=0 || zTab[n]!=0) ){
    return 0;
  }
  zSpan += n+1;
  if( zCol && sqlite3StrICmp(zSpan, zCol)!=0 ){
    return 0;
  }
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %rbx
leaq 0x1(%rdi), %r15
xorl %r13d, %r13d
movzbl -0x1(%r15), %eax
testl %eax, %eax
je 0x43ea7
cmpl $0x2e, %eax
je 0x43ea7
incq %r13
incq %r15
jmp 0x43e91
testq %r12, %r12
je 0x43ec6
movq %r12, %rsi
movl %r13d, %edx
callq 0x8f45
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x43f21
cmpb $0x0, (%r12,%r13)
jne 0x43f21
leaq 0x1(%r15), %r12
xorl %r13d, %r13d
movzbl -0x1(%r12), %eax
testl %eax, %eax
je 0x43ee4
cmpl $0x2e, %eax
je 0x43ee4
incq %r13
incq %r12
jmp 0x43ecd
testq %r14, %r14
je 0x43f06
movq %r15, %rdi
movq %r14, %rsi
movl %r13d, %edx
callq 0x8f45
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x43f21
cmpb $0x0, (%r14,%r13)
jne 0x43f21
testq %rbx, %rbx
je 0x43f1e
movq %r12, %rdi
movq %rbx, %rsi
callq 0xb1bf
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
jne 0x43f21
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3IsRowid
SQLITE_PRIVATE int sqlite3IsRowid(const char *z){
  if( sqlite3StrICmp(z, "_ROWID_")==0 ) return 1;
  if( sqlite3StrICmp(z, "ROWID")==0 ) return 1;
  if( sqlite3StrICmp(z, "OID")==0 ) return 1;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x290da(%rip), %rsi     # 0x6d01b
callq 0xb1bf
pushq $0x1
popq %r14
testl %eax, %eax
je 0x43f79
leaq 0x290ce(%rip), %rsi     # 0x6d023
movq %rbx, %rdi
callq 0xb1bf
testl %eax, %eax
je 0x43f79
leaq 0x290c1(%rip), %rsi     # 0x6d029
movq %rbx, %rdi
callq 0xb1bf
xorl %r14d, %r14d
testl %eax, %eax
sete %r14b
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq