LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: renderLogMsg
static void renderLogMsg(int iErrCode, const char *zFormat, va_list ap){
  StrAccum acc;                          /* String accumulator */
  char zMsg[SQLITE_PRINT_BUF_SIZE*3];    /* Complete log message */

  sqlite3StrAccumInit(&acc, zMsg, sizeof(zMsg), 0);
  acc.useMalloc = 0;
  sqlite3VXPrintf(&acc, 0, zFormat, ap);
  sqlite3GlobalConfig.xLog(sqlite3GlobalConfig.pLogArg, iErrCode,
                           sqlite3StrAccumFinish(&acc));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x120(%rbp), %rsi
leaq -0x40(%rbp), %rdi
movl $0xd2, %edx
xorl %ecx, %ecx
callq 0xa720
movb $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0xa790
movq 0xc3f2d(%rip), %rax     # 0xd0618
movq %rax, -0x128(%rbp)
movq 0xc3f27(%rip), %rax     # 0xd0620
movq %rax, -0x138(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x12c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xc310
movq -0x138(%rbp), %rdi
movl -0x12c(%rbp), %esi
movq %rax, %rdx
movq -0x128(%rbp), %rax
callq *%rax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_stricmp
SQLITE_API int sqlite3_stricmp(const char *zLeft, const char *zRight){
  register unsigned char *a, *b;
  a = (unsigned char *)zLeft;
  b = (unsigned char *)zRight;
  while( *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
  return UpperToLower[*a] - UpperToLower[*b];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x21(%rbp)
je 0xc9cd
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x9e193(%rip), %rax     # 0xaab40
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
movl %ecx, %edx
leaq 0x9e17f(%rip), %rcx     # 0xaab40
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0xc9d6
jmp 0xc9f0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xc98c
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x9e140(%rip), %rax     # 0xaab40
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movzbl (%rcx), %ecx
movl %ecx, %edx
leaq 0x9e12c(%rip), %rcx     # 0xaab40
movzbl (%rcx,%rdx), %ecx
subl %ecx, %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixDelete
static int unixDelete(
  sqlite3_vfs *NotUsed,     /* VFS containing this as the xDelete method */
  const char *zPath,        /* Name of file to be deleted */
  int dirSync               /* If true, fsync() directory after deleting file */
){
  int rc = SQLITE_OK;
  UNUSED_PARAMETER(NotUsed);
  SimulateIOError(return SQLITE_IOERR_DELETE);
  if( osUnlink(zPath)==(-1) ){
    if( errno==ENOENT ){
      rc = SQLITE_IOERR_DELETE_NOENT;
    }else{
      rc = unixLogError(SQLITE_IOERR_DELETE, "unlink", zPath);
    }
    return rc;
  }
#ifndef SQLITE_DISABLE_DIRSYNC
  if( (dirSync & 1)!=0 ){
    int fd;
    rc = osOpenDirectory(zPath, &fd);
    if( rc==SQLITE_OK ){
#if OS_VXWORKS
      if( fsync(fd)==-1 )
#else
      if( fsync(fd) )
#endif
      {
        rc = unixLogError(SQLITE_IOERR_DIR_FSYNC, "fsync", zPath);
      }
      robust_close(0, fd, __LINE__);
    }else if( rc==SQLITE_CANTOPEN ){
      rc = SQLITE_OK;
    }
  }
#endif
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq 0xc3be7(%rip), %rax     # 0xd0a68
movq -0x18(%rbp), %rdi
callq *%rax
cmpl $-0x1, %eax
jne 0xcec4
callq 0x8060
cmpl $0x2, (%rax)
jne 0xce9f
movl $0x170a, -0x20(%rbp)    # imm = 0x170A
jmp 0xcebc
movq -0x18(%rbp), %rdx
movl $0xa0a, %edi            # imm = 0xA0A
leaq 0xa12ca(%rip), %rsi     # 0xae179
movl $0x70b9, %ecx           # imm = 0x70B9
callq 0x1d930
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xcf3d
movl -0x1c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xcf37
movq 0xc3baa(%rip), %rax     # 0xd0a80
movq -0x18(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq *%rax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jne 0xcf26
movl -0x24(%rbp), %edi
callq 0x8330
cmpl $0x0, %eax
je 0xcf13
movq -0x18(%rbp), %rdx
movl $0x50a, %edi            # imm = 0x50A
leaq 0xa12f9(%rip), %rsi     # 0xae1ff
movl $0x70c8, %ecx           # imm = 0x70C8
callq 0x1d930
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edi
movl $0x70ca, %edx           # imm = 0x70CA
callq 0x1da50
jmp 0xcf35
cmpl $0xe, -0x20(%rbp)
jne 0xcf33
movl $0x0, -0x20(%rbp)
jmp 0xcf35
jmp 0xcf37
movl -0x20(%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: unixAccess
static int unixAccess(
  sqlite3_vfs *NotUsed,   /* The VFS containing this xAccess method */
  const char *zPath,      /* Path of the file to examine */
  int flags,              /* What do we want to learn about the zPath file? */
  int *pResOut            /* Write result boolean here */
){
  int amode = 0;
  UNUSED_PARAMETER(NotUsed);
  SimulateIOError( return SQLITE_IOERR_ACCESS; );
  switch( flags ){
    case SQLITE_ACCESS_EXISTS:
      amode = F_OK;
      break;
    case SQLITE_ACCESS_READWRITE:
      amode = W_OK|R_OK;
      break;
    case SQLITE_ACCESS_READ:
      amode = R_OK;
      break;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0xbc(%rbp)
testl %eax, %eax
je 0xcf9a
jmp 0xcf80
movl -0xbc(%rbp), %eax
subl $0x1, %eax
je 0xcfa3
jmp 0xcf8d
movl -0xbc(%rbp), %eax
subl $0x2, %eax
je 0xcfac
jmp 0xcfb5
movl $0x0, -0x24(%rbp)
jmp 0xcfb7
movl $0x6, -0x24(%rbp)
jmp 0xcfb7
movl $0x4, -0x24(%rbp)
jmp 0xcfb7
jmp 0xcfb7
movq 0xc395a(%rip), %rax     # 0xd0918
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
callq *%rax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x0, -0x14(%rbp)
jne 0xd019
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0xd019
movq 0xc395a(%rip), %rax     # 0xd0948
movq -0x10(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq *%rax
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0xd017
cmpq $0x0, -0x88(%rbp)
jne 0xd017
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
jmp 0xd019
xorl %eax, %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixFullPathname
static int unixFullPathname(
  sqlite3_vfs *pVfs,            /* Pointer to vfs object */
  const char *zPath,            /* Possibly relative input path */
  int nOut,                     /* Size of output buffer in bytes */
  char *zOut                    /* Output buffer */
){

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0xd07f
movl -0x1c(%rbp), %edi
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0xa115a(%rip), %rdx     # 0xae1d0
movb $0x0, %al
callq 0xc540
jmp 0xd0f0
movq 0xc38aa(%rip), %rax     # 0xd0930
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rsi
callq *%rax
cmpq $0x0, %rax
jne 0xd0c1
movl $0x711f, %edi           # imm = 0x711F
callq 0x1d9a0
movl %eax, %edi
movq -0x18(%rbp), %rdx
leaq 0xa107b(%rip), %rsi     # 0xae12d
movl $0x711f, %ecx           # imm = 0x711F
callq 0x1d930
movl %eax, -0x4(%rbp)
jmp 0xd0f7
movq -0x28(%rbp), %rdi
callq 0x81b0
movl %eax, -0x2c(%rbp)
movl -0x1c(%rbp), %edi
subl -0x2c(%rbp), %edi
movq -0x28(%rbp), %rsi
movslq -0x2c(%rbp), %rax
addq %rax, %rsi
movq -0x18(%rbp), %rcx
leaq 0xa1161(%rip), %rdx     # 0xae24a
movb $0x0, %al
callq 0xc540
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixRandomness
static int unixRandomness(sqlite3_vfs *NotUsed, int nBuf, char *zBuf){
  UNUSED_PARAMETER(NotUsed);
  assert((size_t)nBuf>=(sizeof(time_t)+sizeof(int)));

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movslq -0xc(%rbp), %rdx
xorl %esi, %esi
callq 0x8200
leaq 0xa1125(%rip), %rdi     # 0xae24e
xorl %edx, %edx
movl %edx, %esi
callq 0x1d850
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x20(%rbp)
jge 0xd16a
leaq -0x30(%rbp), %rdi
callq 0x8380
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, (%rax)
callq 0x8640
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, 0x8(%rax)
movl $0xc, -0xc(%rbp)
jmp 0xd1b4
jmp 0xd16c
movq 0xc3835(%rip), %rax     # 0xd09a8
movl -0x20(%rbp), %edi
movq -0x18(%rbp), %rsi
movslq -0xc(%rbp), %rdx
callq *%rax
movl %eax, -0x24(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x24(%rbp)
movb %al, -0x31(%rbp)
jge 0xd19c
callq 0x8060
cmpl $0x4, (%rax)
sete %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xd16c
movl -0x20(%rbp), %esi
xorl %eax, %eax
movl %eax, %edi
movl $0x7188, %edx           # imm = 0x7188
callq 0x1da50
movl -0xc(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixCurrentTime
static int unixCurrentTime(sqlite3_vfs *NotUsed, double *prNow){
  sqlite3_int64 i = 0;
  int rc;
  UNUSED_PARAMETER(NotUsed);
  rc = unixCurrentTimeInt64(0, &i);
  *prNow = i/86400000.0;
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
xorl %eax, %eax
movl %eax, %edi
leaq -0x18(%rbp), %rsi
callq 0xd270
movl %eax, -0x1c(%rbp)
cvtsi2sdq -0x18(%rbp), %xmm0
movsd 0xa0be2(%rip), %xmm1    # 0xade18
divsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixCurrentTimeInt64
static int unixCurrentTimeInt64(sqlite3_vfs *NotUsed, sqlite3_int64 *piNow){
  static const sqlite3_int64 unixEpoch = 24405875*(sqlite3_int64)8640000;
  int rc = SQLITE_OK;
#if defined(NO_GETTOD)
  time_t t;
  time(&t);
  *piNow = ((sqlite3_int64)t)*1000 + unixEpoch;
#elif OS_VXWORKS
  struct timespec sNow;
  clock_gettime(CLOCK_REALTIME, &sNow);
  *piNow = unixEpoch + 1000*(sqlite3_int64)sNow.tv_sec + sNow.tv_nsec/1000000;
#else
  struct timeval sNow;
  if( gettimeofday(&sNow, 0)==0 ){
    *piNow = unixEpoch + 1000*(sqlite3_int64)sNow.tv_sec + sNow.tv_usec/1000;
  }else{
    rc = SQLITE_ERROR;
  }
#endif

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
leaq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x86d0
cmpl $0x0, %eax
jne 0xd2c8
imulq $0x3e8, -0x28(%rbp), %rcx # imm = 0x3E8
movabsq $0xbfc83e532200, %rax   # imm = 0xBFC83E532200
addq %rax, %rcx
movq -0x20(%rbp), %rax
movl $0x3e8, %esi            # imm = 0x3E8
cqto
idivq %rsi
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0xd2cf
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixGetSystemCall
static sqlite3_syscall_ptr unixGetSystemCall(
  sqlite3_vfs *pNotUsed,
  const char *zName
){
  unsigned int i;

  UNUSED_PARAMETER(pNotUsed);
  for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){
    if( strcmp(zName, aSyscall[i].zName)==0 ) return aSyscall[i].pCurrent;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpq $0x18, %rax
jae 0xd4ce
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xc3450(%rip), %rax     # 0xd08e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x85d0
cmpl $0x0, %eax
jne 0xd4c1
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xc3430(%rip), %rax     # 0xd08e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xd4d6
jmp 0xd4c3
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xd477
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: unixNextSystemCall
static const char *unixNextSystemCall(sqlite3_vfs *p, const char *zName){
  int i = -1;

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
cmpq $0x0, -0x18(%rbp)
je 0xd53f
movl $0x0, -0x1c(%rbp)
cmpl $0x17, -0x1c(%rbp)
jge 0xd53d
movq -0x18(%rbp), %rdi
movslq -0x1c(%rbp), %rcx
leaq 0xc33c6(%rip), %rax     # 0xd08e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x85d0
cmpl $0x0, %eax
jne 0xd530
jmp 0xd53d
jmp 0xd532
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xd505
jmp 0xd53f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
cmpl $0x18, -0x1c(%rbp)
jge 0xd58f
movslq -0x1c(%rbp), %rcx
leaq 0xc3387(%rip), %rax     # 0xd08e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0xd582
movslq -0x1c(%rbp), %rcx
leaq 0xc336e(%rip), %rax     # 0xd08e0
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xd597
jmp 0xd584
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xd548
movq $0x0, -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: sqlite3Error
SQLITE_PRIVATE void sqlite3Error(sqlite3 *db, int err_code, const char *zFormat, ...){
  if( db && (db->pErr || (db->pErr = sqlite3ValueNew(db))!=0) ){
    db->errCode = err_code;
    if( zFormat ){
      char *z;
      va_list ap;
      va_start(ap, zFormat);
      z = sqlite3VMPrintf(db, zFormat, ap);
      va_end(ap);
      sqlite3ValueSetStr(db->pErr, -1, z, SQLITE_UTF8, SQLITE_DYNAMIC);
    }else{
      sqlite3ValueSetStr(db->pErr, 0, 0, SQLITE_UTF8, SQLITE_STATIC);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
testb %al, %al
je 0xd75b
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 %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xd848
movq -0x8(%rbp), %rax
cmpq $0x0, 0x130(%rax)
jne 0xd7b2
movq -0x8(%rbp), %rdi
callq 0x16f80
movq -0x8(%rbp), %rcx
movq %rax, 0x130(%rcx)
cmpq $0x0, %rax
je 0xd848
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x44(%rax)
cmpq $0x0, -0x18(%rbp)
je 0xd827
leaq -0x40(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x18, (%rax)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x1f730
movq %rax, -0x20(%rbp)
leaq -0x40(%rbp), %rax
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rdi
movq -0x20(%rbp), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl $0x1, %ecx
leaq -0x3e90(%rip), %r8      # 0x9990
callq 0x16fd0
jmp 0xd846
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %ecx
movq %r8, %rdx
callq 0x16fd0
jmp 0xd848
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3MallocZero
SQLITE_PRIVATE void *sqlite3MallocZero(int n){
  void *p = sqlite3Malloc(n);
  if( p ){
    memset(p, 0, n);
  }
  return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %edi
callq 0xa3c0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xd88d
movq -0x10(%rbp), %rdi
movslq -0x4(%rbp), %rdx
xorl %esi, %esi
callq 0x8200
movq -0x10(%rbp), %rax
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: findBtree
static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
  int i = sqlite3FindDbName(pDb, zDb);

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x193b0
movl %eax, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
jne 0xd97f
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movl $0x298, %esi            # imm = 0x298
callq 0x11ca0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0xd90e
movq -0x10(%rbp), %rdi
movl $0x7, %esi
leaq 0xa095d(%rip), %rdx     # 0xae25b
movb $0x0, %al
callq 0xd720
movl $0x7, -0x34(%rbp)
jmp 0xd96d
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rdi
callq 0x1f7c0
cmpl $0x0, %eax
je 0xd94f
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movl 0x18(%rax), %esi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
leaq 0xa088f(%rip), %rdx     # 0xae1d0
movb $0x0, %al
callq 0xd720
movl $0x1, -0x34(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x9cd0
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x9cd0
cmpl $0x0, -0x34(%rbp)
je 0xd97d
movq $0x0, -0x8(%rbp)
jmp 0xd9c5
jmp 0xd97f
cmpl $0x0, -0x24(%rbp)
jge 0xd9aa
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x1, %esi
leaq 0xa08d0(%rip), %rdx     # 0xae269
movb $0x0, %al
callq 0xd720
movq $0x0, -0x8(%rbp)
jmp 0xd9c5
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x24(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeGetMeta
SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){
  BtShared *pBt = p->pBt;

  sqlite3BtreeEnter(p);
  assert( p->inTrans>TRANS_NONE );
  assert( SQLITE_OK==querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK) );
  assert( pBt->pPage1 );
  assert( idx>=0 && idx<=15 );

  *pMeta = get4byte(&pBt->pPage1->aData[36 + idx*4]);

  /* If auto-vacuum is disabled in this build and this is an auto-vacuum
  ** database, mark the database as read-only.  */
#ifdef SQLITE_OMIT_AUTOVACUUM
  if( idx==BTREE_LARGEST_ROOT_PAGE && *pMeta>0 ){
    pBt->btsFlags |= BTS_READ_ONLY;
  }
#endif

  sqlite3BtreeLeave(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0xe0f0
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x50(%rax), %rdi
movl -0xc(%rbp), %eax
shll $0x2, %eax
addl $0x24, %eax
cltq
addq %rax, %rdi
callq 0x20a50
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%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: sqlite3PagerUnref
SQLITE_PRIVATE void sqlite3PagerUnref(DbPage *pPg){
  if( pPg ){
    Pager *pPager = pPg->pPager;
    if( pPg->flags & PGHDR_MMAP ){
      pagerReleaseMapPage(pPg);
    }else{
      sqlite3PcacheRelease(pPg);
    }
    pagerUnlockIfUnused(pPager);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xec7c
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x2c(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0xec6a
movq -0x8(%rbp), %rdi
callq 0x2ad20
jmp 0xec73
movq -0x8(%rbp), %rdi
callq 0x28900
movq -0x10(%rbp), %rdi
callq 0x2acc0
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: attachBackupObject
static void attachBackupObject(sqlite3_backup *p){
  sqlite3_backup **pp;
  assert( sqlite3BtreeHoldsMutex(p->pSrc) );
  pp = sqlite3PagerBackupPtr(sqlite3BtreePager(p->pSrc));
  p->pNext = *pp;
  *pp = p;
  p->isAttached = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x98f0
movq %rax, %rdi
callq 0xf7e0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x3c(%rax)
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeNewDb
SQLITE_PRIVATE int sqlite3BtreeNewDb(Btree *p){
  int rc;
  sqlite3BtreeEnter(p);
  p->pBt->nPage = 0;
  rc = newDatabase(p->pBt);
  sqlite3BtreeLeave(p);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0xe0f0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl $0x0, 0x3c(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x297b0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeUpdateMeta
SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree *p, int idx, u32 iMeta){
  BtShared *pBt = p->pBt;
  unsigned char *pP1;
  int rc;
  assert( idx>=1 && idx<=15 );
  sqlite3BtreeEnter(p);
  assert( p->inTrans==TRANS_WRITE );
  assert( pBt->pPage1!=0 );
  pP1 = pBt->pPage1->aData;
  rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
  if( rc==SQLITE_OK ){
    put4byte(&pP1[36 + idx*4], iMeta);
#ifndef SQLITE_OMIT_AUTOVACUUM
    if( idx==BTREE_INCR_VACUUM ){
      assert( pBt->autoVacuum || iMeta==0 );
      assert( iMeta==0 || iMeta==1 );
      pBt->incrVacuum = (u8)iMeta;
    }
#endif
  }
  sqlite3BtreeLeave(p);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xe0f0
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rdi
callq 0xef80
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0xed9f
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %eax
shll $0x2, %eax
addl $0x24, %eax
cltq
addq %rax, %rdi
movl -0x10(%rbp), %esi
callq 0x22060
cmpl $0x7, -0xc(%rbp)
jne 0xed9d
movl -0x10(%rbp), %eax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x22(%rax)
jmp 0xed9f
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ResetAllSchemasOfConnection
SQLITE_PRIVATE void sqlite3ResetAllSchemasOfConnection(sqlite3 *db){
  int i;
  sqlite3BtreeEnterAll(db);
  for(i=0; i<db->nDb; i++){
    Db *pDb = &db->aDb[i];
    if( pDb->pSchema ){
      sqlite3SchemaClear(pDb->pSchema);
    }
  }
  db->flags &= ~SQLITE_InternChanges;
  sqlite3VtabUnlockList(db);
  sqlite3BtreeLeaveAll(db);
  sqlite3CollapseDatabaseArray(db);
}

// 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 0xee14
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0xee07
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x40d30
jmp 0xee09
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xedcc
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
andl $-0x3, %ecx
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rdi
callq 0x4b240
movq -0x8(%rbp), %rdi
callq 0x4b2b0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeSetVersion
SQLITE_PRIVATE int sqlite3BtreeSetVersion(Btree *pBtree, int iVersion){
  BtShared *pBt = pBtree->pBt;
  int rc;                         /* Return code */
 
  assert( iVersion==1 || iVersion==2 );

  /* If setting the version fields to 1, do not automatically open the
  ** WAL connection, even if the version fields are currently set to 2.
  */
  pBt->btsFlags &= ~BTS_NO_WAL;
  if( iVersion==1 ) pBt->btsFlags |= BTS_NO_WAL;

  rc = sqlite3BtreeBeginTrans(pBtree, 0);
  if( rc==SQLITE_OK ){
    u8 *aData = pBt->pPage1->aData;
    if( aData[18]!=(u8)iVersion || aData[19]!=(u8)iVersion ){
      rc = sqlite3BtreeBeginTrans(pBtree, 2);
      if( rc==SQLITE_OK ){
        rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
        if( rc==SQLITE_OK ){
          aData[18] = (u8)iVersion;
          aData[19] = (u8)iVersion;
        }
      }
    }
  }

  pBt->btsFlags &= ~BTS_NO_WAL;
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x26(%rax), %ecx
andl $-0x11, %ecx
movw %cx, 0x26(%rax)
cmpl $0x1, -0xc(%rbp)
jne 0xee7f
movq -0x18(%rbp), %rax
movzwl 0x26(%rax), %ecx
orl $0x10, %ecx
movw %cx, 0x26(%rax)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0xe150
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0xef1a
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x50(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movzbl 0x12(%rax), %eax
movl -0xc(%rbp), %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0xeecb
movq -0x28(%rbp), %rax
movzbl 0x13(%rax), %eax
movl -0xc(%rbp), %ecx
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0xef18
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0xe150
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0xef16
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rdi
callq 0xef80
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0xef14
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, 0x12(%rax)
movl -0xc(%rbp), %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, 0x13(%rax)
jmp 0xef16
jmp 0xef18
jmp 0xef1a
movq -0x18(%rbp), %rax
movzwl 0x26(%rax), %ecx
andl $-0x11, %ecx
movw %cx, 0x26(%rax)
movl -0x1c(%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: backupTruncateFile
static int backupTruncateFile(sqlite3_file *pFile, i64 iSize){
  i64 iCurrent;
  int rc = sqlite3OsFileSize(pFile, &iCurrent);
  if( rc==SQLITE_OK && iCurrent>iSize ){
    rc = sqlite3OsTruncate(pFile, iSize);
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x23e00
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0xf4b0
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jle 0xf4b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x241d0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3PagerSync
SQLITE_PRIVATE int sqlite3PagerSync(Pager *pPager){
  int rc = SQLITE_OK;
  if( !pPager->noSync ){
    assert( !MEMDB );
    rc = sqlite3OsSync(pPager->fd, pPager->syncFlags);
  }else if( isOpen(pPager->fd) ){
    assert( !MEMDB );
    rc = sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_SYNC_OMITTED, 0);
    if( rc==SQLITE_NOTFOUND ){
      rc = SQLITE_OK;
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpb $0x0, 0xb(%rax)
jne 0xf4f7
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x8(%rbp), %rax
movzbl 0xf(%rax), %esi
callq 0x22ce0
movl %eax, -0xc(%rbp)
jmp 0xf52f
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
cmpq $0x0, (%rax)
je 0xf52d
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movl $0x8, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1a4c0
movl %eax, -0xc(%rbp)
cmpl $0xc, -0xc(%rbp)
jne 0xf52b
movl $0x0, -0xc(%rbp)
jmp 0xf52d
jmp 0xf52f
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeCommitPhaseTwo
SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree *p, int bCleanup){

  if( p->inTrans==TRANS_NONE ) return SQLITE_OK;
  sqlite3BtreeEnter(p);
  btreeIntegrity(p);

  /* If the handle has a write-transaction open, commit the shared-btrees 
  ** transaction and set the shared state to TRANS_READ.
  */
  if( p->inTrans==TRANS_WRITE ){
    int rc;
    BtShared *pBt = p->pBt;
    assert( pBt->inTransaction==TRANS_WRITE );
    assert( pBt->nTransaction>0 );
    rc = sqlite3PagerCommitPhaseTwo(pBt->pPager);
    if( rc!=SQLITE_OK && bCleanup==0 ){
      sqlite3BtreeLeave(p);
      return rc;
    }
    pBt->inTransaction = TRANS_READ;
    btreeClearHasContent(pBt);
  }

  btreeEndTransaction(p);
  sqlite3BtreeLeave(p);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x0, %eax
jne 0xf585
movl $0x0, -0x4(%rbp)
jmp 0xf5eb
movq -0x10(%rbp), %rdi
callq 0xe0f0
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x2, %eax
jne 0xf5db
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
callq 0x2b480
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0xf5ca
cmpl $0x0, -0x14(%rbp)
jne 0xf5ca
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf5eb
movq -0x20(%rbp), %rax
movb $0x1, 0x24(%rax)
movq -0x20(%rbp), %rdi
callq 0x2b520
movq -0x10(%rbp), %rdi
callq 0x2b550
movl $0x0, -0x4(%rbp)
movl -0x4(%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: sqlite3BtreeCommitPhaseOne
SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree *p, const char *zMaster){
  int rc = SQLITE_OK;
  if( p->inTrans==TRANS_WRITE ){
    BtShared *pBt = p->pBt;
    sqlite3BtreeEnter(p);
#ifndef SQLITE_OMIT_AUTOVACUUM
    if( pBt->autoVacuum ){
      rc = autoVacuumCommit(pBt);
      if( rc!=SQLITE_OK ){
        sqlite3BtreeLeave(p);
        return rc;
      }
    }
    if( pBt->bDoTruncate ){
      sqlite3PagerTruncateImage(pBt->pPager, pBt->nPage);
    }
#endif
    rc = sqlite3PagerCommitPhaseOne(pBt->pPager, zMaster, 0);
    sqlite3BtreeLeave(p);
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x2, %eax
jne 0xf691
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0xe0f0
movq -0x28(%rbp), %rax
cmpb $0x0, 0x21(%rax)
je 0xf65f
movq -0x28(%rbp), %rdi
callq 0x2b740
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0xf65d
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf697
jmp 0xf65f
movq -0x28(%rbp), %rax
cmpb $0x0, 0x23(%rax)
je 0xf67c
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rax
movl 0x3c(%rax), %esi
callq 0xf540
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
xorl %edx, %edx
callq 0xf1e0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3BtreeRollback
SQLITE_PRIVATE int sqlite3BtreeRollback(Btree *p, int tripCode){
  int rc;
  BtShared *pBt = p->pBt;
  MemPage *pPage1;

  sqlite3BtreeEnter(p);
  if( tripCode==SQLITE_OK ){
    rc = tripCode = saveAllCursors(pBt, 0, 0);
  }else{
    rc = SQLITE_OK;
  }
  if( tripCode ){
    sqlite3BtreeTripAllCursors(p, tripCode);
  }
  btreeIntegrity(p);

  if( p->inTrans==TRANS_WRITE ){
    int rc2;

    assert( TRANS_WRITE==pBt->inTransaction );
    rc2 = sqlite3PagerRollback(pBt->pPager);
    if( rc2!=SQLITE_OK ){
      rc = rc2;
    }

    /* The rollback may have destroyed the pPage1->aData value.  So
    ** call btreeGetPage() on page 1 again to make
    ** sure pPage1->aData is set correctly. */
    if( btreeGetPage(pBt, 1, &pPage1, 0)==SQLITE_OK ){
      int nPage = get4byte(28+(u8*)pPage1->aData);
      testcase( nPage==0 );
      if( nPage==0 ) sqlite3PagerPagecount(pBt->pPager, &nPage);
      testcase( pBt->nPage!=nPage );
      pBt->nPage = nPage;
      releasePage(pPage1);
    }
    assert( countValidCursors(pBt, 1)==0 );
    pBt->inTransaction = TRANS_READ;
    btreeClearHasContent(pBt);
  }

  btreeEndTransaction(p);
  sqlite3BtreeLeave(p);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xe0f0
cmpl $0x0, -0xc(%rbp)
jne 0xf841
movq -0x18(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x2bad0
movl %eax, -0xc(%rbp)
movl %eax, -0x10(%rbp)
jmp 0xf848
movl $0x0, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0xf85a
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x2e330
movq -0x8(%rbp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x2, %eax
jne 0xf8ed
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x26840
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xf886
movl -0x24(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
movl $0x1, %esi
leaq -0x20(%rbp), %rdx
xorl %ecx, %ecx
callq 0x29ed0
cmpl $0x0, %eax
jne 0xf8dc
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rdi
addq $0x1c, %rdi
callq 0x20a50
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0xf8c9
movq -0x18(%rbp), %rax
movq (%rax), %rdi
leaq -0x28(%rbp), %rsi
callq 0xef60
movl -0x28(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x3c(%rax)
movq -0x20(%rbp), %rdi
callq 0x29fd0
movq -0x18(%rbp), %rax
movb $0x1, 0x24(%rax)
movq -0x18(%rbp), %rdi
callq 0x2b520
movq -0x8(%rbp), %rdi
callq 0x2b550
movl -0x10(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_finalize
SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt){
  int rc;
  if( pStmt==0 ){
    /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL
    ** pointer is a harmless no-op. */
    rc = SQLITE_OK;
  }else{
    Vdbe *v = (Vdbe*)pStmt;
    sqlite3 *db = v->db;
    if( vdbeSafety(v) ) return SQLITE_MISUSE_BKPT;
    sqlite3_mutex_enter(db->mutex);
    rc = sqlite3VdbeFinalize(v);
    rc = sqlite3ApiExit(db, rc);
    sqlite3LeaveMutexAndCloseZombie(db);
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xfd0c
movl $0x0, -0x14(%rbp)
jmp 0xfd60
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0xfd70
cmpl $0x0, %eax
je 0xfd3c
movl $0xf7a0, %edi           # imm = 0xF7A0
callq 0x9420
movl %eax, -0x4(%rbp)
jmp 0xfd66
movq -0x20(%rbp), %rdi
callq 0xfdc0
movl %eax, -0x14(%rbp)
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xfe10
movl %eax, -0x14(%rbp)
movq -0x28(%rbp), %rdi
callq 0xf900
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: vdbeSafety
static int vdbeSafety(Vdbe *p){
  if( p->db==0 ){
    sqlite3_log(SQLITE_MISUSE, "API called with finalized prepared statement");
    return 1;
  }else{
    return 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0xfda2
movl $0x15, %edi
leaq 0x9e5c2(%rip), %rsi     # 0xae354
movb $0x0, %al
callq 0xc5f0
movl $0x1, -0x4(%rbp)
jmp 0xfda9
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
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: sqlite3VdbeFinalize
SQLITE_PRIVATE int sqlite3VdbeFinalize(Vdbe *p){
  int rc = SQLITE_OK;
  if( p->magic==VDBE_MAGIC_RUN || p->magic==VDBE_MAGIC_HALT ){
    rc = sqlite3VdbeReset(p);
    assert( (rc & p->db->errMask)==rc );
  }
  sqlite3VdbeDelete(p);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0xbdf20da3, 0x50(%rax) # imm = 0xBDF20DA3
je 0xfded
movq -0x8(%rbp), %rax
cmpl $0x519c2973, 0x50(%rax) # imm = 0x519C2973
jne 0xfdf9
movq -0x8(%rbp), %rdi
callq 0xfef0
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2e770
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3ApiExit
SQLITE_PRIVATE int sqlite3ApiExit(sqlite3* db, int rc){
  /* If the db handle is not NULL, then we must hold the connection handle
  ** mutex here. Otherwise the read (and possible write) of db->mallocFailed 
  ** is unsafe, as is the call to sqlite3Error().
  */
  assert( !db || sqlite3_mutex_held(db->mutex) );
  if( db && (db->mallocFailed || rc==SQLITE_IOERR_NOMEM) ){
    sqlite3Error(db, SQLITE_NOMEM, 0);
    db->mallocFailed = 0;
    rc = SQLITE_NOMEM;
  }
  return rc & (db ? db->errMask : 0xff);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xfe5f
movq -0x8(%rbp), %rax
movzbl 0x50(%rax), %eax
cmpl $0x0, %eax
jne 0xfe3c
cmpl $0xc0a, -0xc(%rbp)      # imm = 0xC0A
jne 0xfe5f
movq -0x8(%rbp), %rdi
movl $0x7, %esi
xorl %eax, %eax
movl %eax, %edx
movb $0x0, %al
callq 0xd720
movq -0x8(%rbp), %rax
movb $0x0, 0x50(%rax)
movl $0x7, -0xc(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xfe78
movq -0x8(%rbp), %rax
movl 0x48(%rax), %eax
movl %eax, -0x14(%rbp)
jmp 0xfe82
movl $0xff, %eax
movl %eax, -0x14(%rbp)
jmp 0xfe82
movl -0x10(%rbp), %eax
movl -0x14(%rbp), %ecx
andl %ecx, %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_reset
SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt){
  int rc;
  if( pStmt==0 ){
    rc = SQLITE_OK;
  }else{
    Vdbe *v = (Vdbe*)pStmt;
    sqlite3_mutex_enter(v->db->mutex);
    rc = sqlite3VdbeReset(v);
    sqlite3VdbeRewind(v);
    assert( (rc & (v->db->errMask))==rc );
    rc = sqlite3ApiExit(v->db, rc);
    sqlite3_mutex_leave(v->db->mutex);
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0xfeac
movl $0x0, -0xc(%rbp)
jmp 0xfedb
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xfef0
movl %eax, -0xc(%rbp)
movq -0x18(%rbp), %rdi
callq 0x10040
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xfe10
movl %eax, -0xc(%rbp)
movl -0xc(%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: sqlite3_clear_bindings
SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *pStmt){
  int i;
  int rc = SQLITE_OK;
  Vdbe *p = (Vdbe*)pStmt;
#if SQLITE_THREADSAFE
  sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
#endif
  sqlite3_mutex_enter(mutex);
  for(i=0; i<p->nVar; i++){
    sqlite3VdbeMemRelease(&p->aVar[i]);
    p->aVar[i].flags = MEM_Null;
  }
  if( p->isPrepareV2 && p->expmask ){
    p->expired = 1;
  }
  sqlite3_mutex_leave(mutex);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x18(%rbp), %rcx
movswl 0x88(%rcx), %ecx
cmpl %ecx, %eax
jge 0x10140
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rdi
movslq -0xc(%rbp), %rax
imulq $0x38, %rax, %rax
addq %rax, %rdi
callq 0x10190
movq -0x18(%rbp), %rax
movq 0x78(%rax), %rax
movslq -0xc(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movw $0x1, 0x24(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x100f2
movq -0x18(%rbp), %rax
movw 0x9a(%rax), %ax
shrw $0xa, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x10182
movq -0x18(%rbp), %rax
cmpl $0x0, 0x104(%rax)
je 0x10182
movq -0x18(%rbp), %rax
movw 0x9a(%rax), %cx
andw $-0x21, %cx
orw $0x20, %cx
movw %cx, 0x9a(%rax)
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VdbeMemRelease
SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p){
  VdbeMemRelease(p);
  sqlite3DbFree(p->db, p->zMalloc);
  p->z = 0;
  p->zMalloc = 0;
  p->xDel = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x24(%rax), %eax
andl $0x2460, %eax           # imm = 0x2460
cmpl $0x0, %eax
je 0x101b7
movq -0x8(%rbp), %rdi
callq 0x11880
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x9cd0
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
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: sqlite3_value_blob
SQLITE_API const void *sqlite3_value_blob(sqlite3_value *pVal){
  Mem *p = (Mem*)pVal;
  if( p->flags & (MEM_Blob|MEM_Str) ){
    sqlite3VdbeMemExpandBlob(p);
    p->flags &= ~MEM_Str;
    p->flags |= MEM_Blob;
    return p->n ? p->z : 0;
  }else{
    return sqlite3_value_text(pVal);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x24(%rax), %eax
andl $0x12, %eax
cmpl $0x0, %eax
je 0x10275
movq -0x18(%rbp), %rdi
callq 0x10290
movq -0x18(%rbp), %rax
movzwl 0x24(%rax), %ecx
andl $-0x3, %ecx
movw %cx, 0x24(%rax)
movq -0x18(%rbp), %rax
movzwl 0x24(%rax), %ecx
orl $0x10, %ecx
movw %cx, 0x24(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x10263
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x1026b
xorl %eax, %eax
movq %rax, -0x20(%rbp)
jmp 0x1026b
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x10282
movq -0x10(%rbp), %rdi
callq 0x10350
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VdbeMemExpandBlob
SQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *pMem){
  if( pMem->flags & MEM_Zero ){
    int nByte;
    assert( pMem->flags&MEM_Blob );
    assert( (pMem->flags&MEM_RowSet)==0 );
    assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );

    /* Set nByte to the number of bytes required to store the expanded blob. */
    nByte = pMem->n + pMem->u.nZero;
    if( nByte<=0 ){
      nByte = 1;
    }
    if( sqlite3VdbeMemGrow(pMem, nByte, 1) ){
      return SQLITE_NOMEM;
    }

    memset(&pMem->z[pMem->n], 0, pMem->u.nZero);
    pMem->n += pMem->u.nZero;
    pMem->flags &= ~(MEM_Zero|MEM_Term);
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x24(%rax), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0x10334
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x18(%rcx), %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jg 0x102d0
movl $0x1, -0x14(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl $0x1, %edx
callq 0x11940
cmpl $0x0, %eax
je 0x102ef
movl $0x7, -0x4(%rbp)
jmp 0x1033b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rax
movslq 0x20(%rax), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
movslq 0x18(%rax), %rdx
xorl %esi, %esi
callq 0x8200
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x10(%rbp), %rax
addl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movzwl 0x24(%rax), %ecx
andl $0xffffbdff, %ecx       # imm = 0xFFFFBDFF
movw %cx, 0x24(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)