LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3Utf8Read
SQLITE_PRIVATE u32 sqlite3Utf8Read(
  const unsigned char **pz    /* Pointer to string from which to read char */
){
  unsigned int c;

  /* Same as READ_UTF8() above but without the zTerm parameter.
  ** For this routine, we assume the UTF8 string is always zero-terminated.
  */
  c = *((*pz)++);
  if( c>=0xc0 ){
    c = sqlite3Utf8Trans1[c-0xc0];
    while( (*(*pz) & 0xc0)==0x80 ){
      c = (c<<6) + (0x3f & *((*pz)++));
    }
    if( c<0x80
        || (c&0xFFFFF800)==0xD800
        || (c&0xFFFFFFFE)==0xFFFE ){  c = 0xFFFD; }
  }
  return c;
}

// Assembly:
movq (%rdi), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, (%rdi)
movzbl (%rdx), %eax
cmpl $0xc0, %eax
jb 0x37041
pushq %rbp
movq %rsp, %rbp
addl $0xffffff40, %eax       # imm = 0xFFFFFF40
leaq 0x3f3f7(%rip), %rcx     # 0x763e0
movzbl (%rax,%rcx), %ecx
movb (%rsi), %al
andb $-0x40, %al
negb %al
jno 0x37013
addq $0x2, %rdx
shll $0x6, %ecx
movq %rdx, (%rdi)
movzbl -0x1(%rdx), %eax
andl $0x3f, %eax
orl %eax, %ecx
movb (%rdx), %al
andb $-0x40, %al
incq %rdx
negb %al
jo 0x36ff9
movl %ecx, %eax
andl $0xfffff800, %eax       # imm = 0xFFFFF800
movl %ecx, %edx
andl $-0x2, %edx
cmpl $0xd800, %eax           # imm = 0xD800
movl $0xfffd, %esi           # imm = 0xFFFD
movl %ecx, %eax
cmovel %esi, %eax
cmpl $0x80, %ecx
cmovbl %esi, %eax
cmpl $0xfffe, %edx           # imm = 0xFFFE
cmovel %esi, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VdbeSetNumCols
SQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe *p, int nResColumn){
  Mem *pColName;
  int n;
  sqlite3 *db = p->db;

  releaseMemArray(p->aColName, p->nResColumn*COLNAME_N);
  sqlite3DbFree(db, p->aColName);
  n = nResColumn*COLNAME_N;
  p->nResColumn = (u16)nResColumn;
  p->aColName = pColName = (Mem*)sqlite3DbMallocZero(db, sizeof(Mem)*n );
  if( p->aColName==0 ) return;
  while( n-- > 0 ){
    pColName->flags = MEM_Null;
    pColName->db = p->db;
    pColName++;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %r15
movq 0x20(%rdi), %rdi
movzwl 0x48(%r14), %esi
addl %esi, %esi
callq 0x22c33
movq 0x20(%r14), %rsi
movq %r15, %rdi
callq 0x9ca4
movw %bx, 0x48(%r14)
imull $0x70, %ebx, %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x11721
testq %rax, %rax
je 0x375ce
movq %rax, %r15
movslq %r12d, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x8200
movq %r15, 0x20(%r14)
testl %ebx, %ebx
jle 0x375d6
movq (%r14), %rax
leal 0x1(,%rbx,2), %ecx
movw $0x1, 0x24(%r15)
movq %rax, (%r15)
addq $0x38, %r15
decl %ecx
cmpl $0x1, %ecx
jg 0x375b7
jmp 0x375d6
movq $0x0, 0x20(%r14)
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: sqlite3Utf8CharLen
SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *zIn, int nByte){
  int r = 0;
  const u8 *z = (const u8*)zIn;
  const u8 *zTerm;
  if( nByte>=0 ){
    zTerm = &z[nByte];
  }else{
    zTerm = (const u8*)(-1);
  }
  assert( z<=zTerm );
  while( *z!=0 && z<zTerm ){
    SQLITE_SKIP_UTF8(z);
    r++;
  }
  return r;
}

// Assembly:
movl %esi, %eax
addq %rdi, %rax
testl %esi, %esi
movq $-0x1, %rcx
cmovnsq %rax, %rcx
movb (%rdi), %dl
testb %dl, %dl
setne %al
cmpq %rdi, %rcx
seta %sil
andb %al, %sil
xorl %eax, %eax
cmpb $0x1, %sil
jne 0x37639
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
cmpb $-0x40, %dl
jb 0x37628
movb 0x1(%rdi), %dl
incq %rdi
movl %edx, %esi
andb $-0x40, %sil
negb %sil
jo 0x37615
jmp 0x3762d
incq %rdi
movb (%rdi), %dl
incl %eax
testb %dl, %dl
je 0x37638
cmpq %rcx, %rdi
jb 0x37610
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3DeleteTriggerStep
SQLITE_PRIVATE void sqlite3DeleteTriggerStep(sqlite3 *db, TriggerStep *pTriggerStep){
  while( pTriggerStep ){
    TriggerStep * pTmp = pTriggerStep;
    pTriggerStep = pTriggerStep->pNext;

    sqlite3ExprDelete(db, pTmp->pWhere);
    sqlite3ExprListDelete(db, pTmp->pExprList);
    sqlite3SelectDelete(db, pTmp->pSelect);
    sqlite3IdListDelete(db, pTmp->pIdList);

    sqlite3DbFree(db, pTmp);
  }
}

// Assembly:
testq %rsi, %rsi
je 0x376a0
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x28(%r14), %rsi
movq 0x40(%r14), %r15
movq %rbx, %rdi
callq 0x3479d
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x3484e
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x34827
movq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0x349e3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9ca4
movq %r15, %r14
testq %r15, %r15
jne 0x3764f
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: yy_pop_parser_stack
static int yy_pop_parser_stack(yyParser *pParser){
  YYCODETYPE yymajor;
  yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];

  /* There is no mechanism by which the parser stack can be popped below
  ** empty in SQLite.  */
  if( NEVER(pParser->yyidx<0) ) return 0;
#ifndef NDEBUG
  if( yyTraceFILE && pParser->yyidx>=0 ){
    fprintf(yyTraceFILE,"%sPopping %s\n",
      yyTracePrompt,
      yyTokenName[yytos->major]);
  }
#endif
  yymajor = yytos->major;
  yy_destructor(pParser, yymajor, &yytos->minor);
  pParser->yyidx--;
  return yymajor;
}

// Assembly:
movslq (%rdi), %rax
testq %rax, %rax
js 0x39453
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
shlq $0x5, %rax
leaq (%rdi,%rax), %rdx
addq $0x18, %rdx
movzbl -0x6(%rdx), %esi
movq 0x8(%rdi), %rdi
callq 0x39379
decl (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BeginTransaction
SQLITE_PRIVATE void sqlite3BeginTransaction(Parse *pParse, int type){
  sqlite3 *db;
  Vdbe *v;
  int i;

  assert( pParse!=0 );
  db = pParse->db;
  assert( db!=0 );
/*  if( db->aDb[0].pBt==0 ) return; */
  if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION, "BEGIN", 0, 0) ){
    return;
  }
  v = sqlite3GetVdbe(pParse);
  if( !v ) return;
  if( type!=TK_DEFERRED ){
    for(i=0; i<db->nDb; i++){
      sqlite3VdbeAddOp2(v, OP_Transaction, i, (type==TK_EXCLUSIVE)+1);
      sqlite3VdbeUsesBtree(v, i);
    }
  }
  sqlite3VdbeAddOp2(v, OP_AutoCommit, 0, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %r12
leaq 0x4148b(%rip), %rdx     # 0x7ad18
movl $0x16, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x460eb
testl %eax, %eax
je 0x398a9
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x45ece
testq %rax, %rax
je 0x398a0
movq %rax, %rbx
cmpl $0x7, %r14d
je 0x39908
cmpl $0x0, 0x28(%r12)
jle 0x39908
xorl %r15d, %r15d
cmpl $0x9, %r14d
sete %r15b
incl %r15d
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x4, %esi
movl %r14d, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl $0x1, %eax
movl %r14d, %ecx
shll %cl, %eax
orl %eax, 0xa0(%rbx)
incl %r14d
cmpl 0x28(%r12), %r14d
jl 0x398d8
movq %rbx, %rdi
movl $0x3, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x45f15
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3CommitTransaction
SQLITE_PRIVATE void sqlite3CommitTransaction(Parse *pParse){
  Vdbe *v;

  assert( pParse!=0 );
  assert( pParse->db!=0 );
  if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION, "COMMIT", 0, 0) ){
    return;
  }
  v = sqlite3GetVdbe(pParse);
  if( v ){
    sqlite3VdbeAddOp2(v, OP_AutoCommit, 1, 0);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x41410(%rip), %rdx     # 0x7ad44
movl $0x16, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x460eb
testl %eax, %eax
je 0x3994e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x45ece
testq %rax, %rax
je 0x39947
movq %rax, %rdi
movl $0x3, %esi
movl $0x1, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x45f15
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3RollbackTransaction
SQLITE_PRIVATE void sqlite3RollbackTransaction(Parse *pParse){
  Vdbe *v;

  assert( pParse!=0 );
  assert( pParse->db!=0 );
  if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION, "ROLLBACK", 0, 0) ){
    return;
  }
  v = sqlite3GetVdbe(pParse);
  if( v ){
    sqlite3VdbeAddOp2(v, OP_AutoCommit, 1, 1);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4395d(%rip), %rdx     # 0x7d2e5
movl $0x16, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x460eb
testl %eax, %eax
je 0x399a2
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
callq 0x45ece
testq %rax, %rax
je 0x3999b
movq %rax, %rdi
movl $0x3, %esi
movl $0x1, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x45f15
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3Savepoint
SQLITE_PRIVATE void sqlite3Savepoint(Parse *pParse, int op, Token *pName){
  char *zName = sqlite3NameFromToken(pParse->db, pName);
  if( zName ){
    Vdbe *v = sqlite3GetVdbe(pParse);
#ifndef SQLITE_OMIT_AUTHORIZATION
    static const char * const az[] = { "BEGIN", "RELEASE", "ROLLBACK" };
    assert( !SAVEPOINT_BEGIN && SAVEPOINT_RELEASE==1 && SAVEPOINT_ROLLBACK==2 );
#endif
    if( !v || sqlite3AuthCheck(pParse, SQLITE_SAVEPOINT, az[op], zName, 0) ){
      sqlite3DbFree(pParse->db, zName);
      return;
    }
    sqlite3VdbeAddOp4(v, OP_Savepoint, op, 0, 0, zName, P4_DYNAMIC);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %r15
movq (%rdi), %rdi
movq %rdx, %rsi
callq 0x46169
testq %rax, %rax
je 0x39a3e
movq %rax, %rbx
movq %r15, %rdi
callq 0x45ece
testq %rax, %rax
je 0x39a2b
movq %rax, %r12
movl %r14d, %eax
leaq 0x3eea3(%rip), %rcx     # 0x788b0
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
movq %r15, %rdi
movl $0x20, %esi
movq %rbx, %rcx
xorl %r8d, %r8d
callq 0x460eb
testl %eax, %eax
je 0x39a47
movq (%r15), %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9ca4
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rdi
movl $0x2, %esi
movl %r14d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl %eax, %esi
movq %rbx, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x11a9f
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3AddColumnType
SQLITE_PRIVATE void sqlite3AddColumnType(Parse *pParse, Token *pType){
  Table *p;
  Column *pCol;

  p = pParse->pNewTable;
  if( p==0 || NEVER(p->nCol<1) ) return;
  pCol = &p->aCol[p->nCol-1];
  assert( pCol->zType==0 );
  pCol->zType = sqlite3NameFromToken(pParse->db, pType);
  pCol->affinity = sqlite3AffinityType(pCol->zType);
}

// Assembly:
movq 0x238(%rdi), %rax
testq %rax, %rax
je 0x3a507
movswq 0x42(%rax), %rcx
testq %rcx, %rcx
jle 0x3a507
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x8(%rax), %rbx
decl %ecx
leaq (%rcx,%rcx,2), %r14
shlq $0x4, %r14
movq (%rdi), %rdi
callq 0x46169
movq %rax, 0x18(%rbx,%r14)
movq %rax, %rdi
callq 0x4b34a
movb %al, 0x29(%rbx,%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3AddDefaultValue
SQLITE_PRIVATE void sqlite3AddDefaultValue(Parse *pParse, ExprSpan *pSpan){
  Table *p;
  Column *pCol;
  sqlite3 *db = pParse->db;
  p = pParse->pNewTable;
  if( p!=0 ){
    pCol = &(p->aCol[p->nCol-1]);
    if( !sqlite3ExprIsConstantOrFunction(pSpan->pExpr) ){
      sqlite3ErrorMsg(pParse, "default value of column [%s] is not constant",
          pCol->zName);
    }else{
      /* A copy of pExpr is used instead of the original, as pExpr contains
      ** tokens that point to volatile memory. The 'span' of the expression
      ** is required by pragma table_info.
      */
      sqlite3ExprDelete(db, pCol->pDflt);
      pCol->pDflt = sqlite3ExprDup(db, pSpan->pExpr, EXPRDUP_REDUCE);
      sqlite3DbFree(db, pCol->zDflt);
      pCol->zDflt = sqlite3DbStrNDup(db, (char*)pSpan->zStart,
                                     (int)(pSpan->zEnd - pSpan->zStart));
    }
  }
  sqlite3ExprDelete(db, pSpan->pExpr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq (%rdi), %rbx
movq 0x238(%rdi), %rax
testq %rax, %rax
je 0x3a61d
movq %rdi, %r15
movswq 0x42(%rax), %rcx
leaq (%rcx,%rcx,2), %r13
shlq $0x4, %r13
addq 0x8(%rax), %r13
movq (%r14), %rsi
xorps %xmm0, %xmm0
leaq -0x58(%rbp), %r12
movups %xmm0, 0x10(%r12)
movq $0x0, 0x20(%r12)
movl $0x2, 0x20(%r12)
leaq 0x11649(%rip), %rax     # 0x4bbb5
movq %rax, (%r12)
leaq 0x11680(%rip), %rax     # 0x4bbf7
movq %rax, 0x8(%r12)
movq %r12, %rdi
callq 0x473bb
cmpl $0x0, 0x20(%r12)
je 0x3a5ff
movq -0x28(%r13), %rsi
movq %rbx, %rdi
callq 0x3479d
movq (%r14), %rsi
xorl %r15d, %r15d
movq %rbx, %rdi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x4848c
movq %rax, -0x28(%r13)
movq -0x20(%r13), %rsi
movq %rbx, %rdi
callq 0x9ca4
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x3a619
movq 0x10(%r14), %r12
movq %rax, -0x30(%rbp)
subq %rax, %r12
leal 0x1(%r12), %esi
movq %rbx, %rdi
callq 0x11721
testq %rax, %rax
je 0x3a616
movq %rax, %r15
movslq %r12d, %r12
movq %rax, %rdi
movq -0x30(%rbp), %rsi
movq %r12, %rdx
callq 0x82f0
movb $0x0, (%r15,%r12)
jmp 0x3a619
movq -0x30(%r13), %rdx
leaq 0x40da2(%rip), %rsi     # 0x7b3ac
movq %r15, %rdi
xorl %eax, %eax
callq 0x11842
jmp 0x3a61d
xorl %r15d, %r15d
movq %r15, -0x20(%r13)
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x3479d
addq $0x38, %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: sqlite3PExpr
SQLITE_PRIVATE Expr *sqlite3PExpr(
  Parse *pParse,          /* Parsing context */
  int op,                 /* Expression opcode */
  Expr *pLeft,            /* Left operand */
  Expr *pRight,           /* Right operand */
  const Token *pToken     /* Argument token */
){
  Expr *p;
  if( op==TK_AND && pLeft && pRight ){
    /* Take advantage of short-circuit false optimization for AND */
    p = sqlite3ExprAnd(pParse->db, pLeft, pRight);
  }else{
    p = sqlite3ExprAlloc(pParse->db, op, pToken, 1);
    sqlite3ExprAttachSubtrees(pParse->db, p, pLeft, pRight);
  }
  if( p ) {
    sqlite3ExprCheckHeight(pParse, p->nHeight);
  }
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %rbx
cmpl $0x45, %esi
setne %al
testq %rdx, %rdx
sete %cl
testq %r15, %r15
sete %dl
orb %cl, %dl
movq (%rdi), %rdi
orb %al, %dl
jne 0x3a676
movq %r12, %rsi
movq %r15, %rdx
callq 0x4a8e5
movq %rax, %r14
jmp 0x3a697
movq %r8, %rdx
movl $0x1, %ecx
callq 0x4aaef
movq %rax, %r14
movq (%rbx), %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x4ac41
testq %r14, %r14
je 0x3a6b9
movq (%rbx), %rax
movl 0x74(%rax), %edx
cmpl 0x28(%r14), %edx
jge 0x3a6b9
leaq 0x40818(%rip), %rsi     # 0x7aec7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11842
movq %r14, %rax
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: sqlite3AddCheckConstraint
SQLITE_PRIVATE void sqlite3AddCheckConstraint(
  Parse *pParse,    /* Parsing context */
  Expr *pCheckExpr  /* The check expression */
){
#ifndef SQLITE_OMIT_CHECK
  Table *pTab = pParse->pNewTable;
  if( pTab && !IN_DECLARE_VTAB ){
    pTab->pCheck = sqlite3ExprListAppend(pParse, pTab->pCheck, pCheckExpr);
    if( pParse->constraintName.n ){
      sqlite3ExprListSetName(pParse, pTab->pCheck, &pParse->constraintName, 1);
    }
  }else
#endif
  {
    sqlite3ExprDelete(pParse->db, pCheckExpr);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rdx
movq %rdi, %rbx
movq 0x238(%rdi), %r14
testq %r14, %r14
je 0x3b5a3
cmpb $0x0, 0x201(%rbx)
je 0x3b5b2
movq (%rbx), %rdi
movq %rdx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x3479d
movq 0x30(%r14), %rsi
movq (%rbx), %rdi
callq 0x3d962
movq %rax, 0x30(%r14)
cmpl $0x0, 0x1b8(%rbx)
je 0x3b5e6
leaq 0x1b0(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %ecx
popq %rbx
popq %r14
popq %rbp
jmp 0x3da1c
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3AddCollateType
SQLITE_PRIVATE void sqlite3AddCollateType(Parse *pParse, Token *pToken){
  Table *p;
  int i;
  char *zColl;              /* Dequoted name of collation sequence */
  sqlite3 *db;

  if( (p = pParse->pNewTable)==0 ) return;
  i = p->nCol-1;
  db = pParse->db;
  zColl = sqlite3NameFromToken(db, pToken);
  if( !zColl ) return;

  if( sqlite3LocateCollSeq(pParse, zColl) ){
    Index *pIdx;
    sqlite3DbFree(db, p->aCol[i].zColl);
    p->aCol[i].zColl = zColl;
  
    /* If the column is declared as "<name> PRIMARY KEY COLLATE <type>",
    ** then an index may have been created on this column before the
    ** collation type was added. Correct this if it is the case.
    */
    for(pIdx=p->pIndex; pIdx; pIdx=pIdx->pNext){
      assert( pIdx->nColumn==1 );
      if( pIdx->aiColumn[0]==i ){
        pIdx->azColl[0] = p->aCol[i].zColl;
      }
    }
  }else{
    sqlite3DbFree(db, zColl);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x238(%rdi), %r12
testq %r12, %r12
je 0x3bafe
movq %rdi, %r15
movswq 0x42(%r12), %r13
movq (%rdi), %rbx
movq %rbx, %rdi
callq 0x46169
testq %rax, %rax
je 0x3bafe
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x4bd86
testq %rax, %rax
je 0x3bb0d
decq %r13
movq 0x8(%r12), %rax
movq %r13, %rcx
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %r15
movq 0x20(%rax,%r15), %rsi
movq %rbx, %rdi
callq 0x9ca4
movq 0x8(%r12), %rax
movq %r14, 0x20(%rax,%r15)
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x3bafe
leaq (,%r13,2), %rcx
addq %r13, %rcx
shlq $0x4, %rcx
movq 0x8(%rax), %rdx
cmpl %r13d, (%rdx)
jne 0x3baf5
movq 0x8(%r12), %rdx
movq 0x20(%rdx,%rcx), %rdx
movq 0x40(%rax), %rsi
movq %rdx, (%rsi)
movq 0x28(%rax), %rax
testq %rax, %rax
jne 0x3badb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9ca4
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprListAppend
SQLITE_PRIVATE ExprList *sqlite3ExprListAppend(
  Parse *pParse,          /* Parsing context */
  ExprList *pList,        /* List to which to append. Might be NULL */
  Expr *pExpr             /* Expression to be appended. Might be NULL */
){
  sqlite3 *db = pParse->db;
  if( pList==0 ){
    pList = sqlite3DbMallocZero(db, sizeof(ExprList) );
    if( pList==0 ){
      goto no_mem;
    }
    pList->a = sqlite3DbMallocRaw(db, sizeof(pList->a[0]));
    if( pList->a==0 ) goto no_mem;
  }else if( (pList->nExpr & (pList->nExpr-1))==0 ){
    struct ExprList_item *a;
    assert( pList->nExpr>0 );
    a = sqlite3DbRealloc(db, pList->a, pList->nExpr*2*sizeof(pList->a[0]));
    if( a==0 ){
      goto no_mem;
    }
    pList->a = a;
  }
  assert( pList->a!=0 );
  if( 1 ){
    struct ExprList_item *pItem = &pList->a[pList->nExpr++];
    memset(pItem, 0, sizeof(*pItem));
    pItem->pExpr = pExpr;
  }
  return pList;

no_mem:     
  /* Avoid leaking memory if malloc has failed. */
  sqlite3ExprDelete(db, pExpr);
  sqlite3ExprListDelete(db, pList);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %r15
testq %rsi, %rsi
je 0x3d9a0
movq %rsi, %rbx
movl (%rsi), %edx
leal -0x1(%rdx), %ecx
movq 0x8(%rsi), %rax
testl %ecx, %edx
jne 0x3d9d1
shll $0x6, %edx
movq %r15, %rdi
movq %rax, %rsi
callq 0x174d6
testq %rax, %rax
je 0x3d9f6
movq %rax, 0x8(%rbx)
jmp 0x3d9d1
movq %r15, %rdi
movl $0x10, %esi
callq 0x11721
testq %rax, %rax
je 0x3d9f4
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq %r15, %rdi
movl $0x20, %esi
callq 0x11721
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x3d9f6
movslq (%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%rbx)
shlq $0x5, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax,%rcx)
movq $0x0, 0x18(%rax,%rcx)
movq %r14, (%rax,%rcx)
jmp 0x3da0e
xorl %ebx, %ebx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3479d
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3484e
xorl %ebx, %ebx
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: sqlite3ExprListSetName
SQLITE_PRIVATE void sqlite3ExprListSetName(
  Parse *pParse,          /* Parsing context */
  ExprList *pList,        /* List to which to add the span. */
  Token *pName,           /* Name to be added */
  int dequote             /* True to cause the name to be dequoted */
){
  assert( pList!=0 || pParse->db->mallocFailed!=0 );
  if( pList ){
    struct ExprList_item *pItem;
    assert( pList->nExpr>0 );
    pItem = &pList->a[pList->nExpr-1];
    assert( pItem->zName==0 );
    pItem->zName = sqlite3DbStrNDup(pParse->db, pName->z, pName->n);
    if( dequote && pItem->zName ) sqlite3Dequote(pItem->zName);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x3da95
movslq (%rsi), %r13
shlq $0x5, %r13
addq 0x8(%rsi), %r13
movq (%rdx), %r14
testq %r14, %r14
je 0x3da8d
movl %ecx, %ebx
movslq 0x8(%rdx), %r15
movq (%rdi), %rdi
leal 0x1(%r15), %esi
callq 0x11721
testq %rax, %rax
je 0x3da8d
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x82f0
movb $0x0, (%r12,%r15)
movq %r12, -0x18(%r13)
testl %ebx, %ebx
je 0x3da95
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x461c6
movq $0x0, -0x18(%r13)
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: sqlite3ExprListSetSpan
SQLITE_PRIVATE void sqlite3ExprListSetSpan(
  Parse *pParse,          /* Parsing context */
  ExprList *pList,        /* List to which to add the span. */
  ExprSpan *pSpan         /* The span to be added */
){
  sqlite3 *db = pParse->db;
  assert( pList!=0 || db->mallocFailed!=0 );
  if( pList ){
    struct ExprList_item *pItem = &pList->a[pList->nExpr-1];
    assert( pList->nExpr>0 );
    assert( db->mallocFailed || pItem->pExpr==pSpan->pExpr );
    sqlite3DbFree(db, pItem->zSpan);
    pItem->zSpan = sqlite3DbStrNDup(db, (char*)pSpan->zStart,
                                    (int)(pSpan->zEnd - pSpan->zStart));
  }
}

// Assembly:
testq %rsi, %rsi
je 0x3db21
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq (%rdi), %rbx
movq 0x8(%rsi), %rax
movslq (%rsi), %rcx
shlq $0x5, %rcx
leaq (%rax,%rcx), %r12
movq -0x10(%rax,%rcx), %rsi
movq %rbx, %rdi
callq 0x9ca4
movq 0x8(%r15), %r14
testq %r14, %r14
je 0x3db12
movq 0x10(%r15), %r15
subq %r14, %r15
leal 0x1(%r15), %esi
movq %rbx, %rdi
callq 0x11721
testq %rax, %rax
je 0x3db12
movq %rax, %rbx
movslq %r15d, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x82f0
movb $0x0, (%rbx,%r15)
jmp 0x3db14
xorl %ebx, %ebx
movq %rbx, -0x10(%r12)
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: sqlite3Expr
SQLITE_PRIVATE Expr *sqlite3Expr(
  sqlite3 *db,            /* Handle for sqlite3DbMallocZero() (may be null) */
  int op,                 /* Expression opcode */
  const char *zToken      /* Token argument.  Might be NULL */
){
  Token x;
  x.z = zToken;
  x.n = zToken ? sqlite3Strlen30(zToken) : 0;
  return sqlite3ExprAlloc(db, op, &x, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdx, -0x10(%rbp)
testq %rdx, %rdx
je 0x3db4a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
cmpb $0x0, (%rdx)
leaq 0x1(%rdx), %rdx
jne 0x3db38
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
jmp 0x3db4c
xorl %eax, %eax
leaq -0x10(%rbp), %rdx
movl %eax, 0x8(%rdx)
xorl %ecx, %ecx
callq 0x4aaef
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
je 0x3db8d
movq %r8, %rbx
movq %r15, %rdi
jmp 0x3dbc5
movq %r8, %rax
orq %r12, %rax
je 0x3dbbd
movq %r8, %rbx
testq %r8, %r8
leaq 0x3debd(%rip), %rax     # 0x7ba5f
leaq 0x3e11a(%rip), %rdx     # 0x7bcc3
cmovneq %rax, %rdx
leaq 0x3e0eb(%rip), %rsi     # 0x7bc9f
xorl %eax, %eax
callq 0x11842
jmp 0x3dc19
movq %r8, %rbx
movq %r15, %rdi
xorl %esi, %esi
callq 0x3dc99
movq %rax, %r14
testq %rax, %rax
je 0x3dc19
movzbl (%r14), %eax
testq %rax, %rax
je 0x3dc19
decl %eax
imulq $0x68, %rax, %rax
leaq (%r14,%rax), %r12
addq $0x8, %r12
cmpl $0x0, 0x8(%r13)
je 0x3dc00
movq %r15, %rdi
movq %r13, %rsi
callq 0x46169
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 0x3dc3e
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3479d
movq %r15, %rdi
movq %r12, %rsi
callq 0x349e3
movq %r15, %rdi
movq -0x30(%rbp), %rsi
callq 0x34827
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_O3/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 0x3dc92
movzbl (%rsi), %eax
testq %rax, %rax
je 0x3dc92
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 0x3dc7d
cmpq $0x0, (%rdx)
je 0x3dc93
movq (%rdi), %rdi
movq %rdx, %rsi
callq 0x46169
movq %rax, 0x58(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
orb $0x1, 0x39(%rbx)
jmp 0x3dc8c
// File: /workspace/github_c_makefile_star2_O3/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, %r12
movq %rdx, %r14
movq %rdi, %r15
testq %rsi, %rsi
je 0x3dcba
movzbl (%rsi), %ebx
jmp 0x3dcf7
movq %r15, %rdi
movl $0x70, %esi
callq 0x11721
xorl %ebx, %ebx
testq %rax, %rax
je 0x3dd6c
movq %rax, %rsi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movb $0x1, 0x1(%rax)
movq %r15, %rdi
movl $0x1, %edx
movl %ebx, %ecx
callq 0x560ab
movq %rax, %rbx
cmpb $0x0, 0x50(%r15)
je 0x3dd1f
movq %r15, %rdi
movq %rbx, %rsi
callq 0x3493b
xorl %ebx, %ebx
jmp 0x3dd6c
movzbl (%rbx), %eax
imulq $0x68, %rax, %rax
leaq (%rax,%rbx), %r13
addq $-0x60, %r13
testq %r12, %r12
je 0x3dd40
movq (%r12), %rax
testq %rax, %rax
cmoveq %rax, %r12
jmp 0x3dd43
xorl %r12d, %r12d
testq %r12, %r12
movq %r12, %rsi
cmoveq %r14, %rsi
cmoveq %r12, %r14
movq %r15, %rdi
callq 0x46169
movq %rax, 0x10(%r13)
movq %r15, %rdi
movq %r14, %rsi
callq 0x46169
movq %rax, 0x8(%r13)
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: 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 %rdi, %r15
testq %rsi, %rsi
je 0x40771
movq %rsi, %rbx
movq (%rsi), %rsi
jmp 0x4078e
movq %r15, %rdi
movl $0x10, %esi
callq 0x11721
testq %rax, %rax
je 0x407d2
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
xorl %esi, %esi
leaq 0x8(%rbx), %rcx
leaq -0x24(%rbp), %r12
movq %r15, %rdi
movl $0x10, %edx
movq %r12, %r8
callq 0x5bdd6
movq %rax, (%rbx)
movslq (%r12), %r12
movq %r15, %rdi
testq %r12, %r12
js 0x407ca
movq %r14, %rsi
callq 0x46169
movq (%rbx), %rcx
shlq $0x4, %r12
movq %rax, (%rcx,%r12)
jmp 0x407d4
movq %rbx, %rsi
callq 0x349e3
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_O3/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 0x40aae
movq (%rdi), %rdi
movl $0x5c, %esi
movl $0x1, %ecx
callq 0x4aaef
testq %rax, %rax
je 0x40aae
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_O3/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, %r14
movq %rdi, %r15
movq (%rdi), %r12
movq %r12, %rdi
movl $0x97, %esi
movl $0x1, %ecx
callq 0x4aaef
movq %rax, %rbx
testq %rax, %rax
je 0x40af7
movq %r14, 0x20(%rbx)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x40b0e
jmp 0x40b02
movq %r12, %rdi
movq %r14, %rsi
callq 0x3484e
movq %rbx, %rax
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: sqlite3Vacuum
SQLITE_PRIVATE void sqlite3Vacuum(Parse *pParse){
  Vdbe *v = sqlite3GetVdbe(pParse);
  if( v ){
    sqlite3VdbeAddOp2(v, OP_Vacuum, 0, 0);
    sqlite3VdbeUsesBtree(v, 0);
  }
  return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x45ece
testq %rax, %rax
je 0x40dbf
movq %rax, %rbx
movq %rax, %rdi
movl $0xb, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
orb $0x1, 0xa0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3TriggerUpdateStep
SQLITE_PRIVATE TriggerStep *sqlite3TriggerUpdateStep(
  sqlite3 *db,         /* The database connection */
  Token *pTableName,   /* Name of the table to be updated */
  ExprList *pEList,    /* The SET clause: list of column and new values */
  Expr *pWhere,        /* The WHERE clause */
  u8 orconf            /* The conflict algorithm. (OE_Abort, OE_Ignore, etc) */
){
  TriggerStep *pTriggerStep;

  pTriggerStep = triggerStepAllocate(db, TK_UPDATE, pTableName);
  if( pTriggerStep ){
    pTriggerStep->pExprList = sqlite3ExprListDup(db, pEList, EXPRDUP_REDUCE);
    pTriggerStep->pWhere = sqlite3ExprDup(db, pWhere, EXPRDUP_REDUCE);
    pTriggerStep->orconf = orconf;
  }
  sqlite3ExprListDelete(db, pEList);
  sqlite3ExprDelete(db, pWhere);
  return pTriggerStep;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r13d
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %r14
movl $0x6b, %esi
callq 0x61180
movq %rax, %r12
testq %rax, %rax
je 0x44bae
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x4887b
movq %rax, 0x30(%r12)
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x4848c
movq %rax, 0x28(%r12)
movb %r13b, 0x1(%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3484e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3479d
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: 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
movl $0x69, %esi
callq 0x61180
movq %rax, %r12
movq %r14, %rdi
testq %rax, %rax
je 0x44c42
movq %rbx, %rsi
movl $0x1, %edx
callq 0x48744
movq %rax, 0x10(%r12)
movq %r13, 0x38(%r12)
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x4887b
movq %rax, 0x30(%r12)
movl -0x2c(%rbp), %eax
movb %al, 0x1(%r12)
jmp 0x44c4a
movq %r13, %rsi
callq 0x349e3
movq %r14, %rdi
movq %r15, %rsi
callq 0x3484e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x34827
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: sqlite3TriggerDeleteStep
SQLITE_PRIVATE TriggerStep *sqlite3TriggerDeleteStep(
  sqlite3 *db,            /* Database connection */
  Token *pTableName,      /* The table from which rows are deleted */
  Expr *pWhere            /* The WHERE clause */
){
  TriggerStep *pTriggerStep;

  pTriggerStep = triggerStepAllocate(db, TK_DELETE, pTableName);
  if( pTriggerStep ){
    pTriggerStep->pWhere = sqlite3ExprDup(db, pWhere, EXPRDUP_REDUCE);
    pTriggerStep->orconf = OE_Default;
  }
  sqlite3ExprDelete(db, pWhere);
  return pTriggerStep;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %r14
movl $0x6a, %esi
callq 0x61180
movq %rax, %r15
testq %rax, %rax
je 0x44cb2
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x4848c
movq %rax, 0x28(%r15)
movb $0x63, 0x1(%r15)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3479d
movq %r15, %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: sqlite3TriggerSelectStep
SQLITE_PRIVATE TriggerStep *sqlite3TriggerSelectStep(sqlite3 *db, Select *pSelect){
  TriggerStep *pTriggerStep = sqlite3DbMallocZero(db, sizeof(TriggerStep));
  if( pTriggerStep==0 ) {
    sqlite3SelectDelete(db, pSelect);
    return 0;
  }
  pTriggerStep->op = TK_SELECT;
  pTriggerStep->pSelect = pSelect;
  pTriggerStep->orconf = OE_Default;
  return pTriggerStep;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
movl $0x50, %esi
callq 0x11721
movq %rax, %r14
testq %rax, %rax
je 0x44d15
xorps %xmm0, %xmm0
movups %xmm0, 0x12(%r14)
movups %xmm0, 0x2(%r14)
movups %xmm0, 0x40(%r14)
movups %xmm0, 0x32(%r14)
movups %xmm0, 0x22(%r14)
movw $0x6374, (%r14)         # imm = 0x6374
movq %rbx, 0x10(%r14)
jmp 0x44d20
movq %r15, %rdi
movq %rbx, %rsi
callq 0x34827
movq %r14, %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: 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 0x45f0d
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x11977
movq %rax, 0x10(%r14)
testq %rax, %rax
je 0x45f0b
movq %rax, %rbx
movq %rax, %rdi
movl $0x94, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
jmp 0x45f0d
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, %r14d
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r13
movl 0x34(%rdi), %ebx
movl %ebx, %eax
cmpl %ebx, 0x38(%rdi)
jg 0x45f58
movl %r8d, -0x2c(%rbp)
movq %r13, %rdi
callq 0x36657
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x45f91
movl 0x34(%r13), %eax
movl -0x2c(%rbp), %r8d
movslq %ebx, %rcx
incl %eax
movl %eax, 0x34(%r13)
movq 0x8(%r13), %rax
leaq (%rcx,%rcx,2), %rcx
movb %r12b, (%rax,%rcx,8)
xorl %edx, %edx
movb %dl, 0x3(%rax,%rcx,8)
movl %r15d, 0x4(%rax,%rcx,8)
movl %r14d, 0x8(%rax,%rcx,8)
movl %r8d, 0xc(%rax,%rcx,8)
movq $0x0, 0x10(%rax,%rcx,8)
movb %dl, 0x1(%rax,%rcx,8)
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: 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 0x45ece
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 0x46018
movl 0x3c(%rbx), %ecx
movq %r12, %rdi
movl %r15d, %esi
movl -0x2c(%rbp), %edx
movl %r14d, %r8d
callq 0x45f15
movswq 0x42(%rbx), %rdx
movq %r12, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xfffffff2, %ecx       # imm = 0xFFFFFFF2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11a9f
// File: /workspace/github_c_makefile_star2_O3/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
movslq 0x1c0(%r13), %rax
movq 0x1c8(%r13), %rsi
testq %rax, %rax
jle 0x46076
leaq (,%rax,8), %rcx
leaq (%rcx,%rcx,2), %rdx
xorl %ecx, %ecx
cmpl %r12d, (%rsi,%rcx)
jne 0x4606d
cmpl %r15d, 0x4(%rsi,%rcx)
je 0x460d3
addq $0x18, %rcx
cmpq %rcx, %rdx
jne 0x46060
leal (%rax,%rax,2), %eax
leal 0x18(,%rax,8), %edx
movq (%r13), %rdi
callq 0x33c1f
movq %rax, 0x1c8(%r13)
testq %rax, %rax
je 0x460be
movslq 0x1c0(%r13), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x1c0(%r13)
leaq (%rcx,%rcx,2), %rcx
movl %r12d, (%rax,%rcx,8)
movl %r15d, 0x4(%rax,%rcx,8)
movb %bl, 0x8(%rax,%rcx,8)
movq %r14, 0x10(%rax,%rcx,8)
jmp 0x460dc
movl $0x0, 0x1c0(%r13)
movq (%r13), %rax
movb $0x1, 0x50(%rax)
jmp 0x460dc
orb 0x8(%rsi,%rcx), %bl
setne 0x8(%rsi,%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: 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 %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
xorl %eax, %eax
cmpb $0x0, 0x99(%rdi)
jne 0x46164
cmpb $0x0, 0x201(%rbx)
jne 0x46164
movq 0x180(%rdi), %r10
testq %r10, %r10
je 0x46164
movq 0x188(%rdi), %rdi
movq 0x248(%rbx), %r9
callq *%r10
cmpl $0x1, %eax
jne 0x4613d
movl $0x17, %r14d
leaq 0x34be3(%rip), %rsi     # 0x7ad1e
jmp 0x46151
testl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
je 0x46164
movl $0x1, %r14d
leaq 0x34bdc(%rip), %rsi     # 0x7ad2d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x11842
movl %r14d, 0x18(%rbx)
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x461b6
movq (%rsi), %r14
testq %r14, %r14
je 0x461aa
movslq 0x8(%rsi), %r15
leal 0x1(%r15), %esi
callq 0x11721
testq %rax, %rax
je 0x461aa
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x82f0
movb $0x0, (%rbx,%r15)
jmp 0x461ac
xorl %ebx, %ebx
movq %rbx, %rdi
callq 0x461c6
jmp 0x461b8
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq