LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x45ff7
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 0x62662
movq 0x10(%r13), %r13
testq %r13, %r13
je 0x62561
movl 0x58(%r14), %r12d
incl %r12d
movq 0x10(%r13), %rsi
movq %r14, %rdi
xorl %edx, %edx
movl %r15d, %ecx
movl %r12d, %r8d
callq 0x627bc
movq (%r13), %r13
testq %r13, %r13
jne 0x62544
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x630a1
// File: /workspace/github_c_makefile_star2_O1/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, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x68(%rsi), %rax
testq %rax, %rax
je 0x625c4
movq (%rbx), %rdx
movl 0x28(%rdx), %ecx
testl %ecx, %ecx
jle 0x625cc
movq 0x20(%rdx), %rdx
addq $0x18, %rdx
xorl %r12d, %r12d
cmpq %rax, (%rdx)
je 0x625cf
incq %r12
addq $0x20, %rdx
cmpq %r12, %rcx
jne 0x625ae
movl %ecx, %r12d
jmp 0x625cf
movl $0xfff0bdc0, %r12d      # imm = 0xFFF0BDC0
jmp 0x625cf
xorl %r12d, %r12d
movq 0x1d8(%rbx), %r13
testq %r13, %r13
cmoveq %rbx, %r13
movq %rbx, %rdi
movl %r12d, %esi
callq 0x45ff7
movl $0x1, %eax
movl %r12d, %ecx
shll %cl, %eax
orl %eax, 0x164(%r13)
movl 0x54(%rbx), %r13d
leal 0x3(%r13), %eax
movl %eax, 0x54(%rbx)
testq %r14, %r14
movq %r14, %rax
cmoveq %r15, %rax
leaq 0x191d9(%rip), %rcx     # 0x7b7ee
leaq 0x19990(%rip), %r8      # 0x7bfac
cmoveq %rcx, %r8
movq (%rax), %rcx
movq %rbx, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0x62662
movl 0x58(%rbx), %r8d
incl %r8d
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %r13d, %ecx
callq 0x627bc
movq %rbx, %rdi
movl %r12d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x630a1
// File: /workspace/github_c_makefile_star2_O1/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 0x6319f
movq %rsi, %rdx
movq $-0x1, %rcx
cmpb $0x0, 0x1(%rdx,%rcx)
leaq 0x1(%rcx), %rcx
jne 0x630e9
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
cmpl $0x7, %ecx
jb 0x6319f
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x7(%rdx), %r10
movl $0x7, %eax
leaq 0x17ccf(%rip), %r9      # 0x7adec
xorl %r11d, %r11d
leaq 0x12f39(%rip), %rcx     # 0x76060
leaq 0x17cc5(%rip), %r8      # 0x7adf3
movq %r9, %rbx
movq %rdx, %rsi
movzbl (%rsi), %r14d
testq %r14, %r14
je 0x63160
movb (%r14,%rcx), %r14b
movzbl (%rbx), %r15d
cmpb (%r15,%rcx), %r14b
jne 0x63168
incq %rsi
incq %r11
incq %rbx
decq %rax
jne 0x63134
xorl %eax, %eax
movq %r10, %rsi
jmp 0x6316b
addq %r11, %r9
movq %r9, %r8
jmp 0x6316b
movq %rbx, %r8
testl %eax, %eax
jle 0x63182
movzbl (%rsi), %eax
movb (%rax,%rcx), %sil
movzbl (%r8), %r8d
xorl %eax, %eax
cmpb (%r8,%rcx), %sil
jne 0x63195
leaq 0x199a0(%rip), %rsi     # 0x7cb29
xorl %eax, %eax
callq 0x11724
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: 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 0x4fce9
testq %rax, %rax
je 0x631d8
movq %rax, %r14
xorl %eax, %eax
movq (%rbx), %rdi
movq (%r14), %rcx
movq (%rcx), %rdx
movq %rax, %rsi
callq 0x633fa
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0x631bc
jmp 0x631da
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, %rbx
movq (%rdi), %r15
movq 0x20(%r15), %rax
movq 0x38(%rax), %r13
cmpq %r13, 0x68(%rsi)
je 0x63239
movq %rbx, %rdi
callq 0x4fd20
testq %rax, %rax
je 0x63239
movq %rax, %r12
xorl %r14d, %r14d
cmpq %r13, 0x28(%r12)
jne 0x6322d
movq (%r12), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x633fa
movq %rax, %r14
movq 0x40(%r12), %r12
testq %r12, %r12
jne 0x63214
jmp 0x6323c
xorl %r14d, %r14d
testq %r14, %r14
je 0x63268
movq (%rbx), %rdi
leaq 0x19908(%rip), %rsi     # 0x7cb53
movq %r14, %rdx
xorl %eax, %eax
callq 0x117e2
movq %rax, %r15
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x9c3a
movq %r15, %rax
jmp 0x6326a
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_O1/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 0x63442
movq %rsi, %r14
leaq 0x1972c(%rip), %rsi     # 0x7cb45
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x117e2
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9c3a
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x183fa(%rip), %rsi     # 0x7b843
movq %rbx, %rdi
movq %rcx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x117e2
// File: /workspace/github_c_makefile_star2_O1/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 0x45b57
testq %rax, %rax
je 0x635d0
movq %rax, %r12
movb 0x1f(%rbx), %al
testb %al, %al
je 0x6349e
decb %al
movb %al, 0x1f(%rbx)
movzbl %al, %eax
movl 0x28(%rbx,%rax,4), %r15d
jmp 0x634a9
movl 0x58(%rbx), %r15d
incl %r15d
movl %r15d, 0x58(%rbx)
movl %r14d, -0x2c(%rbp)
movb 0x1f(%rbx), %al
testb %al, %al
je 0x634c3
decb %al
movb %al, 0x1f(%rbx)
movzbl %al, %eax
movl 0x28(%rbx,%rax,4), %r14d
jmp 0x634ce
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 0x45b9e
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 0x45b9e
movq %r12, %rdi
movl $0x50, %esi
movl %r14d, %edx
xorl %ecx, %ecx
movl %r15d, %r8d
callq 0x45b9e
movl %r13d, %edx
movl %eax, %r13d
movq %r12, %rdi
movl $0x2e, %esi
movl $0x2, %ecx
movl %r14d, %r8d
callq 0x45b9e
testl %r13d, %r13d
js 0x6355e
movl 0x34(%r12), %eax
cmpl %r13d, %eax
jbe 0x6355e
movq 0x8(%r12), %rcx
movl %r13d, %edx
leaq (%rdx,%rdx,2), %rdx
movl %eax, 0x8(%rcx,%rdx,8)
testl %r15d, %r15d
je 0x63597
movzbl 0x1f(%rbx), %eax
cmpq $0x7, %rax
ja 0x63597
xorl %ecx, %ecx
cmpl %r15d, 0x84(%rbx,%rcx)
je 0x63592
addq $0x18, %rcx
cmpl $0xf0, %ecx
jne 0x6356f
leal 0x1(%rax), %ecx
movb %cl, 0x1f(%rbx)
movl %r15d, 0x28(%rbx,%rax,4)
jmp 0x63597
movb $0x1, 0x7c(%rbx,%rcx)
testl %r14d, %r14d
je 0x635d0
movzbl 0x1f(%rbx), %eax
cmpq $0x7, %rax
ja 0x635d0
xorl %ecx, %ecx
cmpl %r14d, 0x84(%rbx,%rcx)
je 0x635cb
addq $0x18, %rcx
cmpl $0xf0, %ecx
jne 0x635a8
leal 0x1(%rax), %ecx
movb %cl, 0x1f(%rbx)
movl %r14d, 0x28(%rbx,%rax,4)
jmp 0x635d0
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_O1/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 0x63651
movq 0x238(%rdi), %rbx
testq %rbx, %rbx
je 0x63651
movslq 0x278(%rdi), %r12
movq (%rdi), %r15
leal 0x1(%r12), %esi
movq %r15, %rdi
callq 0x115e9
movq %rax, %r13
testq %rax, %rax
je 0x63638
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 0x63660
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: 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 0x174d4
movq %rax, %r12
testq %rax, %rax
je 0x636ad
movslq %r13d, %rax
movq %r14, (%r12,%rax,8)
movq $0x0, 0x8(%r12,%rax,8)
jmp 0x636f0
movq %r14, -0x30(%rbp)
testl %r13d, %r13d
jle 0x636d1
xorl %r14d, %r14d
movq 0x50(%rbx), %rax
movq (%rax,%r14,8), %rsi
movq %r15, %rdi
callq 0x9c3a
incq %r14
cmpq %r14, %r13
jne 0x636b9
movq %r15, %rdi
movq -0x30(%rbp), %rsi
callq 0x9c3a
movq 0x50(%rbx), %rsi
movq %r15, %rdi
callq 0x9c3a
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_O1/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
movq (%rdx), %rax
cmpb $0x5, 0x26(%rax)
jne 0x63a03
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r14
xorl %r15d, %r15d
cmpl $0x2, %esi
jl 0x63a4f
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x38(%rbp)
movl %esi, %ebx
movl $0x1, %r13d
movq (%r14,%r13,8), %rsi
cmpb $0x5, 0x26(%rsi)
je 0x639f4
movslq %r15d, %rax
movq (%r14,%rax,8), %rdi
movq -0x38(%rbp), %rdx
callq 0x2c122
xorl %r12d, %eax
js 0x63a44
movl %r13d, %r15d
incq %r13
cmpq %r13, %rbx
jne 0x63a22
movslq %r15d, %r15
movq (%r14,%r15,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 0xf373
// File: /workspace/github_c_makefile_star2_O1/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 0x10174
testq %rax, %rax
je 0x63adf
movq %rax, %r15
movq (%r12), %rax
cmpb $0x5, 0x26(%rax)
movzwl 0x24(%r15), %eax
jne 0x63aaa
testw %ax, %ax
jne 0x63adb
jmp 0x63adf
testw %ax, %ax
je 0x63ae8
movq (%rbx), %rax
movq 0x48(%rbx), %rdx
movq 0x8(%rax), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x2c122
xorl %ecx, %ecx
xorl %edx, %edx
testl %eax, %eax
setns %cl
setle %dl
testq %r12, %r12
cmovel %edx, %ecx
testb %cl, %cl
je 0x63ae8
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 0xf373
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %r14
testb $0x20, 0x25(%r14)
jne 0x63b27
movq %r14, %rdi
callq 0x101e6
movw $0x1, 0x24(%r14)
movq $0x0, 0x8(%r14)
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x63b53
cmpw $0x0, 0x24(%r14)
je 0x63b47
addq $0x8, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xf373
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xec23
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x63b7b
movzbl %al, %eax
leaq 0x156de(%rip), %rcx     # 0x79250
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
jmp 0x63b82
leaq 0x1a713(%rip), %rsi     # 0x7e295
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
popq %rbp
jmp 0xef1b
// File: /workspace/github_c_makefile_star2_O1/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 0x63bb8
cmpl $0x3, %eax
je 0x63be1
cmpl $0x4, %eax
jne 0x63c22
movl $0x1, %esi
callq 0xed28
leaq 0x8(%rbx), %rdi
movslq %eax, %r14
callq 0xec23
movq %r14, 0x20(%rbx)
movw $0x4, 0x2c(%rbx)
movb $0x1, 0x2e(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movl $0x1, %esi
callq 0xee49
testq %rax, %rax
je 0x63bdc
movb (%rax), %cl
xorl %r14d, %r14d
testb %cl, %cl
je 0x63c1c
cmpb $-0x40, %cl
jb 0x63c0d
movb 0x1(%rax), %cl
incq %rax
andb $-0x40, %cl
negb %cl
jo 0x63bfe
jmp 0x63c10
incq %rax
incl %r14d
movb (%rax), %cl
testb %cl, %cl
jne 0x63bf9
movl %r14d, %r14d
leaq 0x8(%rbx), %rdi
jmp 0x63bc9
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xf2d0
// File: /workspace/github_c_makefile_star2_O1/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 0x63d5d
movq %rdx, %rbx
movl $0x1, %esi
callq 0xed28
movl %eax, %r15d
movq 0x8(%rbx), %rdi
movl $0x1, %esi
callq 0xed28
movl %eax, -0x2c(%rbp)
xorb $0x4, %r14b
xorb $0x4, %r12b
orb %r14b, %r12b
sete %r14b
movq (%rbx), %rdi
jne 0x63cb3
callq 0xec61
movq %rax, %r12
movq 0x8(%rbx), %rdi
callq 0xec61
jmp 0x63cce
movl $0x1, %esi
callq 0xee49
movq %rax, %r12
movq 0x8(%rbx), %rdi
movl $0x1, %esi
callq 0xee49
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
cmpl %r15d, %eax
jle 0x63cde
xorl %ebx, %ebx
jmp 0x63d44
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 0x63d3d
incl %r13d
leal 0x1(%r15), %ecx
incq %r12
movq %r12, %rdx
movl %ecx, %eax
movq %rdx, %r12
testb %r14b, %r14b
jne 0x63d2c
movb (%r12), %sil
andb $-0x40, %sil
leal -0x1(%rax), %ecx
leaq 0x1(%r12), %rdx
negb %sil
jo 0x63d0b
jmp 0x63d2f
movl %r15d, %ecx
addl $-0x2, %eax
movl %eax, %r15d
cmpl %ecx, -0x2c(%rbp)
jl 0x63ceb
xorl %r13d, %r13d
movl %r13d, %ebx
movq -0x40(%rbp), %r13
leaq 0x8(%r13), %rdi
callq 0xec23
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_O1/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
subq $0x18, %rsp
movq %rdx, %r14
movl %esi, %r13d
movq %rdi, %rbx
callq 0x9d1f
testl %eax, %eax
je 0x63ff5
xorl %r12d, %r12d
jmp 0x64005
leal (,%r13,4), %edi
callq 0xa2a2
movq %rax, %r12
testq %r12, %r12
je 0x6411b
movq %rbx, -0x38(%rbp)
movq %r12, -0x30(%rbp)
testl %r13d, %r13d
jle 0x640ee
movl %r13d, %r13d
xorl %ebx, %ebx
movl $0xfffd, %r15d          # imm = 0xFFFD
movq -0x30(%rbp), %r12
movq (%r14,%rbx,8), %rdi
callq 0xedcc
movl %eax, %ecx
andl $0x1fffff, %ecx         # imm = 0x1FFFFF
cmpq $0x110000, %rax         # imm = 0x110000
cmovael %r15d, %ecx
cmpl $0x7f, %ecx
ja 0x6405a
movb %cl, (%r12)
incq %r12
jmp 0x640e2
movl %ecx, %eax
cmpl $0x7ff, %ecx            # imm = 0x7FF
ja 0x6407e
shrl $0x6, %eax
orb $-0x40, %al
movb %al, (%r12)
andb $0x3f, %cl
orb $-0x80, %cl
movb %cl, 0x1(%r12)
addq $0x2, %r12
jmp 0x640e2
cmpl $0xffff, %ecx           # imm = 0xFFFF
ja 0x640ae
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 0x640e2
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 %rbx
cmpq %rbx, %r13
jne 0x6402e
movq -0x30(%rbp), %rsi
subl %esi, %r12d
leaq -0x59e14(%rip), %r8     # 0xa2e8
movq -0x38(%rbp), %rdi
movl %r12d, %edx
movl $0x1, %ecx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xef1b
leaq 0x8(%rbx), %rdi
callq 0xf2d0
movl $0x7, 0x5c(%rbx)
movb $0x1, %al
movb %al, 0x61(%rbx)
movq 0x8(%rbx), %rcx
movb %al, 0x50(%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: absFunc
static void absFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  switch( sqlite3_value_type(argv[0]) ){
    case SQLITE_INTEGER: {
      i64 iVal = sqlite3_value_int64(argv[0]);
      if( iVal<0 ){
        if( (iVal<<1)==0 ){
          /* IMP: R-35460-15084 If X is the integer -9223372036854775807 then
          ** abs(X) throws an integer overflow error since there is no
          ** equivalent positive 64-bit two complement value. */
          sqlite3_result_error(context, "integer overflow", -1);
          return;
        }
        iVal = -iVal;
      } 
      sqlite3_result_int64(context, iVal);
      break;
    }
    case SQLITE_NULL: {
      /* IMP: R-37434-19929 Abs(X) returns NULL if X is NULL. */
      sqlite3_result_null(context);
      break;
    }
    default: {
      /* Because sqlite3_value_double() returns 0.0 if the argument is not
      ** something that can be converted into a number, we have:
      ** IMP: R-57326-31541 Abs(X) return 0.0 if X is a string or blob that
      ** cannot be converted to a numeric value. 
      */
      double rVal = sqlite3_value_double(argv[0]);
      if( rVal<0 ) rVal = -rVal;
      sqlite3_result_double(context, rVal);
      break;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdx), %rdi
movzbl 0x26(%rdi), %eax
cmpl $0x5, %eax
je 0x6419a
cmpl $0x1, %eax
jne 0x641aa
callq 0xedcc
movq %rax, %r14
testq %rax, %rax
jns 0x6417e
leaq (,%r14,2), %rax
testq %rax, %rax
je 0x641d3
negq %r14
leaq 0x8(%rbx), %rdi
callq 0xec23
movq %r14, 0x20(%rbx)
movw $0x4, 0x2c(%rbx)
movb $0x1, 0x2e(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xf2d0
callq 0xed72
movapd 0x151f9(%rip), %xmm1    # 0x793b0
xorpd %xmm0, %xmm1
maxsd %xmm0, %xmm1
addq $0x8, %rbx
movq %rbx, %rdi
movapd %xmm1, %xmm0
popq %rbx
popq %r14
popq %rbp
jmp 0xef73
movl $0x1, 0x5c(%rbx)
movb $0x1, 0x61(%rbx)
addq $0x8, %rbx
leaq 0x18cd2(%rip), %rsi     # 0x7cebb
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
popq %rbx
popq %r14
popq %rbp
jmp 0xeff4
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: roundFunc
static void roundFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
  int n = 0;
  double r;
  char *zBuf;
  assert( argc==1 || argc==2 );
  if( argc==2 ){
    if( SQLITE_NULL==sqlite3_value_type(argv[1]) ) return;
    n = sqlite3_value_int(argv[1]);
    if( n>30 ) n = 30;
    if( n<0 ) n = 0;
  }
  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
  r = sqlite3_value_double(argv[0]);
  /* If Y==0 and X will fit in a 64-bit int,
  ** handle the rounding directly,
  ** otherwise use printf.
  */
  if( n==0 && r>=0 && r<LARGEST_INT64-1 ){
    r = (double)((sqlite_int64)(r+0.5));
  }else if( n==0 && r<0 && (-r)<LARGEST_INT64-1 ){
    r = -(double)((sqlite_int64)((-r)+0.5));
  }else{
    zBuf = sqlite3_mprintf("%.*f",n,r);
    if( zBuf==0 ){
      sqlite3_result_error_nomem(context);
      return;
    }
    sqlite3AtoF(zBuf, &r, sqlite3Strlen30(zBuf), SQLITE_UTF8);
    sqlite3_free(zBuf);
  }
  sqlite3_result_double(context, r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %rbx
xorl %r14d, %r14d
cmpl $0x2, %esi
jne 0x64241
movq 0x8(%r15), %rdi
cmpb $0x5, 0x26(%rdi)
je 0x6424a
callq 0xedcc
cmpl $0x1e, %eax
movl $0x1e, %ecx
cmovll %eax, %ecx
xorl %r14d, %r14d
testl %ecx, %ecx
cmovgl %ecx, %r14d
movq (%r15), %rdi
cmpb $0x5, 0x26(%rdi)
jne 0x64255
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0xed72
movsd %xmm0, -0x20(%rbp)
testl %r14d, %r14d
jne 0x6429b
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x6429b
movsd 0x15032(%rip), %xmm1    # 0x792a8
ucomisd %xmm0, %xmm1
jbe 0x6429b
addsd 0x14fec(%rip), %xmm0    # 0x79270
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0x64326
testl %r14d, %r14d
jne 0x642dc
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x642dc
ucomisd 0x1501e(%rip), %xmm0    # 0x792d0
jbe 0x642dc
movsd 0x14fb4(%rip), %xmm1    # 0x79270
subsd %xmm0, %xmm1
cvttsd2si %xmm1, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
xorpd 0x150db(%rip), %xmm0    # 0x793b0
movlpd %xmm0, -0x20(%rbp)
jmp 0x64326
leaq 0x18be9(%rip), %rdi     # 0x7cecc
movb $0x1, %r15b
movl %r14d, %esi
movb $0x1, %al
callq 0xb76d
testq %rax, %rax
je 0x64341
movq %rax, %r14
xorl %edx, %edx
cmpb $0x0, (%r14,%rdx)
leaq 0x1(%rdx), %rdx
jne 0x642fa
decl %edx
andl $0x3fffffff, %edx       # imm = 0x3FFFFFFF
leaq -0x20(%rbp), %rsi
movq %r14, %rdi
movl $0x1, %ecx
callq 0x248aa
movq %r14, %rdi
callq 0xa2e8
movsd -0x20(%rbp), %xmm0
addq $0x8, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xef73
leaq 0x8(%rbx), %rdi
callq 0xf2d0
movl $0x7, 0x5c(%rbx)
movb %r15b, 0x61(%rbx)
movq 0x8(%rbx), %rax
movb %r15b, 0x50(%rax)
jmp 0x6424a
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: upperFunc
static void upperFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
  char *z1;
  const char *z2;
  int i, n;
  UNUSED_PARAMETER(argc);
  z2 = (char*)sqlite3_value_text(argv[0]);
  n = sqlite3_value_bytes(argv[0]);
  /* Verify that the call to _bytes() does not invalidate the _text() pointer */
  assert( z2==(char*)sqlite3_value_text(argv[0]) );
  if( z2 ){
    z1 = contextMalloc(context, ((i64)n)+1);
    if( z1 ){
      for(i=0; i<n; i++){
        z1[i] = (char)sqlite3Toupper(z2[i]);
      }
      sqlite3_result_text(context, z1, n, sqlite3_free);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %rbx
movq (%rdx), %rdi
movl $0x1, %esi
callq 0xee49
movq %rax, %r14
movq (%r15), %rdi
movl $0x1, %esi
callq 0xed28
testq %r14, %r14
je 0x643fe
movl %eax, %r15d
movslq %eax, %rsi
incq %rsi
movq %rbx, %rdi
callq 0x65256
testq %rax, %rax
je 0x643fe
testl %r15d, %r15d
jle 0x643da
movl %r15d, %ecx
xorl %edx, %edx
leaq 0x11ba5(%rip), %rsi     # 0x75f60
movzbl (%r14,%rdx), %edi
movb (%rdi,%rsi), %r8b
notb %r8b
orb $-0x21, %r8b
andb %dil, %r8b
movb %r8b, (%rax,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x643bb
leaq -0x5a0f9(%rip), %r8     # 0xa2e8
movq %rbx, %rdi
movq %rax, %rsi
movl %r15d, %edx
movl $0x1, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xef1b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: lowerFunc
static void lowerFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
  char *z1;
  const char *z2;
  int i, n;
  UNUSED_PARAMETER(argc);
  z2 = (char*)sqlite3_value_text(argv[0]);
  n = sqlite3_value_bytes(argv[0]);
  /* Verify that the call to _bytes() does not invalidate the _text() pointer */
  assert( z2==(char*)sqlite3_value_text(argv[0]) );
  if( z2 ){
    z1 = contextMalloc(context, ((i64)n)+1);
    if( z1 ){
      for(i=0; i<n; i++){
        z1[i] = sqlite3Tolower(z2[i]);
      }
      sqlite3_result_text(context, z1, n, sqlite3_free);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rdi, %rbx
movq (%rdx), %rdi
movl $0x1, %esi
callq 0xee49
movq %rax, %r14
movq (%r15), %rdi
movl $0x1, %esi
callq 0xed28
testq %r14, %r14
je 0x6449b
movl %eax, %r15d
movslq %eax, %rsi
incq %rsi
movq %rbx, %rdi
callq 0x65256
testq %rax, %rax
je 0x6449b
testl %r15d, %r15d
jle 0x64477
movl %r15d, %ecx
xorl %edx, %edx
leaq 0x11bfe(%rip), %rsi     # 0x76060
movzbl (%r14,%rdx), %edi
movb (%rdi,%rsi), %dil
movb %dil, (%rax,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x64462
leaq -0x5a196(%rip), %r8     # 0xa2e8
movq %rbx, %rdi
movq %rax, %rsi
movl %r15d, %edx
movl $0x1, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xef1b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: hexFunc
static void hexFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  int i, n;
  const unsigned char *pBlob;
  char *zHex, *z;
  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  pBlob = sqlite3_value_blob(argv[0]);
  n = sqlite3_value_bytes(argv[0]);
  assert( pBlob==sqlite3_value_blob(argv[0]) );  /* No encoding change */
  z = zHex = contextMalloc(context, ((i64)n)*2 + 1);
  if( zHex ){
    for(i=0; i<n; i++, pBlob++){
      unsigned char c = *pBlob;
      *(z++) = hexdigits[(c>>4)&0xf];
      *(z++) = hexdigits[c&0xf];
    }
    *z = 0;
    sqlite3_result_text(context, zHex, n*2, sqlite3_free);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq (%rdx), %rdi
callq 0xec61
movq %rax, %r15
movq (%r14), %rdi
movl $0x1, %esi
callq 0xed28
movl %eax, %r14d
cltq
leaq 0x1(,%rax,2), %rsi
movq %rbx, %rdi
callq 0x65256
testq %rax, %rax
je 0x64578
movq %rax, %rdx
testl %r14d, %r14d
jle 0x6454e
movl %r14d, %edx
xorl %ecx, %ecx
leaq 0x14ef6(%rip), %rsi     # 0x79410
xorl %edi, %edi
movzbl (%r15,%rdi), %r8d
movl %r8d, %r9d
shrl $0x4, %r9d
movb (%r9,%rsi), %r9b
movb %r9b, (%rax,%rdi,2)
andl $0xf, %r8d
movb (%r8,%rsi), %r8b
movb %r8b, 0x1(%rax,%rdi,2)
incq %rdi
addq $-0x2, %rcx
cmpl %edi, %edx
jne 0x6451c
movq %rax, %rdx
subq %rcx, %rdx
movb $0x0, (%rdx)
addl %r14d, %r14d
leaq -0x5a273(%rip), %r8     # 0xa2e8
movq %rbx, %rdi
movq %rax, %rsi
movl %r14d, %edx
movl $0x1, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xef1b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: randomFunc
static void randomFunc(
  sqlite3_context *context,
  int NotUsed,
  sqlite3_value **NotUsed2
){
  sqlite_int64 r;
  UNUSED_PARAMETER2(NotUsed, NotUsed2);
  sqlite3_randomness(sizeof(r), &r);
  if( r<0 ){
    /* We need to prevent a random number of 0x8000000000000000 
    ** (or -9223372036854775808) since when you do abs() of that
    ** number of you get the same value back again.  To do this
    ** in a way that is testable, mask the sign bit off of negative
    ** values, resulting in a positive value.  Then take the 
    ** 2s complement of that positive value.  The end result can
    ** therefore be no less than -9223372036854775807.
    */
    r = -(r & LARGEST_INT64);
  }
  sqlite3_result_int64(context, r);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x18(%rbp), %r14
movl $0x8, %edi
movq %r14, %rsi
callq 0xb9d9
movq (%r14), %rax
testq %rax, %rax
jns 0x645b6
btrq $0x3f, %rax
negq %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %r14
leaq 0x8(%rbx), %rdi
callq 0xec23
movq %r14, 0x20(%rbx)
movw $0x4, 0x2c(%rbx)
movb $0x1, 0x2e(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: randomBlob
static void randomBlob(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  int n;
  unsigned char *p;
  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  n = sqlite3_value_int(argv[0]);
  if( n<1 ){
    n = 1;
  }
  p = contextMalloc(context, n);
  if( p ){
    sqlite3_randomness(n, p);
    sqlite3_result_blob(context, (char*)p, n, sqlite3_free);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdx), %rdi
callq 0xedcc
cmpl $0x2, %eax
movl $0x1, %r14d
cmovgel %eax, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x65256
testq %rax, %rax
je 0x6463b
movq %rax, %r15
movl %r14d, %edi
movq %rax, %rsi
callq 0xb9d9
leaq -0x5a339(%rip), %r8     # 0xa2e8
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xef1b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: nullifFunc
static void nullifFunc(
  sqlite3_context *context,
  int NotUsed,
  sqlite3_value **argv
){
  CollSeq *pColl = sqlite3GetFuncCollSeq(context);
  UNUSED_PARAMETER(NotUsed);
  if( sqlite3MemCompare(argv[0], argv[1], pColl)!=0 ){
    sqlite3_result_value(context, argv[0]);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq 0x48(%rdi), %rdx
movq (%r14), %rdi
movq 0x8(%r14), %rsi
callq 0x2c122
testl %eax, %eax
je 0x6467a
movq (%r14), %rsi
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xf373
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: compileoptionusedFunc
static void compileoptionusedFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  const char *zOptName;
  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  /* IMP: R-39564-36305 The sqlite_compileoption_used() SQL
  ** function is a wrapper around the sqlite3_compileoption_used() C/C++
  ** function.
  */
  if( (zOptName = (const char*)sqlite3_value_text(argv[0]))!=0 ){
    sqlite3_result_int(context, sqlite3_compileoption_used(zOptName));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdx), %rdi
movl $0x1, %esi
callq 0xee49
testq %rax, %rax
je 0x64716
movq %rax, %rdi
callq 0x935c
leaq 0x8(%rbx), %rdi
movl %eax, %r14d
callq 0xec23
movq %r14, 0x20(%rbx)
movw $0x4, 0x2c(%rbx)
movb $0x1, 0x2e(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: compileoptiongetFunc
static void compileoptiongetFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  int n;
  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  /* IMP: R-04922-24076 The sqlite_compileoption_get() SQL function
  ** is a wrapper around the sqlite3_compileoption_get() C/C++ function.
  */
  n = sqlite3_value_int(argv[0]);
  sqlite3_result_text(context, sqlite3_compileoption_get(n), -1, SQLITE_STATIC);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdx), %rdi
callq 0xedcc
testl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
je 0x64737
xorl %esi, %esi
jmp 0x64745
andl $0x1, %eax
leaq 0x2e51f(%rip), %rcx     # 0x92c60
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xef1b
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: last_insert_rowid
static void last_insert_rowid(
  sqlite3_context *context, 
  int NotUsed, 
  sqlite3_value **NotUsed2
){
  sqlite3 *db = sqlite3_context_db_handle(context);
  UNUSED_PARAMETER2(NotUsed, NotUsed2);
  /* IMP: R-51513-12026 The last_insert_rowid() SQL function is a
  ** wrapper around the sqlite3_last_insert_rowid() C/C++ interface
  ** function. */
  sqlite3_result_int64(context, sqlite3_last_insert_rowid(db));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rdi
movq 0x8(%rbx), %rax
movq 0x30(%rax), %r14
callq 0xec23
movq %r14, 0x20(%rbx)
movw $0x4, 0x2c(%rbx)
movb $0x1, 0x2e(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: total_changes
static void total_changes(
  sqlite3_context *context,
  int NotUsed,
  sqlite3_value **NotUsed2
){
  sqlite3 *db = sqlite3_context_db_handle(context);
  UNUSED_PARAMETER2(NotUsed, NotUsed2);
  /* IMP: R-52756-41993 This function is a wrapper around the
  ** sqlite3_total_changes() C/C++ interface. */
  sqlite3_result_int(context, sqlite3_total_changes(db));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x8, %rdi
movq 0x8(%rbx), %rax
movslq 0x64(%rax), %r14
callq 0xec23
movq %r14, 0x20(%rbx)
movw $0x4, 0x2c(%rbx)
movb $0x1, 0x2e(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: zeroblobFunc
static void zeroblobFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  i64 n;
  sqlite3 *db = sqlite3_context_db_handle(context);
  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  n = sqlite3_value_int64(argv[0]);
  testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH] );
  testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
  if( n>db->aLimit[SQLITE_LIMIT_LENGTH] ){
    sqlite3_result_error_toobig(context);
  }else{
    sqlite3_result_zeroblob(context, (int)n); /* IMP: R-00293-64994 */
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq 0x8(%rdi), %r12
movq (%rdx), %rdi
callq 0xedcc
movq %rax, %r15
movslq 0x68(%r12), %rax
cmpq %rax, %r15
jle 0x64d54
movl $0x12, 0x5c(%rbx)
movb $0x1, 0x61(%rbx)
leaq 0x1473f(%rip), %rsi     # 0x79476
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xeff4
movq %r14, %rdi
callq 0xec23
movabsq $0x104401000000000, %rax # imm = 0x104401000000000
movq %rax, 0x28(%rbx)
xorl %eax, %eax
testl %r15d, %r15d
cmovgl %r15d, %eax
movl %eax, 0x20(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sumStep
static void sumStep(sqlite3_context *context, int argc, sqlite3_value **argv){
  SumCtx *p;
  int type;
  assert( argc==1 );
  UNUSED_PARAMETER(argc);
  p = sqlite3_aggregate_context(context, sizeof(*p));
  type = sqlite3_value_numeric_type(argv[0]);
  if( p && type!=SQLITE_NULL ){
    p->cnt++;
    if( type==SQLITE_INTEGER ){
      i64 v = sqlite3_value_int64(argv[0]);
      p->rSum += v;
      if( (p->approx|p->overflow)==0 && sqlite3AddInt64(&p->iSum, v) ){
        p->overflow = 1;
      }
    }else{
      p->rSum += sqlite3_value_double(argv[0]);
      p->approx = 1;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
movl $0x20, %esi
callq 0x10174
movq %rax, %rbx
movq (%r14), %rdi
callq 0x10f04
testq %rbx, %rbx
setne %cl
cmpl $0x5, %eax
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x64e16
incq 0x10(%rbx)
movq (%r14), %rdi
cmpl $0x1, %eax
jne 0x64e05
callq 0xedcc
cvtsi2sd %rax, %xmm0
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
movb 0x18(%rbx), %cl
orb 0x19(%rbx), %cl
jne 0x64e16
movq 0x8(%rbx), %rcx
testq %rax, %rax
js 0x64e1b
testq %rcx, %rcx
setg %dl
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
subq %rcx, %rsi
cmpq %rax, %rsi
setl %sil
testb %sil, %dl
je 0x64e3a
movb $0x1, 0x18(%rbx)
jmp 0x64e16
callq 0xed72
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
movb $0x1, 0x19(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
testq %rcx, %rcx
jns 0x64e3a
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
subq %rcx, %rdx
addq $0x2, %rdx
leaq 0x1(%rax), %rsi
cmpq %rsi, %rdx
jg 0x64dff
addq %rax, %rcx
movq %rcx, 0x8(%rbx)
jmp 0x64e16
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sumFinalize
static void sumFinalize(sqlite3_context *context){
  SumCtx *p;
  p = sqlite3_aggregate_context(context, 0);
  if( p && p->cnt>0 ){
    if( p->overflow ){
      sqlite3_result_error(context,"integer overflow",-1);
    }else if( p->approx ){
      sqlite3_result_double(context, p->rSum);
    }else{
      sqlite3_result_int64(context, p->iSum);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %r14
testb $0x20, 0x25(%r14)
jne 0x64e6f
movq %r14, %rdi
callq 0x101e6
movw $0x1, 0x24(%r14)
movq $0x0, 0x8(%r14)
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x64eed
cmpq $0x0, 0x10(%rax)
jle 0x64eed
cmpb $0x0, 0x18(%rax)
je 0x64eb8
movl $0x1, 0x5c(%rbx)
movb $0x1, 0x61(%rbx)
addq $0x8, %rbx
leaq 0x18020(%rip), %rsi     # 0x7cebb
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
popq %rbx
popq %r14
popq %rbp
jmp 0xeff4
cmpb $0x0, 0x19(%rax)
je 0x64ed2
movsd (%rax), %xmm0
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xef73
movq 0x8(%rax), %r14
leaq 0x8(%rbx), %rdi
callq 0xec23
movq %r14, 0x20(%rbx)
movw $0x4, 0x2c(%rbx)
movb $0x1, 0x2e(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: totalFinalize
static void totalFinalize(sqlite3_context *context){
  SumCtx *p;
  p = sqlite3_aggregate_context(context, 0);
  /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
  sqlite3_result_double(context, p ? p->rSum : (double)0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %r14
testb $0x20, 0x25(%r14)
jne 0x64f1e
movq %r14, %rdi
callq 0x101e6
movw $0x1, 0x24(%r14)
movq $0x0, 0x8(%r14)
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x64f2d
movsd (%rax), %xmm0
jmp 0x64f30
xorps %xmm0, %xmm0
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xef73