LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: avgFinalize
static void avgFinalize(sqlite3_context *context){
  SumCtx *p;
  p = sqlite3_aggregate_context(context, 0);
  if( p && p->cnt>0 ){
    sqlite3_result_double(context, p->rSum/(double)p->cnt);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %r14
testb $0x20, 0x25(%r14)
jne 0x64f6c
movq %r14, %rdi
callq 0x101e6
movw $0x1, 0x24(%r14)
movq $0x0, 0x8(%r14)
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x64f9b
movq 0x10(%rax), %rcx
testq %rcx, %rcx
jle 0x64f9b
movsd (%rax), %xmm0
cvtsi2sd %rcx, %xmm1
divsd %xmm1, %xmm0
addq $0x8, %rbx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xef73
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: countStep
static void countStep(sqlite3_context *context, int argc, sqlite3_value **argv){
  CountCtx *p;
  p = sqlite3_aggregate_context(context, sizeof(*p));
  if( (argc==0 || SQLITE_NULL!=sqlite3_value_type(argv[0])) && p ){
    p->n++;
  }

#ifndef SQLITE_OMIT_DEPRECATED
  /* The sqlite3_aggregate_count() function is deprecated.  But just to make
  ** sure it still operates correctly, verify that its count agrees with our 
  ** internal count when using count(*) and when the total count can be
  ** expressed as a 32-bit integer. */
  assert( argc==1 || p==0 || p->n>0x7fffffff
          || p->n==sqlite3_aggregate_count(context) );
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %r14d
movl $0x8, %esi
callq 0x10174
testl %r14d, %r14d
je 0x64fd8
movq (%rbx), %rcx
cmpb $0x5, 0x26(%rcx)
setne %cl
testq %rax, %rax
setne %dl
testb %dl, %cl
je 0x64fd3
incq (%rax)
popq %rbx
popq %r14
popq %rbp
retq
testq %rax, %rax
jne 0x64fd0
jmp 0x64fd3
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: groupConcatStep
static void groupConcatStep(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  const char *zVal;
  StrAccum *pAccum;
  const char *zSep;
  int nVal, nSep;
  assert( argc==1 || argc==2 );
  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
  pAccum = (StrAccum*)sqlite3_aggregate_context(context, sizeof(*pAccum));

  if( pAccum ){
    sqlite3 *db = sqlite3_context_db_handle(context);
    int firstTerm = pAccum->useMalloc==0;
    pAccum->useMalloc = 2;
    pAccum->mxAlloc = db->aLimit[SQLITE_LIMIT_LENGTH];
    if( !firstTerm ){
      if( argc==2 ){
        zSep = (char*)sqlite3_value_text(argv[1]);
        nSep = sqlite3_value_bytes(argv[1]);
      }else{
        zSep = ",";
        nSep = 1;
      }
      sqlite3StrAccumAppend(pAccum, zSep, nSep);
    }
    zVal = (char*)sqlite3_value_text(argv[0]);
    nVal = sqlite3_value_bytes(argv[0]);
    sqlite3StrAccumAppend(pAccum, zVal, nVal);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdx), %rax
cmpb $0x5, 0x26(%rax)
je 0x650a7
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r12
movl $0x28, %esi
callq 0x10174
testq %rax, %rax
je 0x650a7
movq %rax, %r14
cmpb $0x0, 0x24(%rax)
movq 0x8(%r12), %rax
movb $0x2, 0x24(%r14)
movl 0x68(%rax), %eax
movl %eax, 0x20(%r14)
je 0x650c7
cmpl $0x2, %r15d
jne 0x650b0
movq 0x8(%rbx), %rdi
movl $0x1, %esi
callq 0xee49
movq %rax, %r15
movq 0x8(%rbx), %rdi
movl $0x1, %esi
callq 0xed28
movl %eax, %edx
jmp 0x650bc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16296(%rip), %r15     # 0x7b34d
movl $0x1, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x172ee
movq (%rbx), %rdi
movl $0x1, %esi
callq 0xee49
movq %rax, %r15
movq (%rbx), %rdi
movl $0x1, %esi
callq 0xed28
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x172ee
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: groupConcatFinalize
static void groupConcatFinalize(sqlite3_context *context){
  StrAccum *pAccum;
  pAccum = sqlite3_aggregate_context(context, 0);
  if( pAccum ){
    if( pAccum->accError==STRACCUM_TOOBIG ){
      sqlite3_result_error_toobig(context);
    }else if( pAccum->accError==STRACCUM_NOMEM ){
      sqlite3_result_error_nomem(context);
    }else{    
      sqlite3_result_text(context, sqlite3StrAccumFinish(pAccum), -1, 
                          sqlite3_free);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %r14
testb $0x20, 0x25(%r14)
jne 0x65125
movq %r14, %rdi
callq 0x101e6
movw $0x1, 0x24(%r14)
movq $0x0, 0x8(%r14)
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x65187
movzbl 0x25(%rdi), %eax
cmpl $0x1, %eax
je 0x6516b
cmpl $0x2, %eax
jne 0x6518c
movl $0x12, 0x5c(%rbx)
movb $0x1, 0x61(%rbx)
addq $0x8, %rbx
leaq 0x14324(%rip), %rsi     # 0x79476
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
popq %rbx
popq %r14
popq %rbp
jmp 0xeff4
leaq 0x8(%rbx), %rdi
callq 0xf2d0
movl $0x7, 0x5c(%rbx)
movb $0x1, %al
movb %al, 0x61(%rbx)
movq 0x8(%rbx), %rcx
movb %al, 0x50(%rcx)
popq %rbx
popq %r14
popq %rbp
retq
callq 0xb6e7
leaq -0x5aeb0(%rip), %r8     # 0xa2e8
movq %rbx, %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
popq %rbx
popq %r14
popq %rbp
jmp 0xef1b
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3FuncDefInsert
SQLITE_PRIVATE void sqlite3FuncDefInsert(
  FuncDefHash *pHash,  /* The hash table into which to insert */
  FuncDef *pDef        /* The function definition to insert */
){
  FuncDef *pOther;
  int nName = sqlite3Strlen30(pDef->zName);
  u8 c1 = (u8)pDef->zName[0];
  int h = (sqlite3UpperToLower[c1] + nName) % ArraySize(pHash->a);
  pOther = functionSearch(pHash, h, pDef->zName, nName);
  if( pOther ){
    assert( pOther!=pDef && pOther->pNext!=pDef );
    pDef->pNext = pOther->pNext;
    pOther->pNext = pDef;
  }else{
    pDef->pNext = 0;
    pDef->pHash = pHash->a[h];
    pHash->a[h] = pDef;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x30(%rsi), %rdx
testq %rdx, %rdx
je 0x651e5
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rdx, %rax
incl %ecx
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x651d2
andl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
jmp 0x651e7
xorl %ecx, %ecx
movzbl (%rdx), %eax
leaq 0x10e6f(%rip), %rsi     # 0x76060
movzbl (%rax,%rsi), %eax
addl %ecx, %eax
movl $0xb21642c9, %r15d      # imm = 0xB21642C9
imulq %rax, %r15
shrq $0x24, %r15
leal (%r15,%r15,2), %esi
shll $0x3, %esi
subl %esi, %r15d
addl %eax, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x652db
testq %rax, %rax
je 0x6522d
addq $0x10, %rax
movl $0x10, %ecx
jmp 0x65241
movq $0x0, 0x10(%rbx)
movl %r15d, %eax
leaq (%r14,%rax,8), %rax
movl $0x38, %ecx
movq (%rax), %rdx
movq %rdx, (%rbx,%rcx)
movq %rbx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: contextMalloc
static void *contextMalloc(sqlite3_context *context, i64 nByte){
  char *z;
  sqlite3 *db = sqlite3_context_db_handle(context);
  assert( nByte>0 );
  testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH] );
  testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
  if( nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
    sqlite3_result_error_toobig(context);
    z = 0;
  }else{
    z = sqlite3Malloc((int)nByte);
    if( !z ){
      sqlite3_result_error_nomem(context);
    }
  }
  return z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x8(%rdi), %r14
movq 0x8(%rdi), %rax
movslq 0x68(%rax), %rax
cmpq %rsi, %rax
jge 0x652a0
movl $0x12, 0x5c(%rbx)
movb $0x1, 0x61(%rbx)
leaq 0x141f0(%rip), %rsi     # 0x79476
xorl %r15d, %r15d
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0xeff4
jmp 0x652cd
movl %esi, %edi
callq 0xa2a2
movq %rax, %r15
testq %rax, %rax
jne 0x652cd
movq %r14, %rdi
callq 0xf2d0
movl $0x7, 0x5c(%rbx)
movb $0x1, %al
movb %al, 0x61(%rbx)
movq 0x8(%rbx), %rcx
movb %al, 0x50(%rcx)
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: juliandayFunc
static void juliandayFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  DateTime x;
  if( isDate(context, argc, argv, &x)==0 ){
    computeJD(&x);
    sqlite3_result_double(context, x.iJD/86400000.0);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq -0x40(%rbp), %rcx
callq 0x65ad3
testl %eax, %eax
jne 0x65378
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x6655d
cvtsi2sdq (%r14), %xmm0
divsd 0x13f34(%rip), %xmm0    # 0x792a0
addq $0x8, %rbx
movq %rbx, %rdi
callq 0xef73
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: dateFunc
static void dateFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  DateTime x;
  if( isDate(context, argc, argv, &x)==0 ){
    char zBuf[100];
    computeYMD(&x);
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%04d-%02d-%02d", x.Y, x.M, x.D);
    sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq -0x40(%rbp), %rcx
callq 0x65ad3
testl %eax, %eax
jne 0x653f0
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x66bfb
movl 0x8(%r14), %ecx
movl 0xc(%r14), %r8d
movl 0x10(%r14), %r9d
leaq 0x17baf(%rip), %rdx     # 0x7cf6d
leaq -0xb0(%rbp), %r14
movl $0x64, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0xb859
movq %rbx, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
callq 0xef1b
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: timeFunc
static void timeFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  DateTime x;
  if( isDate(context, argc, argv, &x)==0 ){
    char zBuf[100];
    computeHMS(&x);
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%02d:%02d:%02d", x.h, x.m, (int)x.s);
    sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
leaq -0x40(%rbp), %rcx
callq 0x65ad3
testl %eax, %eax
jne 0x6546d
leaq -0x40(%rbp), %r14
movq %r14, %rdi
callq 0x66d16
movl 0x14(%r14), %ecx
movl 0x18(%r14), %r8d
cvttsd2si 0x20(%r14), %r9d
leaq 0x17b50(%rip), %rdx     # 0x7cf8b
leaq -0xb0(%rbp), %r14
movl $0x64, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0xb859
movq %rbx, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
callq 0xef1b
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: datetimeFunc
static void datetimeFunc(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  DateTime x;
  if( isDate(context, argc, argv, &x)==0 ){
    char zBuf[100];
    computeYMD_HMS(&x);
    sqlite3_snprintf(sizeof(zBuf), zBuf, "%04d-%02d-%02d %02d:%02d:%02d",
                     x.Y, x.M, x.D, x.h, x.m, (int)(x.s));
    sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
leaq -0x48(%rbp), %rcx
callq 0x65ad3
testl %eax, %eax
jne 0x6550e
leaq -0x48(%rbp), %r14
movq %r14, %rdi
callq 0x66bfb
movq %r14, %rdi
callq 0x66d16
movl 0x8(%r14), %ecx
movl 0xc(%r14), %r8d
movl 0x10(%r14), %r9d
movl 0x14(%r14), %r10d
movl 0x18(%r14), %r11d
cvttsd2si 0x20(%r14), %r15d
subq $0x8, %rsp
leaq 0x17aaa(%rip), %rdx     # 0x7cf7c
leaq -0xb0(%rbp), %r14
movl $0x64, %edi
movq %r14, %rsi
xorl %eax, %eax
pushq %r15
pushq %r11
pushq %r10
callq 0xb859
addq $0x20, %rsp
movq %rbx, %rdi
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
callq 0xef1b
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: computeJD
static void computeJD(DateTime *p){
  int Y, M, D, A, B, X1, X2;

  if( p->validJD ) return;
  if( p->validYMD ){
    Y = p->Y;
    M = p->M;
    D = p->D;
  }else{
    Y = 2000;  /* If no YMD specified, assume 2000-Jan-01 */
    M = 1;
    D = 1;
  }
  if( M<=2 ){
    Y--;
    M += 12;
  }
  A = Y/100;
  B = 2 - A + (A/4);
  X1 = 36525*(Y+4716)/100;
  X2 = 306001*(M+1)/10000;
  p->iJD = (sqlite3_int64)((X1 + X2 + D + B - 1524.5 ) * 86400000);
  p->validJD = 1;
  if( p->validHMS ){
    p->iJD += p->h*3600000 + p->m*60000 + (sqlite3_int64)(p->s*1000);
    if( p->validTZ ){
      p->iJD -= p->tz*60000;
      p->validYMD = 0;
      p->validHMS = 0;
      p->validTZ = 0;
    }
  }
}

// Assembly:
cmpb $0x0, 0x2a(%rdi)
je 0x66564
retq
cmpb $0x0, 0x28(%rdi)
je 0x66578
movl 0x8(%rdi), %edx
movl 0xc(%rdi), %esi
movl 0x10(%rdi), %ecx
addl $0x2, %ecx
jmp 0x66587
movl $0x7d0, %edx            # imm = 0x7D0
movl $0x1, %esi
movl $0x3, %ecx
pushq %rbp
movq %rsp, %rbp
leal 0xc(%rsi), %eax
xorl %r8d, %r8d
cmpl $0x3, %esi
setl %r8b
cmovgel %esi, %eax
subl %r8d, %edx
movslq %edx, %rdx
imulq $-0x51eb851f, %rdx, %rsi # imm = 0xAE147AE1
movq %rsi, %r8
shrq $0x3f, %r8
sarq $0x25, %rsi
addl %r8d, %esi
addl %ecx, %esi
imulq $0x51eb851f, %rdx, %rcx # imm = 0x51EB851F
movq %rcx, %r8
shrq $0x3f, %r8
sarq $0x27, %rcx
addl %r8d, %ecx
addl %esi, %ecx
imull $0x8ead, %edx, %edx     # imm = 0x8EAD
addl $0xa445afc, %edx        # imm = 0xA445AFC
movslq %edx, %rdx
imulq $0x51eb851f, %rdx, %rdx # imm = 0x51EB851F
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x25, %rdx
addl %esi, %edx
imull $0x4ab51, %eax, %eax    # imm = 0x4AB51
addl $0x4ab51, %eax          # imm = 0x4AB51
cltq
imulq $0x68db8bad, %rax, %rax # imm = 0x68DB8BAD
movq %rax, %rsi
shrq $0x3f, %rsi
sarq $0x2c, %rax
addl %esi, %eax
addl %ecx, %eax
addl %edx, %eax
cvtsi2sd %eax, %xmm0
addsd 0x12cfd(%rip), %xmm0    # 0x79320
mulsd 0x12c75(%rip), %xmm0    # 0x792a0
cvttsd2si %xmm0, %rax
movq %rax, (%rdi)
movb $0x1, 0x2a(%rdi)
cmpb $0x0, 0x29(%rdi)
je 0x66692
movslq 0x14(%rdi), %rcx
imulq $0x36ee80, %rcx, %rcx   # imm = 0x36EE80
movslq 0x18(%rdi), %rdx
imulq $0xea60, %rdx, %rdx     # imm = 0xEA60
movsd 0x20(%rdi), %xmm0
mulsd 0x12c98(%rip), %xmm0    # 0x792f8
addq %rcx, %rdx
cvttsd2si %xmm0, %rcx
addq %rdx, %rcx
addq %rax, %rcx
movq %rcx, (%rdi)
cmpb $0x0, 0x2b(%rdi)
je 0x66692
movslq 0x1c(%rdi), %rax
imulq $0xea60, %rax, %rax     # imm = 0xEA60
subq %rax, %rcx
movq %rcx, (%rdi)
movw $0x0, 0x28(%rdi)
movb $0x0, 0x2b(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: getDigits
static int getDigits(const char *zDate, ...){
  va_list ap;
  int val;
  int N;
  int min;
  int max;
  int nextC;
  int *pVal;
  int cnt = 0;
  va_start(ap, zDate);
  do{
    N = va_arg(ap, int);
    min = va_arg(ap, int);
    max = va_arg(ap, int);
    nextC = va_arg(ap, int);
    pVal = va_arg(ap, int*);
    val = 0;
    while( N-- ){
      if( !sqlite3Isdigit(*zDate) ){
        goto end_getDigits;
      }
      val = val*10 + *zDate - '0';
      zDate++;
    }
    if( val<min || val>max || (nextC!=0 && nextC!=*zDate) ){
      goto end_getDigits;
    }
    *pVal = val;
    zDate++;
    cnt++;
  }while( nextC );
end_getDigits:
  va_end(ap);
  return cnt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
leaq -0xe0(%rbp), %r10
movq %rsi, 0x8(%r10)
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x668f6
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)
movq %r10, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, -0x30(%rbp)
xorl %eax, %eax
movl -0x30(%rbp), %edx
cmpq $0x28, %rdx
ja 0x6692a
movq %rdx, %rcx
addq -0x20(%rbp), %rcx
addl $0x8, %edx
movl %edx, -0x30(%rbp)
jmp 0x66936
movq -0x28(%rbp), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, -0x28(%rbp)
movl (%rcx), %ecx
movl -0x30(%rbp), %esi
cmpq $0x28, %rsi
ja 0x66950
movq %rsi, %rdx
addq -0x20(%rbp), %rdx
addl $0x8, %esi
movl %esi, -0x30(%rbp)
jmp 0x6695c
movq -0x28(%rbp), %rdx
leaq 0x8(%rdx), %rsi
movq %rsi, -0x28(%rbp)
movl (%rdx), %edx
movl -0x30(%rbp), %r8d
cmpq $0x28, %r8
ja 0x66979
movq %r8, %rsi
addq -0x20(%rbp), %rsi
addl $0x8, %r8d
movl %r8d, -0x30(%rbp)
jmp 0x66985
movq -0x28(%rbp), %rsi
leaq 0x8(%rsi), %r8
movq %r8, -0x28(%rbp)
movl (%rsi), %esi
movl -0x30(%rbp), %r9d
cmpq $0x28, %r9
ja 0x669a2
movq %r9, %r8
addq -0x20(%rbp), %r8
addl $0x8, %r9d
movl %r9d, -0x30(%rbp)
jmp 0x669ae
movq -0x28(%rbp), %r8
leaq 0x8(%r8), %r9
movq %r9, -0x28(%rbp)
movl (%r8), %r8d
movl -0x30(%rbp), %r10d
cmpq $0x28, %r10
ja 0x669cc
movq %r10, %r9
addq -0x20(%rbp), %r9
addl $0x8, %r10d
movl %r10d, -0x30(%rbp)
jmp 0x669d8
movq -0x28(%rbp), %r9
leaq 0x8(%r9), %r10
movq %r10, -0x28(%rbp)
movq (%r9), %r9
testq %rcx, %rcx
je 0x66a1b
leal -0x1(%rcx), %r10d
leaq (%rdi,%r10), %r11
incq %r11
xorl %ebx, %ebx
xorl %r10d, %r10d
movzbl (%rdi,%rbx), %r14d
leaq -0x3a(%r14), %r15
cmpq $-0xa, %r15
jb 0x66a46
movsbl %r14b, %r14d
leal (%r10,%r10,4), %r10d
leal (%r14,%r10,2), %r10d
addl $-0x30, %r10d
incq %rbx
cmpl %ebx, %ecx
jne 0x669f0
movq %r11, %rdi
jmp 0x66a1e
xorl %r10d, %r10d
cmpl %edx, %r10d
jl 0x66a46
cmpl %esi, %r10d
jg 0x66a46
testl %r8d, %r8d
je 0x66a35
movsbl (%rdi), %ecx
cmpl %ecx, %r8d
jne 0x66a46
incq %rdi
incl %eax
movl %r10d, (%r9)
testl %r8d, %r8d
jne 0x66912
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: computeYMD
static void computeYMD(DateTime *p){
  int Z, A, B, C, D, E, X1;
  if( p->validYMD ) return;
  if( !p->validJD ){
    p->Y = 2000;
    p->M = 1;
    p->D = 1;
  }else{
    Z = (int)((p->iJD + 43200000)/86400000);
    A = (int)((Z - 1867216.25)/36524.25);
    A = Z + 1 + A - (A/4);
    B = A + 1524;
    C = (int)((B - 122.1)/365.25);
    D = (36525*C)/100;
    E = (int)((B-D)/30.6001);
    X1 = (int)(30.6001*E);
    p->D = B - D - X1;
    p->M = E<14 ? E-1 : E-13;
    p->Y = p->M>2 ? C - 4716 : C - 4715;
  }
  p->validYMD = 1;
}

// Assembly:
cmpb $0x0, 0x28(%rdi)
je 0x66c02
retq
pushq %rbp
movq %rsp, %rbp
cmpb $0x0, 0x2a(%rdi)
je 0x66cf5
movl $0x2932e00, %eax        # imm = 0x2932E00
addq (%rdi), %rax
movabsq $0x636ba875fd33dc87, %rcx # imm = 0x636BA875FD33DC87
imulq %rcx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x19, %rdx
addl %eax, %edx
cvtsi2sd %edx, %xmm0
addsd 0x126fa(%rip), %xmm0    # 0x79338
divsd 0x126fa(%rip), %xmm0    # 0x79340
cvttsd2si %xmm0, %eax
leal 0x3(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x2, %ecx
addl %eax, %edx
subl %ecx, %edx
leal 0x5f5(%rdx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
addsd 0x126da(%rip), %xmm0    # 0x79348
divsd 0x126da(%rip), %xmm0    # 0x79350
cvttsd2si %xmm0, %eax
imull $0x8ead, %eax, %ecx     # imm = 0x8EAD
movslq %ecx, %rcx
imulq $-0x51eb851f, %rcx, %rcx # imm = 0xAE147AE1
movq %rcx, %rsi
shrq $0x3f, %rsi
sarq $0x25, %rcx
addl %esi, %ecx
addl %edx, %ecx
addl $0x5f5, %ecx            # imm = 0x5F5
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd 0x126aa(%rip), %xmm1    # 0x79358
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %edx
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
subl %esi, %ecx
movl %ecx, 0x10(%rdi)
xorl %esi, %esi
cmpl $0xe, %edx
setl %sil
negl %esi
orl $-0xd, %esi
addl %edx, %esi
movl %esi, 0xc(%rdi)
xorl %ecx, %ecx
cmpl $0x3, %esi
setge %cl
xorl $0xffffed95, %ecx       # imm = 0xFFFFED95
addl %eax, %ecx
movl $0x8, %eax
jmp 0x66d0d
movabsq $0x1000007d0, %rax      # imm = 0x1000007D0
movq %rax, 0x8(%rdi)
movl $0x1, %ecx
movl $0x10, %eax
movl %ecx, (%rdi,%rax)
movb $0x1, 0x28(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: computeHMS
static void computeHMS(DateTime *p){
  int s;
  if( p->validHMS ) return;
  computeJD(p);
  s = (int)((p->iJD + 43200000) % 86400000);
  p->s = s/1000.0;
  s = (int)p->s;
  p->s -= s;
  p->h = s/3600;
  s -= p->h*3600;
  p->m = s/60;
  p->s += s - p->m*60;
  p->validHMS = 1;
}

// Assembly:
cmpb $0x0, 0x29(%rdi)
je 0x66d1d
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x6655d
movl $0x2932e00, %ecx        # imm = 0x2932E00
addq (%rbx), %rcx
movabsq $0x636ba875fd33dc87, %rdx # imm = 0x636BA875FD33DC87
movq %rcx, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x19, %rdx
addl %eax, %edx
imull $0x5265c00, %edx, %eax  # imm = 0x5265C00
subl %eax, %ecx
cvtsi2sd %ecx, %xmm0
divsd 0x12594(%rip), %xmm0    # 0x792f8
cvttsd2si %xmm0, %eax
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm0
cltq
imulq $-0x6e5d4c3b, %rax, %rcx # imm = 0x91A2B3C5
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0xb, %ecx
addl %edx, %ecx
movl %ecx, 0x14(%rbx)
imull $0xfffff1f0, %ecx, %ecx # imm = 0xFFFFF1F0
addl %eax, %ecx
movslq %ecx, %rax
imulq $-0x77777777, %rax, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x5, %ecx
addl %edx, %ecx
imull $-0x3c, %ecx, %edx
addl %eax, %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
movl %ecx, 0x18(%rbx)
addsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rbx)
movb $0x1, 0x29(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: renameTableFunc
static void renameTableFunc(
  sqlite3_context *context,
  int NotUsed,
  sqlite3_value **argv
){
  unsigned char const *zSql = sqlite3_value_text(argv[0]);
  unsigned char const *zTableName = sqlite3_value_text(argv[1]);

  int token;
  Token tname;
  unsigned char const *zCsr = zSql;
  int len = 0;
  char *zRet;

  sqlite3 *db = sqlite3_context_db_handle(context);

  UNUSED_PARAMETER(NotUsed);

  /* The principle used to locate the table name in the CREATE TABLE 
  ** statement is that the table name is the first non-space token that
  ** is immediately followed by a TK_LP or TK_USING token.
  */
  if( zSql ){
    do {
      if( !*zCsr ){
        /* Ran out of input before finding an opening bracket. Return NULL. */
        return;
      }

      /* Store the token that zCsr points to in tname. */
      tname.z = (char*)zCsr;
      tname.n = len;

      /* Advance zCsr to the next token. Store that token type in 'token',
      ** and its length in 'len' (to be used next iteration of this loop).
      */
      do {
        zCsr += len;
        len = sqlite3GetToken(zCsr, &token);
      } while( token==TK_SPACE );
      assert( len>0 );
    } while( token!=TK_LP && token!=TK_USING );

    zRet = sqlite3MPrintf(db, "%.*s\"%w\"%s", ((u8*)tname.z) - zSql, zSql, 
       zTableName, tname.z+tname.n);
    sqlite3_result_text(context, zRet, -1, SQLITE_DYNAMIC);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq (%rdx), %rdi
movl $0x1, %esi
callq 0xee49
movq %rax, %r12
movq 0x8(%r14), %rdi
movl $0x1, %esi
callq 0xee49
testq %r12, %r12
je 0x66e62
cmpb $0x0, (%r12)
je 0x66e62
movq %rax, %rcx
movq 0x8(%rbx), %rax
movq %rax, -0x38(%rbp)
xorl %eax, %eax
leaq -0x2c(%rbp), %r13
movq %r12, %r14
movq %rbx, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
movl %eax, %ebx
movq %r14, %r15
cltq
addq %rax, %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x3590c
movl -0x2c(%rbp), %ecx
cmpl $0x95, %ecx
je 0x66e37
cmpl $0x79, %ecx
je 0x66e71
cmpl $0x16, %ecx
je 0x66e71
cmpb $0x0, (%r14)
jne 0x66e32
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdx
subq %r12, %rdx
movl %ebx, %r9d
addq %r15, %r9
leaq 0x16166(%rip), %rsi     # 0x7cfea
movq -0x38(%rbp), %rdi
movq %r12, %rcx
movq -0x40(%rbp), %r8
xorl %eax, %eax
callq 0x117e2
leaq -0x5d5c9(%rip), %r8     # 0x98d4
movq -0x48(%rbp), %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xef1b
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3MemMalloc
static void *sqlite3MemMalloc(int nByte){
#ifdef SQLITE_MALLOCSIZE
  void *p = SQLITE_MALLOC( nByte );
  if( p==0 ){
    testcase( sqlite3GlobalConfig.xLog!=0 );
    sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
  }
  return p;
#else
  sqlite3_int64 *p;
  assert( nByte>0 );
  nByte = ROUND8(nByte);
  p = SQLITE_MALLOC( nByte+8 );
  if( p ){
    p[0] = nByte;
    p++;
  }else{
    testcase( sqlite3GlobalConfig.xLog!=0 );
    sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
  }
  return (void *)p;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
addl $0x7, %ebx
andl $-0x8, %ebx
leal 0x8(%rbx), %eax
movslq %eax, %rdi
callq 0x8510
testq %rax, %rax
je 0x67241
movq %rax, %r14
movslq %ebx, %rax
movq %rax, (%r14)
addq $0x8, %r14
jmp 0x67259
leaq 0x15db8(%rip), %rsi     # 0x7d000
xorl %r14d, %r14d
movl $0x7, %edi
movl %ebx, %edx
xorl %eax, %eax
callq 0xb8cc
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3MemRealloc
static void *sqlite3MemRealloc(void *pPrior, int nByte){
#ifdef SQLITE_MALLOCSIZE
  void *p = SQLITE_REALLOC(pPrior, nByte);
  if( p==0 ){
    testcase( sqlite3GlobalConfig.xLog!=0 );
    sqlite3_log(SQLITE_NOMEM,
      "failed memory resize %u to %u bytes",
      SQLITE_MALLOCSIZE(pPrior), nByte);
  }
  return p;
#else
  sqlite3_int64 *p = (sqlite3_int64*)pPrior;
  assert( pPrior!=0 && nByte>0 );
  assert( nByte==ROUND8(nByte) ); /* EV: R-46199-30249 */
  p--;
  p = SQLITE_REALLOC(p, nByte+8 );
  if( p ){
    p[0] = nByte;
    p++;
  }else{
    testcase( sqlite3GlobalConfig.xLog!=0 );
    sqlite3_log(SQLITE_NOMEM,
      "failed memory resize %u to %u bytes",
      sqlite3MemSize(pPrior), nByte);
  }
  return (void*)p;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r12
leaq -0x8(%rdi), %r15
leal 0x8(%rbx), %eax
movslq %eax, %rsi
movq %r15, %rdi
callq 0x8680
testq %rax, %rax
je 0x672a5
movq %rax, %r14
movslq %ebx, %rax
movq %rax, (%r14)
addq $0x8, %r14
jmp 0x672c9
testq %r12, %r12
je 0x672af
movl (%r15), %edx
jmp 0x672b1
xorl %edx, %edx
leaq 0x15d6e(%rip), %rsi     # 0x7d026
xorl %r14d, %r14d
movl $0x7, %edi
movl %ebx, %ecx
xorl %eax, %eax
callq 0xb8cc
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: pcache1Init
static int pcache1Init(void *NotUsed){
  UNUSED_PARAMETER(NotUsed);
  assert( pcache1.isInit==0 );
  memset(&pcache1, 0, sizeof(pcache1));
  if( sqlite3GlobalConfig.bCoreMutex ){
    pcache1.grp.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_LRU);
    pcache1.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_PMEM);
  }
  pcache1.grp.mxPinned = 10;
  pcache1.isInit = 1;
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x2ecb1(%rip)    # 0x95fc0
movups %xmm0, 0x2ec9a(%rip)    # 0x95fb0
movups %xmm0, 0x2ec83(%rip)    # 0x95fa0
movups %xmm0, 0x2ec6c(%rip)    # 0x95f90
movups %xmm0, 0x2ec55(%rip)    # 0x95f80
movups %xmm0, 0x2ec3e(%rip)    # 0x95f70
cmpl $0x0, 0x2d0cb(%rip)     # 0x94404
je 0x6734e
movl $0x8, %eax
movq %rax, 0x2ec29(%rip)     # 0x95f70
movq %rax, 0x2ec6a(%rip)     # 0x95fb8
movl $0xa, 0x2ec28(%rip)     # 0x95f80
movl $0x1, 0x2ec36(%rip)     # 0x95f98
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: pcache1Cachesize
static void pcache1Cachesize(sqlite3_pcache *p, int nMax){
  PCache1 *pCache = (PCache1 *)p;
  if( pCache->bPurgeable ){
    PGroup *pGroup = pCache->pGroup;
    pcache1EnterMutex(pGroup);
    pGroup->nMaxPage += (nMax - pCache->nMax);
    pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
    pCache->nMax = nMax;
    pCache->n90pct = pCache->nMax*9/10;
    pcache1EnforceMaxPage(pGroup);
    pcache1LeaveMutex(pGroup);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x10(%rdi)
je 0x6745d
movq (%rdi), %rax
movl %esi, %ecx
subl 0x18(%rdi), %ecx
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
subl 0xc(%rax), %ecx
addl $0xa, %ecx
movl %ecx, 0x10(%rax)
movl %esi, 0x18(%rdi)
leal (%rsi,%rsi,8), %ecx
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
imulq %rcx, %rdx
shrq $0x23, %rdx
movl %edx, 0x1c(%rdi)
movq %rax, %rdi
popq %rbp
jmp 0x678e1
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: pcache1Unpin
static void pcache1Unpin(
  sqlite3_pcache *p, 
  sqlite3_pcache_page *pPg, 
  int reuseUnlikely
){
  PCache1 *pCache = (PCache1 *)p;
  PgHdr1 *pPage = (PgHdr1 *)pPg;
  PGroup *pGroup = pCache->pGroup;
 
  assert( pPage->pCache==pCache );
  pcache1EnterMutex(pGroup);

  /* It is an error to call this function if the page is already 
  ** part of the PGroup LRU list.
  */
  assert( pPage->pLruPrev==0 && pPage->pLruNext==0 );
  assert( pGroup->pLruHead!=pPage && pGroup->pLruTail!=pPage );

  if( reuseUnlikely || pGroup->nCurrentPage>pGroup->nMaxPage ){
    pcache1RemoveFromHash(pPage);
    pcache1FreePage(pPage);
  }else{
    /* Add the page to the PGroup LRU list. */
    if( pGroup->pLruHead ){
      pGroup->pLruHead->pLruPrev = pPage;
      pPage->pLruNext = pGroup->pLruHead;
      pGroup->pLruHead = pPage;
    }else{
      pGroup->pLruTail = pPage;
      pGroup->pLruHead = pPage;
    }
    pCache->nRecyclable++;
  }

  pcache1LeaveMutex(pCache->pGroup);
}

// Assembly:
testl %edx, %edx
jne 0x6779b
movq (%rdi), %rax
movl 0x14(%rax), %ecx
cmpl 0x8(%rax), %ecx
jbe 0x677d4
pushq %rbp
movq %rsp, %rbp
movq 0x20(%rsi), %rcx
movl 0x10(%rsi), %eax
xorl %edx, %edx
divl 0x2c(%rcx)
shlq $0x3, %rdx
addq 0x30(%rcx), %rdx
movq %rdx, %rax
movq (%rdx), %rdi
leaq 0x18(%rdi), %rdx
cmpq %rsi, %rdi
jne 0x677b3
movq (%rdx), %rdx
movq %rdx, (%rax)
decl 0x28(%rcx)
movq %rsi, %rdi
popq %rbp
jmp 0x679b8
movq 0x18(%rax), %rcx
testq %rcx, %rcx
je 0x677e7
movq %rsi, 0x30(%rcx)
movq %rcx, 0x28(%rsi)
jmp 0x677eb
movq %rsi, 0x20(%rax)
movq %rsi, 0x18(%rax)
incl 0x24(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: pcache1Destroy
static void pcache1Destroy(sqlite3_pcache *p){
  PCache1 *pCache = (PCache1 *)p;
  PGroup *pGroup = pCache->pGroup;
  assert( pCache->bPurgeable || (pCache->nMax==0 && pCache->nMin==0) );
  pcache1EnterMutex(pGroup);
  pcache1TruncateUnsafe(pCache, 0);
  assert( pGroup->nMaxPage >= pCache->nMax );
  pGroup->nMaxPage -= pCache->nMax;
  assert( pGroup->nMinPage >= pCache->nMin );
  pGroup->nMinPage -= pCache->nMin;
  pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
  pcache1EnforceMaxPage(pGroup);
  pcache1LeaveMutex(pGroup);
  sqlite3_free(pCache->apHash);
  sqlite3_free(pCache);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
xorl %esi, %esi
callq 0x679e5
movl 0x8(%r14), %eax
subl 0x18(%rbx), %eax
movl 0xc(%r14), %ecx
movl %eax, 0x8(%r14)
subl 0x14(%rbx), %ecx
movl %ecx, 0xc(%r14)
subl %ecx, %eax
addl $0xa, %eax
movl %eax, 0x10(%r14)
movq %r14, %rdi
callq 0x678e1
movq 0x30(%rbx), %rdi
callq 0xa2e8
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xa2e8
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: pcache1Shrink
static void pcache1Shrink(sqlite3_pcache *p){
  PCache1 *pCache = (PCache1*)p;
  if( pCache->bPurgeable ){
    PGroup *pGroup = pCache->pGroup;
    int savedMaxPage;
    pcache1EnterMutex(pGroup);
    savedMaxPage = pGroup->nMaxPage;
    pGroup->nMaxPage = 0;
    pcache1EnforceMaxPage(pGroup);
    pGroup->nMaxPage = savedMaxPage;
    pcache1LeaveMutex(pGroup);
  }
}

// Assembly:
cmpl $0x0, 0x10(%rdi)
je 0x678e0
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rbx
movl 0x8(%rbx), %r14d
movl $0x0, 0x8(%rbx)
movq %rbx, %rdi
callq 0x678e1
movl %r14d, 0x8(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: pcache1EnforceMaxPage
static void pcache1EnforceMaxPage(PGroup *pGroup){
  assert( sqlite3_mutex_held(pGroup->mutex) );
  while( pGroup->nCurrentPage>pGroup->nMaxPage && pGroup->pLruTail ){
    PgHdr1 *p = pGroup->pLruTail;
    assert( p->pCache->pGroup==pGroup );
    pcache1PinPage(p);
    pcache1RemoveFromHash(p);
    pcache1FreePage(p);
  }
}

// Assembly:
movl 0x14(%rdi), %eax
cmpl 0x8(%rdi), %eax
jbe 0x67956
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rbx), %r14
testq %r14, %r14
je 0x67952
movq %r14, %rdi
callq 0x67957
movq 0x20(%r14), %rcx
movl 0x10(%r14), %eax
xorl %edx, %edx
divl 0x2c(%rcx)
shlq $0x3, %rdx
addq 0x30(%rcx), %rdx
movq %rdx, %rax
movq (%rdx), %rsi
leaq 0x18(%rsi), %rdx
cmpq %r14, %rsi
jne 0x67919
movq (%rdx), %rdx
movq %rdx, (%rax)
decl 0x28(%rcx)
movq (%r14), %rdi
movq 0x20(%r14), %r14
callq 0x1cf8c
cmpl $0x0, 0x10(%r14)
je 0x6794a
movq (%r14), %rax
decl 0x14(%rax)
movl 0x14(%rbx), %eax
cmpl 0x8(%rbx), %eax
ja 0x678f3
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: pcache1PinPage
static void pcache1PinPage(PgHdr1 *pPage){
  PCache1 *pCache;
  PGroup *pGroup;

  if( pPage==0 ) return;
  pCache = pPage->pCache;
  pGroup = pCache->pGroup;
  assert( sqlite3_mutex_held(pGroup->mutex) );
  if( pPage->pLruNext || pPage==pGroup->pLruTail ){
    if( pPage->pLruPrev ){
      pPage->pLruPrev->pLruNext = pPage->pLruNext;
    }
    if( pPage->pLruNext ){
      pPage->pLruNext->pLruPrev = pPage->pLruPrev;
    }
    if( pGroup->pLruHead==pPage ){
      pGroup->pLruHead = pPage->pLruNext;
    }
    if( pGroup->pLruTail==pPage ){
      pGroup->pLruTail = pPage->pLruPrev;
    }
    pPage->pLruNext = 0;
    pPage->pLruPrev = 0;
    pPage->pCache->nRecyclable--;
  }
}

// Assembly:
testq %rdi, %rdi
je 0x679b7
pushq %rbp
movq %rsp, %rbp
movq 0x20(%rdi), %rax
movq 0x28(%rdi), %rsi
movq (%rax), %rcx
testq %rsi, %rsi
je 0x679b0
leaq 0x28(%rdi), %rdx
movq 0x30(%rdi), %r8
testq %r8, %r8
je 0x67981
movq %rsi, 0x28(%r8)
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x6798d
movq %r8, 0x30(%rsi)
cmpq %rdi, 0x18(%rcx)
jne 0x67997
movq %rsi, 0x18(%rcx)
cmpq %rdi, 0x20(%rcx)
jne 0x679a5
movq 0x30(%rdi), %rsi
movq %rsi, 0x20(%rcx)
xorps %xmm0, %xmm0
movups %xmm0, (%rdx)
decl 0x24(%rax)
jmp 0x679b6
cmpq %rdi, 0x20(%rcx)
je 0x67970
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: pcache1FreePage
static void pcache1FreePage(PgHdr1 *p){
  if( ALWAYS(p) ){
    PCache1 *pCache = p->pCache;
    assert( sqlite3_mutex_held(p->pCache->pGroup->mutex) );
    pcache1Free(p->page.pBuf);
#ifdef SQLITE_PCACHE_SEPARATE_HEADER
    sqlite3_free(p);
#endif
    if( pCache->bPurgeable ){
      pCache->pGroup->nCurrentPage--;
    }
  }
}

// Assembly:
testq %rdi, %rdi
je 0x679e4
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rax
movq 0x20(%rdi), %rbx
movq %rax, %rdi
callq 0x1cf8c
cmpl $0x0, 0x10(%rbx)
je 0x679de
movq (%rbx), %rax
decl 0x14(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: pcache1TruncateUnsafe
static void pcache1TruncateUnsafe(
  PCache1 *pCache,             /* The cache to truncate */
  unsigned int iLimit          /* Drop pages with this pgno or larger */
){
  TESTONLY( unsigned int nPage = 0; )  /* To assert pCache->nPage is correct */
  unsigned int h;
  assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
  for(h=0; h<pCache->nHash; h++){
    PgHdr1 **pp = &pCache->apHash[h]; 
    PgHdr1 *pPage;
    while( (pPage = *pp)!=0 ){
      if( pPage->iKey>=iLimit ){
        pCache->nPage--;
        *pp = pPage->pNext;
        pcache1PinPage(pPage);
        pcache1FreePage(pPage);
      }else{
        pp = &pPage->pNext;
        TESTONLY( nPage++; )
      }
    }
  }
  assert( pCache->nPage==nPage );
}

// Assembly:
cmpl $0x0, 0x2c(%rdi)
je 0x67a75
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %r12d, %r12d
movq 0x30(%r14), %rax
movq (%rax,%r12,8), %r15
testq %r15, %r15
je 0x67a5b
leaq (%rax,%r12,8), %r13
cmpl %ebx, 0x10(%r15)
jae 0x67a25
addq $0x18, %r15
movq %r15, %r13
jmp 0x67a52
decl 0x28(%r14)
movq 0x18(%r15), %rax
movq %rax, (%r13)
movq %r15, %rdi
callq 0x67957
movq (%r15), %rdi
movq 0x20(%r15), %r15
callq 0x1cf8c
cmpl $0x0, 0x10(%r15)
je 0x67a52
movq (%r15), %rax
decl 0x14(%rax)
movq (%r13), %r15
testq %r15, %r15
jne 0x67a16
incq %r12
movl 0x2c(%r14), %eax
cmpq %rax, %r12
jb 0x67a05
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: connectionIsBusy
static int connectionIsBusy(sqlite3 *db){
  int j;
  assert( sqlite3_mutex_held(db->mutex) );
  if( db->pVdbe ) return 1;
  for(j=0; j<db->nDb; j++){
    Btree *pBt = db->aDb[j].pBt;
    if( pBt && sqlite3BtreeIsInBackup(pBt) ) return 1;
  }
  return 0;
}

// Assembly:
movl $0x1, %eax
cmpq $0x0, 0x8(%rdi)
je 0x67a83
retq
movslq 0x28(%rdi), %rcx
testq %rcx, %rcx
jle 0x67ab7
pushq %rbp
movq %rsp, %rbp
movq 0x20(%rdi), %rdx
shlq $0x5, %rcx
xorl %esi, %esi
movq 0x8(%rdx,%rsi), %rdi
testq %rdi, %rdi
je 0x67aaa
cmpl $0x0, 0x18(%rdi)
jne 0x67ab5
addq $0x20, %rsi
cmpq %rsi, %rcx
jne 0x67a9a
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: functionDestroy
static void functionDestroy(sqlite3 *db, FuncDef *p){
  FuncDestructor *pDestructor = p->pDestructor;
  if( pDestructor ){
    pDestructor->nRef--;
    if( pDestructor->nRef==0 ){
      pDestructor->xDestroy(pDestructor->pUserData);
      sqlite3DbFree(db, pDestructor);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x40(%rsi), %rbx
testq %rbx, %rbx
je 0x67ace
decl (%rbx)
je 0x67ad3
popq %rbx
popq %r14
popq %rbp
retq
movq %rdi, %r14
movq 0x10(%rbx), %rdi
callq *0x8(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x9c3a
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: matchQuality
static int matchQuality(
  FuncDef *p,     /* The function we are evaluating for match quality */
  int nArg,       /* Desired number of arguments.  (-1)==any */
  u8 enc          /* Desired text encoding */
){
  int match;

  /* nArg of -2 is a special case */
  if( nArg==(-2) ) return (p->xFunc==0 && p->xStep==0) ? 0 : FUNC_PERFECT_MATCH;

  /* Wrong number of arguments means "no match" */
  if( p->nArg!=nArg && p->nArg>=0 ) return 0;

  /* Give a better score to a function with a specific number of arguments
  ** than to function that accepts any number of arguments. */
  if( p->nArg==nArg ){
    match = 4;
  }else{
    match = 1;
  }

  /* Bonus points if the text encoding matches */
  if( enc==p->iPrefEnc ){
    match += 2;  /* Exact encoding match */
  }else if( (enc & p->iPrefEnc & 2)!=0 ){
    match += 1;  /* Both are UTF16, but with different byte orders */
  }

  return match;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $-0x2, %esi
jne 0x67b0d
movl $0x6, %eax
cmpq $0x0, 0x18(%rdi)
jne 0x67b47
xorl %ecx, %ecx
cmpq $0x0, 0x20(%rdi)
cmovel %ecx, %eax
jmp 0x67b47
movswl (%rdi), %ecx
testl %ecx, %ecx
setns %r8b
cmpl %esi, %ecx
setne %r9b
xorl %eax, %eax
testb %r9b, %r8b
jne 0x67b47
xorl %eax, %eax
cmpl %esi, %ecx
sete %al
leal (%rax,%rax,2), %eax
incl %eax
movb 0x2(%rdi), %cl
cmpb %dl, %cl
jne 0x67b3b
orl $0x2, %eax
jmp 0x67b47
andb %dl, %cl
movzbl %cl, %ecx
btl $0x1, %ecx
adcl $0x0, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: binCollFunc
static int binCollFunc(
  void *padFlag,
  int nKey1, const void *pKey1,
  int nKey2, const void *pKey2
){
  int rc, n;
  n = nKey1<nKey2 ? nKey1 : nKey2;
  rc = memcmp(pKey1, pKey2, n);
  if( rc==0 ){
    if( padFlag
     && allSpaces(((char*)pKey1)+n, nKey1-n)
     && allSpaces(((char*)pKey2)+n, nKey2-n)
    ){
      /* Leave rc unchanged at 0 */
    }else{
      rc = nKey1 - nKey2;
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %ebx
movl %esi, %r12d
movq %rdi, -0x30(%rbp)
movl %esi, %r14d
subl %ecx, %r14d
movl %ecx, %r13d
cmovll %esi, %r13d
movslq %r13d, %r15
movq %rdx, -0x38(%rbp)
movq %rdx, %rdi
movq %r8, -0x40(%rbp)
movq %r8, %rsi
movq %r15, %rdx
callq 0x81a0
testl %eax, %eax
jne 0x67bed
movq -0x38(%rbp), %rax
cmpq $0x0, -0x30(%rbp)
movq -0x40(%rbp), %rsi
je 0x67bea
subl %r13d, %r12d
jle 0x67bc1
addq %r15, %rax
decq %rax
movl %r12d, %ecx
cmpb $0x20, (%rax,%rcx)
jne 0x67bc1
leal -0x1(%r12), %ecx
cmpl $0x1, %r12d
movl %ecx, %r12d
jg 0x67ba7
xorl %r12d, %r12d
testl %r12d, %r12d
jne 0x67bea
subl %r13d, %ebx
jle 0x67be6
leaq (%rsi,%r15), %rax
decq %rax
movl %ebx, %ecx
cmpb $0x20, (%rax,%rcx)
jne 0x67be6
leal -0x1(%rbx), %ecx
cmpl $0x1, %ebx
movl %ecx, %ebx
jg 0x67bd2
xorl %ebx, %ebx
testl %ebx, %ebx
je 0x67bfc
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x67bed
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: nocaseCollatingFunc
static int nocaseCollatingFunc(
  void *NotUsed,
  int nKey1, const void *pKey1,
  int nKey2, const void *pKey2
){
  int r = sqlite3StrNICmp(
      (const char *)pKey1, (const char *)pKey2, (nKey1<nKey2)?nKey1:nKey2);
  UNUSED_PARAMETER(NotUsed);
  if( 0==r ){
    r = nKey1-nKey2;
  }
  return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdx, %rdi
movl %esi, %ebx
subl %ecx, %ebx
cmovll %esi, %ecx
movq %r8, %rsi
movl %ecx, %edx
callq 0x9454
testl %eax, %eax
cmovel %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3AutoLoadExtensions
SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3 *db){
  int i;
  int go = 1;
  int rc;
  int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);

  wsdAutoextInit;
  if( wsdAutoext.nExt==0 ){
    /* Common case: early out without every having to acquire a mutex */
    return;
  }
  for(i=0; go; i++){
    char *zErrmsg;
#if SQLITE_THREADSAFE
    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
#endif
    sqlite3_mutex_enter(mutex);
    if( i>=wsdAutoext.nExt ){
      xInit = 0;
      go = 0;
    }else{
      xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
              wsdAutoext.aExt[i];
    }
    sqlite3_mutex_leave(mutex);
    zErrmsg = 0;
    if( xInit && (rc = xInit(db, &zErrmsg, &sqlite3Apis))!=0 ){
      sqlite3Error(db, rc,
            "automatic extension loading failed: %s", zErrmsg);
      go = 0;
    }
    sqlite3_free(zErrmsg);
  }
}

// Assembly:
cmpl $0x0, 0x2e24b(%rip)     # 0x95e78
je 0x67ccb
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r13d, %r13d
leaq 0x11002(%rip), %r14     # 0x78c50
leaq -0x30(%rbp), %r15
movslq 0x2e21f(%rip), %rax     # 0x95e78
cmpq %rax, %r13
jge 0x67c71
movq 0x2e21b(%rip), %rax     # 0x95e80
movq (%rax,%r13,8), %rax
movl $0x1, %r12d
jmp 0x67c76
xorl %r12d, %r12d
xorl %eax, %eax
movq $0x0, -0x30(%rbp)
testq %rax, %rax
je 0x67cac
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *%rax
testl %eax, %eax
je 0x67cac
movq -0x30(%rbp), %rcx
xorl %r12d, %r12d
movq %rbx, %rdi
movl %eax, %esi
leaq 0x156d4(%rip), %rdx     # 0x7d379
xorl %eax, %eax
callq 0xc8f4
movq -0x30(%rbp), %rdi
callq 0xa2e8
incq %r13
testl %r12d, %r12d
jne 0x67c52
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/barabo[P]advanced-shell-history/src/config.cpp
// Function: ash::Config::instance()
Config & Config::instance() {
  static Config _instance;
  if (!_instance.is_loaded) {
    // Find all environment variables matching a common prefix ASH_CFG_
    for (int i = 0; environ[i] != NULL; ++i) {
      string line = environ[i];
      if (line.substr(0, 8) == "ASH_CFG_") {
        int first_equals = line.find_first_of('=');
        string key = line.substr(8, first_equals - 8);
        string value = line.substr(first_equals + 1);
        _instance.values[key] = value;
      }
    }
    _instance.is_loaded = true;
  }
  return _instance;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movb 0x2c48a(%rip), %al      # 0x96390
testb %al, %al
je 0x6a07d
cmpb $0x0, 0x2c473(%rip)     # 0x96388
jne 0x6a067
movq 0x2a0a6(%rip), %rax     # 0x93fc8
movq (%rax), %rax
cmpq $0x0, (%rax)
je 0x6a060
leaq 0x38(%rsp), %r13
movl $0x8, %r12d
leaq 0x48(%rsp), %rbx
leaq 0x28(%rsp), %r14
leaq 0x13a76(%rip), %r15     # 0x7d9c1
movq (%rax), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x8170
movl $0x8, %ecx
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x8420
movq %r14, %rdi
movq %r15, %rsi
callq 0x80f0
movl %eax, %ebp
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x69f87
callq 0x8390
testl %ebp, %ebp
jne 0x6a02e
movq %rbx, %rdi
movl $0x3d, %esi
xorl %edx, %edx
callq 0x8500
movq %rax, %rbp
shlq $0x20, %rbp
movabsq $-0x800000000, %rax     # imm = 0xFFFFFFF800000000
leaq (%rax,%rbp), %rcx
sarq $0x20, %rcx
movl $0x8, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8420
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %rbp
sarq $0x20, %rbp
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
movq $-0x1, %rcx
callq 0x8420
leaq 0x2c362(%rip), %rdi     # 0x96358
movq %r14, %rsi
callq 0x697fa
movq %rax, %rdi
leaq 0x8(%rsp), %rsi
callq 0x81f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6a01f
callq 0x8390
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x6a02e
callq 0x8390
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x6a042
callq 0x8390
movq 0x29f7f(%rip), %rax     # 0x93fc8
movq (%rax), %rcx
leaq (%rcx,%r12), %rax
cmpq $0x0, (%rcx,%r12)
leaq 0x8(%r12), %r12
jne 0x69f4b
movb $0x1, 0x2c321(%rip)     # 0x96388
leaq 0x2c2ea(%rip), %rax     # 0x96358
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x87f0
jmp 0x69f0e
jmp 0x6a0ab
jmp 0x6a0a6
jmp 0x6a0a6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6a0ae
callq 0x8390
jmp 0x6a0ae
movq %rax, %rbx
jmp 0x6a0bd
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x6a0bd
callq 0x8390
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x6a0d1
callq 0x8390
movq %rbx, %rdi
callq 0x8720