LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3AffinityType
SQLITE_PRIVATE char sqlite3AffinityType(const char *zIn){
  u32 h = 0;
  char aff = SQLITE_AFF_NUMERIC;

  if( zIn ) while( zIn[0] ){
    h = (h<<8) + sqlite3UpperToLower[(*zIn)&0xff];
    zIn++;
    if( h==(('c'<<24)+('h'<<16)+('a'<<8)+'r') ){             /* CHAR */
      aff = SQLITE_AFF_TEXT; 
    }else if( h==(('c'<<24)+('l'<<16)+('o'<<8)+'b') ){       /* CLOB */
      aff = SQLITE_AFF_TEXT;
    }else if( h==(('t'<<24)+('e'<<16)+('x'<<8)+'t') ){       /* TEXT */
      aff = SQLITE_AFF_TEXT;
    }else if( h==(('b'<<24)+('l'<<16)+('o'<<8)+'b')          /* BLOB */
        && (aff==SQLITE_AFF_NUMERIC || aff==SQLITE_AFF_REAL) ){
      aff = SQLITE_AFF_NONE;
#ifndef SQLITE_OMIT_FLOATING_POINT
    }else if( h==(('r'<<24)+('e'<<16)+('a'<<8)+'l')          /* REAL */
        && aff==SQLITE_AFF_NUMERIC ){
      aff = SQLITE_AFF_REAL;
    }else if( h==(('f'<<24)+('l'<<16)+('o'<<8)+'a')          /* FLOA */
        && aff==SQLITE_AFF_NUMERIC ){
      aff = SQLITE_AFF_REAL;
    }else if( h==(('d'<<24)+('o'<<16)+('u'<<8)+'b')          /* DOUB */
        && aff==SQLITE_AFF_NUMERIC ){
      aff = SQLITE_AFF_REAL;
#endif
    }else if( (h&0x00FFFFFF)==(('i'<<16)+('n'<<8)+'t') ){    /* INT */
      aff = SQLITE_AFF_INTEGER;
      break;
    }
  }

  return aff;
}

// Assembly:
testq %rdi, %rdi
je 0x468cd
pushq %rbp
movq %rsp, %rbp
movb $0x63, %al
xorl %edx, %edx
leaq 0x21851(%rip), %rcx     # 0x68070
incq %rdi
movzbl %al, %esi
movzbl -0x1(%rdi), %r8d
testq %r8, %r8
je 0x468d2
movl %edx, %r9d
shll $0x8, %r9d
movzbl (%r8,%rcx), %edx
orl %r9d, %edx
cmpl $0x626c6f62, %edx       # imm = 0x626C6F62
je 0x46864
cmpl $0x63686172, %edx       # imm = 0x63686172
je 0x468b8
cmpl $0x636c6f62, %edx       # imm = 0x636C6F62
je 0x468b8
cmpl $0x74657874, %edx       # imm = 0x74657874
jne 0x4686d
jmp 0x468b8
cmpb $0x63, %al
je 0x468c6
cmpl $0x65, %esi
je 0x468c6
cmpb $0x63, %al
sete %r8b
cmpl $0x7265616c, %edx       # imm = 0x7265616C
sete %r9b
cmpl $0x666c6f61, %edx       # imm = 0x666C6F61
sete %r10b
orb %r9b, %r10b
cmpl $0x646f7562, %edx       # imm = 0x646F7562
sete %r9b
orb %r10b, %r9b
testb %r8b, %r9b
jne 0x468bf
movl %edx, %r8d
andl $0xffffff, %r8d         # imm = 0xFFFFFF
incq %rdi
cmpl $0x696e74, %r8d         # imm = 0x696E74
jne 0x46825
jmp 0x468d0
movb $0x61, %al
jmp 0x4681f
movb $0x65, %al
jmp 0x4681f
movb $0x62, %al
jmp 0x4681f
movb $0x63, %al
retq
movb $0x64, %al
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3GetCollSeq
SQLITE_PRIVATE CollSeq *sqlite3GetCollSeq(
  Parse *pParse,        /* Parsing context */
  u8 enc,               /* The desired encoding for the collating sequence */
  CollSeq *pColl,       /* Collating sequence with native encoding, or NULL */
  const char *zName     /* Collating sequence name */
){
  CollSeq *p;
  sqlite3 *db = pParse->db;

  p = pColl;
  if( !p ){
    p = sqlite3FindCollSeq(db, enc, zName, 0);
  }
  if( !p || !p->xCmp ){
    /* No collation sequence of this type for this encoding is registered.
    ** Call the collation factory to see if it can supply us with one.
    */
    callCollNeeded(db, enc, zName);
    p = sqlite3FindCollSeq(db, enc, zName, 0);
  }
  if( p && !p->xCmp && synthCollSeq(db, p) ){
    p = 0;
  }
  assert( !p || p->xCmp );
  if( p==0 ){
    sqlite3ErrorMsg(pParse, "no such collation sequence: %s", zName);
  }
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r13
movq %rdi, %r14
movq (%rdi), %r15
movzbl %sil, %r12d
testq %rdx, %rdx
jne 0x46912
movq %r15, %rdi
movl %r12d, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x46a5b
movq %rax, %r13
testq %rax, %rax
je 0x4691d
cmpq $0x0, 0x18(%r13)
jne 0x46a49
movq %r14, -0x30(%rbp)
cmpq $0x0, 0x118(%r15)
je 0x46964
movq %r15, %rdi
movq %rbx, %rsi
callq 0xf173
testq %rax, %rax
je 0x469c5
movq %rax, %r13
movq 0x128(%r15), %rdi
movq %r15, %rsi
movl %r12d, %edx
movq %rax, %rcx
callq *0x118(%r15)
movq %r15, %rdi
movq %r13, %rsi
callq 0x968b
cmpq $0x0, 0x120(%r15)
je 0x469c5
movq %r15, %rdi
callq 0x129fe
movq %rax, %r13
pushq $-0x1
popq %rsi
pushq $0x1
popq %rcx
movq %rax, %rdi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0x12a28
pushq $0x2
popq %rsi
movq %r13, %rdi
callq 0xe05a
testq %rax, %rax
je 0x469bd
movq 0x20(%r15), %rcx
movq 0x128(%r15), %rdi
movq 0x18(%rcx), %rcx
movzbl 0x71(%rcx), %edx
movq %r15, %rsi
movq %rax, %rcx
callq *0x120(%r15)
movq %r13, %rdi
callq 0x12a43
movq %r15, %rdi
movl %r12d, %esi
movq %rbx, -0x38(%rbp)
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x46a5b
testq %rax, %rax
je 0x46a30
movq %rax, %r13
cmpq $0x0, 0x18(%rax)
jne 0x46a49
movq (%r13), %r12
xorl %r14d, %r14d
leaq 0x23e86(%rip), %rbx     # 0x6a87c
cmpq $0x3, %r14
je 0x46a30
movzbl (%r14,%rbx), %esi
movq %r15, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x46a5b
incq %r14
cmpq $0x0, 0x18(%rax)
je 0x469f6
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x10(%r13)
movups %xmm0, (%r13)
andq $0x0, 0x20(%r13)
jmp 0x46a49
leaq 0x26861(%rip), %rsi     # 0x6d298
xorl %r13d, %r13d
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rdx
xorl %eax, %eax
callq 0x104d6
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3FindCollSeq
SQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(
  sqlite3 *db,
  u8 enc,
  const char *zName,
  int create
){
  CollSeq *pColl;
  if( zName ){
    pColl = findCollSeqEntry(db, zName, create);
  }else{
    pColl = db->pDfltColl;
  }
  assert( SQLITE_UTF8==1 && SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );
  assert( enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE );
  if( pColl ) pColl += enc-1;
  return pColl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, -0x2c(%rbp)
movq %rdi, %r14
testq %rdx, %rdx
je 0x46b2d
movl %ecx, %ebx
movq %rdx, %r12
movq %rdx, %rdi
callq 0x8f8e
movl %eax, %r13d
leaq 0x290(%r14), %rdi
movq %rdi, -0x38(%rbp)
movq %r12, %rsi
movl %eax, %edx
callq 0x2eeba
movq %rax, %r15
testq %rax, %rax
setne %al
testl %ebx, %ebx
sete %cl
orb %al, %cl
jne 0x46b31
leal 0x79(%r13), %esi
movq %r14, %rdi
callq 0xf4ae
testq %rax, %rax
je 0x46b28
movq %rax, %r15
movl %r13d, %eax
movq %r15, %rbx
addq $0x78, %rbx
movq %rbx, (%r15)
movb $0x1, 0x8(%r15)
movq %rbx, 0x28(%r15)
movb $0x2, 0x30(%r15)
movq %rbx, 0x50(%r15)
movb $0x3, 0x58(%r15)
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %r12
movq %rax, %rdx
callq 0x82c0
movb $0x0, 0x78(%r15,%r12)
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
movl %r13d, %edx
movq %r15, %rcx
callq 0x2f1a7
testq %rax, %rax
je 0x46b31
movb $0x1, 0x50(%r14)
movq %r14, %rdi
movq %rax, %rsi
callq 0x968b
xorl %r15d, %r15d
jmp 0x46b31
movq 0x10(%r14), %r15
movzbl -0x2c(%rbp), %eax
imulq $0x28, %rax, %rax
testq %r15, %r15
leaq -0x28(%rax,%r15), %rax
cmoveq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: resolveAsName
static int resolveAsName(
  Parse *pParse,     /* Parsing context for error messages */
  ExprList *pEList,  /* List of expressions to scan */
  Expr *pE           /* Expression we are trying to match */
){
  int i;             /* Loop counter */

  UNUSED_PARAMETER(pParse);

  if( pE->op==TK_ID ){
    char *zCol = pE->u.zToken;
    for(i=0; i<pEList->nExpr; i++){
      char *zAs = pEList->a[i].zName;
      if( zAs!=0 && sqlite3StrICmp(zAs, zCol)==0 ){
        return i+1;
      }
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpb $0x1a, (%rsi)
jne 0x46bb2
movq %rdi, %r14
movq 0x8(%rsi), %r15
movl (%rdi), %r12d
xorl %ebx, %ebx
testl %r12d, %r12d
cmovlel %ebx, %r12d
xorl %r13d, %r13d
cmpq %r12, %r13
je 0x46bb2
movq 0x8(%r14), %rax
movq %r13, %rcx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rdi
testq %rdi, %rdi
je 0x46baa
movq %r15, %rsi
callq 0xb1bf
incq %r13
testl %eax, %eax
jne 0x46b7f
jmp 0x46baf
incq %r13
jmp 0x46b7f
movl %r13d, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ResolveOrderGroupBy
SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(
  Parse *pParse,        /* Parsing context.  Leave error messages here */
  Select *pSelect,      /* The SELECT statement containing the clause */
  ExprList *pOrderBy,   /* The ORDER BY or GROUP BY clause to be processed */
  const char *zType     /* "ORDER" or "GROUP" */
){
  int i;
  sqlite3 *db = pParse->db;
  ExprList *pEList;
  struct ExprList_item *pItem;

  if( pOrderBy==0 || pParse->db->mallocFailed ) return 0;
#if SQLITE_MAX_COLUMN
  if( pOrderBy->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){
    sqlite3ErrorMsg(pParse, "too many terms in %s BY clause", zType);
    return 1;
  }
#endif
  pEList = pSelect->pEList;
  assert( pEList!=0 );  /* sqlite3SelectNew() guarantees this */
  for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
    if( pItem->iOrderByCol ){
      if( pItem->iOrderByCol>pEList->nExpr ){
        resolveOutOfRangeError(pParse, zType, i+1, pEList->nExpr);
        return 1;
      }
      resolveAlias(pParse, pEList, pItem->iOrderByCol-1, pItem->pExpr, zType,0);
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, -0x30(%rbp)
xorl %eax, %eax
testq %rdx, %rdx
je 0x46e67
movq %rdi, %r14
movq (%rdi), %rcx
cmpb $0x0, 0x50(%rcx)
jne 0x46e67
movq %rdx, %r12
movl (%rdx), %eax
cmpl 0x70(%rcx), %eax
jle 0x46e0a
leaq 0x264f5(%rip), %rsi     # 0x6d2ef
movq %r14, %rdi
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x104d6
jmp 0x46e64
movq (%rsi), %r15
movq 0x8(%r12), %rbx
pushq $0x1
popq %r13
leal -0x1(%r13), %ecx
cmpl %eax, %ecx
jge 0x46e51
movzwl 0x1a(%rbx), %edx
testl %edx, %edx
je 0x46e48
movl (%r15), %ecx
cmpl %edx, %ecx
jl 0x46e55
decl %edx
movq (%rbx), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq -0x30(%rbp), %r8
xorl %r9d, %r9d
callq 0x43f81
movl (%r12), %eax
addq $0x20, %rbx
incl %r13d
jmp 0x46e16
xorl %eax, %eax
jmp 0x46e67
movq %r14, %rdi
movq -0x30(%rbp), %rsi
movl %r13d, %edx
callq 0x46bc3
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprListCompare
SQLITE_PRIVATE int sqlite3ExprListCompare(ExprList *pA, ExprList *pB, int iTab){
  int i;
  if( pA==0 && pB==0 ) return 0;
  if( pA==0 || pB==0 ) return 1;
  if( pA->nExpr!=pB->nExpr ) return 1;
  for(i=0; i<pA->nExpr; i++){
    Expr *pExprA = pA->a[i].pExpr;
    Expr *pExprB = pB->a[i].pExpr;
    if( pA->a[i].sortOrder!=pB->a[i].sortOrder ) return 1;
    if( sqlite3ExprCompare(pExprA, pExprB, iTab) ) return 1;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, -0x2c(%rbp)
xorl %ebx, %ebx
movq %rdi, %rax
orq %rsi, %rax
je 0x46efd
movq %rsi, %r15
movq %rdi, %r12
testq %rsi, %rsi
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
pushq $0x1
popq %rbx
jne 0x46efd
movl (%r12), %r13d
cmpl (%r15), %r13d
jne 0x46efd
xorl %ecx, %ecx
testl %r13d, %r13d
cmovlel %ecx, %r13d
shlq $0x5, %r13
addq $0x20, %r13
leaq 0x20(%rcx), %r14
cmpq %r14, %r13
je 0x46efb
movq 0x8(%r12), %rax
movq 0x8(%r15), %rdx
movb 0x18(%rax,%rcx), %sil
cmpb 0x18(%rdx,%rcx), %sil
jne 0x46efd
movq (%rdx,%rcx), %rsi
movq (%rax,%rcx), %rdi
movl -0x2c(%rbp), %edx
callq 0x46bdc
movq %r14, %rcx
testl %eax, %eax
je 0x46ec4
jmp 0x46efd
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: identLength
static int identLength(const char *z){
  int n;
  for(n=0; *z; n++, z++){
    if( *z=='"' ){ n++; }
  }
  return n + 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movzbl (%rdi), %ecx
cmpl $0x22, %ecx
je 0x46f22
testl %ecx, %ecx
jne 0x46f24
jmp 0x46f2b
incl %eax
incl %eax
incq %rdi
jmp 0x46f14
addl $0x2, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: identPut
static void identPut(char *z, int *pIdx, char *zSignedIdent){
  unsigned char *zIdent = (unsigned char*)zSignedIdent;
  int i, j, needQuote;
  i = *pIdx;

  for(j=0; zIdent[j]; j++){
    if( !sqlite3Isalnum(zIdent[j]) && zIdent[j]!='_' ) break;
  }
  needQuote = sqlite3Isdigit(zIdent[0]) || sqlite3KeywordCode(zIdent, j)!=TK_ID;
  if( !needQuote ){
    needQuote = zIdent[j];
  }

  if( needQuote ) z[i++] = '"';
  for(j=0; zIdent[j]; j++){
    z[i++] = zIdent[j];
    if( zIdent[j]=='"' ) z[i++] = '"';
  }
  if( needQuote ) z[i++] = '"';
  z[i] = 0;
  *pIdx = i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r8
movq %rdi, %r14
movl (%rsi), %r12d
movslq %r12d, %r13
xorl %esi, %esi
leaq 0x2101a(%rip), %rax     # 0x67f70
movzbl (%r15,%rsi), %ebx
testq %rbx, %rbx
je 0x46f73
cmpq $0x5f, %rbx
je 0x46f6e
movb (%rbx,%rax), %cl
andb $0x6, %cl
je 0x46f73
incq %rsi
jmp 0x46f56
movzbl (%r15), %eax
addq $-0x3a, %rax
cmpq $-0xb, %rax
ja 0x46f9d
movq %r15, %rdi
movq %r8, -0x30(%rbp)
callq 0x30f61
movq -0x30(%rbp), %r8
testq %rbx, %rbx
jne 0x46f9d
movb $0x1, %cl
cmpl $0x1a, %eax
je 0x46fc9
leal 0x1(%r13), %r12d
movb $0x22, (%r14,%r13)
xorl %ecx, %ecx
jmp 0x46fc9
movb %dl, (%r14,%rax)
incq %rax
cmpb $0x22, (%r15)
jne 0x46fc3
addl $0x2, %r12d
movb $0x22, (%r14,%rax)
movl %r12d, %eax
incq %r15
movl %eax, %r12d
movb (%r15), %dl
movslq %r12d, %rax
testb %dl, %dl
jne 0x46faa
testb %cl, %cl
jne 0x46fdf
incl %r12d
movb $0x22, (%r14,%rax)
movslq %r12d, %rax
movb $0x0, (%r14,%rax)
movl %eax, (%r8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ReleaseTempReg
SQLITE_PRIVATE void sqlite3ReleaseTempReg(Parse *pParse, int iReg){
  if( iReg && pParse->nTempReg<ArraySize(pParse->aTempReg) ){
    int i;
    struct yColCache *p;
    for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
      if( p->iReg==iReg ){
        p->tempReg = 1;
        return;
      }
    }
    pParse->aTempReg[pParse->nTempReg++] = iReg;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %esi, %esi
je 0x47058
movzbl 0x1f(%rdi), %eax
cmpq $0x7, %rax
ja 0x47058
xorl %ecx, %ecx
cmpl $0xf0, %ecx
je 0x47047
cmpl %esi, 0x84(%rdi,%rcx)
je 0x47053
addq $0x18, %rcx
jmp 0x47030
leal 0x1(%rax), %ecx
movb %cl, 0x1f(%rdi)
movl %esi, 0x28(%rdi,%rax,4)
jmp 0x47058
movb $0x1, 0x7c(%rdi,%rcx)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: exprIsConst
static int exprIsConst(Expr *p, int initFlag){
  Walker w;
  memset(&w, 0, sizeof(w));
  w.u.i = initFlag;
  w.xExprCallback = exprNodeIsConstant;
  w.xSelectCallback = selectNodeIsConstant;
  sqlite3WalkExpr(&w, p);
  return w.u.i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rax
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %rbx
movups %xmm0, 0x10(%rbx)
andq $0x0, 0x20(%rbx)
movl %esi, 0x20(%rbx)
leaq 0x23(%rip), %rcx        # 0x470a3
movq %rcx, (%rbx)
leaq 0x58(%rip), %rcx        # 0x470e2
movq %rcx, 0x8(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4336b
movl 0x20(%rbx), %eax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3SrcListLookup
SQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse *pParse, SrcList *pSrc){
  struct SrcList_item *pItem = pSrc->a;
  Table *pTab;
  assert( pItem && pSrc->nSrc==1 );
  pTab = sqlite3LocateTableItem(pParse, 0, pItem);
  sqlite3DeleteTable(pParse->db, pItem->pTab);
  pItem->pTab = pTab;
  if( pTab ){
    pTab->nRef++;
  }
  if( sqlite3IndexedByLookup(pParse, pItem) ){
    pTab = 0;
  }
  return pTab;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %r15
leaq 0x8(%rsi), %r14
xorl %esi, %esi
movq %r14, %rdx
callq 0x45a80
movq %rax, %rbx
movq (%r15), %rdi
movq 0x28(%r12), %rsi
callq 0x93dc
movq %rbx, 0x28(%r12)
testq %rbx, %rbx
je 0x4712e
incw 0x44(%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x45cb2
xorl %ecx, %ecx
testl %eax, %eax
cmoveq %rbx, %rcx
movq %rcx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3FixSrcList
SQLITE_PRIVATE int sqlite3FixSrcList(
  DbFixer *pFix,       /* Context of the fixation */
  SrcList *pList       /* The Source list to check and modify */
){
  int i;
  const char *zDb;
  struct SrcList_item *pItem;

  if( NEVER(pList==0) ) return 0;
  zDb = pFix->zDb;
  for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
    if( pItem->zDatabase && sqlite3StrICmp(pItem->zDatabase, zDb) ){
      sqlite3ErrorMsg(pFix->pParse,
         "%s %T cannot reference objects in database %s",
         pFix->zType, pFix->pName, pItem->zDatabase);
      return 1;
    }
    sqlite3DbFree(pFix->pParse->db, pItem->zDatabase);
    pItem->zDatabase = 0;
    pItem->pSchema = pFix->pSchema;
#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER)
    if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
    if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
#endif
  }
  return 0;
}

// Assembly:
testq %rsi, %rsi
je 0x471de
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movq 0x10(%rdi), %rax
movq %rax, -0x30(%rbp)
leaq 0x8(%rsi), %rbx
xorl %r12d, %r12d
movzbl (%r15), %eax
cmpl %eax, %r12d
jae 0x471e1
movq 0x8(%rbx), %r13
testq %r13, %r13
je 0x4719b
movq %r13, %rdi
movq -0x30(%rbp), %rsi
callq 0xb1bf
testl %eax, %eax
jne 0x471e5
movq (%r14), %rax
movq (%rax), %rdi
movq %r13, %rsi
callq 0x968b
andq $0x0, 0x8(%rbx)
movq 0x8(%r14), %rax
movq %rax, (%rbx)
movq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0x47584
testl %eax, %eax
jne 0x47201
movq 0x40(%rbx), %rsi
movq %r14, %rdi
callq 0x475f0
testl %eax, %eax
jne 0x47201
incl %r12d
addq $0x68, %rbx
jmp 0x47179
xorl %eax, %eax
retq
xorl %eax, %eax
jmp 0x47204
movq (%r14), %rdi
movq 0x18(%r14), %rdx
movq 0x20(%r14), %rcx
leaq 0x263ff(%rip), %rsi     # 0x6d5f6
movq %r13, %r8
xorl %eax, %eax
callq 0x104d6
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3LocateCollSeq
SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char *zName){
  sqlite3 *db = pParse->db;
  u8 enc = ENC(db);
  u8 initbusy = db->init.busy;
  CollSeq *pColl;

  pColl = sqlite3FindCollSeq(db, enc, zName, initbusy);
  if( !initbusy && (!pColl || !pColl->xCmp) ){
    pColl = sqlite3GetCollSeq(pParse, enc, pColl, zName);
  }

  return pColl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x20(%rdi), %rax
movq 0x18(%rax), %rax
movzbl 0x99(%rdi), %r12d
movzbl 0x71(%rax), %r15d
movl %r15d, %esi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x46a5b
testl %r12d, %r12d
je 0x47258
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testq %rax, %rax
je 0x47264
cmpq $0x0, 0x18(%rax)
jne 0x4724f
movq %r14, %rdi
movl %r15d, %esi
movq %rax, %rdx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x468d4
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3FixSelect
SQLITE_PRIVATE int sqlite3FixSelect(
  DbFixer *pFix,       /* Context of the fixation */
  Select *pSelect      /* The SELECT statement to be fixed to one database */
){
  while( pSelect ){
    if( sqlite3FixExprList(pFix, pSelect->pEList) ){
      return 1;
    }
    if( sqlite3FixSrcList(pFix, pSelect->pSrc) ){
      return 1;
    }
    if( sqlite3FixExpr(pFix, pSelect->pWhere) ){
      return 1;
    }
    if( sqlite3FixExpr(pFix, pSelect->pHaving) ){
      return 1;
    }
    pSelect = pSelect->pPrior;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
pushq $0x1
popq %rbx
testq %r14, %r14
je 0x475e1
movq (%r14), %rsi
movq %r15, %rdi
callq 0x47656
testl %eax, %eax
jne 0x475e3
movq 0x28(%r14), %rsi
movq %r15, %rdi
callq 0x4714d
testl %eax, %eax
jne 0x475e3
movq 0x30(%r14), %rsi
movq %r15, %rdi
callq 0x475f0
testl %eax, %eax
jne 0x475e3
movq 0x40(%r14), %rsi
movq %r15, %rdi
callq 0x475f0
testl %eax, %eax
jne 0x475e3
movq 0x50(%r14), %r14
jmp 0x47597
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3FixExpr
SQLITE_PRIVATE int sqlite3FixExpr(
  DbFixer *pFix,     /* Context of the fixation */
  Expr *pExpr        /* The expression to be fixed to one database */
){
  while( pExpr ){
    if( ExprHasAnyProperty(pExpr, EP_TokenOnly) ) break;
    if( ExprHasProperty(pExpr, EP_xIsSelect) ){
      if( sqlite3FixSelect(pFix, pExpr->x.pSelect) ) return 1;
    }else{
      if( sqlite3FixExprList(pFix, pExpr->x.pList) ) return 1;
    }
    if( sqlite3FixExpr(pFix, pExpr->pRight) ){
      return 1;
    }
    pExpr = pExpr->pLeft;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x1
popq %r15
xorl %eax, %eax
testq %rbx, %rbx
je 0x4764b
movzwl 0x2(%rbx), %ecx
btl $0xe, %ecx
jb 0x4764b
btl $0xb, %ecx
movq 0x20(%rbx), %rsi
movq %r14, %rdi
jb 0x47629
callq 0x47656
jmp 0x4762e
callq 0x47584
testl %eax, %eax
jne 0x47648
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x475f0
testl %eax, %eax
jne 0x47648
movq 0x10(%rbx), %rbx
jmp 0x47604
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3FixExprList
SQLITE_PRIVATE int sqlite3FixExprList(
  DbFixer *pFix,     /* Context of the fixation */
  ExprList *pList    /* The expression to be fixed to one database */
){
  int i;
  struct ExprList_item *pItem;
  if( pList==0 ) return 0;
  for(i=0, pItem=pList->a; i<pList->nExpr; i++, pItem++){
    if( sqlite3FixExpr(pFix, pItem->pExpr) ){
      return 1;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x47696
movq %rsi, %r14
movq %rdi, %r15
movq 0x8(%rsi), %r12
xorl %ebx, %ebx
xorl %r13d, %r13d
cmpl (%r14), %r13d
jge 0x4769d
movq (%r12), %rsi
movq %r15, %rdi
callq 0x475f0
testl %eax, %eax
jne 0x4769a
incl %r13d
addq $0x20, %r12
jmp 0x47678
xorl %ebx, %ebx
jmp 0x4769d
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3IndexKeyinfo
SQLITE_PRIVATE KeyInfo *sqlite3IndexKeyinfo(Parse *pParse, Index *pIdx){
  int i;
  int nCol = pIdx->nColumn;
  KeyInfo *pKey;

  pKey = sqlite3KeyInfoAlloc(pParse->db, nCol);
  if( pKey ){
    for(i=0; i<nCol; i++){
      char *zColl = pIdx->azColl[i];
      assert( zColl );
      pKey->aColl[i] = sqlite3LocateCollSeq(pParse, zColl);
      pKey->aSortOrder[i] = pIdx->aSortOrder[i];
    }
  }

  if( pParse->nErr ){
    sqlite3DbFree(pParse->db, pKey);
    pKey = 0;
  }
  return pKey;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
movzwl 0x54(%rsi), %r12d
movq (%rdi), %rdi
movl %r12d, %esi
callq 0x3107c
movq %rax, %rbx
testq %rax, %rax
je 0x4770c
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x4770c
movq 0x40(%r15), %rax
movq (%rax,%r13,8), %rsi
movq %r14, %rdi
callq 0x47213
movq %rax, 0x18(%rbx,%r13,8)
movq 0x38(%r15), %rax
movb (%rax,%r13), %al
movq 0x10(%rbx), %rcx
movb %al, (%rcx,%r13)
incq %r13
jmp 0x476dd
cmpl $0x0, 0x50(%r14)
je 0x47720
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x968b
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3HaltConstraint
SQLITE_PRIVATE void sqlite3HaltConstraint(
  Parse *pParse,    /* Parsing context */
  int errCode,      /* extended error code */
  int onError,      /* Constraint type */
  char *p4,         /* Error message */
  int p4type        /* P4_STATIC or P4_TRANSIENT */
){
  Vdbe *v = sqlite3GetVdbe(pParse);
  assert( (errCode&0xff)==SQLITE_CONSTRAINT );
  if( onError==OE_Abort ){
    sqlite3MayAbort(pParse);
  }
  sqlite3VdbeAddOp4(v, OP_Halt, errCode, onError, 0, p4, p4type);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r12d
movq %rcx, %rbx
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %r13
callq 0x41ef4
cmpl $0x2, %r14d
jne 0x4790a
movq 0x1d8(%r13), %rcx
testq %rcx, %rcx
cmoveq %r13, %rcx
movb $0x1, 0x24(%rcx)
movl %r12d, (%rsp)
pushq $0x14
popq %rsi
movq %rax, %rdi
movl %r15d, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
movq %rbx, %r9
callq 0x41fd2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VdbeMakeLabel
SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe *p){
  int i = p->nLabel++;
  assert( p->magic==VDBE_MAGIC_INIT );
  if( (i & (i-1))==0 ){
    p->aLabel = sqlite3DbReallocOrFree(p->db, p->aLabel, 
                                       (i*2+1)*sizeof(p->aLabel[0]));
  }
  if( p->aLabel ){
    p->aLabel[i] = -1;
  }
  return -1-i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movslq 0x3c(%rdi), %rbx
leal 0x1(%rbx), %eax
movl %eax, 0x3c(%rdi)
leal -0x1(%rbx), %eax
testl %eax, %ebx
jne 0x47968
movq (%r14), %rdi
movq 0x40(%r14), %rsi
leal 0x4(,%rbx,8), %edx
callq 0x2eac1
movq %rax, 0x40(%r14)
jmp 0x4796c
movq 0x40(%r14), %rax
testq %rax, %rax
je 0x47975
orl $-0x1, (%rax,%rbx,4)
notl %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3GetTempRange
SQLITE_PRIVATE int sqlite3GetTempRange(Parse *pParse, int nReg){
  int i, n;
  i = pParse->iRangeReg;
  n = pParse->nRangeReg;
  if( nReg<=n ){
    assert( !usedAsColumnCache(pParse, i, i+n-1) );
    pParse->iRangeReg += nReg;
    pParse->nRangeReg -= nReg;
  }else{
    i = pParse->nMem+1;
    pParse->nMem += nReg;
  }
  return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x48(%rdi), %ecx
subl %esi, %ecx
jge 0x47c44
movl 0x58(%rdi), %ecx
leal 0x1(%rcx), %eax
addl %ecx, %esi
movl %esi, 0x58(%rdi)
jmp 0x47c4f
movl 0x4c(%rdi), %eax
addl %eax, %esi
movl %esi, 0x4c(%rdi)
movl %ecx, 0x48(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ColumnDefault
SQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *v, Table *pTab, int i, int iReg){
  assert( pTab!=0 );
  if( !pTab->pSelect ){
    sqlite3_value *pValue;
    u8 enc = ENC(sqlite3VdbeDb(v));
    Column *pCol = &pTab->aCol[i];
    VdbeComment((v, "%s.%s", pTab->zName, pCol->zName));
    assert( i<pTab->nCol );
    sqlite3ValueFromExpr(sqlite3VdbeDb(v), pCol->pDflt, enc, 
                         pCol->affinity, &pValue);
    if( pValue ){
      sqlite3VdbeChangeP4(v, -1, (const char *)pValue, P4_MEM);
    }
#ifndef SQLITE_OMIT_FLOATING_POINT
    if( iReg>=0 && pTab->aCol[i].affinity==SQLITE_AFF_REAL ){
      sqlite3VdbeAddOp1(v, OP_RealAffinity, iReg);
    }
#endif
  }
}

// Assembly:
cmpq $0x0, 0x18(%rsi)
je 0x47c59
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x20(%rdi), %rax
movq 0x18(%rax), %rax
movzbl 0x71(%rax), %eax
movq 0x8(%rsi), %rcx
movslq %edx, %rdx
imulq $0x30, %rdx, %r13
movq 0x8(%rcx,%r13), %rsi
movzbl 0x29(%rcx,%r13), %ecx
leaq -0x30(%rbp), %r12
movl %eax, %edx
movq %r12, %r8
callq 0x4a065
movq (%r12), %rdx
testq %rdx, %rdx
je 0x47cb9
pushq $-0x1
popq %rsi
pushq $-0x8
popq %rcx
movq %r14, %rdi
callq 0x1074b
testl %ebx, %ebx
js 0x47cd6
movq 0x8(%r15), %rax
cmpb $0x65, 0x29(%rax,%r13)
jne 0x47cd6
pushq $0x22
popq %rsi
movq %r14, %rdi
movl %ebx, %edx
callq 0x42436
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3IndexAffinityStr
SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *v, Index *pIdx){
  if( !pIdx->zColAff ){
    /* The first time a column affinity string for a particular index is
    ** required, it is allocated and populated here. It is then stored as
    ** a member of the Index structure for subsequent use.
    **
    ** The column affinity string will eventually be deleted by
    ** sqliteDeleteIndex() when the Index structure itself is cleaned
    ** up.
    */
    int n;
    Table *pTab = pIdx->pTable;
    sqlite3 *db = sqlite3VdbeDb(v);
    pIdx->zColAff = (char *)sqlite3DbMallocRaw(0, pIdx->nColumn+2);
    if( !pIdx->zColAff ){
      db->mallocFailed = 1;
      return 0;
    }
    for(n=0; n<pIdx->nColumn; n++){
      pIdx->zColAff[n] = pTab->aCol[pIdx->aiColumn[n]].affinity;
    }
    pIdx->zColAff[n++] = SQLITE_AFF_INTEGER;
    pIdx->zColAff[n] = 0;
  }
 
  return pIdx->zColAff;
}

// Assembly:
movq 0x20(%rsi), %rax
testq %rax, %rax
je 0x47cef
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0x18(%rsi), %r14
movq (%rdi), %r15
movzwl 0x54(%rsi), %edi
addl $0x2, %edi
callq 0x9c40
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x47d5a
xorl %eax, %eax
movzwl 0x54(%rbx), %ecx
cmpq %rcx, %rax
jae 0x47d43
movq 0x8(%r14), %rcx
movq 0x8(%rbx), %rdx
movq 0x20(%rbx), %rsi
movslq (%rdx,%rax,4), %rdx
imulq $0x30, %rdx, %rdx
movb 0x29(%rcx,%rdx), %cl
movb %cl, (%rsi,%rax)
incq %rax
jmp 0x47d1a
movq 0x20(%rbx), %rcx
movb $0x64, (%rcx,%rax)
movq 0x20(%rbx), %rcx
movb $0x0, 0x1(%rcx,%rax)
movq 0x20(%rbx), %rax
jmp 0x47d61
movb $0x1, 0x50(%r15)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ReleaseTempRange
SQLITE_PRIVATE void sqlite3ReleaseTempRange(Parse *pParse, int iReg, int nReg){
  sqlite3ExprCacheRemove(pParse, iReg, nReg);
  if( nReg>pParse->nRangeReg ){
    pParse->nRangeReg = nReg;
    pParse->iRangeReg = iReg;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %ebx
movq %rdi, %r15
callq 0x49537
cmpl %r14d, 0x48(%r15)
jge 0x47d91
movl %r14d, 0x48(%r15)
movl %ebx, 0x4c(%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCachePop
SQLITE_PRIVATE void sqlite3ExprCachePop(Parse *pParse, int N){
  int i;
  struct yColCache *p;
  assert( N>0 );
  assert( pParse->iCacheLevel>=N );
  pParse->iCacheLevel -= N;
  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    if( p->iReg && p->iLevel>pParse->iCacheLevel ){
      cacheEntryClear(pParse, p);
      p->iReg = 0;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
decl 0x6c(%rdi)
leaq 0x74(%rdi), %r14
pushq $0xa
popq %r15
subl $0x1, %r15d
jb 0x4807f
cmpl $0x0, 0x10(%r14)
je 0x48079
movl 0xc(%r14), %eax
cmpl 0x6c(%rbx), %eax
jle 0x48079
movq %rbx, %rdi
movq %r14, %rsi
callq 0x484b3
andl $0x0, 0x10(%r14)
addq $0x18, %r14
jmp 0x48053
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCodeTemp
SQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse *pParse, Expr *pExpr, int *pReg){
  int r1 = sqlite3GetTempReg(pParse);
  int r2 = sqlite3ExprCodeTarget(pParse, pExpr, r1);
  if( r2==r1 ){
    *pReg = r1;
  }else{
    sqlite3ReleaseTempReg(pParse, r1);
    *pReg = 0;
  }
  return r2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
callq 0x46ff9
movl %eax, %r14d
movq %r15, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x484da
movl %eax, %r12d
cmpl %r14d, %eax
je 0x480c9
movq %r15, %rdi
movl %r14d, %esi
callq 0x4701c
xorl %r14d, %r14d
movl %r14d, (%rbx)
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: codeCompare
static int codeCompare(
  Parse *pParse,    /* The parsing (and code generating) context */
  Expr *pLeft,      /* The left operand */
  Expr *pRight,     /* The right operand */
  int opcode,       /* The comparison opcode */
  int in1, int in2, /* Register holding operands */
  int dest,         /* Jump here if true.  */
  int jumpIfNull    /* If true, jump if either operand is NULL */
){
  int p5;
  int addr;
  CollSeq *p4;

  p4 = sqlite3BinaryCompareCollSeq(pParse, pLeft, pRight);
  p5 = binaryCompareP5(pLeft, pRight, jumpIfNull);
  addr = sqlite3VdbeAddOp4(pParse->pVdbe, opcode, in2, dest, in1,
                           (void*)p4, P4_COLLSEQ);
  sqlite3VdbeChangeP5(pParse->pVdbe, (u8)p5);
  return addr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, -0x2c(%rbp)
movl %r8d, -0x30(%rbp)
movl %ecx, %r12d
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %rbx
callq 0x49bae
movq %rax, %r15
movq %r13, %rdi
callq 0x4667c
movsbl %al, %esi
movq %r14, %rdi
callq 0x49bf2
movl %eax, %r13d
movq 0x10(%rbx), %rdi
movl $0xfffffffc, (%rsp)     # imm = 0xFFFFFFFC
movl %r12d, %esi
movl -0x2c(%rbp), %edx
movl 0x10(%rbp), %ecx
movl -0x30(%rbp), %r8d
movq %r15, %r9
callq 0x41fd2
movq 0x10(%rbx), %rcx
movq 0x8(%rcx), %rax
testq %rax, %rax
je 0x4815b
movl 0x18(%rbp), %edx
orb %dl, %r13b
movslq 0x34(%rcx), %rcx
imulq $0x18, %rcx, %rcx
movb %r13b, -0x15(%rax,%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: exprCodeBetween
static void exprCodeBetween(
  Parse *pParse,    /* Parsing and code generating context */
  Expr *pExpr,      /* The BETWEEN expression */
  int dest,         /* Jump here if the jump is taken */
  int jumpIfTrue,   /* Take the jump if the BETWEEN is true */
  int jumpIfNull    /* Take the jump if the BETWEEN is NULL */
){
  Expr exprAnd;     /* The AND operator in  x>=y AND x<=z  */
  Expr compLeft;    /* The  x>=y  term */
  Expr compRight;   /* The  x<=z  term */
  Expr exprX;       /* The  x  subexpression */
  int regFree1 = 0; /* Temporary use register */

  assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
  exprX = *pExpr->pLeft;
  exprAnd.op = TK_AND;
  exprAnd.pLeft = &compLeft;
  exprAnd.pRight = &compRight;
  compLeft.op = TK_GE;
  compLeft.pLeft = &exprX;
  compLeft.pRight = pExpr->x.pList->a[0].pExpr;
  compRight.op = TK_LE;
  compRight.pLeft = &exprX;
  compRight.pRight = pExpr->x.pList->a[1].pExpr;
  exprX.iTable = sqlite3ExprCodeTemp(pParse, &exprX, &regFree1);
  exprX.op2 = exprX.op;
  exprX.op = TK_REGISTER;
  if( jumpIfTrue ){
    sqlite3ExprIfTrue(pParse, &exprAnd, dest, jumpIfNull);
  }else{
    sqlite3ExprIfFalse(pParse, &exprAnd, dest, jumpIfNull);
  }
  sqlite3ReleaseTempReg(pParse, regFree1);

  /* Ensure adequate test coverage */
  testcase( jumpIfTrue==0 && jumpIfNull==0 && regFree1==0 );
  testcase( jumpIfTrue==0 && jumpIfNull==0 && regFree1!=0 );
  testcase( jumpIfTrue==0 && jumpIfNull!=0 && regFree1==0 );
  testcase( jumpIfTrue==0 && jumpIfNull!=0 && regFree1!=0 );
  testcase( jumpIfTrue!=0 && jumpIfNull==0 && regFree1==0 );
  testcase( jumpIfTrue!=0 && jumpIfNull==0 && regFree1!=0 );
  testcase( jumpIfTrue!=0 && jumpIfNull!=0 && regFree1==0 );
  testcase( jumpIfTrue!=0 && jumpIfNull!=0 && regFree1!=0 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movl %r8d, %r14d
movl %ecx, %r12d
movl %edx, %r15d
leaq -0x2c(%rbp), %rdx
andl $0x0, (%rdx)
movq %rsi, %rax
movq %rdi, %rbx
movq 0x10(%rsi), %rsi
pushq $0x9
popq %rcx
leaq -0xc0(%rbp), %r13
movq %r13, %rdi
rep  movsq (%rsi), %es:(%rdi)
movb $0x45, -0x78(%rbp)
leaq -0x150(%rbp), %rcx
movq %rcx, -0x68(%rbp)
leaq -0x108(%rbp), %rsi
movq %rsi, -0x60(%rbp)
movb $0x50, (%rcx)
movq %r13, 0x10(%rcx)
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
movq %rdi, 0x18(%rcx)
movb $0x4e, (%rsi)
movq %r13, 0x10(%rsi)
movq 0x20(%rax), %rax
movq %rax, 0x18(%rsi)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4808a
movl %eax, 0x2c(%r13)
movb (%r13), %al
movb %al, 0x37(%r13)
movb $-0x7c, (%r13)
leaq -0x78(%rbp), %rsi
movq %rbx, %rdi
movl %r15d, %edx
movl %r14d, %ecx
testl %r12d, %r12d
je 0x4821c
callq 0x47d9c
jmp 0x48221
callq 0x4797e
movl -0x2c(%rbp), %esi
movq %rbx, %rdi
callq 0x4701c
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: cacheEntryClear
static void cacheEntryClear(Parse *pParse, struct yColCache *p){
  if( p->tempReg ){
    if( pParse->nTempReg<ArraySize(pParse->aTempReg) ){
      pParse->aTempReg[pParse->nTempReg++] = p->iReg;
    }
    p->tempReg = 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpb $0x0, 0x8(%rsi)
je 0x484d8
movzbl 0x1f(%rdi), %eax
cmpq $0x7, %rax
ja 0x484d4
movl 0x10(%rsi), %ecx
leal 0x1(%rax), %edx
movb %dl, 0x1f(%rdi)
movl %ecx, 0x28(%rdi,%rax,4)
movb $0x0, 0x8(%rsi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCodeGetColumn
SQLITE_PRIVATE int sqlite3ExprCodeGetColumn(
  Parse *pParse,   /* Parsing and code generating context */
  Table *pTab,     /* Description of the table we are reading from */
  int iColumn,     /* Index of the table column */
  int iTable,      /* The cursor pointing to the table */
  int iReg,        /* Store results here */
  u8 p5            /* P5 value for OP_Column */
){
  Vdbe *v = pParse->pVdbe;
  int i;
  struct yColCache *p;

  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    if( p->iReg>0 && p->iTable==iTable && p->iColumn==iColumn ){
      p->lru = pParse->iCacheCnt++;
      sqlite3ExprCachePinRegister(pParse, p->iReg);
      return p->iReg;
    }
  }  
  assert( v!=0 );
  sqlite3ExprCodeGetColumnOfTable(v, pTab, iTable, iColumn, iReg);
  if( p5 ){
    sqlite3VdbeChangeP5(v, p5);
  }else{   
    sqlite3ExprCacheStore(pParse, iTable, iColumn, iReg);
  }
  return iReg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r13d
movl %edx, %r12d
movq %rdi, %r14
movq 0x10(%rdi), %rbx
movl $0x88, %ecx
cmpl $0x178, %ecx            # imm = 0x178
je 0x4927f
movl -0x4(%r14,%rcx), %eax
testl %eax, %eax
jle 0x49279
cmpl %r13d, -0x14(%r14,%rcx)
jne 0x49279
cmpl %r12d, -0x10(%r14,%rcx)
je 0x492dd
addq $0x18, %rcx
jmp 0x4925a
movq %rbx, %rdi
movl %r13d, %edx
movl %r12d, %ecx
movl %r8d, -0x2c(%rbp)
movl %r9d, %r15d
callq 0x49a4c
movl %r15d, %edx
testb %dl, %dl
je 0x492b9
movl -0x2c(%rbp), %r15d
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x492b4
movslq 0x34(%rbx), %rcx
imulq $0x18, %rcx, %rcx
movb %dl, -0x15(%rax,%rcx)
movl %r15d, %eax
jmp 0x492ce
movq %r14, %rdi
movl %r13d, %esi
movl %r12d, %edx
movl -0x2c(%rbp), %ebx
movl %ebx, %ecx
callq 0x49ac2
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x70(%r14), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x70(%r14)
movl %edx, (%r14,%rcx)
xorl %ecx, %ecx
cmpl $0xf0, %ecx
je 0x492ce
cmpl %eax, 0x84(%r14,%rcx)
jne 0x49306
movb $0x0, 0x7c(%r14,%rcx)
addq $0x18, %rcx
jmp 0x492ee
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: codeInteger
static void codeInteger(Parse *pParse, Expr *pExpr, int negFlag, int iMem){
  Vdbe *v = pParse->pVdbe;
  if( pExpr->flags & EP_IntValue ){
    int i = pExpr->u.iValue;
    assert( i>=0 );
    if( negFlag ) i = -i;
    sqlite3VdbeAddOp2(v, OP_Integer, i, iMem);
  }else{
    int c;
    i64 value;
    const char *z = pExpr->u.zToken;
    assert( z!=0 );
    c = sqlite3Atoi64(z, &value, sqlite3Strlen30(z), SQLITE_UTF8);
    if( c==0 || (c==2 && negFlag) ){
      char *zV;
      if( negFlag ){ value = c==2 ? SMALLEST_INT64 : -value; }
      zV = dup8bytes(v, (char*)&value);
      sqlite3VdbeAddOp4(v, OP_Int64, 0, iMem, 0, zV, P4_INT64);
    }else{
#ifdef SQLITE_OMIT_FLOATING_POINT
      sqlite3ErrorMsg(pParse, "oversized integer: %s%s", negFlag ? "-" : "", z);
#else
      codeReal(v, z, negFlag, iMem);
#endif
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movl %edx, %r15d
movq 0x10(%rdi), %r14
testb $0x4, 0x3(%rsi)
jne 0x49374
movq 0x8(%rsi), %r12
movq %r12, %rdi
callq 0x8f8e
leaq -0x28(%rbp), %rsi
pushq $0x1
popq %rcx
movq %r12, %rdi
movl %eax, %edx
callq 0x15296
testl %eax, %eax
je 0x4939a
cmpl $0x2, %eax
sete %cl
testl %r15d, %r15d
setne %dl
testb %cl, %dl
jne 0x4939f
movq %r14, %rdi
movq %r12, %rsi
movl %r15d, %edx
movl %ebx, %ecx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x493ef
movl 0x8(%rsi), %eax
movl %eax, %edx
negl %edx
testl %r15d, %r15d
cmovel %eax, %edx
pushq $0x15
popq %rsi
movq %r14, %rdi
movl %ebx, %ecx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x41f42
testl %r15d, %r15d
je 0x493ba
xorl %ecx, %ecx
subq -0x28(%rbp), %rcx
cmpl $0x2, %eax
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmovneq %rcx, %rax
movq %rax, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
movq %r14, %rdi
callq 0x49b60
movl $0xfffffff3, (%rsp)     # imm = 0xFFFFFFF3
pushq $0x16
popq %rsi
movq %r14, %rdi
xorl %edx, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x41fd2
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: codeReal
static void codeReal(Vdbe *v, const char *z, int negateFlag, int iMem){
  if( ALWAYS(z!=0) ){
    double value;
    char *zV;
    sqlite3AtoF(z, &value, sqlite3Strlen30(z), SQLITE_UTF8);
    assert( !sqlite3IsNaN(value) ); /* The new AtoF never returns NaN */
    if( negateFlag ) value = -value;
    zV = dup8bytes(v, (char*)&value);
    sqlite3VdbeAddOp4(v, OP_Real, 0, iMem, 0, zV, P4_REAL);
  }
}

// Assembly:
testq %rsi, %rsi
je 0x49472
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, %rdi
callq 0x8f8e
leaq -0x28(%rbp), %rsi
pushq $0x1
popq %rcx
movq %r12, %rdi
movl %eax, %edx
callq 0x20fe3
testl %r15d, %r15d
je 0x4943c
movsd -0x28(%rbp), %xmm0
xorps 0x21f88(%rip), %xmm0    # 0x6b3c0
movlps %xmm0, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
movq %r14, %rdi
callq 0x49b60
movl $0xfffffff4, (%rsp)     # imm = 0xFFFFFFF4
movq %r14, %rdi
movl $0x82, %esi
xorl %edx, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
movq %rax, %r9
callq 0x41fd2
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3HexToBlob
SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3 *db, const char *z, int n){
  char *zBlob;
  int i;

  zBlob = (char *)sqlite3DbMallocRaw(db, n/2 + 1);
  n--;
  if( zBlob ){
    for(i=0; i<n; i+=2){
      zBlob[i/2] = (sqlite3HexToInt(z[i])<<4) | sqlite3HexToInt(z[i+1]);
    }
    zBlob[i/2] = 0;
  }
  return zBlob;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
pushq $0x2
popq %rcx
movl %edx, %eax
cltd
idivl %ecx
leal 0x1(%rax), %esi
callq 0x103b4
testq %rax, %rax
je 0x494e6
decl %r14d
movslq %r14d, %rcx
xorl %edx, %edx
movq %rax, %rsi
cmpq %rcx, %rdx
jge 0x494e3
movb (%rbx,%rdx), %dil
movb 0x1(%rbx,%rdx), %r8b
leal (%rdi,%rdi), %r9d
sarb $0x7, %r9b
andb $0x9, %r9b
addb %dil, %r9b
shlb $0x4, %r9b
leal (%r8,%r8), %edi
sarb $0x7, %dil
andb $0x9, %dil
addb %r8b, %dil
andb $0xf, %dil
orb %r9b, %dil
movb %dil, (%rsi)
addq $0x2, %rdx
incq %rsi
jmp 0x494a0
movb $0x0, (%rsi)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCode
SQLITE_PRIVATE int sqlite3ExprCode(Parse *pParse, Expr *pExpr, int target){
  int inReg;

  assert( target>0 && target<=pParse->nMem );
  if( pExpr && pExpr->op==TK_REGISTER ){
    sqlite3VdbeAddOp2(pParse->pVdbe, OP_Copy, pExpr->iTable, target);
  }else{
    inReg = sqlite3ExprCodeTarget(pParse, pExpr, target);
    assert( pParse->pVdbe || pParse->db->mallocFailed );
    if( inReg!=target && pParse->pVdbe ){
      sqlite3VdbeAddOp2(pParse->pVdbe, OP_SCopy, inReg, target);
    }
  }
  return target;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
testq %rsi, %rsi
je 0x4950d
cmpb $-0x7c, (%rsi)
jne 0x4950d
movq 0x10(%r14), %rdi
movl 0x2c(%rsi), %edx
pushq $0x1c
popq %rsi
jmp 0x49529
movq %r14, %rdi
movl %ebx, %edx
callq 0x484da
cmpl %ebx, %eax
je 0x49530
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x49530
pushq $0x1d
popq %rsi
movl %eax, %edx
movl %ebx, %ecx
callq 0x41f42
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ExprCacheRemove
SQLITE_PRIVATE void sqlite3ExprCacheRemove(Parse *pParse, int iReg, int nReg){
  int i;
  int iLast = iReg + nReg - 1;
  struct yColCache *p;
  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
    int r = p->iReg;
    if( r>=iReg && r<=iLast ){
      cacheEntryClear(pParse, p);
      p->iReg = 0;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
addl %esi, %ebx
leaq 0x74(%rdi), %r12
pushq $0xa
popq %r13
subl $0x1, %r13d
jb 0x4958a
movl 0x10(%r12), %eax
cmpl %r14d, %eax
setge %cl
cmpl %ebx, %eax
setl %al
andb %cl, %al
cmpb $0x1, %al
jne 0x49584
movq %r15, %rdi
movq %r12, %rsi
callq 0x484b3
andl $0x0, 0x10(%r12)
addq $0x18, %r12
jmp 0x49557
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq