LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/lakekeyakv2/SandyBridge/KeccakP-1600-times2-SIMD128.c
// Function: KeccakP1600times2_ExtractBytes
void KeccakP1600times2_ExtractBytes(const void *states, unsigned int instanceIndex, unsigned char *data, unsigned int offset, unsigned int length)
{
    unsigned int sizeLeft = length;
    unsigned int lanePosition = offset/SnP_laneLengthInBytes;
    unsigned int offsetInLane = offset%SnP_laneLengthInBytes;
    unsigned char *curData = data;
    const UINT64 *statesAsLanes = states;

    if ((sizeLeft > 0) && (offsetInLane != 0)) {
        unsigned int bytesInLane = SnP_laneLengthInBytes - offsetInLane;
        if (bytesInLane > sizeLeft)
            bytesInLane = sizeLeft;
        memcpy( curData, ((unsigned char *)&statesAsLanes[laneIndex(instanceIndex, lanePosition)]) + offsetInLane, bytesInLane);
        sizeLeft -= bytesInLane;
        lanePosition++;
        curData += bytesInLane;
    }

    while(sizeLeft >= SnP_laneLengthInBytes) {
        *(UINT64*)curData = statesAsLanes[laneIndex(instanceIndex, lanePosition)];
        sizeLeft -= SnP_laneLengthInBytes;
        lanePosition++;
        curData += SnP_laneLengthInBytes;
    }

    if (sizeLeft > 0) {
        memcpy( curData, &statesAsLanes[laneIndex(instanceIndex, lanePosition)], sizeLeft);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r14d
movq %rdx, %rbx
movl %esi, %r12d
movq %rdi, %r15
movl %ecx, %ebp
shrl $0x3, %ebp
testl %r8d, %r8d
sete %al
andl $0x7, %ecx
sete %dl
orb %al, %dl
jne 0x131bd
movl $0x8, %r13d
subl %ecx, %r13d
cmpl %r14d, %r13d
cmovael %r14d, %r13d
leal (%r12,%rbp,2), %eax
leaq (%r15,%rax,8), %rax
movl %ecx, %esi
addq %rax, %rsi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x5590
subl %r13d, %r14d
incl %ebp
addq %r13, %rbx
cmpl $0x8, %r14d
jb 0x131ec
leal (%r12,%rbp,2), %eax
leal -0x8(%r14), %ecx
shrl $0x3, %ecx
addl %ecx, %ebp
incl %ebp
movl %eax, %ecx
movq (%r15,%rcx,8), %rcx
movq %rcx, (%rbx)
addl $-0x8, %r14d
addq $0x8, %rbx
addl $0x2, %eax
cmpl $0x7, %r14d
ja 0x131d2
testl %r14d, %r14d
je 0x13212
leal (%r12,%rbp,2), %eax
leaq (%r15,%rax,8), %rsi
movl %r14d, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5590
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mjosaarinen[P]brutus/crypto_aead/lakekeyakv2/SandyBridge/KeccakP-1600-times2-SIMD128.c
// Function: KeccakP1600times2_ExtractAndAddBytes
void KeccakP1600times2_ExtractAndAddBytes(const void *states, unsigned int instanceIndex,  const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length)
{
    unsigned int sizeLeft = length;
    unsigned int lanePosition = offset/SnP_laneLengthInBytes;
    unsigned int offsetInLane = offset%SnP_laneLengthInBytes;
    const unsigned char *curInput = input;
    unsigned char *curOutput = output;
    const UINT64 *statesAsLanes = states;

    if ((sizeLeft > 0) && (offsetInLane != 0)) {
        unsigned int bytesInLane = SnP_laneLengthInBytes - offsetInLane;
        UINT64 lane = statesAsLanes[laneIndex(instanceIndex, lanePosition)] >> (8 * offsetInLane);
        if (bytesInLane > sizeLeft)
            bytesInLane = sizeLeft;
        sizeLeft -= bytesInLane;
        do {
            *(curOutput++) = *(curInput++) ^ (unsigned char)lane;
            lane >>= 8;
        } while ( --bytesInLane != 0);
        lanePosition++;
    }

    while(sizeLeft >= SnP_laneLengthInBytes) {
        *((UINT64*)curOutput) = *((UINT64*)curInput) ^ statesAsLanes[laneIndex(instanceIndex, lanePosition)];
        sizeLeft -= SnP_laneLengthInBytes;
        lanePosition++;
        curInput += SnP_laneLengthInBytes;
        curOutput += SnP_laneLengthInBytes;
    }

    if (sizeLeft != 0) {
        UINT64 lane = statesAsLanes[laneIndex(instanceIndex, lanePosition)];
        do {
            *(curOutput++) = *(curInput++) ^ (unsigned char)lane;
            lane >>= 8;
        } while ( --sizeLeft != 0);
    }
}

// Assembly:
pushq %rbx
movl %r8d, %eax
shrl $0x3, %eax
testl %r9d, %r9d
sete %r10b
andl $0x7, %r8d
sete %r11b
orb %r10b, %r11b
jne 0x13474
movl $0x8, %r10d
subl %r8d, %r10d
leal (%rsi,%rax,2), %r11d
shll $0x3, %r8d
shrxq %r8, (%rdi,%r11,8), %r8
cmpl %r9d, %r10d
cmovael %r9d, %r10d
movl %r10d, %r11d
movb (%rdx), %bl
xorb %r8b, %bl
incq %rdx
movb %bl, (%rcx)
incq %rcx
shrq $0x8, %r8
decl %r11d
jne 0x13459
subl %r10d, %r9d
incl %eax
cmpl $0x8, %r9d
jb 0x134ae
leal (%rsi,%rax,2), %r8d
leal -0x8(%r9), %r10d
shrl $0x3, %r10d
addl %r10d, %eax
incl %eax
movl %r8d, %r10d
movq (%rdi,%r10,8), %r10
xorq (%rdx), %r10
movq %r10, (%rcx)
addl $-0x8, %r9d
addq $0x8, %rdx
addq $0x8, %rcx
addl $0x2, %r8d
cmpl $0x7, %r9d
ja 0x1348b
testl %r9d, %r9d
je 0x134d5
leal (%rsi,%rax,2), %eax
movq (%rdi,%rax,8), %rax
movl %r9d, %esi
xorl %edi, %edi
movb (%rdx,%rdi), %r8b
xorb %al, %r8b
movb %r8b, (%rcx,%rdi)
shrq $0x8, %rax
incq %rdi
cmpl %edi, %esi
jne 0x134bf
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_compileoption_used
SQLITE_API int sqlite3_compileoption_used(const char *zOptName){
  int i, n;
  if( sqlite3StrNICmp(zOptName, "SQLITE_", 7)==0 ) zOptName += 7;
  n = sqlite3Strlen30(zOptName);

  /* Since ArraySize(azCompileOpt) is normally in single digits, a
  ** linear search is adequate.  No need for a binary search. */
  for(i=0; i<ArraySize(azCompileOpt); i++){
    if( sqlite3StrNICmp(zOptName, azCompileOpt[i], n)==0
     && sqlite3CtypeMap[(unsigned char)azCompileOpt[i][n]]==0
    ){
      return 1;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
xorl %eax, %eax
leaq 0x6cd42(%rip), %rcx     # 0x760b0
leaq 0x700ab(%rip), %rdx     # 0x79420
movzbl (%rdi,%rax), %esi
testq %rsi, %rsi
je 0x93a2
movzbl (%rsi,%rcx), %esi
movzbl (%rax,%rdx), %r8d
movb (%r8,%rcx), %r8b
cmpb %r8b, %sil
jne 0x93ac
incq %rax
cmpq $0x7, %rax
jne 0x9375
addq $0x7, %rdi
movq %rdi, %rdx
jmp 0x93bf
movzbl (%rax,%rdx), %eax
movb (%rax,%rcx), %r8b
xorl %esi, %esi
movzbl %r8b, %eax
leaq 0x7(%rdi), %rdx
cmpl %eax, %esi
cmovneq %rdi, %rdx
testq %rdi, %rdi
je 0x93d5
xorl %esi, %esi
cmpb $0x0, (%rdx,%rsi)
leaq 0x1(%rsi), %rsi
jne 0x93c1
decl %esi
andl $0x3fffffff, %esi       # imm = 0x3FFFFFFF
jmp 0x93d9
xorl %edx, %edx
xorl %esi, %esi
movl %esi, %edi
incl %esi
movb $0x1, %r8b
xorl %r11d, %r11d
leaq 0x89876(%rip), %r9      # 0x92c60
leaq 0x6cbbf(%rip), %r10     # 0x75fb0
movq (%r9,%r11,8), %rax
testq %rdi, %rdi
je 0x943d
xorl %r11d, %r11d
movl %esi, %ebx
movzbl (%rdx,%r11), %r14d
testq %r14, %r14
je 0x9428
movzbl (%r14,%rcx), %r14d
movzbl (%rax,%r11), %r15d
movb (%r15,%rcx), %r15b
cmpb %r15b, %r14b
jne 0x9434
decl %ebx
incq %r11
cmpl $0x1, %ebx
ja 0x93ff
jmp 0x943d
movzbl (%rax,%r11), %r11d
movb (%r11,%rcx), %r15b
xorl %r14d, %r14d
movzbl %r15b, %r11d
cmpl %r11d, %r14d
jne 0x945d
movzbl (%rax,%rdi), %eax
movb (%rax,%r10), %bl
testb %bl, %bl
setne %al
movl $0x1, %r11d
testb %r8b, %al
movl $0x0, %r8d
jne 0x93f1
jmp 0x9473
xorl %eax, %eax
movl $0x1, %r11d
testb $0x1, %r8b
movl $0x0, %r8d
jne 0x93f1
jmp 0x947a
xorl %eax, %eax
testb %bl, %bl
sete %al
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_strnicmp
SQLITE_API int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
  register unsigned char *a, *b;
  a = (unsigned char *)zLeft;
  b = (unsigned char *)zRight;
  while( N-- > 0 && *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
  return N<0 ? 0 : UpperToLower[*a] - UpperToLower[*b];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edx, %edx
jle 0x94b8
incl %edx
xorl %r8d, %r8d
leaq 0x6cc1b(%rip), %rcx     # 0x760b0
movzbl (%rdi,%r8), %eax
testq %rax, %rax
je 0x94bc
movzbl (%rax,%rcx), %eax
movzbl (%rsi,%r8), %r9d
cmpb (%r9,%rcx), %al
jne 0x94be
decl %edx
incq %r8
cmpl $0x1, %edx
ja 0x9495
xorl %eax, %eax
jmp 0x94c9
xorl %eax, %eax
movzbl (%rsi,%r8), %edx
movzbl (%rdx,%rcx), %ecx
subl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_status
SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
  wsdStatInit;
  if( op<0 || op>=ArraySize(wsdStat.nowValue) ){
    return SQLITE_MISUSE_BKPT;
  }
  *pCurrent = wsdStat.nowValue[op];
  *pHighwater = wsdStat.mxValue[op];
  if( resetFlag ){
    wsdStat.mxValue[op] = wsdStat.nowValue[op];
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0xa, %edi
jb 0x9518
leaq 0x73eeb(%rip), %rsi     # 0x7d3e4
leaq 0x70039(%rip), %rcx     # 0x79539
movl $0x15, %ebx
movl $0x15, %edi
movl $0x35d6, %edx           # imm = 0x35D6
xorl %eax, %eax
callq 0xb9c7
jmp 0x9539
movl %edi, %eax
leaq 0x8c7bf(%rip), %rdi     # 0x95ce0
movl (%rdi,%rax,4), %r8d
movl %r8d, (%rsi)
movl 0x28(%rdi,%rax,4), %esi
movl %esi, (%rdx)
xorl %ebx, %ebx
testl %ecx, %ecx
je 0x9539
movl %r8d, 0x28(%rdi,%rax,4)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3DeleteTrigger
SQLITE_PRIVATE void sqlite3DeleteTrigger(sqlite3 *db, Trigger *pTrigger){
  if( pTrigger==0 ) return;
  sqlite3DeleteTriggerStep(db, pTrigger->step_list);
  sqlite3DbFree(db, pTrigger->zName);
  sqlite3DbFree(db, pTrigger->table);
  sqlite3ExprDelete(db, pTrigger->pWhen);
  sqlite3IdListDelete(db, pTrigger->pColumns);
  sqlite3DbFree(db, pTrigger);
}

// Assembly:
testq %rsi, %rsi
je 0x9974
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x38(%rsi), %rsi
callq 0x3763a
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x9ca4
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x9ca4
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x3479d
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x349e3
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x9ca4
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VdbeClearObject
SQLITE_PRIVATE void sqlite3VdbeClearObject(sqlite3 *db, Vdbe *p){
  SubProgram *pSub, *pNext;
  int i;
  assert( p->db==0 || p->db==db );
  releaseMemArray(p->aVar, p->nVar);
  releaseMemArray(p->aColName, p->nResColumn*COLNAME_N);
  for(pSub=p->pProgram; pSub; pSub=pNext){
    pNext = pSub->pNext;
    vdbeFreeOpArray(db, pSub->aOp, pSub->nOp);
    sqlite3DbFree(db, pSub);
  }
  for(i=p->nzVar-1; i>=0; i--) sqlite3DbFree(db, p->azVar[i]);
  vdbeFreeOpArray(db, p->aOp, p->nOp);
  sqlite3DbFree(db, p->aLabel);
  sqlite3DbFree(db, p->aColName);
  sqlite3DbFree(db, p->zSql);
  sqlite3DbFree(db, p->pFree);
#if defined(SQLITE_ENABLE_TREE_EXPLAIN)
  sqlite3DbFree(db, p->zExplain);
  sqlite3DbFree(db, p->pExplain);
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x78(%rsi), %rdi
movswl 0x88(%rsi), %esi
callq 0x22c33
movq 0x20(%r14), %rdi
movzwl 0x48(%r14), %esi
addl %esi, %esi
callq 0x22c33
movq 0x108(%r14), %r15
testq %r15, %r15
je 0x9c2c
movq 0x20(%r15), %r12
movq (%r15), %rsi
movl 0x8(%r15), %edx
movq %rbx, %rdi
callq 0x22cd8
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9ca4
movq %r12, %r15
testq %r12, %r12
jne 0x9c06
movswq 0x8a(%r14), %r15
testq %r15, %r15
jle 0x9c59
incq %r15
movq 0x80(%r14), %rax
movq -0x10(%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x9ca4
decq %r15
cmpq $0x1, %r15
ja 0x9c3c
movq 0x8(%r14), %rsi
movl 0x34(%r14), %edx
movq %rbx, %rdi
callq 0x22cd8
movq 0x40(%r14), %rsi
movq %rbx, %rdi
callq 0x9ca4
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x9ca4
movq 0xe0(%r14), %rsi
movq %rbx, %rdi
callq 0x9ca4
movq 0xe8(%r14), %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9ca4
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3DbFree
SQLITE_PRIVATE void sqlite3DbFree(sqlite3 *db, void *p){
  assert( db==0 || sqlite3_mutex_held(db->mutex) );
  if( db ){
    if( db->pnBytesFreed ){
      *db->pnBytesFreed += sqlite3DbMallocSize(db, p);
      return;
    }
    if( isLookaside(db, p) ){
      LookasideSlot *pBuf = (LookasideSlot*)p;
#if SQLITE_DEBUG
      /* Trash all content in the buffer being freed */
      memset(p, 0xaa, db->lookaside.sz);
#endif
      pBuf->pNext = db->lookaside.pFree;
      db->lookaside.pFree = pBuf;
      db->lookaside.nOut--;
      return;
    }
  }
  assert( sqlite3MemdebugHasType(p, MEMTYPE_DB) );
  assert( sqlite3MemdebugHasType(p, MEMTYPE_LOOKASIDE|MEMTYPE_HEAP) );
  assert( db!=0 || sqlite3MemdebugNoType(p, MEMTYPE_LOOKASIDE) );
  sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
  sqlite3_free(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x9d27
movq %rdi, %rbx
movq 0x328(%rdi), %rcx
testq %rcx, %rcx
je 0x9cf7
testq %rsi, %rsi
je 0x9cde
cmpq %rsi, 0x170(%rbx)
ja 0x9cde
cmpq %rsi, 0x178(%rbx)
jbe 0x9cde
movzwl 0x150(%rbx), %eax
jmp 0x9cee
movq %rsi, %rdi
callq *0x8a751(%rip)          # 0x94438
movq 0x328(%rbx), %rcx
addl %eax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
testq %rsi, %rsi
je 0x9d27
cmpq %rsi, 0x170(%rbx)
ja 0x9d27
cmpq %rsi, 0x178(%rbx)
jbe 0x9d27
movq 0x168(%rbx), %rax
movq %rax, (%rsi)
movq %rsi, 0x168(%rbx)
decl 0x154(%rbx)
jmp 0x9cf0
movq %rsi, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa3c7
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_vfs_find
SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){
  sqlite3_vfs *pVfs = 0;
#if SQLITE_THREADSAFE
  sqlite3_mutex *mutex;
#endif
#ifndef SQLITE_OMIT_AUTOINIT
  int rc = sqlite3_initialize();
  if( rc ) return 0;
#endif
#if SQLITE_THREADSAFE
  mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
#endif
  sqlite3_mutex_enter(mutex);
  for(pVfs = vfsList; pVfs; pVfs=pVfs->pNext){
    if( zVfs==0 ) break;
    if( strcmp(zVfs, pVfs->zName)==0 ) break;
  }
  sqlite3_mutex_leave(mutex);
  return pVfs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x9d86
testl %eax, %eax
je 0x9d4c
xorl %ebx, %ebx
jmp 0x9d63
testq %r14, %r14
sete %al
movq 0x8bfd7(%rip), %rbx     # 0x95d30
testq %rbx, %rbx
sete %cl
orb %al, %cl
je 0x9d6b
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x8530
testl %eax, %eax
je 0x9d63
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x9d6b
jmp 0x9d48
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_vfs_register
SQLITE_API int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
  MUTEX_LOGIC(sqlite3_mutex *mutex;)
#ifndef SQLITE_OMIT_AUTOINIT
  int rc = sqlite3_initialize();
  if( rc ) return rc;
#endif
  MUTEX_LOGIC( mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER); )
  sqlite3_mutex_enter(mutex);
  vfsUnlink(pVfs);
  if( makeDflt || vfsList==0 ){
    pVfs->pNext = vfsList;
    vfsList = pVfs;
  }else{
    pVfs->pNext = vfsList->pNext;
    vfsList->pNext = pVfs;
  }
  assert(vfsList);
  sqlite3_mutex_leave(mutex);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
callq 0x9d86
testl %eax, %eax
jne 0xa227
movq 0x8bb84(%rip), %rax     # 0x95d30
testq %rbx, %rbx
je 0xa1ef
cmpq %rbx, %rax
je 0xa1da
testq %rax, %rax
je 0xa215
movq %rax, %rdx
movq %rdx, %rcx
movq 0x10(%rdx), %rdx
testq %rdx, %rdx
je 0xa1cf
cmpq %rbx, %rdx
jne 0xa1be
cmpq %rbx, %rdx
jne 0xa1ef
addq $0x10, %rcx
jmp 0xa1e1
leaq 0x8bb4f(%rip), %rcx     # 0x95d30
movq 0x10(%rbx), %rax
movq %rax, (%rcx)
movq 0x8bb41(%rip), %rax     # 0x95d30
testl %r14d, %r14d
setne %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
je 0xa208
leaq 0x8bb2a(%rip), %rcx     # 0x95d30
jmp 0xa21e
movq %rax, %rcx
movq 0x10(%rax), %rax
addq $0x10, %rcx
jmp 0xa21e
leaq 0x8bb14(%rip), %rcx     # 0x95d30
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq %rbx, (%rcx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_vfs_unregister
SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
#if SQLITE_THREADSAFE
  sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
#endif
  sqlite3_mutex_enter(mutex);
  vfsUnlink(pVfs);
  sqlite3_mutex_leave(mutex);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0xa270
movq 0x8baf4(%rip), %rcx     # 0x95d30
cmpq %rdi, %rcx
je 0xa262
testq %rcx, %rcx
je 0xa270
movq %rcx, %rax
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
je 0xa257
cmpq %rdi, %rcx
jne 0xa246
cmpq %rdi, %rcx
jne 0xa270
addq $0x10, %rax
jmp 0xa269
leaq 0x8bac7(%rip), %rax     # 0x95d30
movq 0x10(%rdi), %rcx
movq %rcx, (%rax)
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_soft_heap_limit64
SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 n){
  sqlite3_int64 priorLimit;
  sqlite3_int64 excess;
#ifndef SQLITE_OMIT_AUTOINIT
  int rc = sqlite3_initialize();
  if( rc ) return -1;
#endif
  sqlite3_mutex_enter(mem0.mutex);
  priorLimit = mem0.alarmThreshold;
  sqlite3_mutex_leave(mem0.mutex);
  if( n<0 ) return priorLimit;
  if( n>0 ){
    sqlite3MemoryAlarm(softHeapLimitEnforcer, 0, n);
  }else{
    sqlite3MemoryAlarm(0, 0, 0);
  }
  excess = sqlite3_memory_used() - n;
  if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff));
  return priorLimit;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x9d86
movl %eax, %ecx
movq $-0x1, %rax
testl %ecx, %ecx
jne 0xa320
movq 0x8ba67(%rip), %rax     # 0x95d40
testq %rbx, %rbx
js 0xa320
movslq 0x8b9fb(%rip), %rcx     # 0x95ce0
cmpq %rbx, %rcx
setge %cl
testq %rbx, %rbx
setne %dl
leaq 0x2f(%rip), %rsi        # 0xa327
cmoveq %rbx, %rsi
andb %cl, %dl
movzbl %dl, %ecx
movq %rsi, 0x8ba40(%rip)     # 0x95d48
movq $0x0, 0x8ba3d(%rip) # 0x95d50
movq %rbx, 0x8ba26(%rip)     # 0x95d40
movl %ecx, 0x8ba4c(%rip)     # 0x95d6c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_memory_highwater
SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag){
  int n, mx;
  sqlite3_int64 res;
  sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, resetFlag);
  res = (sqlite3_int64)mx;  /* Work around bug in Borland C. Ticket #3216 */
  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x8b9b2(%rip), %rax     # 0x95d08
testl %edi, %edi
je 0xa366
movl 0x8b980(%rip), %ecx     # 0x95ce0
movl %ecx, 0x8b9a2(%rip)     # 0x95d08
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3Malloc
SQLITE_PRIVATE void *sqlite3Malloc(int n){
  void *p;
  if( n<=0               /* IMP: R-65312-04917 */ 
   || n>=0x7fffff00
  ){
    /* A memory allocation of a number of bytes which is near the maximum
    ** signed integer value might cause an integer overflow inside of the
    ** xMalloc().  Hence we limit the maximum size to 0x7fffff00, giving
    ** 255 bytes of overhead.  SQLite itself will never use anything near
    ** this amount.  The only way to reach the limit is with sqlite3_malloc() */
    p = 0;
  }else if( sqlite3GlobalConfig.bMemstat ){
    sqlite3_mutex_enter(mem0.mutex);
    mallocWithAlarm(n, &p);
    sqlite3_mutex_leave(mem0.mutex);
  }else{
    p = sqlite3GlobalConfig.m.xMalloc(n);
  }
  assert( EIGHT_BYTE_ALIGNMENT(p) );  /* IMP: R-04675-44850 */
  return p;
}

// Assembly:
leal -0x7fffff00(%rdi), %eax
cmpl $0x80000101, %eax       # imm = 0x80000101
jae 0xa39c
xorl %eax, %eax
retq
cmpl $0x0, 0x8a05d(%rip)     # 0x94400
je 0xa3c1
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq -0x10(%rbp), %rbx
movq %rbx, %rsi
callq 0x171f8
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
jmpq *0x8a059(%rip)          # 0x94420
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_free
SQLITE_API void sqlite3_free(void *p){
  if( p==0 ) return;  /* IMP: R-49053-54554 */
  assert( sqlite3MemdebugNoType(p, MEMTYPE_DB) );
  assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
  if( sqlite3GlobalConfig.bMemstat ){
    sqlite3_mutex_enter(mem0.mutex);
    sqlite3StatusAdd(SQLITE_STATUS_MEMORY_USED, -sqlite3MallocSize(p));
    sqlite3StatusAdd(SQLITE_STATUS_MALLOC_COUNT, -1);
    sqlite3GlobalConfig.m.xFree(p);
    sqlite3_mutex_leave(mem0.mutex);
  }else{
    sqlite3GlobalConfig.m.xFree(p);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xa42e
movq %rdi, %rbx
cmpl $0x0, 0x8a024(%rip)     # 0x94400
je 0xa41f
movq %rbx, %rdi
callq *0x8a051(%rip)          # 0x94438
movl 0x8b8f3(%rip), %ecx     # 0x95ce0
subl %eax, %ecx
movl %ecx, 0x8b8eb(%rip)     # 0x95ce0
cmpl 0x8b90d(%rip), %ecx     # 0x95d08
jle 0xa403
movl %ecx, 0x8b905(%rip)     # 0x95d08
movl 0x8b8fb(%rip), %eax     # 0x95d04
decl %eax
movl %eax, 0x8b8f3(%rip)     # 0x95d04
cmpl 0x8b915(%rip), %eax     # 0x95d2c
jle 0xa41f
movl %eax, 0x8b90d(%rip)     # 0x95d2c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *0x89ffa(%rip)          # 0x94428
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_vmprintf
SQLITE_API char *sqlite3_vmprintf(const char *zFormat, va_list ap){
  char *z;
  char zBase[SQLITE_PRINT_BUF_SIZE];
  StrAccum acc;
#ifndef SQLITE_OMIT_AUTOINIT
  if( sqlite3_initialize() ) return 0;
#endif
  sqlite3StrAccumInit(&acc, zBase, sizeof(zBase), SQLITE_MAX_LENGTH);
  acc.useMalloc = 2;
  sqlite3VXPrintf(&acc, 0, zFormat, ap);
  z = sqlite3StrAccumFinish(&acc);
  return z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x9d86
testl %eax, %eax
je 0xa62a
xorl %eax, %eax
jmp 0xa679
leaq -0x90(%rbp), %rax
leaq -0x40(%rbp), %r15
movq %rax, 0x8(%r15)
movq %rax, 0x10(%r15)
movq $0x0, (%r15)
movabsq $0x4600000000, %rax     # imm = 0x4600000000
movq %rax, 0x18(%r15)
movl $0x3b9aca00, 0x20(%r15) # imm = 0x3B9ACA00
movw $0x2, 0x24(%r15)
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0xa684
movq %r15, %rdi
callq 0xb7d6
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3StrAccumFinish
SQLITE_PRIVATE char *sqlite3StrAccumFinish(StrAccum *p){
  if( p->zText ){
    p->zText[p->nChar] = 0;
    if( p->useMalloc && p->zText==p->zBase ){
      if( p->useMalloc==1 ){
        p->zText = sqlite3DbMallocRaw(p->db, p->nChar+1 );
      }else{
        p->zText = sqlite3_malloc(p->nChar+1);
      }
      if( p->zText ){
        memcpy(p->zText, p->zBase, p->nChar+1);
      }else{
        p->accError = STRACCUM_NOMEM;
      }
    }
  }
  return p->zText;
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0xb816
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x18(%rdi), %rcx
movb $0x0, (%rax,%rcx)
movb 0x24(%rdi), %cl
movq 0x10(%rdi), %rax
testb %cl, %cl
je 0xb863
cmpq 0x8(%rbx), %rax
jne 0xb863
cmpb $0x1, %cl
jne 0xb819
movq (%rbx), %rdi
movl 0x18(%rbx), %esi
incl %esi
callq 0x11721
jmp 0xb83b
xorl %eax, %eax
retq
movl 0x18(%rbx), %r14d
callq 0x9d86
testl %eax, %eax
je 0xb830
movq $0x0, 0x10(%rbx)
jmp 0xb85d
incl %r14d
movl %r14d, %edi
callq 0xa38c
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0xb85d
movq 0x8(%rbx), %rsi
movslq 0x18(%rbx), %rdx
incq %rdx
movq %rax, %rdi
callq 0x82f0
movq 0x10(%rbx), %rax
jmp 0xb863
movb $0x1, 0x25(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_mprintf
SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){
  va_list ap;
  char *z;
#ifndef SQLITE_OMIT_AUTOINIT
  if( sqlite3_initialize() ) return 0;
#endif
  va_start(ap, zFormat);
  z = sqlite3_vmprintf(zFormat, ap);
  va_end(ap);
  return z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
movq %rsi, -0xc8(%rbp)
movq %rdx, -0xc0(%rbp)
movq %rcx, -0xb8(%rbp)
movq %r8, -0xb0(%rbp)
movq %r9, -0xa8(%rbp)
testb %al, %al
je 0xb8c4
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
callq 0x9d86
testl %eax, %eax
je 0xb8d1
xorl %eax, %eax
jmp 0xb8fd
leaq -0xd0(%rbp), %rax
leaq -0x20(%rbp), %rsi
movq %rax, 0x10(%rsi)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rsi)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0xa60a
addq $0xc8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_vsnprintf
SQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
  StrAccum acc;
  if( n<=0 ) return zBuf;
  sqlite3StrAccumInit(&acc, zBuf, n, 0);
  acc.useMalloc = 0;
  sqlite3VXPrintf(&acc, 0, zFormat, ap);
  return sqlite3StrAccumFinish(&acc);
}

// Assembly:
movq %rsi, %rax
testl %edi, %edi
jle 0xb953
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
leaq -0x30(%rbp), %rbx
movq %rax, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq $0x0, (%rbx)
xorl %eax, %eax
movl %eax, 0x18(%rbx)
movl %edi, 0x1c(%rbx)
movl %eax, 0x20(%rbx)
movw $0x0, 0x24(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xa684
movq %rbx, %rdi
callq 0xb7d6
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_snprintf
SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
  char *z;
  va_list ap;
  va_start(ap,zFormat);
  z = sqlite3_vsnprintf(n, zBuf, zFormat, ap);
  va_end(ap);
  return z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
leaq -0xd0(%rbp), %r10
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0xb99c
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
leaq -0x20(%rbp), %rcx
movq %r10, 0x10(%rcx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rcx)
callq 0xb907
addq $0xd0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_log
SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){
  va_list ap;                             /* Vararg list */
  if( sqlite3GlobalConfig.xLog ){
    va_start(ap, zFormat);
    renderLogMsg(iErrCode, zFormat, ap);
    va_end(ap);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdx, -0xe0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %r8, -0xd0(%rbp)
movq %r9, -0xc8(%rbp)
testb %al, %al
je 0xba25
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
cmpq $0x0, 0x88b5b(%rip)     # 0x94588
je 0xbac4
movq %rsi, %r10
movl %edi, %ebx
leaq -0xf0(%rbp), %rax
leaq -0x40(%rbp), %rcx
movq %rax, 0x10(%rcx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rcx)
leaq -0x1f0(%rbp), %rax
leaq -0x118(%rbp), %r14
movq %rax, 0x8(%r14)
movq %rax, 0x10(%r14)
movq $0x0, (%r14)
movabsq $0xd200000000, %rax     # imm = 0xD200000000
movq %rax, 0x18(%r14)
movl $0x0, 0x20(%r14)
movw $0x0, 0x24(%r14)
movq %r14, %rdi
xorl %esi, %esi
movq %r10, %rdx
callq 0xa684
movq 0x88ade(%rip), %r12     # 0x94588
movq 0x88adf(%rip), %r15     # 0x94590
movq %r14, %rdi
callq 0xb7d6
movq %r15, %rdi
movl %ebx, %esi
movq %rax, %rdx
callq *%r12
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_stricmp
SQLITE_API int sqlite3_stricmp(const char *zLeft, const char *zRight){
  register unsigned char *a, *b;
  a = (unsigned char *)zLeft;
  b = (unsigned char *)zRight;
  while( *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
  return UpperToLower[*a] - UpperToLower[*b];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb (%rdi), %al
testb %al, %al
je 0xbc36
incq %rdi
leaq 0x6a49d(%rip), %rcx     # 0x760b0
movzbl %al, %edx
movb (%rdx,%rcx), %dl
movzbl (%rsi), %r8d
cmpb (%r8,%rcx), %dl
jne 0xbc31
incq %rsi
movb (%rdi), %al
incq %rdi
testb %al, %al
jne 0xbc13
xorl %eax, %eax
movzbl %al, %eax
jmp 0xbc38
xorl %eax, %eax
leaq 0x6a471(%rip), %rcx     # 0x760b0
movzbl (%rax,%rcx), %eax
movzbl (%rsi), %edx
movzbl (%rdx,%rcx), %ecx
subl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixDelete
static int unixDelete(
  sqlite3_vfs *NotUsed,     /* VFS containing this as the xDelete method */
  const char *zPath,        /* Name of file to be deleted */
  int dirSync               /* If true, fsync() directory after deleting file */
){
  int rc = SQLITE_OK;
  UNUSED_PARAMETER(NotUsed);
  SimulateIOError(return SQLITE_IOERR_DELETE);
  if( osUnlink(zPath)==(-1) ){
    if( errno==ENOENT ){
      rc = SQLITE_IOERR_DELETE_NOENT;
    }else{
      rc = unixLogError(SQLITE_IOERR_DELETE, "unlink", zPath);
    }
    return rc;
  }
#ifndef SQLITE_DISABLE_DIRSYNC
  if( (dirSync & 1)!=0 ){
    int fd;
    rc = osOpenDirectory(zPath, &fd);
    if( rc==SQLITE_OK ){
#if OS_VXWORKS
      if( fsync(fd)==-1 )
#else
      if( fsync(fd) )
#endif
      {
        rc = unixLogError(SQLITE_IOERR_DIR_FSYNC, "fsync", zPath);
      }
      robust_close(0, fd, __LINE__);
    }else if( rc==SQLITE_CANTOPEN ){
      rc = SQLITE_OK;
    }
  }
#endif
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %r14
movq %rsi, %rdi
callq *0x88622(%rip)          # 0x949d8
cmpl $-0x1, %eax
je 0xc3e2
xorl %ebx, %ebx
testb $0x1, %r15b
je 0xc45f
leaq -0x1c(%rbp), %rsi
movq %r14, %rdi
callq *0x8861c(%rip)          # 0x949f0
testl %eax, %eax
je 0xc40c
xorl %ebx, %ebx
cmpl $0xe, %eax
cmovnel %eax, %ebx
jmp 0xc45f
callq 0x8060
movl $0x170a, %ebx           # imm = 0x170A
cmpl $0x2, (%rax)
je 0xc45f
leaq 0x6d28a(%rip), %rsi     # 0x79682
movl $0xa0a, %ebx            # imm = 0xA0A
movl $0xa0a, %edi            # imm = 0xA0A
movq %r14, %rdx
movl $0x70b9, %ecx           # imm = 0x70B9
jmp 0xc45a
movl -0x1c(%rbp), %edi
callq 0x8330
testl %eax, %eax
je 0xc438
leaq 0x6d2e9(%rip), %rsi     # 0x79708
movl $0x50a, %ebx            # imm = 0x50A
movl $0x50a, %edi            # imm = 0x50A
movq %r14, %rdx
movl $0x70c8, %ecx           # imm = 0x70C8
callq 0x18d3b
jmp 0xc43a
xorl %ebx, %ebx
movl -0x1c(%rbp), %edi
callq *0x8842d(%rip)          # 0x94870
testl %eax, %eax
je 0xc45f
leaq 0x6d1db(%rip), %rsi     # 0x79629
movl $0x100a, %edi           # imm = 0x100A
xorl %edx, %edx
movl $0x70ca, %ecx           # imm = 0x70CA
callq 0x18d3b
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixAccess
static int unixAccess(
  sqlite3_vfs *NotUsed,   /* The VFS containing this xAccess method */
  const char *zPath,      /* Path of the file to examine */
  int flags,              /* What do we want to learn about the zPath file? */
  int *pResOut            /* Write result boolean here */
){
  int amode = 0;
  UNUSED_PARAMETER(NotUsed);
  SimulateIOError( return SQLITE_IOERR_ACCESS; );
  switch( flags ){
    case SQLITE_ACCESS_EXISTS:
      amode = F_OK;
      break;
    case SQLITE_ACCESS_READWRITE:
      amode = W_OK|R_OK;
      break;
    case SQLITE_ACCESS_READ:
      amode = R_OK;
      break;

    default:
      assert(!"Invalid flags argument");
  }
  *pResOut = (osAccess(zPath, amode)==0);
  if( flags==SQLITE_ACCESS_EXISTS && *pResOut ){
    struct stat buf;
    if( 0==osStat(zPath, &buf) && buf.st_size==0 ){
      *pResOut = 0;
    }
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rcx, %rbx
movl %edx, %r15d
movq %rsi, %r14
xorl %eax, %eax
cmpl $0x1, %edx
movl $0x6, %ecx
cmovnel %eax, %ecx
cmpl $0x2, %edx
movl $0x4, %esi
cmovnel %ecx, %esi
movq %r14, %rdi
callq *0x883e2(%rip)          # 0x94888
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, (%rbx)
orl %eax, %r15d
jne 0xc4d5
leaq -0xa8(%rbp), %rsi
movq %r14, %rdi
callq *0x883f4(%rip)          # 0x948b8
testl %eax, %eax
jne 0xc4d5
cmpq $0x0, -0x78(%rbp)
jne 0xc4d5
movl $0x0, (%rbx)
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixFullPathname
static int unixFullPathname(
  sqlite3_vfs *pVfs,            /* Pointer to vfs object */
  const char *zPath,            /* Possibly relative input path */
  int nOut,                     /* Size of output buffer in bytes */
  char *zOut                    /* Output buffer */
){

  /* It's odd to simulate an io-error here, but really this is just
  ** using the io-error infrastructure to test that SQLite handles this
  ** function failing. This function could fail if, for example, the
  ** current working directory has been unlinked.
  */
  SimulateIOError( return SQLITE_ERROR );

  assert( pVfs->mxPathname==MAX_PATHNAME );
  UNUSED_PARAMETER(pVfs);

  zOut[nOut-1] = '\0';
  if( zPath[0]=='/' ){
    sqlite3_snprintf(nOut, zOut, "%s", zPath);
  }else{
    int nCwd;
    if( osGetcwd(zOut, nOut-1)==0 ){
      return unixLogError(SQLITE_CANTOPEN_BKPT, "getcwd", zPath);
    }
    nCwd = (int)strlen(zOut);
    sqlite3_snprintf(nOut-nCwd, &zOut[nCwd], "/%s", zPath);
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r12
movl %edx, %r15d
movq %rsi, %rbx
movslq %edx, %rsi
movb $0x0, -0x1(%rcx,%rsi)
cmpb $0x2f, (%rbx)
jne 0xc518
leaq 0x6d1cc(%rip), %rdx     # 0x796d9
xorl %r14d, %r14d
movl %r15d, %edi
movq %r12, %rsi
jmp 0xc547
decq %rsi
movq %r12, %rdi
callq *0x8837c(%rip)          # 0x948a0
testq %rax, %rax
je 0xc55d
movq %r12, %rdi
callq 0x8190
subl %eax, %r15d
movslq %eax, %rsi
addq %r12, %rsi
leaq 0x6d212(%rip), %rdx     # 0x79753
xorl %r14d, %r14d
movl %r15d, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0xb954
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6d178(%rip), %rsi     # 0x796dc
leaq 0x6cfce(%rip), %rcx     # 0x79539
movl $0xe, %r14d
movl $0xe, %edi
movl $0x711f, %edx           # imm = 0x711F
xorl %eax, %eax
callq 0xb9c7
leaq 0x6d0ad(%rip), %rsi     # 0x79636
movl $0xe, %edi
movq %rbx, %rdx
movl $0x711f, %ecx           # imm = 0x711F
callq 0x18d3b
jmp 0xc551
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixRandomness
static int unixRandomness(sqlite3_vfs *NotUsed, int nBuf, char *zBuf){
  UNUSED_PARAMETER(NotUsed);
  assert((size_t)nBuf>=(sizeof(time_t)+sizeof(int)));

  /* We have to initialize zBuf to prevent valgrind from reporting
  ** errors.  The reports issued by valgrind are incorrect - we would
  ** prefer that the randomness be increased by making use of the
  ** uninitialized space in zBuf - but valgrind errors tend to worry
  ** some users.  Rather than argue, it seems easier just to initialize
  ** the whole array and silence valgrind, even if that means less randomness
  ** in the random seed.
  **
  ** When testing, initializing zBuf[] to zero is all we do.  That means
  ** that we always use the same random number sequence.  This makes the
  ** tests repeatable.
  */
  memset(zBuf, 0, nBuf);
#if !defined(SQLITE_TEST)
  {
    int pid, fd, got;
    fd = robust_open("/dev/urandom", O_RDONLY, 0);
    if( fd<0 ){
      time_t t;
      time(&t);
      memcpy(zBuf, &t, sizeof(t));
      pid = getpid();
      memcpy(&zBuf[sizeof(t)], &pid, sizeof(pid));
      assert( sizeof(t)+sizeof(pid)<=(size_t)nBuf );
      nBuf = sizeof(t) + sizeof(pid);
    }else{
      do{ got = osRead(fd, zBuf, nBuf); }while( got<0 && errno==EINTR );
      robust_close(0, fd, __LINE__);
    }
  }
#endif
  return nBuf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebx
movslq %esi, %r15
movq %rdx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x8200
leaq 0x6d190(%rip), %r13     # 0x79757
movq %r13, %rdi
movl $0x80000, %esi          # imm = 0x80000
movl $0x1a4, %edx            # imm = 0x1A4
callq *0x8827e(%rip)          # 0x94858
testl %eax, %eax
jns 0xc60a
callq 0x8060
cmpl $0x4, (%rax)
je 0xc5c7
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x8370
movq (%rbx), %rax
movq %rax, (%r14)
callq 0x8590
movl %eax, 0x8(%r14)
movl $0xc, %ebx
jmp 0xc64f
movl %eax, %r12d
movl %r12d, %edi
movq %r14, %rsi
movq %r15, %rdx
callq *0x882fc(%rip)          # 0x94918
testl %eax, %eax
jns 0xc62a
callq 0x8060
cmpl $0x4, (%rax)
je 0xc60d
movl %r12d, %edi
callq *0x8823d(%rip)          # 0x94870
testl %eax, %eax
je 0xc64f
leaq 0x6cfeb(%rip), %rsi     # 0x79629
movl $0x100a, %edi           # imm = 0x100A
xorl %edx, %edx
movl $0x7188, %ecx           # imm = 0x7188
callq 0x18d3b
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixSetSystemCall
static int unixSetSystemCall(
  sqlite3_vfs *pNotUsed,        /* The VFS pointer.  Not used */
  const char *zName,            /* Name of system call to override */
  sqlite3_syscall_ptr pNewFunc  /* Pointer to new system call value */
){
  unsigned int i;
  int rc = SQLITE_NOTFOUND;

  UNUSED_PARAMETER(pNotUsed);
  if( zName==0 ){
    /* If no zName is given, restore all system calls to their default
    ** settings and return NULL
    */
    rc = SQLITE_OK;
    for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){
      if( aSyscall[i].pDefault ){
        aSyscall[i].pCurrent = aSyscall[i].pDefault;
      }
    }
  }else{
    /* If zName is specified, operate on only the one system call
    ** specified.
    */
    for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){
      if( strcmp(zName, aSyscall[i].zName)==0 ){
        if( aSyscall[i].pDefault==0 ){
          aSyscall[i].pDefault = aSyscall[i].pCurrent;
        }
        rc = SQLITE_OK;
        if( pNewFunc==0 ) pNewFunc = aSyscall[i].pDefault;
        aSyscall[i].pCurrent = pNewFunc;
        break;
      }
    }
  }
  return rc;
}

// Assembly:
testq %rsi, %rsi
je 0xc7c6
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movl $0x10, %r15d
leaq 0x880af(%rip), %r12     # 0x94850
movq -0x10(%r15,%r12), %rsi
movq %r14, %rdi
callq 0x8530
testl %eax, %eax
je 0xc7ef
addq $0x18, %r15
cmpq $0x250, %r15            # imm = 0x250
jne 0xc7a1
movl $0xc, %eax
jmp 0xc80f
movl $0x10, %eax
leaq 0x8807e(%rip), %rcx     # 0x94850
movq (%rax,%rcx), %rdx
testq %rdx, %rdx
je 0xc7e0
movq %rdx, -0x8(%rax,%rcx)
addq $0x18, %rax
cmpq $0x250, %rax            # imm = 0x250
jne 0xc7d2
xorl %eax, %eax
retq
movq (%r15,%r12), %rax
testq %rax, %rax
jne 0xc801
movq -0x8(%r15,%r12), %rax
movq %rax, (%r15,%r12)
testq %rbx, %rbx
cmovneq %rbx, %rax
movq %rax, -0x8(%r15,%r12)
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixNextSystemCall
static const char *unixNextSystemCall(sqlite3_vfs *p, const char *zName){
  int i = -1;

  UNUSED_PARAMETER(p);
  if( zName ){
    for(i=0; i<ArraySize(aSyscall)-1; i++){
      if( strcmp(zName, aSyscall[i].zName)==0 ) break;
    }
  }
  for(i++; i<ArraySize(aSyscall); i++){
    if( aSyscall[i].pCurrent!=0 ) return aSyscall[i].zName;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xc8a8
movq %rsi, %rbx
leaq 0x87fd2(%rip), %r15     # 0x94850
xorl %r14d, %r14d
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x8530
testl %eax, %eax
je 0xc8a3
incq %r14
addq $0x18, %r15
cmpq $0x17, %r14
jne 0xc881
movl $0x17, %r14d
movslq %r14d, %rcx
jmp 0xc8af
movq $-0x1, %rcx
leaq (%rcx,%rcx,2), %rax
addq $-0x18, %rcx
leaq 0x87f92(%rip), %rdx     # 0x94850
leaq (%rdx,%rax,8), %rdx
addq $0x20, %rdx
xorl %eax, %eax
incq %rcx
je 0xc8de
leaq 0x18(%rdx), %rsi
cmpq $0x0, (%rdx)
movq %rsi, %rdx
je 0xc8c8
movq -0x20(%rsi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3Error
SQLITE_PRIVATE void sqlite3Error(sqlite3 *db, int err_code, const char *zFormat, ...){
  if( db && (db->pErr || (db->pErr = sqlite3ValueNew(db))!=0) ){
    db->errCode = err_code;
    if( zFormat ){
      char *z;
      va_list ap;
      va_start(ap, zFormat);
      z = sqlite3VMPrintf(db, zFormat, ap);
      va_end(ap);
      sqlite3ValueSetStr(db->pErr, -1, z, SQLITE_UTF8, SQLITE_DYNAMIC);
    }else{
      sqlite3ValueSetStr(db->pErr, 0, 0, SQLITE_UTF8, SQLITE_STATIC);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rcx, -0xc8(%rbp)
movq %r8, -0xc0(%rbp)
movq %r9, -0xb8(%rbp)
testb %al, %al
je 0xca7f
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
testq %rdi, %rdi
je 0xcb55
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
movq 0x130(%rdi), %rax
testq %rax, %rax
jne 0xcad6
movq %rbx, %rdi
movl $0x38, %esi
callq 0x11721
testq %rax, %rax
je 0xcb4a
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x8(%rax)
movw $0x1, 0x24(%rax)
movb $0x5, 0x26(%rax)
movq %rbx, (%rax)
movq %rax, 0x130(%rbx)
movl %r15d, 0x44(%rbx)
testq %r14, %r14
je 0xcb35
leaq -0xe0(%rbp), %rax
leaq -0x30(%rbp), %rdx
movq %rax, 0x10(%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rdx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x194ed
movq 0x130(%rbx), %rdi
testq %rdi, %rdi
je 0xcb55
leaq -0x3211(%rip), %r8      # 0x9910
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq 0xf0d7
jmp 0xcb55
movq %rax, %rdi
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xf373
movq $0x0, 0x130(%rbx)
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: findBtree
static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
  int i = sqlite3FindDbName(pDb, zDb);

  if( i==1 ){
    Parse *pParse;
    int rc = 0;
    pParse = sqlite3StackAllocZero(pErrorDb, sizeof(*pParse));
    if( pParse==0 ){
      sqlite3Error(pErrorDb, SQLITE_NOMEM, "out of memory");
      rc = SQLITE_NOMEM;
    }else{
      pParse->db = pDb;
      if( sqlite3OpenTempDatabase(pParse) ){
        sqlite3Error(pErrorDb, pParse->rc, "%s", pParse->zErrMsg);
        rc = SQLITE_ERROR;
      }
      sqlite3DbFree(pErrorDb, pParse->zErrMsg);
      sqlite3StackFree(pErrorDb, pParse);
    }
    if( rc ){
      return 0;
    }
  }

  if( i<0 ){
    sqlite3Error(pErrorDb, SQLITE_ERROR, "unknown database %s", zDb);
    return 0;
  }

  return pDb->aDb[i].pBt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x158b7
movl %eax, %r12d
cmpl $0x1, %eax
jne 0xcbf6
movq %rbx, %rdi
movl $0x298, %esi            # imm = 0x298
callq 0x11721
testq %rax, %rax
je 0xcc19
movq %rax, %r15
movq %rax, %rdi
addq $0x8, %rdi
movl $0x290, %edx            # imm = 0x290
xorl %esi, %esi
callq 0x8200
movq %r14, (%r15)
movq %r15, %rdi
callq 0x19559
testl %eax, %eax
je 0xcc34
movl 0x18(%r15), %esi
movq 0x8(%r15), %rcx
leaq 0x6cb09(%rip), %rdx     # 0x796d9
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %eax, %eax
callq 0xca2d
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x9ca4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9ca4
jmp 0xcc5b
testl %r12d, %r12d
jns 0xcc4b
leaq 0x6cb70(%rip), %rdx     # 0x79772
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x1, %esi
movq %r15, %rcx
xorl %eax, %eax
callq 0xca2d
jmp 0xcc5b
leaq 0x6cb44(%rip), %rdx     # 0x79764
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x7, %esi
xorl %eax, %eax
callq 0xca2d
jmp 0xcc5b
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x9ca4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9ca4
movq 0x20(%r14), %rax
movl %r12d, %ecx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %r14
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3PagerUnref
SQLITE_PRIVATE void sqlite3PagerUnref(DbPage *pPg){
  if( pPg ){
    Pager *pPager = pPg->pPager;
    if( pPg->flags & PGHDR_MMAP ){
      pagerReleaseMapPage(pPg);
    }else{
      sqlite3PcacheRelease(pPg);
    }
    pagerUnlockIfUnused(pPager);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0xde41
movq 0x20(%rdi), %rbx
testb $0x40, 0x2c(%rdi)
jne 0xddef
callq 0x1f779
jmp 0xde2b
decl 0x98(%rbx)
movq 0xa8(%rbx), %rax
movq %rax, 0x18(%rdi)
movq %rdi, 0xa8(%rbx)
movq 0x48(%rbx), %rax
movl 0x28(%rdi), %ecx
decl %ecx
movslq 0xbc(%rbx), %rsi
imulq %rcx, %rsi
movq 0x8(%rdi), %rdx
movq (%rax), %rcx
movq %rax, %rdi
callq *0x90(%rcx)
cmpl $0x0, 0x98(%rbx)
jne 0xde41
movq 0x110(%rbx), %rax
cmpl $0x0, 0x18(%rax)
je 0xde48
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1d0f7
// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeUpdateMeta
SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree *p, int idx, u32 iMeta){
  BtShared *pBt = p->pBt;
  unsigned char *pP1;
  int rc;
  assert( idx>=1 && idx<=15 );
  sqlite3BtreeEnter(p);
  assert( p->inTrans==TRANS_WRITE );
  assert( pBt->pPage1!=0 );
  pP1 = pBt->pPage1->aData;
  rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
  if( rc==SQLITE_OK ){
    put4byte(&pP1[36 + idx*4], iMeta);
#ifndef SQLITE_OMIT_AUTOVACUUM
    if( idx==BTREE_INCR_VACUUM ){
      assert( pBt->autoVacuum || iMeta==0 );
      assert( iMeta==0 || iMeta==1 );
      pBt->incrVacuum = (u8)iMeta;
    }
#endif
  }
  sqlite3BtreeLeave(p);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, 0x8(%rsi)
movq 0x18(%rsi), %rax
movq 0x50(%rax), %r12
movq 0x68(%rax), %rdi
callq 0xdfbf
testl %eax, %eax
jne 0xde97
movslq %r15d, %rcx
movl %ebx, %edx
bswapl %edx
movl %edx, 0x24(%r12,%rcx,4)
cmpl $0x7, %ecx
jne 0xde97
movb %bl, 0x22(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq