LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/pipde[P]deos-songlib/utils/chorus/chorus.c
// Function: getDatum
static double
getDatum(FILE *in,FILE *out,RRA *h,double t)
    {
    static int edge = -1;
    int ceiling;
    double result;
    
    if (t < 0) return 0;

    if (edge == -1) createRRAData(h);

    /* read in five or so samples ahead */

    ceiling = (int) (t + 0.5) + ReadAhead;

    if (ceiling >= h->samples) ceiling = h->samples - 1;

    while (edge < ceiling)
        {
        ++edge;
        h->data[0][edge] = 
            readRRAAmplitude(in,out,h->bitsPerSample,outputComment);
        }

    result = interp(h->data[0],h->samples,t);

    return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
movsd %xmm1, -0x30(%rbp)
ucomisd %xmm1, %xmm0
ja 0x1aa8
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl 0x5811(%rip), %ecx      # 0x7170
cmpl $-0x1, %ecx
jne 0x1972
movq %rbx, %rdi
callq 0x1e1e
movl 0x57fe(%rip), %ecx      # 0x7170
movsd 0x26c6(%rip), %xmm0     # 0x4040
addsd -0x30(%rbp), %xmm0
cvttsd2si %xmm0, %eax
addl 0x57eb(%rip), %eax      # 0x7174
movl 0xc(%rbx), %edx
leal -0x1(%rdx), %r13d
cmpl %edx, %eax
cmovll %eax, %r13d
leaq 0x14c8(%rip), %r12      # 0x2e65
cmpl %r13d, %ecx
jge 0x19ce
incl %ecx
movl %ecx, 0x57c6(%rip)      # 0x7170
movl 0x8(%rbx), %edx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq 0x269e
movq 0x18(%rbx), %rcx
movq (%rcx), %rdx
movslq 0x57a7(%rip), %rcx      # 0x7170
movl %eax, (%rdx,%rcx,4)
jmp 0x199d
xorpd %xmm0, %xmm0
movsd -0x30(%rbp), %xmm4
ucomisd %xmm0, %xmm4
jb 0x1ab7
movq 0x18(%rbx), %rcx
cvttsd2si %xmm4, %eax
movq (%rcx), %rcx
movslq 0xc(%rbx), %rsi
leal -0x1(%rsi), %edx
cmpl %eax, %edx
jle 0x1a84
leal 0x1(%rax), %esi
xorl %edi, %edi
testl %eax, %eax
setg %dil
movl %eax, %r8d
subl %edi, %r8d
leal 0x2(%rax), %edi
cmpl %edx, %esi
cmovgel %esi, %edi
movslq %eax, %rdx
cvtsi2sdl (%rcx,%rdx,4), %xmm1
movslq %r8d, %rdx
cvtsi2sdl (%rcx,%rdx,4), %xmm2
movsd 0x2624(%rip), %xmm0     # 0x4050
movapd %xmm1, %xmm3
mulsd %xmm0, %xmm3
subsd %xmm2, %xmm3
movslq %esi, %rdx
cvtsi2sdl (%rcx,%rdx,4), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm3, %xmm0
movslq %edi, %rdx
cvtsi2sdl (%rcx,%rdx,4), %xmm3
subsd %xmm3, %xmm0
cvtsi2sd %eax, %xmm3
mulsd 0x25f8(%rip), %xmm0     # 0x4058
subsd %xmm3, %xmm4
movsd 0x25d4(%rip), %xmm3     # 0x4040
ucomisd %xmm4, %xmm3
jbe 0x1a8c
subsd %xmm1, %xmm0
addsd %xmm0, %xmm0
mulsd %xmm4, %xmm0
addsd %xmm1, %xmm0
jmp 0x1aa8
cvtsi2sdl -0x4(%rcx,%rsi,4), %xmm0
jmp 0x1aa8
subsd %xmm0, %xmm2
addsd 0x25c8(%rip), %xmm4     # 0x4060
addsd %xmm2, %xmm2
mulsd %xmm2, %xmm4
addsd %xmm0, %xmm4
movapd %xmm4, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x25e4(%rip), %rdi      # 0x40a2
leaq 0x25e4(%rip), %rsi      # 0x40a9
leaq 0x25e6(%rip), %rcx      # 0x40b2
movl $0xa9, %edx
callq 0x10d0
nop
// File: /workspace/github_c_makefile_star2_O2/KhuramAli[P]JAM-Benchmark/Multi-producer_Multi-consumer_Lock-free_boost/code08.cpp
// Function: consumer()
void consumer(void)
{
	int value;
	while (!done) {
		while (queue.pop(value))
			++consumer_count;
	}
	while (queue.pop(value))
		++consumer_count;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2de1(%rip), %rbx      # 0x40c8
leaq 0x4(%rsp), %r14
movb 0x2dd2(%rip), %al       # 0x40c4
testb $0x1, %al
je 0x12ff
jmp 0x1310
lock
incl 0x2dc1(%rip)            # 0x40c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1bac
testb %al, %al
jne 0x12f8
jmp 0x12ec
leaq 0x2db1(%rip), %rbx      # 0x40c8
leaq 0x4(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1bac
testb %al, %al
je 0x1334
lock
incl 0x2d8e(%rip)            # 0x40c0
jmp 0x131c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/lakekeyakv2/SandyBridge/KeccakP-1600-times2-SIMD128.c
// Function: KeccakP1600times2_AddBytes
void KeccakP1600times2_AddBytes(void *states, unsigned int instanceIndex, const 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;
    const unsigned char *curData = data;
    UINT64 *statesAsLanes = states;

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

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

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
movl %ecx, %r13d
shrl $0x3, %r13d
testl %r8d, %r8d
sete %al
andl $0x7, %ecx
sete %dl
orb %al, %dl
jne 0x12a73
andq $0x0, (%rsp)
pushq $0x8
popq %r12
subl %ecx, %r12d
cmpl %ebp, %r12d
cmovael %ebp, %r12d
movl %ecx, %eax
leaq (%rsp,%rax), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x55b0
movq (%rsp), %rax
leal (%r15,%r13,2), %ecx
xorq %rax, (%rbx,%rcx,8)
subl %r12d, %ebp
incl %r13d
addq %r12, %r14
leal (%r15,%r13,2), %eax
movl %ebp, %edx
movl %eax, %r12d
cmpl $0x8, %edx
jb 0x12a95
movq (%r14), %rcx
xorq %rcx, (%rbx,%r12,8)
addq $0x8, %r14
addl $0x2, %eax
addq $-0x8, %rdx
jmp 0x12a79
testl %edx, %edx
je 0x12ab2
movq %rsp, %r15
andq $0x0, (%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x55b0
movq (%r15), %rax
xorq %rax, (%rbx,%r12,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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, %ebp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
movl %ecx, %r13d
shrl $0x3, %r13d
testl %r8d, %r8d
sete %al
andl $0x7, %ecx
sete %dl
orb %al, %dl
jne 0x13152
pushq $0x8
popq %r12
subl %ecx, %r12d
cmpl %ebp, %r12d
cmovael %ebp, %r12d
leal (%r15,%r13,2), %eax
leaq (%r14,%rax,8), %rax
movl %ecx, %esi
addq %rax, %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x55b0
subl %r12d, %ebp
incl %r13d
addq %r12, %rbx
leal (%r15,%r13,2), %eax
movl %ebp, %edx
movl %eax, %ecx
cmpl $0x8, %edx
jb 0x13173
movq (%r14,%rcx,8), %rcx
movq %rcx, (%rbx)
addq $0x8, %rbx
addl $0x2, %eax
addq $-0x8, %rdx
jmp 0x13158
testl %edx, %edx
je 0x13191
leaq (%r14,%rcx,8), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x55b0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x133e4
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 0x133c9
subl %r10d, %r9d
incl %eax
leal (%rsi,%rax,2), %esi
xorl %eax, %eax
movl %r9d, %r8d
movl %esi, %r10d
cmpl $0x8, %r8d
jb 0x1340e
movq (%rdi,%r10,8), %r10
xorq (%rdx,%rax), %r10
movq %r10, (%rcx,%rax)
addl $-0x8, %r8d
addq $0x8, %rax
addl $0x2, %esi
jmp 0x133ec
cmpl %r9d, %eax
je 0x13430
movq (%rdi,%r10,8), %rsi
movl %r9d, %edi
movb (%rdx,%rax), %r8b
xorb %sil, %r8b
movb %r8b, (%rcx,%rax)
shrq $0x8, %rsi
incq %rax
cmpl %eax, %edi
jne 0x1341a
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x6256c(%rip), %rsi     # 0x6b440
pushq $0x7
popq %rdx
callq 0x8f45
leaq 0x7(%r14), %rbx
testl %eax, %eax
cmovneq %r14, %rbx
movq %rbx, %rdi
callq 0x8f8e
movl %eax, %r15d
leaq 0x7cdb8(%rip), %r13     # 0x85cb0
xorl %r14d, %r14d
cmpq $0x10, %r14
je 0x8f2f
movq (%r14,%r13), %r12
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x8f45
testl %eax, %eax
jne 0x8f29
movzbl (%r12,%r15), %eax
leaq 0x5f04d(%rip), %rcx     # 0x67f70
cmpb $0x0, (%rax,%rcx)
je 0x8f33
addq $0x8, %r14
jmp 0x8efb
xorl %eax, %eax
jmp 0x8f36
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: 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:
cmpl $0xa, %edi
jb 0x8fe5
pushq %rbp
movq %rsp, %rbp
movl $0x35d6, %edi           # imm = 0x35D6
callq 0x9008
pushq $0x15
popq %rax
popq %rbp
retq
movl %edi, %edi
leaq 0x7fcf2(%rip), %r8      # 0x88ce0
movl (%r8,%rdi,4), %r9d
movl %r9d, (%rsi)
movl 0x28(%r8,%rdi,4), %eax
movl %eax, (%rdx)
xorl %eax, %eax
testl %ecx, %ecx
je 0x9007
movl %r9d, 0x28(%r8,%rdi,4)
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeEnterAll
SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
  int i;
  for(i=0; i<db->nDb; i++){
    Btree *p = db->aDb[i].pBt;
    if( p ){
      p->pBt->db = p->db;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x28(%rdi), %rax
movabsq $0x8, %rcx
xorl %edx, %edx
cmpq %rax, %rdx
jge 0x9375
movq 0x20(%rdi), %rsi
movq (%rsi,%rcx), %rsi
testq %rsi, %rsi
je 0x936c
movq (%rsi), %r8
movq 0x8(%rsi), %rsi
movq %r8, 0x8(%rsi)
incq %rdx
addq $0x20, %rcx
jmp 0x934f
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x93db
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x38(%rsi), %rsi
callq 0x31e7b
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x968b
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x968b
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x2f476
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x2f6b3
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x968b
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1fb19
movq 0x20(%r14), %rdi
movzwl 0x48(%r14), %esi
addl %esi, %esi
callq 0x1fb19
movq 0x108(%r14), %r15
testq %r15, %r15
je 0x9617
movq 0x20(%r15), %r12
movq (%r15), %rsi
movl 0x8(%r15), %edx
movq %rbx, %rdi
callq 0x1fbb4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x968b
movq %r12, %r15
jmp 0x95ef
movswq 0x8a(%r14), %rax
movl %eax, %r15d
testl %r15d, %r15d
jle 0x9640
movq 0x80(%r14), %rax
movq -0x8(%rax,%r15,8), %rsi
decq %r15
movq %rbx, %rdi
callq 0x968b
jmp 0x9622
movq 0x8(%r14), %rsi
movl 0x34(%r14), %edx
movq %rbx, %rdi
callq 0x1fbb4
movq 0x40(%r14), %rsi
movq %rbx, %rdi
callq 0x968b
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x968b
movq 0xe0(%r14), %rsi
movq %rbx, %rdi
callq 0x968b
movq 0xe8(%r14), %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x968b
// File: /workspace/github_c_makefile_star2_O2/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 0x96eb
movq %rdi, %rbx
cmpq $0x0, 0x328(%rdi)
je 0x96bb
movq %rbx, %rdi
callq 0x155aa
movq 0x328(%rbx), %rcx
addl %eax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
testq %rsi, %rsi
je 0x96eb
cmpq %rsi, 0x170(%rbx)
ja 0x96eb
cmpq %rsi, 0x178(%rbx)
jbe 0x96eb
movq 0x168(%rbx), %rax
movq %rax, (%rsi)
movq %rsi, 0x168(%rbx)
decl 0x154(%rbx)
jmp 0x96b4
movq %rsi, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9c7b
// File: /workspace/github_c_makefile_star2_O2/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 0x9740
testl %eax, %eax
je 0x9716
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7f613(%rip), %rbx     # 0x88d30
movq (%rbx), %rbx
testq %r14, %r14
je 0x970e
testq %rbx, %rbx
je 0x970e
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x8510
testl %eax, %eax
je 0x970e
addq $0x10, %rbx
jmp 0x971d
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
callq 0x9740
movl %eax, %r14d
testl %eax, %eax
jne 0x9ace
movq %rbx, %rdi
callq 0x9adc
testl %r15d, %r15d
setne %cl
movq 0x7f287(%rip), %rax     # 0x88d30
testq %rax, %rax
sete %dl
orb %cl, %dl
je 0x9abc
leaq 0x7f276(%rip), %rcx     # 0x88d30
jmp 0x9ac7
movq %rax, %rcx
addq $0x10, %rcx
movq 0x10(%rax), %rax
movq %rax, 0x10(%rbx)
movq %rbx, (%rcx)
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: vfsUnlink
static void vfsUnlink(sqlite3_vfs *pVfs){
  assert( sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER)) );
  if( pVfs==0 ){
    /* No-op */
  }else if( vfsList==pVfs ){
    vfsList = pVfs->pNext;
  }else if( vfsList ){
    sqlite3_vfs *p = vfsList;
    while( p->pNext && p->pNext!=pVfs ){
      p = p->pNext;
    }
    if( p->pNext==pVfs ){
      p->pNext = pVfs->pNext;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
je 0x9b20
movq 0x7f244(%rip), %rcx     # 0x88d30
cmpq %rdi, %rcx
je 0x9b12
testq %rcx, %rcx
je 0x9b20
movq %rcx, %rax
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
je 0x9b07
cmpq %rdi, %rcx
jne 0x9af6
cmpq %rdi, %rcx
jne 0x9b20
addq $0x10, %rax
jmp 0x9b19
leaq 0x7f217(%rip), %rax     # 0x88d30
movq 0x10(%rdi), %rcx
movq %rcx, (%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x9740
testl %eax, %eax
je 0x9b89
pushq $-0x1
popq %rax
jmp 0x9bd4
movq 0x7f1b0(%rip), %rax     # 0x88d40
testq %rbx, %rbx
js 0x9bd4
movslq 0x7f144(%rip), %rcx     # 0x88ce0
cmpq %rbx, %rcx
setge %cl
testq %rbx, %rbx
setne %dl
leaq 0x2c(%rip), %rsi        # 0x9bdb
cmoveq %rbx, %rsi
movq %rsi, 0x7f18e(%rip)     # 0x88d48
andq $0x0, 0x7f18e(%rip)     # 0x88d50
andb %cl, %dl
movzbl %dl, %ecx
movq %rbx, 0x7f172(%rip)     # 0x88d40
movl %ecx, 0x7f198(%rip)     # 0x88d6c
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x7f0fe(%rip), %rax     # 0x88d08
testl %edi, %edi
je 0x9c1a
movl 0x7f0cc(%rip), %ecx     # 0x88ce0
movl %ecx, 0x7f0ee(%rip)     # 0x88d08
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x9c50
xorl %eax, %eax
retq
cmpl $0x0, 0x7d7a9(%rip)     # 0x87400
je 0x9c75
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq -0x10(%rbp), %rbx
movq %rbx, %rsi
callq 0x15490
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
jmpq *0x7d7a5(%rip)          # 0x87420
// File: /workspace/github_c_makefile_star2_O2/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 0x9ce2
movq %rdi, %rbx
cmpl $0x0, 0x7d770(%rip)     # 0x87400
je 0x9cd3
movq %rbx, %rdi
callq *0x7d79d(%rip)          # 0x87438
movl 0x7f03f(%rip), %ecx     # 0x88ce0
subl %eax, %ecx
movl %ecx, 0x7f037(%rip)     # 0x88ce0
cmpl 0x7f059(%rip), %ecx     # 0x88d08
jle 0x9cb7
movl %ecx, 0x7f051(%rip)     # 0x88d08
movl 0x7f047(%rip), %eax     # 0x88d04
decl %eax
movl %eax, 0x7f03f(%rip)     # 0x88d04
cmpl 0x7f061(%rip), %eax     # 0x88d2c
jle 0x9cd3
movl %eax, 0x7f059(%rip)     # 0x88d2c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *0x7d746(%rip)          # 0x87428
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x9740
testl %eax, %eax
je 0x9e7a
xorl %eax, %eax
jmp 0x9ec6
leaq -0x90(%rbp), %rax
leaq -0x40(%rbp), %r15
movq %rax, 0x8(%r15)
movq %rax, 0x10(%r15)
andq $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 0x9ed1
movq %r15, %rdi
callq 0xadc3
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: 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 0xae02
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x18(%rdi), %rcx
movb $0x0, (%rax,%rcx)
movb 0x24(%rdi), %cl
movq 0x10(%rdi), %rax
testb %cl, %cl
je 0xae37
cmpq 0x8(%rbx), %rax
jne 0xae37
cmpb $0x1, %cl
jne 0xae05
movq (%rbx), %rdi
movl 0x18(%rbx), %esi
incl %esi
callq 0x103b4
jmp 0xae0f
xorl %eax, %eax
retq
movl 0x18(%rbx), %edi
incl %edi
callq 0x9c1c
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0xae31
movq 0x8(%rbx), %rsi
movslq 0x18(%rbx), %rdx
incq %rdx
movq %rax, %rdi
callq 0x82c0
movq 0x10(%rbx), %rax
jmp 0xae37
movb $0x1, 0x25(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xae9a
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 0x9740
testl %eax, %eax
je 0xaea7
xorl %eax, %eax
jmp 0xaed3
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 0x9e5a
addq $0xc8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xaf25
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
leaq -0x30(%rbp), %rbx
movq %rax, 0x8(%rbx)
movq %rax, 0x10(%rbx)
andq $0x0, (%rbx)
andl $0x0, 0x18(%rbx)
movl %edi, 0x1c(%rbx)
andl $0x0, 0x20(%rbx)
andw $0x0, 0x24(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x9ed1
movq %rbx, %rdi
callq 0xadc3
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xaf6e
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 0xaedd
addq $0xd0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xaff7
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, 0x7c589(%rip)     # 0x87588
je 0xb08f
movq %rsi, %r10
movl %edi, %ebx
leaq -0xf0(%rbp), %rax
leaq -0x40(%rbp), %rcx
movq %rax, 0x10(%rcx)
leaq -0x1f0(%rbp), %rax
leaq -0x118(%rbp), %r14
movq %rax, 0x8(%r14)
movq %rax, 0x10(%r14)
andq $0x0, (%r14)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rcx)
movabsq $0xd200000000, %rax     # imm = 0xD200000000
movq %rax, 0x18(%r14)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
andl $0x0, 0x20(%r14)
movq %rax, (%rcx)
andw $0x0, 0x24(%r14)
movq %r14, %rdi
xorl %esi, %esi
movq %r10, %rdx
callq 0x9ed1
movq 0x7c513(%rip), %r12     # 0x87588
movq 0x7c514(%rip), %r15     # 0x87590
movq %r14, %rdi
callq 0xadc3
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_O2/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, %rbx
movq %rsi, %rdi
callq *0x7c19c(%rip)          # 0x879d8
cmpl $-0x1, %eax
je 0xb86b
xorl %r14d, %r14d
testb $0x1, %r15b
je 0xb8db
leaq -0x1c(%rbp), %rsi
movq %rbx, %rdi
callq *0x7c195(%rip)          # 0x879f0
testl %eax, %eax
je 0xb89c
xorl %r14d, %r14d
cmpl $0xe, %eax
cmovnel %eax, %r14d
jmp 0xb8db
callq 0x8050
movl $0x170a, %r14d          # imm = 0x170A
cmpl $0x2, (%rax)
je 0xb8db
leaq 0x5fe20(%rip), %rsi     # 0x6b6a2
movl $0xa0a, %r14d           # imm = 0xA0A
movl $0xa0a, %edi            # imm = 0xA0A
movq %rbx, %rdx
movl $0x70b9, %ecx           # imm = 0x70B9
callq 0x16c4b
jmp 0xb8db
movl -0x1c(%rbp), %edi
callq 0x8300
testl %eax, %eax
je 0xb8c9
leaq 0x5fe79(%rip), %rsi     # 0x6b728
movl $0x50a, %r14d           # imm = 0x50A
movl $0x50a, %edi            # imm = 0x50A
movq %rbx, %rdx
movl $0x70c8, %ecx           # imm = 0x70C8
callq 0x16c4b
jmp 0xb8cc
xorl %r14d, %r14d
movl -0x1c(%rbp), %esi
xorl %edi, %edi
movl $0x70ca, %edx           # imm = 0x70CA
callq 0x16d1b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: 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
pushq $0x6
popq %rcx
cmovnel %eax, %ecx
cmpl $0x2, %edx
pushq $0x4
popq %rsi
cmovnel %ecx, %esi
movq %r14, %rdi
callq *0x7bf69(%rip)          # 0x87888
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
movl %ecx, (%rbx)
orl %eax, %r15d
jne 0xb94b
leaq -0xa8(%rbp), %rsi
movq %r14, %rdi
callq *0x7bf7b(%rip)          # 0x878b8
testl %eax, %eax
jne 0xb94b
cmpq $0x0, -0x78(%rbp)
jne 0xb94b
andl $0x0, (%rbx)
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: 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, %r15
movl %edx, %r14d
movq %rsi, %rbx
movslq %edx, %rsi
movb $0x0, -0x1(%rcx,%rsi)
cmpb $0x2f, (%rbx)
jne 0xb98e
leaq 0x5fd76(%rip), %rdx     # 0x6b6f9
xorl %r12d, %r12d
movl %r14d, %edi
movq %r15, %rsi
jmp 0xb9bd
decq %rsi
movq %r15, %rdi
callq *0x7bf06(%rip)          # 0x878a0
testq %rax, %rax
je 0xb9d3
movq %r15, %rdi
callq 0x8170
subl %eax, %r14d
movslq %eax, %rsi
addq %r15, %rsi
leaq 0x5fdbc(%rip), %rdx     # 0x6b773
xorl %r12d, %r12d
movl %r14d, %edi
movq %rbx, %rcx
xorl %eax, %eax
callq 0xaf26
movl %r12d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x711f, %edi           # imm = 0x711F
callq 0x16cb0
leaq 0x5fc72(%rip), %rsi     # 0x6b656
pushq $0xe
popq %r12
movl %r12d, %edi
movq %rbx, %rdx
movl $0x711f, %ecx           # imm = 0x711F
callq 0x16c4b
jmp 0xb9c7
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movl %esi, %ebx
movslq %esi, %r15
movq %rdx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x81e0
leaq 0x5fd52(%rip), %rdi     # 0x6b777
xorl %esi, %esi
xorl %edx, %edx
callq 0x16ba9
testl %eax, %eax
js 0xba63
movl %eax, %r12d
movl %r12d, %edi
movq %r14, %rsi
movq %r15, %rdx
callq *0x7bed4(%rip)          # 0x87918
testl %eax, %eax
jns 0xba52
callq 0x8050
cmpl $0x4, (%rax)
je 0xba35
xorl %edi, %edi
movl %r12d, %esi
movl $0x7188, %edx           # imm = 0x7188
callq 0x16d1b
jmp 0xba81
leaq -0x28(%rbp), %rbx
movq %rbx, %rdi
callq 0x8350
movq (%rbx), %rax
movq %rax, (%r14)
callq 0x8580
movl %eax, 0x8(%r14)
pushq $0xc
popq %rbx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixCurrentTime
static int unixCurrentTime(sqlite3_vfs *NotUsed, double *prNow){
  sqlite3_int64 i = 0;
  int rc;
  UNUSED_PARAMETER(NotUsed);
  rc = unixCurrentTimeInt64(0, &i);
  *prNow = i/86400000.0;
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
leaq -0x18(%rbp), %r14
andq $0x0, (%r14)
movq %r14, %rsi
callq 0xbafa
cvtsi2sdq (%r14), %xmm0
divsd 0x5f7cb(%rip), %xmm0    # 0x6b2b0
movsd %xmm0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixCurrentTimeInt64
static int unixCurrentTimeInt64(sqlite3_vfs *NotUsed, sqlite3_int64 *piNow){
  static const sqlite3_int64 unixEpoch = 24405875*(sqlite3_int64)8640000;
  int rc = SQLITE_OK;
#if defined(NO_GETTOD)
  time_t t;
  time(&t);
  *piNow = ((sqlite3_int64)t)*1000 + unixEpoch;
#elif OS_VXWORKS
  struct timespec sNow;
  clock_gettime(CLOCK_REALTIME, &sNow);
  *piNow = unixEpoch + 1000*(sqlite3_int64)sNow.tv_sec + sNow.tv_nsec/1000000;
#else
  struct timeval sNow;
  if( gettimeofday(&sNow, 0)==0 ){
    *piNow = unixEpoch + 1000*(sqlite3_int64)sNow.tv_sec + sNow.tv_usec/1000;
  }else{
    rc = SQLITE_ERROR;
  }
#endif

#ifdef SQLITE_TEST
  if( sqlite3_current_time ){
    *piNow = 1000*(sqlite3_int64)sqlite3_current_time + unixEpoch;
  }
#endif
  UNUSED_PARAMETER(NotUsed);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
xorl %ebx, %ebx
leaq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x8620
testl %eax, %eax
je 0xbb1e
pushq $0x1
popq %rbx
jmp 0xbb47
imulq $0x3e8, -0x20(%rbp), %rcx # imm = 0x3E8
movq -0x18(%rbp), %rax
movl $0x3e8, %esi            # imm = 0x3E8
cqto
idivq %rsi
movabsq $0xbfc83e532200, %rdx   # imm = 0xBFC83E532200
addq %rcx, %rdx
addq %rax, %rdx
movq %rdx, (%r14)
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0xbbcf
movq %rdx, %rbx
movq %rsi, %r15
pushq $-0x10
popq %rcx
pushq $0xc
popq %r14
leaq 0x7bcd7(%rip), %r12     # 0x87850
leaq 0x18(%rcx), %r13
cmpq $0x248, %r13            # imm = 0x248
je 0xbbbd
movq 0x10(%rcx,%r12), %rsi
movq %r15, %rdi
callq 0x8510
movq %r13, %rcx
testl %eax, %eax
jne 0xbb79
movq 0x8(%r13,%r12), %rax
testq %rax, %rax
jne 0xbbae
movq (%r13,%r12), %rax
movq %rax, 0x8(%r13,%r12)
testq %rbx, %rbx
cmovneq %rbx, %rax
movq %rax, (%r13,%r12)
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rax
leaq 0x7bc77(%rip), %rcx     # 0x87850
cmpq $0x250, %rax            # imm = 0x250
je 0xbbba
movq (%rax,%rcx), %rdx
testq %rdx, %rdx
je 0xbbef
movq %rdx, -0x8(%rax,%rcx)
addq $0x18, %rax
jmp 0xbbd9
// File: /workspace/github_c_makefile_star2_O2/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 0xbc79
movq %rsi, %rbx
leaq 0x7bbf8(%rip), %r15     # 0x87850
xorl %r14d, %r14d
cmpq $0x17, %r14
je 0xbc7d
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x8510
testl %eax, %eax
je 0xbc7d
incq %r14
addq $0x18, %r15
jmp 0xbc5b
pushq $-0x1
popq %r14
imulq $0x18, %r14, %rax
addq $-0x18, %r14
leaq 0x7bbc4(%rip), %rcx     # 0x87850
addq %rax, %rcx
addq $0x20, %rcx
xorl %eax, %eax
incq %r14
je 0xbcab
leaq 0x18(%rcx), %rdx
cmpq $0x0, (%rcx)
movq %rdx, %rcx
je 0xbc95
movq -0x20(%rdx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: 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 0xbe03
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 0xbe85
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
movq 0x130(%rdi), %rax
testq %rax, %rax
jne 0xbe31
movq %rbx, %rdi
callq 0x129fe
movq %rax, 0x130(%rbx)
testq %rax, %rax
je 0xbe85
movl %r15d, 0x44(%rbx)
testq %r14, %r14
je 0xbe93
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 0x174b9
movq 0x130(%rbx), %rdi
leaq -0x2b00(%rip), %r8      # 0x9377
pushq $-0x1
popq %rsi
pushq $0x1
popq %rcx
movq %rax, %rdx
callq 0x12a28
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rcx
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x12a28
// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3MallocZero
SQLITE_PRIVATE void *sqlite3MallocZero(int n){
  void *p = sqlite3Malloc(n);
  if( p ){
    memset(p, 0, n);
  }
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
callq 0x9c40
testq %rax, %rax
je 0xbed7
movslq %ebx, %rdx
movq %rax, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x81e0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq