LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x60a7a
movzbl %cl, %ebx
jmp 0x60b13
testb %al, %al
je 0x60af3
xorl %edx, %edx
leaq 0x1c740(%rip), %r8      # 0x7d1c7
leaq 0x15622(%rip), %rcx     # 0x760b0
movl %eax, %r9d
movzbl %r9b, %r9d
movb (%r9,%rcx), %r9b
movzbl (%rdx,%r8), %r10d
movb (%r10,%rcx), %r10b
cmpb %r10b, %r9b
jne 0x60ac0
movb 0x1(%rsi,%rdx), %r9b
incq %rdx
testb %r9b, %r9b
jne 0x60a91
movzbl (%rdx,%r8), %edx
movb (%rdx,%rcx), %r10b
xorl %r9d, %r9d
movl $0x1, %ebx
cmpb %r10b, %r9b
je 0x60b13
incq %rsi
leaq 0x1c54b(%rip), %rdx     # 0x7d01f
movzbl %al, %eax
movb (%rax,%rcx), %r8b
movzbl (%rdx), %r9d
cmpb (%r9,%rcx), %r8b
jne 0x60afc
incq %rdx
movb (%rsi), %al
incq %rsi
testb %al, %al
jne 0x60ad4
jmp 0x60afa
leaq 0x1c525(%rip), %rdx     # 0x7d01f
xorl %eax, %eax
leaq 0x155ad(%rip), %rcx     # 0x760b0
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 0x60b2c
callq 0x60b31
testl %eax, %eax
jne 0x60b2c
movb %bl, 0x4f(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x60b88
cmpb $0x0, 0x4e(%r14)
je 0x60b57
cmpb $0x0, 0x10(%rax)
je 0x60b6c
leaq 0x1b7bc(%rip), %rsi     # 0x7c31a
xorl %eax, %eax
callq 0x11842
movl $0x1, %ebx
jmp 0x60b88
movq %rax, %rdi
callq 0x23ec5
movq 0x20(%r14), %rax
movq $0x0, 0x28(%rax)
movq %r14, %rdi
callq 0xdea0
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl %edx, %eax
movzbl (%rdi), %edx
leaq -0x3a(%rdx), %rcx
cmpq $-0xb, %rcx
ja 0x60c68
movq %rdi, %rcx
testb %dl, %dl
je 0x60bc7
movq %rdi, %rdx
leaq 0x1(%rdx), %rcx
cmpb $0x0, 0x1(%rdx)
movq %rcx, %rdx
jne 0x60bba
cmpl $0x7, %esi
je 0x60c88
subl %edi, %ecx
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
movl $0x7, %edx
subl %esi, %edx
leal 0x1(%rcx), %r8d
xorl %esi, %esi
leaq 0x17dcf(%rip), %r9      # 0x789bb
leaq 0x1c8cd(%rip), %r11     # 0x7d4c0
leaq 0x154b6(%rip), %rbx     # 0x760b0
movzbl (%rsi,%r9), %r10d
cmpl %r10d, %ecx
jne 0x60c5e
testl %ecx, %ecx
je 0x60c7e
leaq 0x17da5(%rip), %r10     # 0x789b4
movzbl (%rsi,%r10), %r14d
xorl %r15d, %r15d
movl %r8d, %r12d
leaq (%r14,%r15), %r10
movzbl (%r11,%r10), %r10d
testq %r10, %r10
je 0x60c49
movzbl (%r10,%rbx), %r13d
movzbl (%rdi,%r15), %r10d
movb (%r10,%rbx), %r10b
cmpb %r10b, %r13b
jne 0x60c55
decl %r12d
incq %r15
cmpl $0x1, %r12d
ja 0x60c1a
jmp 0x60c7e
movzbl (%rdi,%r15), %r10d
movb (%r10,%rbx), %r10b
xorl %r13d, %r13d
movzbl %r10b, %r10d
cmpl %r10d, %r13d
je 0x60c7e
incq %rsi
cmpq %rdx, %rsi
jne 0x60bfa
jmp 0x60c88
leaq -0x2c(%rbp), %rbx
movl $0x0, (%rbx)
movq %rbx, %rsi
callq 0x33f5b
movb (%rbx), %al
jmp 0x60c88
leaq 0x17d3d(%rip), %rax     # 0x789c2
movb (%rsi,%rax), %al
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: 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 0x60cf6
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x28(%rdi), %r14d
testl %r14d, %r14d
jle 0x60cec
movq 0x20(%rbx), %r15
incl %r14d
addq $0x10, %r15
movq -0x8(%r15), %rax
testq %rax, %rax
je 0x60cdf
movzbl (%r15), %ecx
movl 0x2c(%rbx), %edx
andl $0x1c, %edx
orl %ecx, %edx
movq (%rax), %rdi
movq 0x8(%rax), %rsi
callq 0x60f12
decl %r14d
addq $0x20, %r15
cmpl $0x1, %r14d
ja 0x60cbe
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: 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 0x17b88(%rip), %rax     # 0x789cd
leaq 0x17b7d(%rip), %r12     # 0x789c9
cmoveq %rax, %r12
xorl %eax, %eax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x1b328(%rip), %r15     # 0x7c18d
leaq 0x138(%rip), %r14       # 0x60fa4
movq %r15, %rsi
movl $0x2, %edx
movl $0x1, %ecx
movq %r12, %r8
movq %r14, %r9
callq 0x150dc
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 0x150dc
xorl %eax, %eax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
leaq 0x1b5d9(%rip), %r12     # 0x7c49b
leaq 0x15317(%rip), %r8      # 0x761e0
movq %rbx, %rdi
movq %r12, %rsi
movl $0x2, %edx
movl $0x1, %ecx
movq %r14, %r9
callq 0x150dc
movq %rbx, %rdi
movq %r12, %rsi
movl $0x3, %edx
callq 0x61134
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 0x61134
// File: /workspace/github_c_makefile_star2_O3/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, 0x8(%rsi)
movq (%rsi), %rax
movl %edx, %ecx
andl $0x3, %ecx
cmpl $0x1, %ecx
jne 0x60f31
movw $0x1, 0xb(%rax)
xorl %ecx, %ecx
jmp 0x60f51
cmpl $0x3, %ecx
sete %sil
movb 0x10(%rax), %dil
testb %dil, %dil
sete %cl
andb %sil, %cl
testb %dil, %dil
setne 0xb(%rax)
movb %cl, 0xc(%rax)
je 0x60f82
xorl %esi, %esi
movb %sil, 0xf(%rax)
movb %sil, 0xd(%rax)
leal 0x20(%rsi), %edi
testb %cl, %cl
movzbl %sil, %ecx
movzbl %dil, %esi
cmovel %ecx, %esi
movb %sil, 0xe(%rax)
testb $0x10, %dl
sete %cl
movb 0x17(%rax), %dl
andb $-0x2, %dl
orb %cl, %dl
movb %dl, 0x17(%rax)
popq %rbp
retq
testb $0x4, %dl
jne 0x60f96
movb $0x2, 0xf(%rax)
testb $0x8, %dl
jne 0x60f9b
movb $0x2, 0xd(%rax)
jmp 0x60f9f
movb $0x3, %sil
jmp 0x60f53
movb $0x3, 0xd(%rax)
movb $0x2, %sil
jmp 0x60f5b
// File: /workspace/github_c_makefile_star2_O3/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 0x6115c
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movq %rsi, %rax
incl %edx
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x61149
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
jmp 0x6115e
xorl %edx, %edx
movl $0x2, %ecx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x15493
testq %rax, %rax
je 0x61179
movb %bl, 0x3(%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: 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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x61ec5
movq (%rsi), %rax
movq 0x8(%rsi), %r15
movq %rax, 0x8(%r15)
movq 0x40(%r15), %rax
testq %rax, %rax
jne 0x61f65
cmpl $0x0, 0x32553(%rip)     # 0x94400
je 0x61f20
leaq -0x20(%rbp), %r14
movl $0x78, %edi
movq %r14, %rsi
callq 0x171f8
movq (%r14), %rax
jmp 0x61f2b
cmpl $0x0, 0x32534(%rip)     # 0x94400
je 0x61ee4
leaq -0x20(%rbp), %r14
movl $0x78, %edi
movq %r14, %rsi
callq 0x171f8
movq (%r14), %rax
jmp 0x61eef
movl $0x78, %edi
callq *0x32531(%rip)          # 0x94420
testq %rax, %rax
je 0x61f9f
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)
jmp 0x61f65
movl $0x78, %edi
callq *0x324f5(%rip)          # 0x94420
testq %rax, %rax
je 0x61f8c
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(%r15)
leaq -0x31323(%rip), %rcx    # 0x30c3e
movq %rcx, 0x48(%r15)
cmpb $0x0, 0x70(%rax)
jne 0x61fa5
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 0x61fa5
movq $0x0, 0x40(%r15)
leaq -0x3135d(%rip), %rax    # 0x30c3e
movq %rax, 0x48(%r15)
movb $0x1, 0x50(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: 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 0x62033
movq %rsi, %r14
cmpb $0x1a, (%rsi)
jne 0x61fd4
movb $0x5e, (%r14)
jmp 0x62033
movq %rdi, %r15
movq %r14, %rsi
callq 0x46b2f
testl %eax, %eax
je 0x61fea
movl $0x1, %ebx
jmp 0x62033
xorps %xmm0, %xmm0
leaq -0x48(%rbp), %r12
movups %xmm0, 0x10(%r12)
movq $0x0, 0x20(%r12)
movl $0x1, 0x20(%r12)
leaq -0x1645b(%rip), %rax    # 0x4bbb5
movq %rax, (%r12)
leaq -0x16424(%rip), %rax    # 0x4bbf7
movq %rax, 0x8(%r12)
movq %r12, %rdi
movq %r14, %rsi
callq 0x473bb
cmpl $0x0, 0x20(%r12)
je 0x62042
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 0x1a742(%rip), %rsi     # 0x7c792
xorl %eax, %eax
callq 0x11842
jmp 0x61fe3
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: detachFunc
static void detachFunc(
  sqlite3_context *context,
  int NotUsed,
  sqlite3_value **argv
){
  const char *zName = (const char *)sqlite3_value_text(argv[0]);
  sqlite3 *db = sqlite3_context_db_handle(context);
  int i;
  Db *pDb = 0;
  char zErr[128];

  UNUSED_PARAMETER(NotUsed);

  if( zName==0 ) zName = "";
  for(i=0; i<db->nDb; i++){
    pDb = &db->aDb[i];
    if( pDb->pBt==0 ) continue;
    if( sqlite3StrICmp(pDb->zName, zName)==0 ) break;
  }

  if( i>=db->nDb ){
    sqlite3_snprintf(sizeof(zErr),zErr, "no such database: %s", zName);
    goto detach_error;
  }
  if( i<2 ){
    sqlite3_snprintf(sizeof(zErr),zErr, "cannot detach database %s", zName);
    goto detach_error;
  }
  if( !db->autoCommit ){
    sqlite3_snprintf(sizeof(zErr), zErr,
                     "cannot DETACH database within transaction");
    goto detach_error;
  }
  if( sqlite3BtreeIsInReadTrans(pDb->pBt) || sqlite3BtreeIsInBackup(pDb->pBt) ){
    sqlite3_snprintf(sizeof(zErr),zErr, "database %s is locked", zName);
    goto detach_error;
  }

  sqlite3BtreeClose(pDb->pBt);
  pDb->pBt = 0;
  pDb->pSchema = 0;
  sqlite3ResetAllSchemasOfConnection(db);
  return;

detach_error:
  sqlite3_result_error(context, zErr, -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
movq (%rdx), %rdi
movl $0x1, %esi
callq 0xef29
movq 0x8(%rbx), %r14
testq %rax, %rax
leaq 0x1c327(%rip), %rcx     # 0x7e3b0
cmovneq %rax, %rcx
movslq 0x28(%r14), %rax
testq %rax, %rax
jle 0x62108
movq 0x20(%r14), %rsi
xorl %edx, %edx
leaq 0x1400d(%rip), %r8      # 0x760b0
movq %rdx, %r15
shlq $0x5, %r15
movq 0x8(%rsi,%r15), %rdi
testq %rdi, %rdi
je 0x62100
addq %rsi, %r15
movq (%r15), %r9
movb (%r9), %r11b
testb %r11b, %r11b
je 0x620fb
xorl %r10d, %r10d
movzbl %r11b, %r11d
movb (%r11,%r8), %r11b
movzbl (%rcx,%r10), %r12d
movb (%r12,%r8), %r12b
cmpb %r12b, %r11b
jne 0x620f4
movb 0x1(%r9,%r10), %r11b
incq %r10
testb %r11b, %r11b
jne 0x620c5
movzbl (%rcx,%r10), %r9d
movb (%r9,%r8), %r12b
xorl %r11d, %r11d
cmpb %r12b, %r11b
jne 0x62100
jmp 0x6215e
cmpb $0x0, (%rcx)
je 0x6215e
incq %rdx
cmpq %rax, %rdx
jne 0x620a3
leaq 0x1a6a4(%rip), %rdx     # 0x7c7b3
leaq -0xa0(%rbp), %rsi
movl $0x80, %edi
xorl %eax, %eax
callq 0xb954
leaq 0x8(%rbx), %rdi
movl $0x1, 0x5c(%rbx)
movb $0x1, 0x61(%rbx)
leaq -0xa0(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
callq 0xf0d7
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x1, %rdx
ja 0x6216d
leaq 0x1a65d(%rip), %rdx     # 0x7c7c8
jmp 0x6210f
cmpb $0x0, 0x4e(%r14)
je 0x62189
cmpb $0x0, 0x10(%rdi)
jne 0x62180
cmpl $0x0, 0x18(%rdi)
je 0x621a8
leaq 0x1a685(%rip), %rdx     # 0x7c80c
jmp 0x6210f
leaq 0x1a652(%rip), %rdx     # 0x7c7e2
leaq -0xa0(%rbp), %rsi
movl $0x80, %edi
xorl %eax, %eax
callq 0xb954
jmp 0x62122
callq 0x23ec5
xorl %eax, %eax
movq %rax, 0x8(%r15)
movq %rax, 0x18(%r15)
movq %r14, %rdi
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xdea0
// File: /workspace/github_c_makefile_star2_O3/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)
movl 0x28(%rax), %eax
testl %eax, %eax
jle 0x62233
movq %rsi, %rbx
movq %rdi, %r14
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %r12
xorl %r13d, %r13d
movq 0x18(%r12), %rcx
movq 0x10(%rcx), %r15
testq %r15, %r15
je 0x62227
movq 0x10(%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x62242
movq (%r15), %r15
testq %r15, %r15
jne 0x62209
movq -0x30(%rbp), %rax
movl 0x28(%rax), %eax
incl %r13d
addq $0x20, %r12
cmpl %eax, %r13d
jl 0x621fb
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: 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 0x6237a
leaq 0x13e41(%rip), %r14     # 0x760b0
movq %rdx, -0x38(%rbp)
movq -0x30(%rbp), %rbx
testq %rdx, %rdx
je 0x622e7
movzwl 0x54(%r12), %eax
testq %rax, %rax
je 0x6236c
movq 0x40(%r12), %rcx
xorl %r11d, %r11d
movq (%rcx,%r11,8), %rdi
movb (%rdi), %r8b
testb %r8b, %r8b
je 0x622c7
incq %rdi
movq %rdx, %rsi
movzbl %r8b, %r8d
movb (%r8,%r14), %r9b
movzbl (%rsi), %r10d
cmpb (%r10,%r14), %r9b
jne 0x622cd
incq %rsi
movb (%rdi), %r8b
incq %rdi
testb %r8b, %r8b
jne 0x622a5
jmp 0x622ca
movq %rdx, %rsi
xorl %r8d, %r8d
movb (%r8,%r14), %dil
movzbl (%rsi), %esi
cmpb (%rsi,%r14), %dil
je 0x622e7
incq %r11
cmpq %rax, %r11
jne 0x62293
jmp 0x6236c
movq -0x40(%rbp), %rax
movq 0x68(%rax), %rax
testq %rax, %rax
je 0x62323
movq -0x30(%rbp), %rcx
movq (%rcx), %rdx
movl 0x28(%rdx), %ecx
testl %ecx, %ecx
jle 0x6232b
movq 0x20(%rdx), %rdx
addq $0x18, %rdx
xorl %r13d, %r13d
cmpq %rax, (%rdx)
je 0x6232e
incq %r13
addq $0x20, %rdx
cmpq %r13, %rcx
jne 0x6230d
movl %ecx, %r13d
jmp 0x6232e
movl $0xfff0bdc0, %r13d      # imm = 0xFFF0BDC0
jmp 0x6232e
xorl %r13d, %r13d
movq 0x1d8(%rbx), %r15
testq %r15, %r15
cmoveq %rbx, %r15
movq %rbx, %rdi
movl %r13d, %esi
callq 0x4632f
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 0x4bdfa
movq -0x38(%rbp), %rdx
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x62277
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: analyzeDatabase
static void analyzeDatabase(Parse *pParse, int iDb){
  sqlite3 *db = pParse->db;
  Schema *pSchema = db->aDb[iDb].pSchema;    /* Schema of database iDb */
  HashElem *k;
  int iStatCur;
  int iMem;

  sqlite3BeginWriteOperation(pParse, 0, iDb);
  iStatCur = pParse->nTab;
  pParse->nTab += 3;
  openStatTable(pParse, iDb, iStatCur, 0, 0);
  iMem = pParse->nMem+1;
  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
  for(k=sqliteHashFirst(&pSchema->tblHash); k; k=sqliteHashNext(k)){
    Table *pTab = (Table*)sqliteHashData(k);
    analyzeOneTable(pParse, pTab, 0, iStatCur, iMem);
  }
  loadAnalysis(pParse, iDb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq (%rdi), %rax
movq 0x1d8(%rdi), %r15
movq 0x20(%rax), %rax
movslq %esi, %r12
movq %r12, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %r13
testq %r15, %r15
cmoveq %rdi, %r15
movl %r12d, %esi
callq 0x4632f
movl $0x1, %eax
movl %r12d, %ecx
shll %cl, %eax
orl %eax, 0x164(%r15)
movl 0x54(%r14), %r15d
leal 0x3(%r15), %eax
movl %eax, 0x54(%r14)
movq %r14, %rdi
movl %r12d, %esi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x62540
movq 0x10(%r13), %r13
testq %r13, %r13
je 0x62425
movl 0x58(%r14), %r12d
incl %r12d
movq 0x10(%r13), %rsi
movq %r14, %rdi
xorl %edx, %edx
movl %r15d, %ecx
movl %r12d, %r8d
callq 0x6269a
movq (%r13), %r13
testq %r13, %r13
jne 0x62408
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x62f68
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: analyzeTable
static void analyzeTable(Parse *pParse, Table *pTab, Index *pOnlyIdx){
  int iDb;
  int iStatCur;

  assert( pTab!=0 );
  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
  sqlite3BeginWriteOperation(pParse, 0, iDb);
  iStatCur = pParse->nTab;
  pParse->nTab += 3;
  if( pOnlyIdx ){
    openStatTable(pParse, iDb, iStatCur, pOnlyIdx->zName, "idx");
  }else{
    openStatTable(pParse, iDb, iStatCur, pTab->zName, "tbl");
  }
  analyzeOneTable(pParse, pTab, pOnlyIdx, iStatCur, pParse->nMem+1);
  loadAnalysis(pParse, iDb);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq 0x68(%rsi), %rax
testq %rax, %rax
je 0x62488
movq (%rbx), %rdx
movl 0x28(%rdx), %ecx
testl %ecx, %ecx
jle 0x62490
movq 0x20(%rdx), %rdx
addq $0x18, %rdx
xorl %r15d, %r15d
cmpq %rax, (%rdx)
je 0x62493
incq %r15
addq $0x20, %rdx
cmpq %r15, %rcx
jne 0x62472
movl %ecx, %r15d
jmp 0x62493
movl $0xfff0bdc0, %r15d      # imm = 0xFFF0BDC0
jmp 0x62493
xorl %r15d, %r15d
movq 0x1d8(%rbx), %r13
testq %r13, %r13
cmoveq %rbx, %r13
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4632f
movl $0x1, %eax
movl %r15d, %ecx
shll %cl, %eax
orl %eax, 0x164(%r13)
movl 0x54(%rbx), %r13d
leal 0x3(%r13), %eax
movl %eax, 0x54(%rbx)
testq %r12, %r12
je 0x624f8
movq (%r12), %rcx
leaq 0x19ad4(%rip), %r8      # 0x7bfac
movq %rbx, %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0x62540
movl 0x58(%rbx), %r8d
incl %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
jmp 0x6251f
movq (%r14), %rcx
leaq 0x192ec(%rip), %r8      # 0x7b7ee
movq %rbx, %rdi
movl %r15d, %esi
movl %r13d, %edx
callq 0x62540
movl 0x58(%rbx), %r8d
incl %r8d
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movl %r13d, %ecx
callq 0x6269a
movq %rbx, %rdi
movl %r15d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x62f68
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: isSystemTable
static int isSystemTable(Parse *pParse, const char *zName){
  if( sqlite3Strlen30(zName)>6 && 0==sqlite3StrNICmp(zName, "sqlite_", 7) ){
    sqlite3ErrorMsg(pParse, "table %s may not be altered", zName);
    return 1;
  }
  return 0;
}

// Assembly:
xorl %eax, %eax
testq %rsi, %rsi
je 0x6302c
movq %rsi, %rdx
movq $-0x1, %rcx
cmpb $0x0, 0x1(%rdx,%rcx)
leaq 0x1(%rcx), %rcx
jne 0x62fb0
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
cmpl $0x7, %ecx
jb 0x6302c
xorl %ecx, %ecx
leaq 0x130e1(%rip), %rax     # 0x760b0
leaq 0x17e16(%rip), %rsi     # 0x7adec
movzbl (%rdx,%rcx), %r8d
testq %r8, %r8
je 0x62ffe
movzbl (%r8,%rax), %r8d
movzbl (%rcx,%rsi), %r9d
movb (%r9,%rax), %r9b
cmpb %r9b, %r8b
jne 0x63009
incq %rcx
cmpq $0x7, %rcx
jne 0x62fd6
jmp 0x63014
movzbl (%rcx,%rsi), %ecx
movb (%rcx,%rax), %r9b
xorl %r8d, %r8d
movzbl %r9b, %ecx
xorl %eax, %eax
cmpl %ecx, %r8d
jne 0x6302c
pushq %rbp
movq %rsp, %rbp
leaq 0x19b0a(%rip), %rsi     # 0x7cb29
xorl %eax, %eax
callq 0x11842
movl $0x1, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: whereForeignKeys
static char *whereForeignKeys(Parse *pParse, Table *pTab){
  FKey *p;
  char *zWhere = 0;
  for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
    zWhere = whereOrName(pParse->db, zWhere, p->pFrom->zName);
  }
  return zWhere;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x4fce3
testq %rax, %rax
je 0x63065
movq %rax, %r14
xorl %eax, %eax
movq (%rbx), %rdi
movq (%r14), %rcx
movq (%rcx), %rdx
movq %rax, %rsi
callq 0x63297
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0x63049
jmp 0x63067
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: whereTempTriggers
static char *whereTempTriggers(Parse *pParse, Table *pTab){
  Trigger *pTrig;
  char *zWhere = 0;
  const Schema *pTempSchema = pParse->db->aDb[1].pSchema; /* Temp db schema */

  /* If the table is not located in the temp-db (in which case NULL is 
  ** returned, loop through the tables list of triggers. For each trigger
  ** that is not part of the temp-db schema, add a clause to the WHERE 
  ** expression being built up in zWhere.
  */
  if( pTab->pSchema!=pTempSchema ){
    sqlite3 *db = pParse->db;
    for(pTrig=sqlite3TriggerList(pParse, pTab); pTrig; pTrig=pTrig->pNext){
      if( pTrig->pSchema==pTempSchema ){
        zWhere = whereOrName(db, zWhere, pTrig->zName);
      }
    }
  }
  if( zWhere ){
    char *zNew = sqlite3MPrintf(pParse->db, "type='trigger' AND (%s)", zWhere);
    sqlite3DbFree(pParse->db, zWhere);
    zWhere = zNew;
  }
  return zWhere;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %r14
movq 0x20(%r14), %rax
movq 0x38(%rax), %r15
cmpq %r15, 0x68(%rsi)
je 0x630f8
movq %rsi, %rdx
movq %rdi, %rbx
movzbl 0x1f6(%rdi), %esi
movq %r15, %rdi
callq 0x4fd1a
testq %rax, %rax
je 0x630f8
movq %rax, %r13
xorl %r12d, %r12d
cmpq %r15, 0x28(%r13)
jne 0x630c3
movq (%r13), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x63297
movq %rax, %r12
movq 0x40(%r13), %r13
testq %r13, %r13
jne 0x630ab
testq %r12, %r12
je 0x630f8
movq (%rbx), %rdi
leaq 0x19a78(%rip), %rsi     # 0x7cb53
movq %r12, %rdx
xorl %eax, %eax
callq 0x11900
movq %rax, %r14
movq (%rbx), %rdi
movq %r12, %rsi
callq 0x9ca4
movq %r14, %rax
jmp 0x630fa
xorl %eax, %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: whereOrName
static char *whereOrName(sqlite3 *db, char *zWhere, char *zConstant){
  char *zNew;
  if( !zWhere ){
    zNew = sqlite3MPrintf(db, "name=%Q", zConstant);
  }else{
    zNew = sqlite3MPrintf(db, "%s OR name=%Q", zWhere, zConstant);
    sqlite3DbFree(db, zWhere);
  }
  return zNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rcx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x632df
movq %rsi, %r14
leaq 0x1988f(%rip), %rsi     # 0x7cb45
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x11900
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9ca4
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1855d(%rip), %rsi     # 0x7b843
movq %rbx, %rdi
movq %rcx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11900
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3MinimumFileFormat
SQLITE_PRIVATE void sqlite3MinimumFileFormat(Parse *pParse, int iDb, int minFormat){
  Vdbe *v;
  v = sqlite3GetVdbe(pParse);
  /* The VDBE should have been allocated before this routine is called.
  ** If that allocation failed, we would have quit before reaching this
  ** point */
  if( ALWAYS(v) ){
    int r1 = sqlite3GetTempReg(pParse);
    int r2 = sqlite3GetTempReg(pParse);
    int j1;
    sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT);
    sqlite3VdbeUsesBtree(v, iDb);
    sqlite3VdbeAddOp2(v, OP_Integer, minFormat, r2);
    j1 = sqlite3VdbeAddOp3(v, OP_Ge, r2, 0, r1);
    sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, r2);
    sqlite3VdbeJumpHere(v, j1);
    sqlite3ReleaseTempReg(pParse, r1);
    sqlite3ReleaseTempReg(pParse, r2);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r13d
movq %rdi, %rbx
callq 0x45ece
testq %rax, %rax
je 0x63469
movq %rax, %r12
movb 0x1f(%rbx), %al
testb %al, %al
movl %r14d, -0x2c(%rbp)
je 0x63351
leal -0x1(%rax), %ecx
movb %cl, 0x1f(%rbx)
movzbl %cl, %ecx
movl 0x28(%rbx,%rcx,4), %r15d
testb %cl, %cl
je 0x6335c
addb $-0x2, %al
movb %al, 0x1f(%rbx)
movzbl %al, %eax
movl 0x28(%rbx,%rax,4), %r14d
jmp 0x63367
movl 0x58(%rbx), %r15d
incl %r15d
movl %r15d, 0x58(%rbx)
movl 0x58(%rbx), %r14d
incl %r14d
movl %r14d, 0x58(%rbx)
movq %r12, %rdi
movl $0x2d, %esi
movl %r13d, %edx
movl %r15d, %ecx
movl $0x2, %r8d
callq 0x45f15
movl $0x1, %eax
movl %r13d, %ecx
shll %cl, %eax
orl %eax, 0xa0(%r12)
movq %r12, %rdi
movl $0x15, %esi
movl -0x2c(%rbp), %edx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r12, %rdi
movl $0x50, %esi
movl %r14d, %edx
xorl %ecx, %ecx
movl %r15d, %r8d
callq 0x45f15
movl %r13d, %edx
movl %eax, %r13d
movq %r12, %rdi
movl $0x2e, %esi
movl $0x2, %ecx
movl %r14d, %r8d
callq 0x45f15
testl %r13d, %r13d
js 0x633f7
movl 0x34(%r12), %eax
cmpl %r13d, %eax
jbe 0x633f7
movq 0x8(%r12), %rcx
movl %r13d, %edx
leaq (%rdx,%rdx,2), %rdx
movl %eax, 0x8(%rcx,%rdx,8)
testl %r15d, %r15d
je 0x63430
movzbl 0x1f(%rbx), %eax
cmpq $0x7, %rax
ja 0x63430
xorl %ecx, %ecx
cmpl %r15d, 0x84(%rbx,%rcx)
je 0x6342b
addq $0x18, %rcx
cmpl $0xf0, %ecx
jne 0x63408
leal 0x1(%rax), %ecx
movb %cl, 0x1f(%rbx)
movl %r15d, 0x28(%rbx,%rax,4)
jmp 0x63430
movb $0x1, 0x7c(%rbx,%rcx)
testl %r14d, %r14d
je 0x63469
movzbl 0x1f(%rbx), %eax
cmpq $0x7, %rax
ja 0x63469
xorl %ecx, %ecx
cmpl %r14d, 0x84(%rbx,%rcx)
je 0x63464
addq $0x18, %rcx
cmpl $0xf0, %ecx
jne 0x63441
leal 0x1(%rax), %ecx
movb %cl, 0x1f(%rbx)
movl %r14d, 0x28(%rbx,%rax,4)
jmp 0x63469
movb $0x1, 0x7c(%rbx,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: addArgumentToVtab
static void addArgumentToVtab(Parse *pParse){
  if( pParse->sArg.z && pParse->pNewTable ){
    const char *z = (const char*)pParse->sArg.z;
    int n = pParse->sArg.n;
    sqlite3 *db = pParse->db;
    addModuleArgument(db, pParse->pNewTable, sqlite3DbStrNDup(db, z, n));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x270(%rdi), %r14
testq %r14, %r14
je 0x634ea
movq 0x238(%rdi), %rbx
testq %rbx, %rbx
je 0x634ea
movslq 0x278(%rdi), %r12
movq (%rdi), %r15
leal 0x1(%r12), %esi
movq %r15, %rdi
callq 0x11721
movq %rax, %r13
testq %rax, %rax
je 0x634d1
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x82f0
movb $0x0, (%r13,%r12)
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x634f9
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: addModuleArgument
static void addModuleArgument(sqlite3 *db, Table *pTable, char *zArg){
  int i = pTable->nModuleArg++;
  int nBytes = sizeof(char *)*(1+pTable->nModuleArg);
  char **azModuleArg;
  azModuleArg = sqlite3DbRealloc(db, pTable->azModuleArg, nBytes);
  if( azModuleArg==0 ){
    int j;
    for(j=0; j<i; j++){
      sqlite3DbFree(db, pTable->azModuleArg[j]);
    }
    sqlite3DbFree(db, zArg);
    sqlite3DbFree(db, pTable->azModuleArg);
    pTable->nModuleArg = 0;
  }else{
    azModuleArg[i] = zArg;
    azModuleArg[i+1] = 0;
  }
  pTable->azModuleArg = azModuleArg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movl 0x4c(%rsi), %r13d
leal 0x1(%r13), %eax
movl %eax, 0x4c(%rsi)
leal 0x10(,%r13,8), %edx
movq 0x50(%rsi), %rsi
callq 0x174d6
movq %rax, %r12
testq %rax, %rax
je 0x63546
movslq %r13d, %rax
movq %r14, (%r12,%rax,8)
movq $0x0, 0x8(%r12,%rax,8)
jmp 0x63589
movq %r14, -0x30(%rbp)
testl %r13d, %r13d
jle 0x6356a
xorl %r14d, %r14d
movq 0x50(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %r15, %rdi
callq 0x9ca4
incq %r14
cmpq %r14, %r13
jne 0x63552
movq %r15, %rdi
movq -0x30(%rbp), %rsi
callq 0x9ca4
movq 0x50(%rbx), %rsi
movq %r15, %rdi
callq 0x9ca4
movl $0x0, 0x4c(%rbx)
movq %r12, 0x50(%rbx)
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: minmaxFunc
static void minmaxFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  int i;
  int mask;    /* 0 for min() or 0xffffffff for max() */
  int iBest;
  CollSeq *pColl;

  assert( argc>1 );
  mask = sqlite3_user_data(context)==0 ? 0 : -1;
  pColl = sqlite3GetFuncCollSeq(context);
  assert( pColl );
  assert( mask==-1 || mask==0 );
  iBest = 0;
  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
  for(i=1; i<argc; i++){
    if( sqlite3_value_type(argv[i])==SQLITE_NULL ) return;
    if( (sqlite3MemCompare(argv[iBest], argv[i], pColl)^mask)>=0 ){
      testcase( mask==0 );
      iBest = i;
    }
  }
  sqlite3_result_value(context, argv[iBest]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x30(%rbp)
movq (%rdi), %rax
xorl %r12d, %r12d
cmpq 0x8(%rax), %r12
sbbl %r12d, %r12d
movl %esi, %eax
movq (%rdx), %rsi
cmpb $0x5, 0x26(%rsi)
jne 0x63842
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x2, %eax
jl 0x63892
movq %rdx, %r14
movq -0x30(%rbp), %rcx
movq 0x48(%rcx), %rcx
movq %rcx, -0x38(%rbp)
movl %eax, %r13d
xorl %r15d, %r15d
movl $0x1, %ebx
movq (%r14,%rbx,8), %rsi
cmpb $0x5, 0x26(%rsi)
je 0x63833
movslq %r15d, %rax
movq (%r14,%rax,8), %rdi
movq -0x38(%rbp), %rdx
callq 0x2ca3b
xorl %r12d, %eax
js 0x63883
movl %ebx, %r15d
incq %rbx
cmpq %rbx, %r13
jne 0x63861
movslq %r15d, %rax
movq (%r14,%rax,8), %rsi
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf417
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: minmaxStep
static void minmaxStep(
  sqlite3_context *context, 
  int NotUsed, 
  sqlite3_value **argv
){
  Mem *pArg  = (Mem *)argv[0];
  Mem *pBest;
  UNUSED_PARAMETER(NotUsed);

  pBest = (Mem *)sqlite3_aggregate_context(context, sizeof(*pBest));
  if( !pBest ) return;

  if( sqlite3_value_type(argv[0])==SQLITE_NULL ){
    if( pBest->flags ) sqlite3SkipAccumulatorLoad(context);
  }else if( pBest->flags ){
    int max;
    int cmp;
    CollSeq *pColl = sqlite3GetFuncCollSeq(context);
    /* This step function is used for both the min() and max() aggregates,
    ** the only difference between the two being that the sense of the
    ** comparison is inverted. For the max() aggregate, the
    ** sqlite3_user_data() function returns (void *)-1. For min() it
    ** returns (void *)db, where db is the sqlite3* database pointer.
    ** Therefore the next statement sets variable 'max' to 1 for the max()
    ** aggregate, or 0 for min().
    */
    max = sqlite3_user_data(context)!=0;
    cmp = sqlite3MemCompare(pBest, pArg, pColl);
    if( (max && cmp<0) || (!max && cmp>0) ){
      sqlite3VdbeMemCopy(pBest, pArg);
    }else{
      sqlite3SkipAccumulatorLoad(context);
    }
  }else{
    sqlite3VdbeMemCopy(pBest, pArg);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rdi, %rbx
movq (%rdx), %r14
movl $0x38, %esi
callq 0x10263
testq %rax, %rax
je 0x6391e
movq %rax, %r15
movq (%r12), %rax
cmpb $0x5, 0x26(%rax)
movzwl 0x24(%r15), %eax
jne 0x638e9
testw %ax, %ax
jne 0x6391a
jmp 0x6391e
testw %ax, %ax
je 0x63927
movq (%rbx), %rax
movq 0x48(%rbx), %rdx
movq 0x8(%rax), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x2ca3b
xorl %ecx, %ecx
xorl %edx, %edx
testl %eax, %eax
setns %cl
setle %dl
testq %r12, %r12
cmovel %edx, %ecx
testb %cl, %cl
je 0x63927
movb $0x1, 0x60(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xf417
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: minMaxFinalize
static void minMaxFinalize(sqlite3_context *context){
  sqlite3_value *pRes;
  pRes = (sqlite3_value *)sqlite3_aggregate_context(context, 0);
  if( pRes ){
    if( pRes->flags ){
      sqlite3_result_value(context, pRes);
    }
    sqlite3VdbeMemRelease(pRes);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x40(%rdi), %rbx
testb $0x20, 0x25(%rbx)
jne 0x63962
movq %rbx, %rdi
callq 0x102d5
movw $0x1, 0x24(%rbx)
movq $0x0, 0x8(%rbx)
jmp 0x6398c
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x6398c
cmpw $0x0, 0x24(%rbx)
je 0x6397e
addq $0x8, %rdi
movq %rbx, %rsi
callq 0xf417
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xecfd
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: typeofFunc
static void typeofFunc(
  sqlite3_context *context,
  int NotUsed,
  sqlite3_value **argv
){
  const char *z = 0;
  UNUSED_PARAMETER(NotUsed);
  switch( sqlite3_value_type(argv[0]) ){
    case SQLITE_INTEGER: z = "integer"; break;
    case SQLITE_TEXT:    z = "text";    break;
    case SQLITE_FLOAT:   z = "real";    break;
    case SQLITE_BLOB:    z = "blob";    break;
    default:             z = "null";    break;
  }
  sqlite3_result_text(context, z, -1, SQLITE_STATIC);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdx), %rax
movb 0x26(%rax), %al
decb %al
cmpb $0x3, %al
ja 0x639b6
movzbl %al, %eax
leaq 0x158a3(%rip), %rcx     # 0x79250
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
jmp 0x639bd
leaq 0x1a928(%rip), %rsi     # 0x7e2e5
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
popq %rbp
jmp 0xeffe
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: lengthFunc
static void lengthFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  int len;

  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  switch( sqlite3_value_type(argv[0]) ){
    case SQLITE_BLOB:
    case SQLITE_INTEGER:
    case SQLITE_FLOAT: {
      sqlite3_result_int(context, sqlite3_value_bytes(argv[0]));
      break;
    }
    case SQLITE_TEXT: {
      const unsigned char *z = sqlite3_value_text(argv[0]);
      if( z==0 ) return;
      len = 0;
      while( *z ){
        len++;
        SQLITE_SKIP_UTF8(z);
      }
      sqlite3_result_int(context, len);
      break;
    }
    default: {
      sqlite3_result_null(context);
      break;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdx), %rdi
movzbl 0x26(%rdi), %eax
leal -0x1(%rax), %ecx
cmpl $0x2, %ecx
jb 0x639f3
cmpl $0x3, %eax
je 0x63a1c
cmpl $0x4, %eax
jne 0x63a5f
movl $0x1, %esi
callq 0xee02
leaq 0x8(%rbx), %rdi
movslq %eax, %r14
callq 0xecfd
movq %r14, 0x20(%rbx)
movw $0x4, 0x2c(%rbx)
movb $0x1, 0x2e(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movl $0x1, %esi
callq 0xef29
testq %rax, %rax
je 0x63a17
movb (%rax), %cl
xorl %r14d, %r14d
testb %cl, %cl
je 0x63a59
cmpb $-0x40, %cl
jb 0x63a4a
movb 0x1(%rax), %cl
incq %rax
movl %ecx, %edx
andb $-0x40, %dl
negb %dl
jo 0x63a39
jmp 0x63a4f
incq %rax
movb (%rax), %cl
incl %r14d
testb %cl, %cl
jne 0x63a34
movl %r14d, %r14d
leaq 0x8(%rbx), %rdi
jmp 0x63a04
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xf373
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: instrFunc
static void instrFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  const unsigned char *zHaystack;
  const unsigned char *zNeedle;
  int nHaystack;
  int nNeedle;
  int typeHaystack, typeNeedle;
  int N = 1;
  int isText;

  UNUSED_PARAMETER(argc);
  typeHaystack = sqlite3_value_type(argv[0]);
  typeNeedle = sqlite3_value_type(argv[1]);
  if( typeHaystack==SQLITE_NULL || typeNeedle==SQLITE_NULL ) return;
  nHaystack = sqlite3_value_bytes(argv[0]);
  nNeedle = sqlite3_value_bytes(argv[1]);
  if( typeHaystack==SQLITE_BLOB && typeNeedle==SQLITE_BLOB ){
    zHaystack = sqlite3_value_blob(argv[0]);
    zNeedle = sqlite3_value_blob(argv[1]);
    isText = 0;
  }else{
    zHaystack = sqlite3_value_text(argv[0]);
    zNeedle = sqlite3_value_text(argv[1]);
    isText = 1;
  }
  while( nNeedle<=nHaystack && memcmp(zHaystack, zNeedle, nNeedle)!=0 ){
    N++;
    do{
      nHaystack--;
      zHaystack++;
    }while( isText && (zHaystack[0]&0xc0)==0x80 );
  }
  if( nNeedle>nHaystack ) N = 0;
  sqlite3_result_int(context, N);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r13
movq (%rdx), %rdi
movq 0x8(%rdx), %rax
movb 0x26(%rdi), %r14b
movb 0x26(%rax), %r12b
cmpb $0x5, %r14b
sete %al
cmpb $0x5, %r12b
sete %cl
orb %al, %cl
jne 0x63b9a
movq %rdx, %rbx
movl $0x1, %esi
callq 0xee02
movl %eax, %r15d
movq 0x8(%rbx), %rdi
movl $0x1, %esi
callq 0xee02
movl %eax, -0x2c(%rbp)
xorb $0x4, %r14b
xorb $0x4, %r12b
orb %r14b, %r12b
sete %r14b
movq (%rbx), %rdi
jne 0x63af0
callq 0xed3b
movq %rax, %r12
movq 0x8(%rbx), %rdi
callq 0xed3b
jmp 0x63b0b
movl $0x1, %esi
callq 0xef29
movq %rax, %r12
movq 0x8(%rbx), %rdi
movl $0x1, %esi
callq 0xef29
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
cmpl %r15d, %eax
jle 0x63b1b
xorl %ebx, %ebx
jmp 0x63b81
movq %r13, -0x40(%rbp)
movslq %eax, %rbx
movl $0x1, %r13d
movq %r12, %rdi
movq -0x38(%rbp), %rsi
movq %rbx, %rdx
callq 0x8410
testl %eax, %eax
je 0x63b7a
incl %r13d
leal 0x1(%r15), %ecx
incq %r12
movq %r12, %rdx
movl %ecx, %eax
movq %rdx, %r12
testb %r14b, %r14b
jne 0x63b69
movb (%r12), %sil
andb $-0x40, %sil
leal -0x1(%rax), %ecx
leaq 0x1(%r12), %rdx
negb %sil
jo 0x63b48
jmp 0x63b6c
movl %r15d, %ecx
addl $-0x2, %eax
movl %eax, %r15d
cmpl %ecx, -0x2c(%rbp)
jl 0x63b28
xorl %r13d, %r13d
movl %r13d, %ebx
movq -0x40(%rbp), %r13
leaq 0x8(%r13), %rdi
callq 0xecfd
movq %rbx, 0x20(%r13)
movw $0x4, 0x2c(%r13)
movb $0x1, 0x2e(%r13)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: charFunc
static void charFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  unsigned char *z, *zOut;
  int i;
  zOut = z = sqlite3_malloc( argc*4 );
  if( z==0 ){
    sqlite3_result_error_nomem(context);
    return;
  }
  for(i=0; i<argc; i++){
    sqlite3_int64 x;
    unsigned c;
    x = sqlite3_value_int64(argv[i]);
    if( x<0 || x>0x10ffff ) x = 0xfffd;
    c = (unsigned)(x & 0x1fffff);
    if( c<0x00080 ){
      *zOut++ = (u8)(c&0xFF);
    }else if( c<0x00800 ){
      *zOut++ = 0xC0 + (u8)((c>>6)&0x1F);
      *zOut++ = 0x80 + (u8)(c & 0x3F);
    }else if( c<0x10000 ){
      *zOut++ = 0xE0 + (u8)((c>>12)&0x0F);
      *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);
      *zOut++ = 0x80 + (u8)(c & 0x3F);
    }else{
      *zOut++ = 0xF0 + (u8)((c>>18) & 0x07);
      *zOut++ = 0x80 + (u8)((c>>12) & 0x3F);
      *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);
      *zOut++ = 0x80 + (u8)(c & 0x3F);
    }                                                    \
  }
  sqlite3_result_text(context, (char*)z, (int)(zOut-z), sqlite3_free);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %r13d
movq %rdi, %rbx
callq 0x9d86
testl %eax, %eax
je 0x63e5d
leaq 0x8(%rbx), %rdi
callq 0xf373
movl $0x7, 0x5c(%rbx)
movb $0x1, %al
movb %al, 0x61(%rbx)
movq 0x8(%rbx), %rcx
movb %al, 0x50(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leal (,%r13,4), %edi
callq 0xa38c
testq %rax, %rax
je 0x63e32
movq %rax, -0x30(%rbp)
movq %rax, %r12
testl %r13d, %r13d
jle 0x63f4d
movl %r13d, %r13d
xorl %r15d, %r15d
movq -0x30(%rbp), %r12
movq (%r14,%r15,8), %rdi
callq 0xeeac
movl %eax, %ecx
andl $0x1fffff, %ecx         # imm = 0x1FFFFF
cmpq $0x110000, %rax         # imm = 0x110000
movl $0xfffd, %eax           # imm = 0xFFFD
cmovael %eax, %ecx
cmpl $0x7f, %ecx
ja 0x63eb9
movb %cl, (%r12)
incq %r12
jmp 0x63f41
movl %ecx, %eax
cmpl $0x7ff, %ecx            # imm = 0x7FF
ja 0x63edd
shrl $0x6, %eax
orb $-0x40, %al
movb %al, (%r12)
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%r12)
addq $0x2, %r12
jmp 0x63f41
cmpl $0xffff, %ecx           # imm = 0xFFFF
ja 0x63f0d
shrl $0xc, %eax
orb $-0x20, %al
movb %al, (%r12)
movl %ecx, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%r12)
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x2(%r12)
addq $0x3, %r12
jmp 0x63f41
shrl $0x12, %eax
orb $-0x10, %al
movb %al, (%r12)
movl %ecx, %eax
shrl $0xc, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x1(%r12)
movl %ecx, %eax
shrl $0x6, %eax
andb $0x3f, %al
orb $-0x80, %al
movb %al, 0x2(%r12)
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x3(%r12)
addq $0x4, %r12
incq %r15
cmpq %r15, %r13
jne 0x63e89
movq -0x30(%rbp), %rsi
subl %esi, %r12d
leaq -0x59b94(%rip), %r8     # 0xa3c7
movq %rbx, %rdi
movl %r12d, %edx
movl $0x1, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xeffe