LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VdbeMemStoreType
SQLITE_PRIVATE void sqlite3VdbeMemStoreType(Mem *pMem){
  int flags = pMem->flags;
  if( flags & MEM_Null ){
    pMem->type = SQLITE_NULL;
  }
  else if( flags & MEM_Int ){
    pMem->type = SQLITE_INTEGER;
  }
  else if( flags & MEM_Real ){
    pMem->type = SQLITE_FLOAT;
  }
  else if( flags & MEM_Str ){
    pMem->type = SQLITE_TEXT;
  }else{
    pMem->type = SQLITE_BLOB;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x24(%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x12e28
movq -0x8(%rbp), %rax
movb $0x5, 0x26(%rax)
jmp 0x12e75
movl -0xc(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x12e3d
movq -0x8(%rbp), %rax
movb $0x1, 0x26(%rax)
jmp 0x12e73
movl -0xc(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x12e52
movq -0x8(%rbp), %rax
movb $0x2, 0x26(%rax)
jmp 0x12e71
movl -0xc(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x12e67
movq -0x8(%rbp), %rax
movb $0x3, 0x26(%rax)
jmp 0x12e6f
movq -0x8(%rbp), %rax
movb $0x4, 0x26(%rax)
jmp 0x12e71
jmp 0x12e73
jmp 0x12e75
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3DbMallocRaw
SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, int n){
  void *p;
  assert( db==0 || sqlite3_mutex_held(db->mutex) );
  assert( db==0 || db->pnBytesFreed==0 );
#ifndef SQLITE_OMIT_LOOKASIDE
  if( db ){
    LookasideSlot *pBuf;
    if( db->mallocFailed ){
      return 0;
    }
    if( db->lookaside.bEnabled ){
      if( n>db->lookaside.sz ){
        db->lookaside.anStat[1]++;
      }else if( (pBuf = db->lookaside.pFree)==0 ){
        db->lookaside.anStat[2]++;
      }else{
        db->lookaside.pFree = pBuf->pNext;
        db->lookaside.nOut++;
        db->lookaside.anStat[0]++;
        if( db->lookaside.nOut>db->lookaside.mxOut ){
          db->lookaside.mxOut = db->lookaside.nOut;
        }
        return (void*)pBuf;
      }
    }
  }
#else
  if( db && db->mallocFailed ){
    return 0;
  }
#endif
  p = sqlite3Malloc(n);
  if( !p && db ){
    db->mallocFailed = 1;
  }
  sqlite3MemdebugSetType(p, MEMTYPE_DB |
         ((db && db->lookaside.bEnabled) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP));
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x135e8
movq -0x10(%rbp), %rax
cmpb $0x0, 0x50(%rax)
je 0x13511
movq $0x0, -0x8(%rbp)
jmp 0x13612
movq -0x10(%rbp), %rax
cmpb $0x0, 0x152(%rax)
je 0x135e6
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movzwl 0x150(%rcx), %ecx
cmpl %ecx, %eax
jle 0x1354c
movq -0x10(%rbp), %rax
movl 0x160(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x160(%rax)
jmp 0x135e4
movq -0x10(%rbp), %rax
movq 0x168(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x13576
movq -0x10(%rbp), %rax
movl 0x164(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x164(%rax)
jmp 0x135e2
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x168(%rax)
movq -0x10(%rbp), %rax
movl 0x154(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x154(%rax)
movq -0x10(%rbp), %rax
movl 0x15c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x15c(%rax)
movq -0x10(%rbp), %rax
movl 0x154(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x158(%rcx), %eax
jle 0x135d8
movq -0x10(%rbp), %rax
movl 0x154(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x158(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x13612
jmp 0x135e4
jmp 0x135e6
jmp 0x135e8
movl -0x14(%rbp), %edi
callq 0xa3c0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1360a
cmpq $0x0, -0x10(%rbp)
je 0x1360a
movq -0x10(%rbp), %rax
movb $0x1, 0x50(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3LocateTable
SQLITE_PRIVATE Table *sqlite3LocateTable(
  Parse *pParse,         /* context in which to report errors */
  int isView,            /* True if looking for a VIEW rather than a TABLE */
  const char *zName,     /* Name of the table we are looking for */
  const char *zDbase     /* Name of the database.  Might be NULL */
){
  Table *p;

  /* Read the database schema. If an error occurs, leave an error message
  ** and code in pParse and return NULL. */
  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
    return 0;
  }

  p = sqlite3FindTable(pParse->db, zName, zDbase);
  if( p==0 ){
    const char *zMsg = isView ? "no such view" : "no such table";
    if( zDbase ){
      sqlite3ErrorMsg(pParse, "%s: %s.%s", zMsg, zDbase, zName);
    }else{
      sqlite3ErrorMsg(pParse, "%s: %s", zMsg, zName);
    }
    pParse->checkSchema = 1;
  }
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4ab20
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x13655
movq $0x0, -0x8(%rbp)
jmp 0x136e1
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x46b20
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x136d9
movl -0x14(%rbp), %edx
leaq 0x9be7a(%rip), %rax     # 0xaf4f8
leaq 0x9be66(%rip), %rcx     # 0xaf4eb
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x136b7
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %r8
leaq 0x9be58(%rip), %rsi     # 0xaf506
movb $0x0, %al
callq 0x136f0
jmp 0x136d1
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0x9be46(%rip), %rsi     # 0xaf510
movb $0x0, %al
callq 0x136f0
movq -0x10(%rbp), %rax
movb $0x1, 0x1d(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ErrorMsg
SQLITE_PRIVATE void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...){
  char *zMsg;
  va_list ap;
  sqlite3 *db = pParse->db;
  va_start(ap, zFormat);
  zMsg = sqlite3VMPrintf(db, zFormat, ap);
  va_end(ap);
  if( db->suppressErr ){
    sqlite3DbFree(db, zMsg);
  }else{
    pParse->nErr++;
    sqlite3DbFree(db, pParse->zErrMsg);
    pParse->zErrMsg = zMsg;
    pParse->rc = SQLITE_ERROR;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
testb %al, %al
je 0x1372b
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)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdx
callq 0x1f730
movq %rax, -0x18(%rbp)
leaq -0x30(%rbp), %rax
movq -0x38(%rbp), %rax
cmpb $0x0, 0x53(%rax)
je 0x137b0
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x9cd0
jmp 0x137e5
movq -0x8(%rbp), %rax
movl 0x50(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x50(%rax)
movq -0x38(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x9cd0
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x18(%rax)
addq $0xf0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VdbeCreate
SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(sqlite3 *db){
  Vdbe *p;
  p = sqlite3DbMallocZero(db, sizeof(Vdbe) );
  if( p==0 ) return 0;
  p->db = db;
  if( db->pVdbe ){
    db->pVdbe->pPrev = p;
  }
  p->pNext = db->pVdbe;
  p->pPrev = 0;
  db->pVdbe = p;
  p->magic = VDBE_MAGIC_INIT;
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x128, %esi            # imm = 0x128
callq 0x11ca0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x138cf
movq $0x0, -0x8(%rbp)
jmp 0x13930
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x138f5
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x60(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x60(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x26bceaa5, 0x50(%rax) # imm = 0x26BCEAA5
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3SchemaToIndex
SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *pSchema){
  int i = -1000000;

  /* If pSchema is NULL, then return -1000000. This happens when code in 
  ** expr.c is trying to resolve a reference to a transient table (i.e. one
  ** created by a sub-select). In this case the return value of this 
  ** function should never be used.
  **
  ** We return -1000000 instead of the more usual -1 simply because using
  ** -1000000 as the incorrect index into db->aDb[] is much 
  ** more likely to cause a segfault than -1 (of course there are assert()
  ** statements too, but it never hurts to play the odds).
  */
  assert( sqlite3_mutex_held(db->mutex) );
  if( pSchema ){
    for(i=0; ALWAYS(i<db->nDb); i++){
      if( db->aDb[i].pSchema==pSchema ){
        break;
      }
    }
    assert( i>=0 && i<db->nDb );
  }
  return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xfff0bdc0, -0x14(%rbp) # imm = 0xFFF0BDC0
cmpq $0x0, -0x10(%rbp)
je 0x1399b
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x13999
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x1398c
jmp 0x13999
jmp 0x1398e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x13961
jmp 0x1399b
movl -0x14(%rbp), %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VdbeAddOpList
SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe *p, int nOp, VdbeOpList const *aOp){
  int addr;
  assert( p->magic==VDBE_MAGIC_INIT );
  if( p->nOp + nOp > p->nOpAlloc && growOpArray(p) ){
    return 0;
  }
  addr = p->nOp;
  if( ALWAYS(nOp>0) ){
    int i;
    VdbeOpList const *pIn = aOp;
    for(i=0; i<nOp; i++, pIn++){
      int p2 = pIn->p2;
      VdbeOp *pOut = &p->aOp[i+addr];
      pOut->opcode = pIn->opcode;
      pOut->p1 = pIn->p1;
      if( p2<0 && (sqlite3OpcodeProperty[pOut->opcode] & OPFLG_JUMP)!=0 ){
        pOut->p2 = addr + ADDR(p2);
      }else{
        pOut->p2 = p2;
      }
      pOut->p3 = pIn->p3;
      pOut->p4type = P4_NOTUSED;
      pOut->p4.p = 0;
      pOut->p5 = 0;
#ifdef SQLITE_DEBUG
      pOut->zComment = 0;
      if( p->db->flags & SQLITE_VdbeAddopTrace ){
        sqlite3VdbePrintOp(0, i+addr, &p->aOp[i+addr]);
      }
#endif
    }
    p->nOp += nOp;
  }
  return addr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x34(%rax), %eax
addl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jle 0x139e0
movq -0x10(%rbp), %rdi
callq 0x4a660
cmpl $0x0, %eax
je 0x139e0
movl $0x0, -0x4(%rbp)
jmp 0x13aeb
movq -0x10(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0x13ae5
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x13ad8
movq -0x30(%rbp), %rax
movsbl 0x2(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x28(%rbp), %ecx
addl -0x24(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movb (%rax), %cl
movq -0x40(%rbp), %rax
movb %cl, (%rax)
movq -0x30(%rbp), %rax
movsbl 0x1(%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x4(%rax)
cmpl $0x0, -0x34(%rbp)
jge 0x13a89
movq -0x40(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x97a39(%rip), %rax     # 0xab4a0
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x13a89
movl -0x24(%rbp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl -0x34(%rbp), %eax
addl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x13a93
movl -0x34(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x30(%rbp), %rax
movsbl 0x3(%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x40(%rbp), %rax
movb $0x0, 0x1(%rax)
movq -0x40(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x40(%rbp), %rax
movb $0x0, 0x3(%rax)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
jmp 0x13a03
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x34(%rax), %ecx
movl %ecx, 0x34(%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VdbeUsesBtree
SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe *p, int i){
  assert( i>=0 && i<p->db->nDb && i<(int)sizeof(yDbMask)*8 );
  assert( i<(int)sizeof(p->btreeMask)*8 );
  p->btreeMask |= ((yDbMask)1)<<i;
  if( i!=1 && sqlite3BtreeSharable(p->db->aDb[i].pBt) ){
    p->lockMask |= ((yDbMask)1)<<i;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
orl 0xa0(%rax), %ecx
movl %ecx, 0xa0(%rax)
cmpl $0x1, -0xc(%rbp)
je 0x13c11
xorl %eax, %eax
testb $0x1, %al
jne 0x13bf5
jmp 0x13c11
movl -0xc(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, %ecx
movq -0x8(%rbp), %rax
orl 0xa4(%rax), %ecx
movl %ecx, 0xa4(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VdbeChangeToNoop
SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr){
  if( p->aOp ){
    VdbeOp *pOp = &p->aOp[addr];
    sqlite3 *db = p->db;
    freeP4(db, pOp->p4type, pOp->p4.p);
    memset(pOp, 0, sizeof(pOp[0]));
    pOp->opcode = OP_Noop;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x13ecc
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %esi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x2e5d0
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x8200
movq -0x18(%rbp), %rax
movb $-0x6b, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_blob_close
SQLITE_API int sqlite3_blob_close(sqlite3_blob *pBlob){
  Incrblob *p = (Incrblob *)pBlob;
  int rc;
  sqlite3 *db;

  if( p ){
    db = p->db;
    sqlite3_mutex_enter(db->mutex);
    rc = sqlite3_finalize(p->pStmt);
    sqlite3DbFree(db, p);
    sqlite3_mutex_leave(db->mutex);
  }else{
    rc = SQLITE_OK;
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x145b6
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0xfcf0
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x9cd0
jmp 0x145bd
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: blobReadWrite
static int blobReadWrite(
  sqlite3_blob *pBlob, 
  void *z, 
  int n, 
  int iOffset, 
  int (*xCall)(BtCursor*, u32, u32, void*)
){
  int rc;
  Incrblob *p = (Incrblob *)pBlob;
  Vdbe *v;
  sqlite3 *db;

  if( p==0 ) return SQLITE_MISUSE_BKPT;
  db = p->db;
  sqlite3_mutex_enter(db->mutex);
  v = (Vdbe*)p->pStmt;

  if( n<0 || iOffset<0 || (iOffset+n)>p->nByte ){
    /* Request is out of range. Return a transient error. */
    rc = SQLITE_ERROR;
    sqlite3Error(db, SQLITE_ERROR, 0);
  }else if( v==0 ){
    /* If there is no statement handle, then the blob-handle has
    ** already been invalidated. Return SQLITE_ABORT in this case.
    */
    rc = SQLITE_ABORT;
  }else{
    /* Call either BtreeData() or BtreePutData(). If SQLITE_ABORT is
    ** returned, clean-up the statement handle.
    */
    assert( db == v->db );
    sqlite3BtreeEnterCursor(p->pCsr);
    rc = xCall(p->pCsr, iOffset+p->iOffset, n, z);
    sqlite3BtreeLeaveCursor(p->pCsr);
    if( rc==SQLITE_ABORT ){
      sqlite3VdbeFinalize(v);
      p->pStmt = 0;
    }else{
      db->errCode = rc;
      v->rc = rc;
    }
  }
  rc = sqlite3ApiExit(db, rc);
  sqlite3_mutex_leave(db->mutex);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1464b
movl $0x11a1c, %edi          # imm = 0x11A1C
callq 0x9420
movl %eax, -0x4(%rbp)
jmp 0x1471a
movq -0x38(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x1c(%rbp)
jl 0x1467e
cmpl $0x0, -0x20(%rbp)
jl 0x1467e
movl -0x20(%rbp), %eax
addl -0x1c(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jle 0x1469b
movl $0x1, -0x2c(%rbp)
movq -0x48(%rbp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xd720
jmp 0x14705
cmpq $0x0, -0x40(%rbp)
jne 0x146ab
movl $0x4, -0x2c(%rbp)
jmp 0x14703
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %rdi
movl -0x20(%rbp), %esi
movq -0x38(%rbp), %rcx
addl 0x8(%rcx), %esi
movl -0x1c(%rbp), %edx
movq -0x18(%rbp), %rcx
callq *%rax
movl %eax, -0x2c(%rbp)
cmpl $0x4, -0x2c(%rbp)
jne 0x146ea
movq -0x40(%rbp), %rdi
callq 0xfdc0
movq -0x38(%rbp), %rax
movq $0x0, 0x18(%rax)
jmp 0x14701
movl -0x2c(%rbp), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x44(%rax)
movl -0x2c(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x94(%rax)
jmp 0x14703
jmp 0x14705
movq -0x48(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0xfe10
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeData
SQLITE_PRIVATE int sqlite3BtreeData(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
  int rc;

#ifndef SQLITE_OMIT_INCRBLOB
  if ( pCur->eState==CURSOR_INVALID ){
    return SQLITE_ABORT;
  }
#endif

  assert( cursorHoldsMutex(pCur) );
  rc = restoreCursorPosition(pCur);
  if( rc==SQLITE_OK ){
    assert( pCur->eState==CURSOR_VALID );
    assert( pCur->iPage>=0 && pCur->apPage[pCur->iPage] );
    assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
    rc = accessPayload(pCur, offset, amt, pBuf, 0);
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x77(%rax), %eax
cmpl $0x0, %eax
jne 0x1475c
movl $0x4, -0x4(%rbp)
jmp 0x147a9
movq -0x10(%rbp), %rax
movzbl 0x77(%rax), %eax
cmpl $0x3, %eax
jl 0x14777
movq -0x10(%rbp), %rdi
callq 0x40550
movl %eax, -0x28(%rbp)
jmp 0x1477e
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x1477e
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x147a3
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
xorl %r8d, %r8d
callq 0x2c7a0
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreePutData
SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void *z){
  int rc;
  assert( cursorHoldsMutex(pCsr) );
  assert( sqlite3_mutex_held(pCsr->pBtree->db->mutex) );
  assert( pCsr->isIncrblobHandle );

  rc = restoreCursorPosition(pCsr);
  if( rc!=SQLITE_OK ){
    return rc;
  }
  assert( pCsr->eState!=CURSOR_REQUIRESEEK );
  if( pCsr->eState!=CURSOR_VALID ){
    return SQLITE_ABORT;
  }

  /* Save the positions of all other cursors open on this table. This is
  ** required in case any of them are holding references to an xFetch
  ** version of the b-tree page modified by the accessPayload call below.
  **
  ** Note that pCsr must be open on a BTREE_INTKEY table and saveCursorPosition()
  ** and hence saveAllCursors() cannot fail on a BTREE_INTKEY table, hence
  ** saveAllCursors can only return SQLITE_OK.
  */
  VVA_ONLY(rc =) saveAllCursors(pCsr->pBt, pCsr->pgnoRoot, pCsr);
  assert( rc==SQLITE_OK );

  /* Check some assumptions: 
  **   (a) the cursor is open for writing,
  **   (b) there is a read/write transaction open,
  **   (c) the connection holds a write-lock on the table (if required),
  **   (d) there are no conflicting read-locks, and
  **   (e) the cursor points at a valid row of an intKey table.
  */
  if( !pCsr->wrFlag ){
    return SQLITE_READONLY;
  }
  assert( (pCsr->pBt->btsFlags & BTS_READ_ONLY)==0
              && pCsr->pBt->inTransaction==TRANS_WRITE );
  assert( hasSharedCacheTableLock(pCsr->pBtree, pCsr->pgnoRoot, 0, 2) );
  assert( !hasReadConflicts(pCsr->pBtree, pCsr->pgnoRoot) );
  assert( pCsr->apPage[pCsr->iPage]->intKey );

  return accessPayload(pCsr, offset, amt, (unsigned char *)z, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x77(%rax), %eax
cmpl $0x3, %eax
jl 0x14831
movq -0x10(%rbp), %rdi
callq 0x40550
movl %eax, -0x28(%rbp)
jmp 0x14838
xorl %eax, %eax
movl %eax, -0x28(%rbp)
jmp 0x14838
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x1484c
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x148a9
movq -0x10(%rbp), %rax
movzbl 0x77(%rax), %eax
cmpl $0x1, %eax
je 0x14862
movl $0x4, -0x4(%rbp)
jmp 0x148a9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x30(%rax), %esi
movq -0x10(%rbp), %rdx
callq 0x2bad0
movq -0x10(%rbp), %rax
cmpb $0x0, 0x74(%rax)
jne 0x1488d
movl $0x8, -0x4(%rbp)
jmp 0x148a9
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq -0x20(%rbp), %rcx
movl $0x1, %r8d
callq 0x2c7a0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_blob_reopen
SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){
  int rc;
  Incrblob *p = (Incrblob *)pBlob;
  sqlite3 *db;

  if( p==0 ) return SQLITE_MISUSE_BKPT;
  db = p->db;
  sqlite3_mutex_enter(db->mutex);

  if( p->pStmt==0 ){
    /* If there is no statement handle, then the blob-handle has
    ** already been invalidated. Return SQLITE_ABORT in this case.
    */
    rc = SQLITE_ABORT;
  }else{
    char *zErr;
    rc = blobSeekToRow(p, iRow, &zErr);
    if( rc!=SQLITE_OK ){
      sqlite3Error(db, rc, (zErr ? "%s" : 0), zErr);
      sqlite3DbFree(db, zErr);
    }
    assert( rc!=SQLITE_SCHEMA );
  }

  rc = sqlite3ApiExit(db, rc);
  assert( rc==SQLITE_OK || p->pStmt==0 );
  sqlite3_mutex_leave(db->mutex);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x14931
movl $0x11a67, %edi          # imm = 0x11A67
callq 0x9420
movl %eax, -0x4(%rbp)
jmp 0x149b8
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x14951
movl $0x4, -0x1c(%rbp)
jmp 0x149a3
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x14370
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x149a1
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %esi
movq -0x38(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq 0x9984f(%rip), %rax     # 0xae1d0
cmpq $0x0, %rcx
cmovneq %rax, %rdx
movq -0x38(%rbp), %rcx
movb $0x0, %al
callq 0xd720
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x9cd0
jmp 0x149a3
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0xfe10
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_set_authorizer
SQLITE_API int sqlite3_set_authorizer(
  sqlite3 *db,
  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
  void *pArg
){
  sqlite3_mutex_enter(db->mutex);
  db->xAuth = xAuth;
  db->pAuthArg = pArg;
  sqlite3ExpirePreparedStatements(db);
  sqlite3_mutex_leave(db->mutex);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x180(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x188(%rax)
movq -0x8(%rbp), %rdi
callq 0x14a20
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3SafetyCheckOk
SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3 *db){
  u32 magic;
  if( db==0 ){
    logBadConnection("NULL");
    return 0;
  }
  magic = db->magic;
  if( magic!=SQLITE_MAGIC_OPEN ){
    if( sqlite3SafetyCheckSickOrOk(db) ){
      testcase( sqlite3GlobalConfig.xLog!=0 );
      logBadConnection("unopened");
    }
    return 0;
  }else{
    return 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x153b8
leaq 0x9bbc1(%rip), %rdi     # 0xb0f6b
callq 0x4b800
movl $0x0, -0x4(%rbp)
jmp 0x153f5
movq -0x10(%rbp), %rax
movl 0x5c(%rax), %eax
movl %eax, -0x14(%rbp)
cmpl $0xa029a697, -0x14(%rbp) # imm = 0xA029A697
je 0x153ee
movq -0x10(%rbp), %rdi
callq 0x19590
cmpl $0x0, %eax
je 0x153e5
leaq 0x9a1ca(%rip), %rdi     # 0xaf5aa
callq 0x4b800
movl $0x0, -0x4(%rbp)
jmp 0x153f5
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_errcode
SQLITE_API int sqlite3_errcode(sqlite3 *db){
  if( db && !sqlite3SafetyCheckSickOrOk(db) ){
    return SQLITE_MISUSE_BKPT;
  }
  if( !db || db->mallocFailed ){
    return SQLITE_NOMEM;
  }
  return db->errCode & db->errMask;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x15480
movq -0x10(%rbp), %rdi
callq 0x19590
cmpl $0x0, %eax
jne 0x15480
movl $0x1cb0e, %edi          # imm = 0x1CB0E
callq 0x9420
movl %eax, -0x4(%rbp)
jmp 0x154ae
cmpq $0x0, -0x10(%rbp)
je 0x15494
movq -0x10(%rbp), %rax
movzbl 0x50(%rax), %eax
cmpl $0x0, %eax
je 0x1549d
movl $0x7, -0x4(%rbp)
jmp 0x154ae
movq -0x10(%rbp), %rax
movl 0x44(%rax), %eax
movq -0x10(%rbp), %rcx
andl 0x48(%rcx), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_errmsg
SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){
  const char *z;
  if( !db ){
    return sqlite3ErrStr(SQLITE_NOMEM);
  }
  if( !sqlite3SafetyCheckSickOrOk(db) ){
    return sqlite3ErrStr(SQLITE_MISUSE_BKPT);
  }
  sqlite3_mutex_enter(db->mutex);
  if( db->mallocFailed ){
    z = sqlite3ErrStr(SQLITE_NOMEM);
  }else{
    z = (char*)sqlite3_value_text(db->pErr);
    assert( !db->mallocFailed );
    if( z==0 ){
      z = sqlite3ErrStr(db->errCode);
    }
  }
  sqlite3_mutex_leave(db->mutex);
  return z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x154e3
movl $0x7, %edi
callq 0x11060
movq %rax, -0x8(%rbp)
jmp 0x15557
movq -0x10(%rbp), %rdi
callq 0x19590
cmpl $0x0, %eax
jne 0x15508
movl $0x1cac9, %edi          # imm = 0x1CAC9
callq 0x9420
movl %eax, %edi
callq 0x11060
movq %rax, -0x8(%rbp)
jmp 0x15557
movq -0x10(%rbp), %rax
cmpb $0x0, 0x50(%rax)
je 0x15522
movl $0x7, %edi
callq 0x11060
movq %rax, -0x18(%rbp)
jmp 0x1554f
movq -0x10(%rbp), %rax
movq 0x130(%rax), %rdi
callq 0x10350
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1554d
movq -0x10(%rbp), %rax
movl 0x44(%rax), %edi
callq 0x11060
movq %rax, -0x18(%rbp)
jmp 0x1554f
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_auto_extension
SQLITE_API int sqlite3_auto_extension(void (*xInit)(void)){
  int rc = SQLITE_OK;
#ifndef SQLITE_OMIT_AUTOINIT
  rc = sqlite3_initialize();
  if( rc ){
    return rc;
  }else
#endif
  {
    int i;
#if SQLITE_THREADSAFE
    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
#endif
    wsdAutoextInit;
    sqlite3_mutex_enter(mutex);
    for(i=0; i<wsdAutoext.nExt; i++){
      if( wsdAutoext.aExt[i]==xInit ) break;
    }
    if( i==wsdAutoext.nExt ){
      int nByte = (wsdAutoext.nExt+1)*sizeof(wsdAutoext.aExt[0]);
      void (**aNew)(void);
      aNew = sqlite3_realloc(wsdAutoext.aExt, nByte);
      if( aNew==0 ){
        rc = SQLITE_NOMEM;
      }else{
        wsdAutoext.aExt = aNew;
        wsdAutoext.aExt[wsdAutoext.nExt] = xInit;
        wsdAutoext.nExt++;
      }
    }
    sqlite3_mutex_leave(mutex);
    assert( (rc&0xff)==rc );
    return rc;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
callq 0x9e60
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x1559c
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1564a
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl 0xbc9ec(%rip), %eax     # 0xd1f98
jge 0x155d2
movq 0xbc9eb(%rip), %rax     # 0xd1fa0
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x10(%rbp), %rax
jne 0x155c5
jmp 0x155d2
jmp 0x155c7
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x155a3
movl -0x18(%rbp), %eax
cmpl 0xbc9bd(%rip), %eax     # 0xd1f98
jne 0x15644
movl 0xbc9b5(%rip), %eax     # 0xd1f98
addl $0x1, %eax
cltq
shlq $0x3, %rax
movl %eax, -0x1c(%rbp)
movq 0xbc9aa(%rip), %rdi     # 0xd1fa0
movl -0x1c(%rbp), %esi
callq 0xa500
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x15612
movl $0x7, -0x14(%rbp)
jmp 0x15642
movq -0x28(%rbp), %rax
movq %rax, 0xbc983(%rip)     # 0xd1fa0
movq -0x10(%rbp), %rdx
movq 0xbc978(%rip), %rax     # 0xd1fa0
movslq 0xbc969(%rip), %rcx     # 0xd1f98
movq %rdx, (%rax,%rcx,8)
movl 0xbc95f(%rip), %eax     # 0xd1f98
addl $0x1, %eax
movl %eax, 0xbc956(%rip)     # 0xd1f98
jmp 0x15644
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_cancel_auto_extension
SQLITE_API int sqlite3_cancel_auto_extension(void (*xInit)(void)){
#if SQLITE_THREADSAFE
  sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
#endif
  int i;
  int n = 0;
  wsdAutoextInit;
  sqlite3_mutex_enter(mutex);
  for(i=wsdAutoext.nExt-1; i>=0; i--){
    if( wsdAutoext.aExt[i]==xInit ){
      wsdAutoext.nExt--;
      wsdAutoext.aExt[i] = wsdAutoext.aExt[wsdAutoext.nExt];
      n++;
      break;
    }
  }
  sqlite3_mutex_leave(mutex);
  return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movl 0xbc923(%rip), %eax     # 0xd1f98
subl $0x1, %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0x156de
movq 0xbc918(%rip), %rax     # 0xd1fa0
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x8(%rbp), %rax
jne 0x156d1
movl 0xbc8fc(%rip), %eax     # 0xd1f98
addl $-0x1, %eax
movl %eax, 0xbc8f3(%rip)     # 0xd1f98
movq 0xbc8f4(%rip), %rax     # 0xd1fa0
movslq 0xbc8e5(%rip), %rcx     # 0xd1f98
movq (%rax,%rcx,8), %rdx
movq 0xbc8e2(%rip), %rax     # 0xd1fa0
movslq -0xc(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x156de
jmp 0x156d3
movl -0xc(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x1567b
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3LockAndPrepare
static int sqlite3LockAndPrepare(
  sqlite3 *db,              /* Database handle. */
  const char *zSql,         /* UTF-8 encoded SQL statement. */
  int nBytes,               /* Length of zSql in bytes. */
  int saveSqlFlag,          /* True to copy SQL text into the sqlite3_stmt */
  Vdbe *pOld,               /* VM being reprepared */
  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
  const char **pzTail       /* OUT: End of parsed string */
){
  int rc;
  assert( ppStmt!=0 );
  *ppStmt = 0;
  if( !sqlite3SafetyCheckOk(db) ){
    return SQLITE_MISUSE_BKPT;
  }
  sqlite3_mutex_enter(db->mutex);
  sqlite3BtreeEnterAll(db);
  rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
  if( rc==SQLITE_SCHEMA ){
    sqlite3_finalize(*ppStmt);
    rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
  }
  sqlite3BtreeLeaveAll(db);
  sqlite3_mutex_leave(db->mutex);
  assert( rc==SQLITE_OK || *ppStmt==0 );
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rdi
callq 0x15390
cmpl $0x0, %eax
jne 0x157ca
movl $0x17814, %edi          # imm = 0x17814
callq 0x9420
movl %eax, -0x4(%rbp)
jmp 0x15837
movq -0x10(%rbp), %rdi
callq 0x9890
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %rax
movq %rax, (%rsp)
callq 0x4b9a0
movl %eax, -0x34(%rbp)
cmpl $0x11, -0x34(%rbp)
jne 0x15831
movq -0x30(%rbp), %rax
movq (%rax), %rdi
callq 0xfcf0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
movq 0x10(%rbp), %rax
movq %rax, (%rsp)
callq 0x4b9a0
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_free_table
SQLITE_API void sqlite3_free_table(
  char **azResult            /* Result returned from from sqlite3_get_table() */
){
  if( azResult ){
    int i, n;
    azResult--;
    assert( azResult!=0 );
    n = SQLITE_PTR_TO_INT(azResult[0]);
    for(i=1; i<n; i++){ if( azResult[i] ) sqlite3_free(azResult[i]); }
    sqlite3_free(azResult);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x15f3e
movq -0x8(%rbp), %rax
addq $-0x8, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl %eax, -0x10(%rbp)
movl $0x1, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x15f35
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x15f28
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0xa420
jmp 0x15f2a
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x15f00
movq -0x8(%rbp), %rdi
callq 0xa420
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: createModule
static int createModule(
  sqlite3 *db,                    /* Database in which module is registered */
  const char *zName,              /* Name assigned to this module */
  const sqlite3_module *pModule,  /* The definition of the module */
  void *pAux,                     /* Context pointer for xCreate/xConnect */
  void (*xDestroy)(void *)        /* Module destructor function */
){
  int rc = SQLITE_OK;
  int nName;

  sqlite3_mutex_enter(db->mutex);
  nName = sqlite3Strlen30(zName);
  if( sqlite3HashFind(&db->aModule, zName, nName) ){
    rc = SQLITE_MISUSE_BKPT;
  }else{
    Module *pMod;
    pMod = (Module *)sqlite3DbMallocRaw(db, sizeof(Module) + nName + 1);
    if( pMod ){
      Module *pDel;
      char *zCopy = (char *)(&pMod[1]);
      memcpy(zCopy, zName, nName+1);
      pMod->zName = zCopy;
      pMod->pModule = pModule;
      pMod->pAux = pAux;
      pMod->xDestroy = xDestroy;
      pDel = (Module *)sqlite3HashInsert(&db->aModule,zCopy,nName,(void*)pMod);
      assert( pDel==0 || pDel==pMod );
      if( pDel ){
        db->mallocFailed = 1;
        sqlite3DbFree(db, pDel);
      }
    }
  }
  rc = sqlite3ApiExit(db, rc);
  if( rc!=SQLITE_OK && xDestroy ) xDestroy(pAux);

  sqlite3_mutex_leave(db->mutex);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x92f0
movl %eax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
movq -0x10(%rbp), %rsi
movl -0x30(%rbp), %edx
callq 0x468b0
cmpq $0x0, %rax
je 0x15fee
movl $0x19517, %edi          # imm = 0x19517
callq 0x9420
movl %eax, -0x2c(%rbp)
jmp 0x160a4
movq -0x8(%rbp), %rdi
movslq -0x30(%rbp), %rax
addq $0x20, %rax
addq $0x1, %rax
movl %eax, %esi
callq 0x134e0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x160a2
movq -0x38(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x30(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdx
callq 0x82f0
movq -0x48(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
movq -0x48(%rbp), %rsi
movl -0x30(%rbp), %edx
movq -0x38(%rbp), %rcx
callq 0x46e00
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x160a0
movq -0x8(%rbp), %rax
movb $0x1, 0x50(%rax)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x9cd0
jmp 0x160a2
jmp 0x160a4
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0xfe10
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x160ca
cmpq $0x0, -0x28(%rbp)
je 0x160ca
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rdi
callq *%rax
movl -0x2c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_vtab_config
SQLITE_API int sqlite3_vtab_config(sqlite3 *db, int op, ...){
  va_list ap;
  int rc = SQLITE_OK;

  sqlite3_mutex_enter(db->mutex);

  va_start(ap, op);
  switch( op ){
    case SQLITE_VTAB_CONSTRAINT_SUPPORT: {
      VtabCtx *p = db->pVtabCtx;
      if( !p ){
        rc = SQLITE_MISUSE_BKPT;
      }else{
        assert( p->pTab==0 || (p->pTab->tabFlags & TF_Virtual)!=0 );
        p->pVTable->bConstraint = (u8)va_arg(ap, int);
      }
      break;
    }
    default:
      rc = SQLITE_MISUSE_BKPT;
      break;
  }
  va_end(ap);

  if( rc!=SQLITE_OK ) sqlite3Error(db, rc, 0);
  sqlite3_mutex_leave(db->mutex);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
testb %al, %al
je 0x1694b
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)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x34(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x30, -0x2c(%rbp)
movl $0x10, -0x30(%rbp)
movl -0xc(%rbp), %eax
subl $0x1, %eax
jne 0x16a38
jmp 0x169a4
movq -0x8(%rbp), %rax
movq 0x1c0(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x169c9
movl $0x1991e, %edi          # imm = 0x1991E
callq 0x9420
movl %eax, -0x34(%rbp)
jmp 0x16a36
leaq -0x30(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0xf4(%rbp)
cmpl $0x28, %eax
ja 0x16a04
movq -0x100(%rbp), %rcx
movl -0xf4(%rbp), %edx
movslq %edx, %rax
addq 0x10(%rcx), %rax
addl $0x8, %edx
movl %edx, (%rcx)
movq %rax, -0x108(%rbp)
jmp 0x16a21
movq -0x100(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movl (%rax), %eax
movb %al, %cl
movq -0x40(%rbp), %rax
movq (%rax), %rax
movb %cl, 0x1c(%rax)
jmp 0x16a45
movl $0x19926, %edi          # imm = 0x19926
callq 0x9420
movl %eax, -0x34(%rbp)
leaq -0x30(%rbp), %rax
cmpl $0x0, -0x34(%rbp)
je 0x16a61
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %esi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xd720
movl -0x34(%rbp), %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_complete16
SQLITE_API int sqlite3_complete16(const void *zSql){
  sqlite3_value *pVal;
  char const *zSql8;
  int rc = SQLITE_NOMEM;

#ifndef SQLITE_OMIT_AUTOINIT
  rc = sqlite3_initialize();
  if( rc ) return rc;
#endif
  pVal = sqlite3ValueNew(0);
  sqlite3ValueSetStr(pVal, -1, zSql, SQLITE_UTF16NATIVE, SQLITE_STATIC);
  zSql8 = sqlite3ValueText(pVal, SQLITE_UTF8);
  if( zSql8 ){
    rc = sqlite3_complete(zSql8);
  }else{
    rc = SQLITE_NOMEM;
  }
  sqlite3ValueFree(pVal);
  return sqlite3ApiExit(0, rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl $0x7, -0x24(%rbp)
callq 0x9e60
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x16ef9
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x16f68
xorl %eax, %eax
movl %eax, %edi
callq 0x16f80
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x2, %ecx
xorl %eax, %eax
movl %eax, %r8d
callq 0x16fd0
movq -0x18(%rbp), %rdi
movl $0x1, %esi
callq 0x105e0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x16f49
movq -0x20(%rbp), %rdi
callq 0x16a70
movl %eax, -0x24(%rbp)
jmp 0x16f50
movl $0x7, -0x24(%rbp)
movq -0x18(%rbp), %rdi
callq 0x17020
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edi
callq 0xfe10
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ValueNew
SQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *db){
  Mem *p = sqlite3DbMallocZero(db, sizeof(*p));
  if( p ){
    p->flags = MEM_Null;
    p->type = SQLITE_NULL;
    p->db = db;
  }
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x38, %esi
callq 0x11ca0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x16fc2
movq -0x10(%rbp), %rax
movw $0x1, 0x24(%rax)
movq -0x10(%rbp), %rax
movb $0x5, 0x26(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3PcacheInitialize
SQLITE_PRIVATE int sqlite3PcacheInitialize(void){
  if( sqlite3GlobalConfig.pcache2.xInit==0 ){
    /* IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the
    ** built-in default page cache is used instead of the application defined
    ** page cache. */
    sqlite3PCacheSetDefault();
  }
  return sqlite3GlobalConfig.pcache2.xInit(sqlite3GlobalConfig.pcache2.pArg);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpq $0x0, 0xb92bc(%rip)     # 0xd0548
jne 0x17293
callq 0x17e70
movq 0xb92ae(%rip), %rax     # 0xd0548
movq 0xb929f(%rip), %rdi     # 0xd0540
callq *%rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3OsInit
SQLITE_PRIVATE int sqlite3OsInit(void){
  void *p = sqlite3_malloc(10);
  if( p==0 ) return SQLITE_NOMEM;
  sqlite3_free(p);
  return sqlite3_os_init();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0xa, %edi
callq 0xa380
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x172d6
movl $0x7, -0x4(%rbp)
jmp 0x172e7
movq -0x10(%rbp), %rdi
callq 0xa420
callq 0xca20
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3PCacheBufferSetup
SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *pBuf, int sz, int n){
  if( pcache1.isInit ){
    PgFreeslot *p;
    sz = ROUNDDOWN8(sz);
    pcache1.szSlot = sz;
    pcache1.nSlot = pcache1.nFreeSlot = n;
    pcache1.nReserve = n>90 ? 10 : (n/10 + 1);
    pcache1.pStart = pBuf;
    pcache1.pFree = 0;
    pcache1.bUnderPressure = 0;
    while( n-- ){
      p = (PgFreeslot*)pBuf;
      p->pNext = pcache1.pFree;
      pcache1.pFree = p;
      pBuf = (void*)&((char*)pBuf)[sz];
    }
    pcache1.pEnd = pBuf;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
cmpl $0x0, 0xbadb3(%rip)     # 0xd20b8
je 0x173c3
movl -0xc(%rbp), %eax
andl $-0x8, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, 0xbad9f(%rip)     # 0xd20bc
movl -0x10(%rbp), %eax
movl %eax, 0xbadc2(%rip)     # 0xd20e8
movl %eax, 0xbad94(%rip)     # 0xd20c0
cmpl $0x5a, -0x10(%rbp)
jle 0x1733c
movl $0xa, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1734d
movl -0x10(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, 0xbad6e(%rip)     # 0xd20c4
movq -0x8(%rbp), %rax
movq %rax, 0xbad67(%rip)     # 0xd20c8
movq $0x0, 0xbad74(%rip) # 0xd20e0
movl $0x0, 0xbad76(%rip)     # 0xd20ec
movl -0x10(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x10(%rbp)
cmpl $0x0, %eax
je 0x173b8
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0xbad4b(%rip), %rcx     # 0xd20e0
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq %rax, 0xbad39(%rip)     # 0xd20e0
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x17376
movq -0x8(%rbp), %rax
movq %rax, 0xbad0d(%rip)     # 0xd20d0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_db_release_memory
SQLITE_API int sqlite3_db_release_memory(sqlite3 *db){
  int i;
  sqlite3_mutex_enter(db->mutex);
  sqlite3BtreeEnterAll(db);
  for(i=0; i<db->nDb; i++){
    Btree *pBt = db->aDb[i].pBt;
    if( pBt ){
      Pager *pPager = sqlite3BtreePager(pBt);
      sqlite3PagerShrink(pPager);
    }
  }
  sqlite3BtreeLeaveAll(db);
  sqlite3_mutex_leave(db->mutex);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x9890
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x17f1d
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x17f10
movq -0x18(%rbp), %rdi
callq 0x98f0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x17f30
jmp 0x17f12
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x17ecc
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)