LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3FkOldmask
SQLITE_PRIVATE u32 sqlite3FkOldmask(
  Parse *pParse,                  /* Parse context */
  Table *pTab                     /* Table being modified */
){
  u32 mask = 0;
  if( pParse->db->flags&SQLITE_ForeignKeys ){
    FKey *p;
    int i;
    for(p=pTab->pFKey; p; p=p->pNextFrom){
      for(i=0; i<p->nCol; i++) mask |= COLUMN_MASK(p->aCol[i].iFrom);
    }
    for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
      Index *pIdx = 0;
      sqlite3FkLocateIndex(pParse, pTab, p, &pIdx, 0);
      if( pIdx ){
        for(i=0; i<pIdx->nColumn; i++) mask |= COLUMN_MASK(pIdx->aiColumn[i]);
      }
    }
  }
  return mask;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
xorl %r15d, %r15d
testb $0x8, 0x2e(%rax)
je 0x5cc1b
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rsi), %rax
xorl %r15d, %r15d
testq %rax, %rax
je 0x5cbaa
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movslq 0x28(%rax), %rsi
testq %rsi, %rsi
jle 0x5cba1
shlq $0x4, %rsi
xorl %edi, %edi
movl 0x40(%rax,%rdi), %ecx
movl $0x1, %r8d
shll %cl, %r8d
cmpl $0x20, %ecx
cmovgel %edx, %r8d
orl %r8d, %r15d
addq $0x10, %rdi
cmpq %rdi, %rsi
jne 0x5cb81
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x5cb72
movq %rbx, %rdi
callq 0x4fce9
testq %rax, %rax
je 0x5cc1b
movq %rax, %r12
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movq $0x0, -0x30(%rbp)
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
leaq -0x30(%rbp), %rcx
xorl %r8d, %r8d
callq 0x5df16
movq -0x30(%rbp), %rcx
testq %rcx, %rcx
je 0x5cc11
movzwl 0x54(%rcx), %eax
testq %rax, %rax
je 0x5cc11
movq 0x8(%rcx), %rdx
xorl %esi, %esi
movl (%rdx,%rsi,4), %ecx
movl $0x1, %edi
shll %cl, %edi
cmpl $0x20, %ecx
cmovgel %r13d, %edi
orl %edi, %r15d
incq %rsi
cmpq %rsi, %rax
jne 0x5cbf5
movq 0x18(%r12), %r12
testq %r12, %r12
jne 0x5cbc0
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3CodeRowTrigger
SQLITE_PRIVATE void sqlite3CodeRowTrigger(
  Parse *pParse,       /* Parse context */
  Trigger *pTrigger,   /* List of triggers on table pTab */
  int op,              /* One of TK_UPDATE, TK_INSERT, TK_DELETE */
  ExprList *pChanges,  /* Changes list for any UPDATE OF triggers */
  int tr_tm,           /* One of TRIGGER_BEFORE, TRIGGER_AFTER */
  Table *pTab,         /* The table to code triggers from */
  int reg,             /* The first in an array of registers (see above) */
  int orconf,          /* ON CONFLICT policy */
  int ignoreJump       /* Instruction to jump to for RAISE(IGNORE) */
){
  Trigger *p;          /* Used to iterate through pTrigger list */

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

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, -0x30(%rbp)
testq %rsi, %rsi
je 0x5cc9a
movl %r8d, %r14d
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %r13
movq %rdi, %rbx
movzbl 0x10(%r13), %eax
cmpl %r12d, %eax
jne 0x5cc91
movzbl 0x11(%r13), %eax
cmpl %r14d, %eax
jne 0x5cc91
movq 0x20(%r13), %rdi
movq %r15, %rsi
callq 0x5ca34
testl %eax, %eax
je 0x5cc91
movq %rbx, %rdi
movq %r13, %rsi
movq -0x30(%rbp), %rdx
movl 0x10(%rbp), %ecx
movl 0x18(%rbp), %r8d
movl 0x20(%rbp), %r9d
callq 0x5e220
movq 0x40(%r13), %r13
testq %r13, %r13
jne 0x5cc53
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3GenerateRowIndexDelete
SQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(
  Parse *pParse,     /* Parsing and code generating context */
  Table *pTab,       /* Table containing the row to be deleted */
  int iCur,          /* Cursor number for the table */
  int *aRegIdx       /* Only delete if aRegIdx!=0 && aRegIdx[i]>0 */
){
  int i;
  Index *pIdx;
  int r1;
  int iPartIdxLabel;
  Vdbe *v = pParse->pVdbe;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
movq 0x10(%rsi), %r12
testq %r12, %r12
je 0x5d1fc
movq %rcx, %r15
movq -0x38(%rbp), %rax
movq 0x10(%rax), %r13
movq -0x40(%rbp), %rax
leal 0x1(%rax), %r14d
movq %rcx, %rbx
testq %r15, %r15
je 0x5d19c
cmpl $0x0, (%rbx)
je 0x5d1eb
movq -0x38(%rbp), %rdi
movq %r12, %rsi
movq -0x40(%rbp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
leaq -0x2c(%rbp), %r9
callq 0x4c263
movzwl 0x54(%r12), %r8d
incl %r8d
movq %r13, %rdi
movl $0x68, %esi
movl %r14d, %edx
movl %eax, %ecx
callq 0x45b9e
movl -0x2c(%rbp), %eax
testl %eax, %eax
jns 0x5d1eb
movq 0x40(%r13), %rcx
testq %rcx, %rcx
je 0x5d1eb
notl %eax
movl 0x34(%r13), %edx
movl %eax, %eax
movl %edx, (%rcx,%rax,4)
movq 0x28(%r12), %r12
incl %r14d
addq $0x4, %rbx
testq %r12, %r12
jne 0x5d192
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: targetSrcList
static SrcList *targetSrcList(
  Parse *pParse,       /* The parsing context */
  TriggerStep *pStep   /* The trigger containing the target token */
){
  int iDb;             /* Index of the database to use */
  SrcList *pSrc;       /* SrcList to be returned */

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movq (%rdi), %rdi
leaq 0x18(%rsi), %rdx
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x3d75b
movq %rax, %rbx
testq %rax, %rax
je 0x5df08
movq (%r15), %rdi
movq 0x8(%r14), %rax
movq 0x28(%rax), %rcx
testq %rcx, %rcx
je 0x5ded1
movl 0x28(%rdi), %edx
testl %edx, %edx
jle 0x5ded8
movq 0x20(%rdi), %rsi
addq $0x18, %rsi
xorl %eax, %eax
cmpq %rcx, (%rsi)
je 0x5deda
incq %rax
addq $0x20, %rsi
cmpq %rax, %rdx
jne 0x5debc
movl %edx, %eax
jmp 0x5deda
movl $0xfff0bdc0, %eax       # imm = 0xFFF0BDC0
jmp 0x5deda
xorl %eax, %eax
testl %eax, %eax
setne %cl
cmpl $0x2, %eax
setl %dl
testb %dl, %cl
jne 0x5df08
movq 0x20(%rdi), %rcx
movl %eax, %eax
shlq $0x5, %rax
movq (%rcx,%rax), %rsi
callq 0x1010d
movzbl (%rbx), %ecx
imulq $0x68, %rcx, %rcx
movq %rax, -0x58(%rbx,%rcx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3CodeRowTriggerDirect
SQLITE_PRIVATE void sqlite3CodeRowTriggerDirect(
  Parse *pParse,       /* Parse context */
  Trigger *p,          /* Trigger to code */
  Table *pTab,         /* The table to code triggers from */
  int reg,             /* Reg array containing OLD.* and NEW.* values */
  int orconf,          /* ON CONFLICT policy */
  int ignoreJump       /* Instruction to jump to for RAISE(IGNORE) */
){
  Vdbe *v = sqlite3GetVdbe(pParse); /* Main VM */
  TriggerPrg *pPrg;
  pPrg = getRowTrigger(pParse, p, pTab, orconf);
  assert( pPrg || pParse->nErr || pParse->db->mallocFailed );

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, -0x30(%rbp)
movl %r8d, %r13d
movl %ecx, -0x2c(%rbp)
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
callq 0x45b57
movq %rax, %rbx
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x5d94f
testq %rax, %rax
je 0x5e2c5
movq %rax, %r13
cmpq $0x0, (%r14)
je 0x5e276
movq (%r12), %rax
testb $0x4, 0x2e(%rax)
sete %r14b
jmp 0x5e279
xorl %r14d, %r14d
movl 0x58(%r12), %r8d
incl %r8d
movl %r8d, 0x58(%r12)
movq %rbx, %rdi
movl $0x79, %esi
movl -0x2c(%rbp), %edx
movl -0x30(%rbp), %ecx
callq 0x45b9e
movq 0x10(%r13), %rdx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0xffffffee, %ecx       # imm = 0xFFFFFFEE
callq 0x11975
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x5e2c5
movslq 0x34(%rbx), %rcx
leaq (%rcx,%rcx,2), %rcx
movb %r14b, -0x15(%rax,%rcx,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3TableAffinityStr
SQLITE_PRIVATE void sqlite3TableAffinityStr(Vdbe *v, Table *pTab){
  /* The first time a column affinity string for a particular table
  ** is required, it is allocated and populated here. It is then 
  ** stored as a member of the Table structure for subsequent use.
  **
  ** The column affinity string will eventually be deleted by
  ** sqlite3DeleteTable() when the Table structure itself is cleaned up.
  */
  if( !pTab->zColAff ){
    char *zColAff;
    int i;
    sqlite3 *db = sqlite3VdbeDb(v);

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

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

    pTab->zColAff = zColAff;
  }

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x28(%rsi)
jne 0x5efca
movq (%rbx), %r15
movswl 0x42(%r14), %edi
incl %edi
callq 0xa2a2
testq %rax, %rax
je 0x5efc0
movzwl 0x42(%r14), %esi
testw %si, %si
jle 0x5efb2
movl $0x29, %ecx
xorl %edx, %edx
movq 0x8(%r14), %rsi
movb (%rsi,%rcx), %sil
movb %sil, (%rax,%rdx)
incq %rdx
movswq 0x42(%r14), %rsi
addq $0x30, %rcx
cmpq %rsi, %rdx
jl 0x5ef95
movswq %si, %rcx
movb $0x0, (%rax,%rcx)
movq %rax, 0x28(%r14)
jmp 0x5efc5
movb $0x1, 0x50(%r15)
testq %rax, %rax
je 0x5efe7
movq 0x28(%r14), %rdx
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11975
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: autoIncBegin
static int autoIncBegin(
  Parse *pParse,      /* Parsing context */
  int iDb,            /* Index of the database holding pTab */
  Table *pTab         /* The table we are writing to */
){
  int memId = 0;      /* Register holding maximum rowid */
  if( pTab->tabFlags & TF_Autoincrement ){
    Parse *pToplevel = sqlite3ParseToplevel(pParse);
    AutoincInfo *pInfo;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %r15d, %r15d
testb $0x8, 0x46(%rdx)
je 0x60500
movq %rdx, %r14
movl %esi, %ebx
movq 0x1d8(%rdi), %r12
testq %r12, %r12
cmoveq %rdi, %r12
leaq 0x1d0(%r12), %rax
movq (%rax), %rax
testq %rax, %rax
je 0x604b8
cmpq %r14, 0x8(%rax)
jne 0x604a8
jmp 0x604fc
movq (%rdi), %rdi
movl $0x18, %esi
callq 0x115e9
testq %rax, %rax
je 0x60500
movq 0x1d0(%r12), %rcx
movq %rcx, (%rax)
movq %rax, 0x1d0(%r12)
movq %r14, 0x8(%rax)
movl %ebx, 0x10(%rax)
movl 0x58(%r12), %ecx
leal 0x2(%rcx), %edx
movl %edx, 0x58(%r12)
movl %edx, 0x14(%rax)
addl $0x3, %ecx
movl %ecx, 0x58(%r12)
movl 0x14(%rax), %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3CodeCoroutine
SQLITE_PRIVATE int sqlite3CodeCoroutine(Parse *pParse, Select *pSelect, SelectDest *pDest){
  int regYield;       /* Register holding co-routine entry-point */
  int regEof;         /* Register holding co-routine completion flag */
  int addrTop;        /* Top of the co-routine */
  int j1;             /* Jump instruction */
  int rc;             /* Result code */
  Vdbe *v;            /* VDBE under construction */

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

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
movq 0x10(%rdi), %r15
callq 0x4e4ba
cmpb $-0x7c, (%r14)
je 0x60769
movl 0x58(%r12), %r13d
incl %r13d
movl %r13d, 0x58(%r12)
movq %r15, %rdi
movl $0x1c, %esi
movl %ebx, %edx
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movl %r13d, 0x2c(%r14)
movb (%r14), %al
movb %al, 0x37(%r14)
movb $-0x7c, (%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: xferCompatibleCollation
static int xferCompatibleCollation(const char *z1, const char *z2){
  if( z1==0 ){
    return z2==0;
  }
  if( z2==0 ){
    return 0;
  }
  return sqlite3StrICmp(z1, z2)==0;
}

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

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

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x60a4a
movb (%rdi), %cl
testb %cl, %cl
je 0x609e0
leaq 0x1(%rdi), %rsi
leaq 0x1b652(%rip), %rax     # 0x7c009
leaq 0x156a2(%rip), %r8      # 0x76060
movl %ecx, %edx
movzbl %dl, %r9d
movb (%r9,%r8), %r9b
movzbl (%rax), %r10d
cmpb (%r10,%r8), %r9b
jne 0x609e9
incq %rax
movb (%rsi), %dl
incq %rsi
testb %dl, %dl
jne 0x609c0
jmp 0x609e9
leaq 0x1b622(%rip), %rax     # 0x7c009
movl %ecx, %edx
movzbl %dl, %esi
leaq 0x1566d(%rip), %rdx     # 0x76060
movb (%rsi,%rdx), %sil
movzbl (%rax), %r8d
movl $0x1, %eax
cmpb (%r8,%rdx), %sil
je 0x60a4f
testb %cl, %cl
je 0x60a33
incq %rdi
leaq 0x1b5ee(%rip), %rax     # 0x7c002
movzbl %cl, %esi
movb (%rsi,%rdx), %sil
movzbl (%rax), %r8d
cmpb (%r8,%rdx), %sil
jne 0x60a3a
incq %rax
movb (%rdi), %cl
incq %rdi
testb %cl, %cl
jne 0x60a14
jmp 0x60a3a
leaq 0x1b5c8(%rip), %rax     # 0x7c002
movzbl %cl, %ecx
movb (%rcx,%rdx), %cl
movzbl (%rax), %esi
xorl %eax, %eax
cmpb (%rsi,%rdx), %cl
je 0x60a4f
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: getAutoVacuum
static int getAutoVacuum(const char *z){
  int i;
  if( 0==sqlite3StrICmp(z, "none") ) return BTREE_AUTOVACUUM_NONE;
  if( 0==sqlite3StrICmp(z, "full") ) return BTREE_AUTOVACUUM_FULL;
  if( 0==sqlite3StrICmp(z, "incremental") ) return BTREE_AUTOVACUUM_INCR;
  i = sqlite3Atoi(z);
  return (u8)((i>=0&&i<=2)?i:0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movb (%rdi), %cl
testb %cl, %cl
je 0x60a96
leaq 0x1(%rdi), %rsi
leaq 0x189c5(%rip), %rax     # 0x79432
leaq 0x155ec(%rip), %r8      # 0x76060
movl %ecx, %edx
movzbl %dl, %r9d
movb (%r9,%r8), %r9b
movzbl (%rax), %r10d
cmpb (%r10,%r8), %r9b
jne 0x60a9f
incq %rax
movb (%rsi), %dl
incq %rsi
testb %dl, %dl
jne 0x60a76
jmp 0x60a9f
leaq 0x18995(%rip), %rax     # 0x79432
movl %ecx, %edx
movzbl %dl, %esi
leaq 0x155b7(%rip), %rdx     # 0x76060
movb (%rsi,%rdx), %sil
movzbl (%rax), %r8d
xorl %eax, %eax
cmpb (%r8,%rdx), %sil
je 0x60b77
testb %cl, %cl
je 0x60af0
leaq 0x1(%rdi), %r8
leaq 0x1c6de(%rip), %rax     # 0x7d1aa
movl %ecx, %esi
movzbl %sil, %r9d
movb (%r9,%rdx), %r9b
movzbl (%rax), %r10d
cmpb (%r10,%rdx), %r9b
jne 0x60af9
incq %rax
movb (%r8), %sil
incq %r8
testb %sil, %sil
jne 0x60ace
jmp 0x60af9
leaq 0x1c6b3(%rip), %rax     # 0x7d1aa
movl %ecx, %esi
movzbl %sil, %esi
movb (%rsi,%rdx), %sil
movzbl (%rax), %r8d
movl $0x1, %eax
cmpb (%r8,%rdx), %sil
je 0x60b77
testb %cl, %cl
je 0x60b3f
leaq 0x1(%rdi), %rsi
leaq 0x1b7ef(%rip), %rax     # 0x7c30e
movzbl %cl, %r8d
movb (%r8,%rdx), %r8b
movzbl (%rax), %r9d
cmpb (%r9,%rdx), %r8b
jne 0x60b46
incq %rax
movb (%rsi), %cl
incq %rsi
testb %cl, %cl
jne 0x60b1f
jmp 0x60b46
leaq 0x1b7c8(%rip), %rax     # 0x7c30e
movzbl %cl, %ecx
movb (%rcx,%rdx), %cl
movzbl (%rax), %esi
movl $0x2, %eax
cmpb (%rsi,%rdx), %cl
je 0x60b77
xorl %r14d, %r14d
leaq -0x14(%rbp), %rbx
movl %r14d, (%rbx)
movq %rbx, %rsi
callq 0x33854
movl (%rbx), %eax
cmpl $0x3, %eax
movzbl %al, %eax
cmovael %r14d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: changeTempStorage
static int changeTempStorage(Parse *pParse, const char *zStorageType){
  int ts = getTempStore(zStorageType);
  sqlite3 *db = pParse->db;
  if( db->temp_store==ts ) return SQLITE_OK;
  if( invalidateTempStorage( pParse ) != SQLITE_OK ){
    return SQLITE_ERROR;
  }
  db->temp_store = (u8)ts;
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movb (%rsi), %al
leal -0x30(%rax), %ecx
cmpb $0x2, %cl
ja 0x60b99
movzbl %cl, %ebx
jmp 0x60c40
testb %al, %al
je 0x60bd2
leaq 0x1(%rsi), %r8
leaq 0x1c61f(%rip), %rdx     # 0x7d1c7
leaq 0x154b1(%rip), %r9      # 0x76060
movl %eax, %ecx
movzbl %cl, %r10d
movb (%r10,%r9), %r10b
movzbl (%rdx), %r11d
cmpb (%r11,%r9), %r10b
jne 0x60bdb
incq %rdx
movb (%r8), %cl
incq %r8
testb %cl, %cl
jne 0x60bb1
jmp 0x60bdb
leaq 0x1c5ee(%rip), %rdx     # 0x7d1c7
movl %eax, %ecx
movzbl %cl, %r8d
leaq 0x1547a(%rip), %rcx     # 0x76060
movb (%r8,%rcx), %r8b
movzbl (%rdx), %edx
movl $0x1, %ebx
cmpb (%rdx,%rcx), %r8b
je 0x60c40
testb %al, %al
je 0x60c26
incq %rsi
leaq 0x1c419(%rip), %rdx     # 0x7d01f
movzbl %al, %r8d
movb (%r8,%rcx), %r8b
movzbl (%rdx), %r9d
cmpb (%r9,%rcx), %r8b
jne 0x60c2d
incq %rdx
movb (%rsi), %al
incq %rsi
testb %al, %al
jne 0x60c06
jmp 0x60c2d
leaq 0x1c3f2(%rip), %rdx     # 0x7d01f
movzbl %al, %eax
movb (%rax,%rcx), %al
movzbl (%rdx), %edx
xorl %ebx, %ebx
cmpb (%rdx,%rcx), %al
sete %bl
addl %ebx, %ebx
movq (%rdi), %r14
movzbl 0x4f(%r14), %eax
cmpl %eax, %ebx
je 0x60c59
callq 0x60c5e
testl %eax, %eax
jne 0x60c59
movb %bl, 0x4f(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: invalidateTempStorage
static int invalidateTempStorage(Parse *pParse){
  sqlite3 *db = pParse->db;
  if( db->aDb[1].pBt!=0 ){
    if( !db->autoCommit || sqlite3BtreeIsInReadTrans(db->aDb[1].pBt) ){
      sqlite3ErrorMsg(pParse, "temporary storage cannot be changed "
        "from within a transaction");
      return SQLITE_ERROR;
    }
    sqlite3BtreeClose(db->aDb[1].pBt);
    db->aDb[1].pBt = 0;
    sqlite3ResetAllSchemasOfConnection(db);
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq (%rdi), %r14
movq 0x20(%r14), %rax
movq 0x28(%rax), %rax
xorl %ebx, %ebx
testq %rax, %rax
je 0x60cb5
cmpb $0x0, 0x4e(%r14)
je 0x60c84
cmpb $0x0, 0x10(%rax)
je 0x60c99
leaq 0x1b68f(%rip), %rsi     # 0x7c31a
xorl %eax, %eax
callq 0x11724
movl $0x1, %ebx
jmp 0x60cb5
movq %rax, %rdi
callq 0x243ae
movq 0x20(%r14), %rax
movq $0x0, 0x28(%rax)
movq %r14, %rdi
callq 0xdda5
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: getSafetyLevel
static u8 getSafetyLevel(const char *z, int omitFull, int dflt){
                             /* 123456789 123456789 */
  static const char zText[] = "onoffalseyestruefull";
  static const u8 iOffset[] = {0, 1, 2, 4, 9, 12, 16};
  static const u8 iLength[] = {2, 2, 3, 5, 3, 4, 4};
  static const u8 iValue[] =  {1, 0, 0, 0, 1, 1, 2};
  int i, n;
  if( sqlite3Isdigit(*z) ){
    return (u8)sqlite3Atoi(z);
  }
  n = sqlite3Strlen30(z);
  for(i=0; i<ArraySize(iLength)-omitFull; i++){
    if( iLength[i]==n && sqlite3StrNICmp(&zText[iOffset[i]],z,n)==0 ){
      return iValue[i];
    }
  }
  return dflt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movzbl (%rdi), %eax
addq $-0x3a, %rax
cmpq $-0xb, %rax
ja 0x60d4b
movl %edx, -0x2c(%rbp)
xorl %r15d, %r15d
cmpb $0x0, (%r14,%r15)
leaq 0x1(%r15), %r15
jne 0x60ce0
cmpl $0x7, %esi
je 0x60d46
decl %r15d
andl $0x3fffffff, %r15d      # imm = 0x3FFFFFFF
movl $0x7, %r12d
subl %esi, %r12d
xorl %r13d, %r13d
leaq 0x17caf(%rip), %rbx     # 0x789bc
movzbl (%r13,%rbx), %eax
cmpl %eax, %r15d
jne 0x60d3e
leaq 0x17c96(%rip), %rax     # 0x789b5
movzbl (%r13,%rax), %edi
leaq 0x17c74(%rip), %rax     # 0x789a0
addq %rax, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x9454
testl %eax, %eax
je 0x60d71
incq %r13
cmpq %r13, %r12
jne 0x60d0d
movl -0x2c(%rbp), %eax
jmp 0x60d62
leaq -0x30(%rbp), %rbx
movl $0x0, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x33854
movb (%rbx), %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17c4b(%rip), %rax     # 0x789c3
movb (%r13,%rax), %al
jmp 0x60d62
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: setAllPagerFlags
static void setAllPagerFlags(sqlite3 *db){
  if( db->autoCommit ){
    Db *pDb = db->aDb;
    int n = db->nDb;
    assert( SQLITE_FullFSync==PAGER_FULLFSYNC );
    assert( SQLITE_CkptFullFSync==PAGER_CKPT_FULLFSYNC );
    assert( SQLITE_CacheSpill==PAGER_CACHESPILL );
    assert( (PAGER_FULLFSYNC | PAGER_CKPT_FULLFSYNC | PAGER_CACHESPILL)
             ==  PAGER_FLAGS_MASK );
    assert( (pDb->safety_level & PAGER_SYNCHRONOUS_MASK)==pDb->safety_level );
    while( (n--) > 0 ){
      if( pDb->pBt ){
        sqlite3BtreeSetPagerFlags(pDb->pBt,
                 pDb->safety_level | (db->flags & PAGER_FLAGS_MASK) );
      }
      pDb++;
    }
  }
}

// Assembly:
cmpb $0x0, 0x4e(%rdi)
je 0x60dd7
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x28(%rdi), %r14d
testl %r14d, %r14d
jle 0x60dcd
movq 0x20(%rbx), %r15
incl %r14d
addq $0x10, %r15
movq -0x8(%r15), %rdi
testq %rdi, %rdi
je 0x60dc0
movzbl (%r15), %eax
movl 0x2c(%rbx), %esi
andl $0x1c, %esi
orl %eax, %esi
callq 0x60ff5
decl %r14d
addq $0x20, %r15
cmpl $0x1, %r14d
jg 0x60da6
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3RegisterLikeFunctions
SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive){
  struct compareInfo *pInfo;
  if( caseSensitive ){
    pInfo = (struct compareInfo*)&likeInfoAlt;
  }else{
    pInfo = (struct compareInfo*)&likeInfoNorm;
  }
  sqlite3CreateFunc(db, "like", 2, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0);
  sqlite3CreateFunc(db, "like", 3, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0);
  sqlite3CreateFunc(db, "glob", 2, SQLITE_UTF8, 
      (struct compareInfo*)&globInfo, likeFunc, 0, 0, 0);
  setLikeOptFlag(db, "glob", SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE);
  setLikeOptFlag(db, "like", 
      caseSensitive ? (SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE) : SQLITE_FUNC_LIKE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %r13d, %r13d
testl %esi, %esi
setne %r13b
leaq 0x17aa6(%rip), %rax     # 0x789ce
leaq 0x17a9b(%rip), %r12     # 0x789ca
cmoveq %rax, %r12
xorl %eax, %eax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x1b245(%rip), %r15     # 0x7c18d
leaq 0x13d(%rip), %r14       # 0x6108c
movq %r15, %rsi
movl $0x2, %edx
movl $0x1, %ecx
movq %r12, %r8
movq %r14, %r9
callq 0x150db
xorl %eax, %eax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x3, %edx
movl $0x1, %ecx
movq %r12, %r8
movq %r14, %r9
callq 0x150db
xorl %eax, %eax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x1b4f6(%rip), %r12     # 0x7c49b
leaq 0x151e4(%rip), %r8      # 0x76190
movq %rbx, %rdi
movq %r12, %rsi
movl $0x2, %edx
movl $0x1, %ecx
movq %r14, %r9
callq 0x150db
movq %rbx, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq 0x61228
leal 0x1(,%r13,2), %edx
movq %rbx, %rdi
movq %r15, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x61228
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeSetPagerFlags
SQLITE_PRIVATE int sqlite3BtreeSetPagerFlags(
  Btree *p,              /* The btree to set the safety level on */
  unsigned pgFlags       /* Various PAGER_* flags */
){
  BtShared *pBt = p->pBt;
  assert( sqlite3_mutex_held(p->db->mutex) );
  sqlite3BtreeEnter(p);
  sqlite3PagerSetFlags(pBt->pPager, pgFlags);
  sqlite3BtreeLeave(p);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
movq %rax, 0x8(%rcx)
movq (%rcx), %rax
movl %esi, %ecx
andl $0x3, %ecx
movb $0x1, %dl
cmpl $0x1, %ecx
je 0x6101a
cmpb $0x0, 0x10(%rax)
setne %dl
movb %dl, 0xb(%rax)
cmpl $0x3, %ecx
jne 0x6102b
cmpb $0x0, 0x10(%rax)
sete %cl
jmp 0x6102d
xorl %ecx, %ecx
movb %cl, 0xc(%rax)
testb %dl, %dl
je 0x6103e
xorl %edx, %edx
movb %dl, 0xf(%rax)
movb %dl, 0xd(%rax)
jmp 0x61062
testb $0x4, %sil
jne 0x61054
movb $0x2, 0xf(%rax)
testb $0x8, %sil
jne 0x6105e
movb $0x2, 0xd(%rax)
jmp 0x61062
movb $0x3, %dl
movb %dl, 0xf(%rax)
movb %dl, 0xd(%rax)
jmp 0x61062
movb $0x3, 0xd(%rax)
movzbl 0xf(%rax), %edx
movl %edx, %edi
orb $0x20, %dil
testb %cl, %cl
movzbl %dil, %ecx
cmovel %edx, %ecx
movb %cl, 0xe(%rax)
testb $0x10, %sil
sete %cl
movb 0x17(%rax), %dl
andb $-0x2, %dl
orb %cl, %dl
movb %dl, 0x17(%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: setLikeOptFlag
static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){
  FuncDef *pDef;
  pDef = sqlite3FindFunction(db, zName, sqlite3Strlen30(zName),
                             2, SQLITE_UTF8, 0);
  if( ALWAYS(pDef) ){
    pDef->flags = flagVal;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edx, %ebx
testq %rsi, %rsi
je 0x61250
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rsi, %rax
incl %edx
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x6123d
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
jmp 0x61252
xorl %edx, %edx
movl $0x2, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x154a0
testq %rax, %rax
je 0x6126d
movb %bl, 0x3(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: triggerStepAllocate
static TriggerStep *triggerStepAllocate(
  sqlite3 *db,                /* Database connection */
  u8 op,                      /* Trigger opcode */
  Token *pName                /* The target name */
){
  TriggerStep *pTriggerStep;

  pTriggerStep = sqlite3DbMallocZero(db, sizeof(TriggerStep) + pName->n);
  if( pTriggerStep ){
    char *z = (char*)&pTriggerStep[1];
    memcpy(z, pName->z, pName->n);
    pTriggerStep->target.z = z;
    pTriggerStep->target.n = pName->n;
    pTriggerStep->op = op;
  }
  return pTriggerStep;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebx
movl 0x8(%rdx), %r12d
addl $0x50, %r12d
movl %r12d, %esi
callq 0x115e9
movq %rax, %r15
testq %rax, %rax
je 0x612ce
movslq %r12d, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x8200
movq %r15, %r12
addq $0x50, %r12
movq (%r14), %rsi
movl 0x8(%r14), %edx
movq %r12, %rdi
callq 0x82f0
movq %r12, 0x18(%r15)
movl 0x8(%r14), %eax
movl %eax, 0x20(%r15)
movb %bl, (%r15)
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3SchemaGet
SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *db, Btree *pBt){
  Schema * p;
  if( pBt ){
    p = (Schema *)sqlite3BtreeSchema(pBt, sizeof(Schema), sqlite3SchemaClear);
  }else{
    p = (Schema *)sqlite3DbMallocZero(0, sizeof(Schema));
  }
  if( !p ){
    db->mallocFailed = 1;
  }else if ( 0==p->file_format ){
    sqlite3HashInit(&p->tblHash);
    sqlite3HashInit(&p->idxHash);
    sqlite3HashInit(&p->trigHash);
    sqlite3HashInit(&p->fkeyHash);
    p->enc = SQLITE_UTF8;
  }
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x62045
movq (%rsi), %rax
movq 0x8(%rsi), %r14
movq %rax, 0x8(%r14)
cmpq $0x0, 0x40(%r14)
jne 0x6203f
movl $0x78, %edi
callq 0xa2a2
testq %rax, %rax
je 0x62030
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x70(%rax)
movq %rax, 0x40(%r14)
leaq -0x31d07(%rip), %rax    # 0x30334
movq %rax, 0x48(%r14)
movq 0x40(%r14), %rax
jmp 0x6207a
movl $0x78, %edi
callq 0xa2a2
testq %rax, %rax
je 0x6207a
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x70(%rax)
testq %rax, %rax
je 0x620a6
cmpb $0x0, 0x70(%rax)
jne 0x620aa
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rax)
movups %xmm0, 0x48(%rax)
movups %xmm0, 0x38(%rax)
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
movb $0x1, 0x71(%rax)
jmp 0x620aa
movb $0x1, 0x50(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: resolveAttachExpr
static int resolveAttachExpr(NameContext *pName, Expr *pExpr)
{
  int rc = SQLITE_OK;
  if( pExpr ){
    if( pExpr->op!=TK_ID ){
      rc = sqlite3ResolveExprNames(pName, pExpr);
      if( rc==SQLITE_OK && !sqlite3ExprIsConstant(pExpr) ){
        sqlite3ErrorMsg(pName->pParse, "invalid name: \"%s\"", pExpr->u.zToken);
        return SQLITE_ERROR;
      }
    }else{
      pExpr->op = TK_STRING;
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
xorl %ebx, %ebx
testq %rsi, %rsi
je 0x62137
movq %rsi, %r14
cmpb $0x1a, (%rsi)
jne 0x620d3
movb $0x5e, (%r14)
jmp 0x62137
movq %rdi, %r15
movq %r14, %rsi
callq 0x467fe
testl %eax, %eax
je 0x620e9
movl $0x1, %ebx
jmp 0x62137
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %r12
movaps %xmm0, (%r12)
movaps %xmm0, 0x10(%r12)
movq $0x0, 0x20(%r12)
movl $0x1, 0x20(%r12)
leaq -0x1667c(%rip), %rax    # 0x4ba98
movq %rax, (%r12)
leaq -0x16645(%rip), %rax    # 0x4bada
movq %rax, 0x8(%r12)
movq %r12, %rdi
movq %r14, %rsi
callq 0x470d7
cmpl $0x0, 0x20(%r12)
je 0x62146
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r15), %rdi
movq 0x8(%r14), %rdx
leaq 0x1a63e(%rip), %rsi     # 0x7c792
xorl %eax, %eax
callq 0x11724
jmp 0x620e2
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: reindexDatabases
static void reindexDatabases(Parse *pParse, char const *zColl){
  Db *pDb;                    /* A single database */
  int iDb;                    /* The database index number */
  sqlite3 *db = pParse->db;   /* The database connection */
  HashElem *k;                /* For looping over tables in pDb */
  Table *pTab;                /* A table in the database */

  assert( sqlite3BtreeHoldsAllMutexes(db) );  /* Needed for schema access */
  for(iDb=0, pDb=db->aDb; iDb<db->nDb; iDb++, pDb++){
    assert( pDb!=0 );
    for(k=sqliteHashFirst(&pDb->pSchema->tblHash);  k; k=sqliteHashNext(k)){
      pTab = (Table*)sqliteHashData(k);
      reindexTable(pParse, pTab, zColl);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, 0x28(%rax)
jle 0x6236e
movq %rsi, %rbx
movq %rdi, %r14
movq -0x30(%rbp), %rax
movq 0x20(%rax), %r12
xorl %r13d, %r13d
movq 0x18(%r12), %rax
movq 0x10(%rax), %r15
testq %r15, %r15
je 0x6235d
movq 0x10(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x6237d
movq (%r15), %r15
jmp 0x62344
incl %r13d
addq $0x20, %r12
movq -0x30(%rbp), %rax
cmpl 0x28(%rax), %r13d
jl 0x6233b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: reindexTable
static void reindexTable(Parse *pParse, Table *pTab, char const *zColl){
  Index *pIndex;              /* An index associated with pTab */

  for(pIndex=pTab->pIndex; pIndex; pIndex=pIndex->pNext){
    if( zColl==0 || collationMatch(zColl, pIndex) ){
      int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
      sqlite3BeginWriteOperation(pParse, 0, iDb);
      sqlite3RefillIndex(pParse, pIndex, -1);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x30(%rbp)
movq %rsi, -0x40(%rbp)
movq 0x10(%rsi), %r12
testq %r12, %r12
je 0x624b6
leaq 0x13cb6(%rip), %r14     # 0x76060
movq %rdx, -0x38(%rbp)
movq -0x30(%rbp), %rbx
testq %rdx, %rdx
je 0x62423
movzwl 0x54(%r12), %eax
testq %rax, %rax
je 0x624a8
movq 0x40(%r12), %rcx
xorl %r11d, %r11d
movq (%rcx,%r11,8), %r8
movb (%r8), %sil
testb %sil, %sil
je 0x62402
incq %r8
movq %rdx, %rdi
movzbl %sil, %r9d
movb (%r9,%r14), %r9b
movzbl (%rdi), %r10d
cmpb (%r10,%r14), %r9b
jne 0x62405
incq %rdi
movb (%r8), %sil
incq %r8
testb %sil, %sil
jne 0x623e0
jmp 0x62405
movq %rdx, %rdi
movzbl %sil, %esi
movb (%rsi,%r14), %sil
movzbl (%rdi), %edi
cmpb (%rdi,%r14), %sil
je 0x62423
incq %r11
cmpq %rax, %r11
jne 0x623ce
jmp 0x624a8
movq -0x40(%rbp), %rax
movq 0x68(%rax), %rax
testq %rax, %rax
je 0x6245f
movq -0x30(%rbp), %rcx
movq (%rcx), %rdx
movl 0x28(%rdx), %ecx
testl %ecx, %ecx
jle 0x62467
movq 0x20(%rdx), %rdx
addq $0x18, %rdx
xorl %r13d, %r13d
cmpq %rax, (%rdx)
je 0x6246a
incq %r13
addq $0x20, %rdx
cmpq %r13, %rcx
jne 0x62449
movl %ecx, %r13d
jmp 0x6246a
movl $0xfff0bdc0, %r13d      # imm = 0xFFF0BDC0
jmp 0x6246a
xorl %r13d, %r13d
movq 0x1d8(%rbx), %r15
testq %r15, %r15
cmoveq %rbx, %r15
movq %rbx, %rdi
movl %r13d, %esi
callq 0x45ff7
movl $0x1, %eax
movl %r13d, %ecx
shll %cl, %eax
orl %eax, 0x164(%r15)
movq %rbx, %rdi
movq %r12, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4bcd4
movq -0x38(%rbp), %rdx
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x623b2
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq