LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeRecordUnpack
SQLITE_PRIVATE void sqlite3VdbeRecordUnpack(
  KeyInfo *pKeyInfo,     /* Information about the record format */
  int nKey,              /* Size of the binary record */
  const void *pKey,      /* The binary record */
  UnpackedRecord *p      /* Populate this structure before returning. */
){
  const unsigned char *aKey = (const unsigned char *)pKey;
  u32 d;
  u32 idx;                        /* Offset in aKey[] to read from */
  u16 u;                          /* Unsigned loop counter */
  u32 szHdr;
  Mem *pMem = p->aMem;

  p->default_rc = 0;
  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
  idx = getVarint32(aKey, szHdr);
  d = szHdr;
  u = 0;
  while( idx<szHdr && d<=(u32)nKey ){
    u32 serial_type;

    idx += getVarint32(&aKey[idx], serial_type);
    pMem->enc = pKeyInfo->enc;
    pMem->db = pKeyInfo->db;
    /* pMem->flags = 0; // sqlite3VdbeSerialGet() will set this for us */
    pMem->szMalloc = 0;
    pMem->z = 0;
    d += sqlite3VdbeSerialGet(&aKey[d], serial_type, pMem);
    pMem++;
    if( (++u)>=p->nField ) break;
  }
  if( d>(u32)nKey && u ){
    assert( CORRUPT_DB );
    /* In a corrupt record entry, the last pMem might have been set up using
    ** uninitialized memory. Overwrite its value with NULL, to prevent
    ** warnings from MSAN. */
    sqlite3VdbeMemSetNull(pMem-1);
  }
  assert( u<=pKeyInfo->nKeyField + 1 );
  p->nField = u;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movl %esi, 0x8(%rsp)
movq %rdi, 0x18(%rsp)
movq 0x8(%rcx), %r14
movq %rcx, 0x10(%rsp)
movb $0x0, 0x12(%rcx)
movsbl (%rdx), %r12d
testl %r12d, %r12d
js 0x24339a
pushq $0x1
popq %rbp
jmp 0x2433b1
leaq 0x24(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x2425d2
movzbl %al, %ebp
movl (%r13), %r12d
xorl %r13d, %r13d
movl %r12d, %ebx
cmpl %r12d, %ebp
jae 0x243428
cmpl 0x8(%rsp), %ebx
ja 0x243428
movl %ebp, %edi
movsbl (%r15,%rdi), %esi
testl %esi, %esi
js 0x2433d2
pushq $0x1
popq %rax
jmp 0x2433e6
addq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x2425d2
movzbl %al, %eax
movl 0xc(%rsp), %esi
movq 0x18(%rsp), %rdx
movb 0x4(%rdx), %cl
movb %cl, 0xa(%r14)
movq 0x10(%rdx), %rcx
movq %rcx, 0x28(%r14)
andl $0x0, 0x20(%r14)
andq $0x0, 0x10(%r14)
addl %eax, %ebp
movl %ebx, %edi
addq %r15, %rdi
movq %r14, %rdx
callq 0x242680
addl %eax, %ebx
addq $0x38, %r14
incl %r13d
movq 0x10(%rsp), %rax
cmpw 0x10(%rax), %r13w
jb 0x2433b7
cmpl 0x8(%rsp), %ebx
setbe %al
testw %r13w, %r13w
sete %cl
orb %al, %cl
jne 0x243446
addq $-0x38, %r14
movq %r14, %rdi
callq 0x224946
movq 0x10(%rsp), %rax
movw %r13w, 0x10(%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3BtreeFirst
SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor *pCur, int *pRes){
  int rc;

  assert( cursorOwnsBtShared(pCur) );
  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
  rc = moveToRoot(pCur);
  if( rc==SQLITE_OK ){
    assert( pCur->pPage->nCell>0 );
    *pRes = 0;
    rc = moveToLeftmost(pCur);
  }else if( rc==SQLITE_EMPTY ){
    assert( pCur->pgnoRoot==0 || pCur->pPage->nCell==0 );
    *pRes = 1;
    rc = SQLITE_OK;
  }
  return rc;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x245470
cmpl $0x10, %eax
je 0x243f6b
testl %eax, %eax
jne 0x243f73
andl $0x0, (%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x246661
movl $0x1, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3LogEst
SQLITE_PRIVATE LogEst sqlite3LogEst(u64 x){
  static LogEst a[] = { 0, 2, 3, 5, 6, 7, 8, 9 };
  LogEst y = 40;
  if( x<8 ){
    if( x<2 ) return 0;
    while( x<8 ){  y -= 10; x <<= 1; }
  }else{
#if GCC_VERSION>=5004000
    int i = 60 - __builtin_clzll(x);
    y += i*10;
    x >>= i;
#else
    while( x>255 ){ y += 40; x >>= 4; }  /*OPTIMIZATION-IF-TRUE*/
    while( x>15 ){  y += 10; x >>= 1; }
#endif
  }
  return a[x&7] + y - 10;
}

// Assembly:
cmpq $0x8, %rdi
jae 0x243f8a
cmpq $0x2, %rdi
jae 0x243fbe
xorl %eax, %eax
retq
movw $0x28, %ax
cmpq $0xff, %rdi
jbe 0x243fa6
addl $0x28, %eax
shrq $0x4, %rdi
jmp 0x243f8e
addl $0xa, %eax
shrq %rdi
cmpq $0x10, %rdi
jae 0x243fa0
andl $0x7, %edi
leaq 0x131bfa(%rip), %rcx    # 0x375bb0
addw (%rcx,%rdi,2), %ax
addl $-0xa, %eax
retq
movw $0x28, %ax
cmpq $0x7, %rdi
ja 0x243fac
addl $-0xa, %eax
addq %rdi, %rdi
jmp 0x243fc2
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeFinishMoveto
SQLITE_NOINLINE sqlite3VdbeFinishMoveto(VdbeCursor *p){
  int res, rc;
#ifdef SQLITE_TEST
  extern int sqlite3_search_count;
#endif
  assert( p->deferredMoveto );
  assert( p->isTable );
  assert( p->eCurType==CURTYPE_BTREE );
  rc = sqlite3BtreeMovetoUnpacked(p->uc.pCursor, 0, p->movetoTarget, 0, &res);
  if( rc ) return rc;
  if( res!=0 ) return SQLITE_CORRUPT_BKPT;
#ifdef SQLITE_TEST
  sqlite3_search_count++;
#endif
  p->deferredMoveto = 0;
  p->cacheStatus = CACHE_STALE;
  return SQLITE_OK;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
movq 0x50(%rbx), %rdx
leaq 0xc(%rsp), %r8
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x242e02
testl %eax, %eax
je 0x243ff8
addq $0x10, %rsp
popq %rbx
retq
cmpl $0x0, 0xc(%rsp)
je 0x24400e
movl $0x13d63, %edi          # imm = 0x13D63
addq $0x10, %rsp
popq %rbx
jmp 0x232547
movb $0x0, 0x3(%rbx)
andl $0x0, 0x20(%rbx)
xorl %eax, %eax
jmp 0x243ff2
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemSetRowSet
SQLITE_PRIVATE int sqlite3VdbeMemSetRowSet(Mem *pMem){
  sqlite3 *db = pMem->db;
  RowSet *p;
  assert( db!=0 );
  assert( !sqlite3VdbeMemIsRowSet(pMem) );
  sqlite3VdbeMemRelease(pMem);
  p = sqlite3RowSetInit(db);
  if( p==0 ) return SQLITE_NOMEM;
  pMem->z = (char*)p;
  pMem->flags = MEM_Blob|MEM_Dyn;
  pMem->xDel = sqlite3RowSetDelete;
  return SQLITE_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %r15
callq 0x224336
pushq $0x38
popq %rsi
movq %r15, %rdi
callq 0x22d205
testq %rax, %rax
je 0x2447f5
movq %rax, %r14
movq %r15, %rdi
movq %rax, %rsi
callq 0x22103d
andq $0x0, (%r14)
movq %r15, 0x8(%r14)
andq $0x0, 0x28(%r14)
movq %r14, %rcx
addq $0x38, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %rcx, 0x20(%r14)
cltq
addq $-0x38, %rax
xorl %ecx, %ecx
pushq $0x18
popq %rsi
xorl %edx, %edx
divq %rsi
movw %ax, 0x30(%r14)
movw $0x1, 0x32(%r14)
andl $0x0, 0x34(%r14)
movq %r14, 0x10(%rbx)
movw $0x410, 0x8(%rbx)       # imm = 0x410
leaq 0x7d21(%rip), %rax      # 0x24c510
movq %rax, 0x30(%rbx)
jmp 0x2447f8
pushq $0x7
popq %rcx
movl %ecx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3RowSetInsert
SQLITE_PRIVATE void sqlite3RowSetInsert(RowSet *p, i64 rowid){
  struct RowSetEntry *pEntry;  /* The new entry */
  struct RowSetEntry *pLast;   /* The last prior entry */

  /* This routine is never called after sqlite3RowSetNext() */
  assert( p!=0 && (p->rsFlags & ROWSET_NEXT)==0 );

  pEntry = rowSetEntryAlloc(p);
  if( pEntry==0 ) return;
  pEntry->v = rowid;
  pEntry->pRight = 0;
  pLast = p->pLast;
  if( pLast ){
    if( rowid<=pLast->v ){  /*OPTIMIZATION-IF-FALSE*/
      /* Avoid unnecessary sorts by preserving the ROWSET_SORTED flags
      ** where possible */
      p->rsFlags &= ~ROWSET_SORTED;
    }
    pLast->pRight = pEntry;
  }else{
    p->pEntry = pEntry;
  }
  p->pLast = pEntry;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x24c565
testq %rax, %rax
je 0x24483f
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x244834
cmpq %r14, (%rcx)
jl 0x24482e
andb $-0x2, 0x32(%rbx)
addq $0x8, %rcx
jmp 0x244838
leaq 0x10(%rbx), %rcx
movq %rax, (%rcx)
movq %rax, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: computeNumericType
static u16 SQLITE_NOINLINE computeNumericType(Mem *pMem){
  int rc;
  sqlite3_int64 ix;
  assert( (pMem->flags & (MEM_Int|MEM_Real|MEM_IntReal))==0 );
  assert( (pMem->flags & (MEM_Str|MEM_Blob))!=0 );
  ExpandBlob(pMem);
  rc = sqlite3AtoF(pMem->z, &pMem->u.r, pMem->n, pMem->enc);
  if( rc<=0 ){
    if( rc==0 && sqlite3Atoi64(pMem->z, &ix, pMem->n, pMem->enc)<=1 ){
      pMem->u.i = ix;
      return MEM_Int;
    }else{
      return MEM_Real;
    }
  }else if( rc==1 && sqlite3Atoi64(pMem->z, &ix, pMem->n, pMem->enc)==0 ){
    pMem->u.i = ix;
    return MEM_Int;
  }
  return MEM_Real;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testb $0x40, 0x9(%rdi)
je 0x244f35
movq %rbx, %rdi
callq 0x224391
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
movq %rbx, %rsi
callq 0x23a955
movw $0x8, %bp
testl %eax, %eax
jle 0x244f6e
cmpl $0x1, %eax
jne 0x244f93
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
movq %rsp, %rsi
callq 0x23ad9d
testl %eax, %eax
jne 0x244f93
jmp 0x244f88
jne 0x244f93
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
movq %rsp, %rsi
callq 0x23ad9d
cmpl $0x2, %eax
jge 0x244f93
movq (%rsp), %rax
movq %rax, (%rbx)
movw $0x4, %bp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeIntegerAffinity
SQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem *pMem){
  i64 ix;
  assert( pMem->flags & MEM_Real );
  assert( !sqlite3VdbeMemIsRowSet(pMem) );
  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
  assert( EIGHT_BYTE_ALIGNMENT(pMem) );

  ix = doubleToInt64(pMem->u.r);

  /* Only mark the value as an integer if
  **
  **    (1) the round-trip conversion real->int->real is a no-op, and
  **    (2) The integer is neither the largest nor the smallest
  **        possible integer (ticket #3922)
  **
  ** The second and third terms in the following conditional enforces
  ** the second condition under the assumption that addition overflow causes
  ** values to wrap around.
  */
  if( pMem->u.r==ix && ix>SMALLEST_INT64 && ix<LARGEST_INT64 ){
    pMem->u.i = ix;
    MemSetTypeFlag(pMem, MEM_Int);
  }
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movsd (%rdi), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x23ad44
cvtsi2sd %rax, %xmm0
ucomisd 0x8(%rsp), %xmm0
setp %cl
setne %dl
orb %cl, %dl
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
addq %rax, %rcx
cmpq $-0x2, %rcx
setae %cl
orb %dl, %cl
jne 0x244ff1
movq %rax, (%rbx)
movzwl 0x8(%rbx), %eax
andl $0x3e40, %eax           # imm = 0x3E40
orl $0x4, %eax
movw %ax, 0x8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemNumerify
SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem *pMem){
  testcase( pMem->flags & MEM_Int );
  testcase( pMem->flags & MEM_Real );
  testcase( pMem->flags & MEM_IntReal );
  testcase( pMem->flags & MEM_Null );
  if( (pMem->flags & (MEM_Int|MEM_Real|MEM_IntReal|MEM_Null))==0 ){
    int rc;
    sqlite3_int64 ix;
    assert( (pMem->flags & (MEM_Blob|MEM_Str))!=0 );
    assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
    rc = sqlite3AtoF(pMem->z, &pMem->u.r, pMem->n, pMem->enc);
    if( ((rc==0 || rc==1) && sqlite3Atoi64(pMem->z, &ix, pMem->n, pMem->enc)<=1)
     || sqlite3RealSameAsInt(pMem->u.r, (ix = (i64)pMem->u.r))
    ){
      pMem->u.i = ix;
      MemSetTypeFlag(pMem, MEM_Int);
    }else{
      MemSetTypeFlag(pMem, MEM_Real);
    }
  }
  assert( (pMem->flags & (MEM_Int|MEM_Real|MEM_IntReal|MEM_Null))!=0 );
  pMem->flags &= ~(MEM_Str|MEM_Blob|MEM_Zero);
  return SQLITE_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl 0x8(%rdi), %eax
testb $0x2d, %al
jne 0x24506d
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
movq %rbx, %rsi
callq 0x23a955
cmpl $0x1, %eax
ja 0x24503c
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
movq %rsp, %rsi
callq 0x23ad9d
cmpl $0x1, %eax
jg 0x24503c
movq (%rsp), %r14
jmp 0x245051
movsd (%rbx), %xmm0
cvttsd2si %xmm0, %r14
movq %r14, %rdi
callq 0x24507e
testl %eax, %eax
je 0x24505a
movq %r14, (%rbx)
movw $0x4, %ax
jmp 0x24505e
movw $0x8, %ax
movzwl 0x8(%rbx), %ecx
andl $0x3e40, %ecx           # imm = 0x3E40
movzwl %ax, %eax
orl %ecx, %eax
andl $0xbfed, %eax           # imm = 0xBFED
movw %ax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3RealSameAsInt
SQLITE_PRIVATE int sqlite3RealSameAsInt(double r1, sqlite3_int64 i){
  double r2 = (double)i;
  return r1==0.0
      || (memcmp(&r1, &r2, sizeof(r1))==0
          && i >= -2251799813685248LL && i < 2251799813685248LL);
}

// Assembly:
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x24508e
jp 0x24508e
pushq $0x1
popq %rax
retq
xorl %eax, %eax
movabsq $-0x8000000000000, %rcx # imm = 0xFFF8000000000000
cmpq %rcx, %rdi
jl 0x2450c5
cvtsi2sd %rdi, %xmm1
movq %xmm0, %rcx
movq %xmm1, %rdx
cmpq %rdx, %rcx
jne 0x2450c5
movabsq $0x8000000000000, %rcx  # imm = 0x8000000000000
xorl %eax, %eax
cmpq %rcx, %rdi
setl %al
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeCompareMemString
static int vdbeCompareMemString(
  const Mem *pMem1,
  const Mem *pMem2,
  const CollSeq *pColl,
  u8 *prcErr                      /* If an OOM occurs, set to SQLITE_NOMEM */
){
  if( pMem1->enc==pColl->enc ){
    /* The strings are already in the correct encoding.  Call the
     ** comparison function directly */
    return pColl->xCmp(pColl->pUser,pMem1->n,pMem1->z,pMem2->n,pMem2->z);
  }else{
    int rc;
    const void *v1, *v2;
    Mem c1;
    Mem c2;
    sqlite3VdbeMemInit(&c1, pMem1->db, MEM_Null);
    sqlite3VdbeMemInit(&c2, pMem1->db, MEM_Null);
    sqlite3VdbeMemShallowCopy(&c1, pMem1, MEM_Ephem);
    sqlite3VdbeMemShallowCopy(&c2, pMem2, MEM_Ephem);
    v1 = sqlite3ValueText((sqlite3_value*)&c1, pColl->enc);
    v2 = sqlite3ValueText((sqlite3_value*)&c2, pColl->enc);
    if( (v1==0 || v2==0) ){
      if( prcErr ) *prcErr = SQLITE_NOMEM_BKPT;
      rc = 0;
    }else{
      rc = pColl->xCmp(pColl->pUser, c1.n, v1, c2.n, v2);
    }
    sqlite3VdbeMemRelease(&c1);
    sqlite3VdbeMemRelease(&c2);
    return rc;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %rax
movb 0xa(%rdi), %cl
cmpb 0x8(%rdx), %cl
jne 0x24510e
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %r9
movl 0xc(%rax), %esi
movq 0x10(%rax), %rdx
movl 0xc(%r15), %ecx
movq 0x10(%r15), %r8
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmpq *%r9
movq 0x28(%rax), %rcx
movw $0x1, %dx
leaq 0x38(%rsp), %r12
movw %dx, 0x8(%r12)
movq %rcx, 0x28(%r12)
andl $0x0, 0x20(%r12)
movq %rsp, %r13
movw %dx, 0x8(%r13)
movq %rcx, 0x28(%r13)
andl $0x0, 0x20(%r13)
movq %r12, %rdi
movq %rax, %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2422af
movq %r13, %rdi
movq %r15, %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2422af
movzbl 0x8(%rbx), %esi
movq %r12, %rdi
callq 0x2244c6
movq %rax, %r15
movzbl 0x8(%rbx), %esi
movq %r13, %rdi
callq 0x2244c6
testq %r15, %r15
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x245198
xorl %ebx, %ebx
testq %r14, %r14
je 0x2451af
movb $0x7, (%r14)
jmp 0x2451af
movq 0x10(%rbx), %rdi
movl 0x44(%rsp), %esi
movl 0xc(%rsp), %ecx
movq %r15, %rdx
movq %rax, %r8
callq *0x18(%rbx)
movl %eax, %ebx
leaq 0x38(%rsp), %rdi
callq 0x224336
movq %rsp, %rdi
callq 0x224336
movl %ebx, %eax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3BlobCompare
int sqlite3BlobCompare(const Mem *pB1, const Mem *pB2){
  int c;
  int n1 = pB1->n;
  int n2 = pB2->n;

  /* It is possible to have a Blob value that has some non-zero content
  ** followed by zero content.  But that only comes up for Blobs formed
  ** by the OP_MakeRecord opcode, and such Blobs never get passed into
  ** sqlite3MemCompare(). */
  assert( (pB1->flags & MEM_Zero)==0 || n1==0 );
  assert( (pB2->flags & MEM_Zero)==0 || n2==0 );

  if( (pB1->flags|pB2->flags) & MEM_Zero ){
    if( pB1->flags & pB2->flags & MEM_Zero ){
      return pB1->u.nZero - pB2->u.nZero;
    }else if( pB1->flags & MEM_Zero ){
      if( !isAllZero(pB2->z, pB2->n) ) return -1;
      return pB1->u.nZero - n2;
    }else{
      if( !isAllZero(pB1->z, pB1->n) ) return +1;
      return n1 - pB2->u.nZero;
    }
  }
  c = memcmp(pB1->z, pB2->z, n1>n2 ? n2 : n1);
  if( c ) return c;
  return n1 - n2;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl 0xc(%rdi), %ebx
movl 0xc(%rsi), %ebp
movzwl 0x8(%rdi), %eax
movzwl 0x8(%rsi), %ecx
movl %ecx, %edx
orl %eax, %edx
btl $0xe, %edx
jb 0x24521a
movq 0x10(%r15), %rdi
movq 0x10(%r14), %rsi
movl %ebx, %r14d
subl %ebp, %r14d
cmovll %ebx, %ebp
movslq %ebp, %rdx
callq 0x172e0
testl %eax, %eax
cmovnel %eax, %r14d
movl %r14d, %ebx
jmp 0x245229
andl $0x4000, %eax           # imm = 0x4000
testl %ecx, %eax
je 0x245236
movl (%r15), %ebx
subl (%r14), %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testl %eax, %eax
jne 0x24524d
movq 0x10(%r15), %rdi
movl %ebx, %esi
callq 0x245268
testl %eax, %eax
jne 0x245226
pushq $0x1
jmp 0x245265
movq 0x10(%r14), %rdi
movl %ebp, %esi
callq 0x245268
testl %eax, %eax
je 0x245263
movl (%r15), %ebx
subl %ebp, %ebx
jmp 0x245229
pushq $-0x1
popq %rbx
jmp 0x245229
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: isAllZero
static int isAllZero(const char *z, int n){
  int i;
  for(i=0; i<n; i++){
    if( z[i] ) return 0;
  }
  return 1;
}

// Assembly:
xorl %ecx, %ecx
testl %esi, %esi
cmovlel %ecx, %esi
pushq $0x1
popq %rax
cmpq %rcx, %rsi
je 0x245283
cmpb $0x0, (%rdi,%rcx)
leaq 0x1(%rcx), %rcx
je 0x245272
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: handleMovedCursor
static int SQLITE_NOINLINE handleMovedCursor(VdbeCursor *p){
  int isDifferentRow, rc;
  assert( p->eCurType==CURTYPE_BTREE );
  assert( p->uc.pCursor!=0 );
  assert( sqlite3BtreeCursorHasMoved(p->uc.pCursor) );
  rc = sqlite3BtreeCursorRestore(p->uc.pCursor, &isDifferentRow);
  p->cacheStatus = CACHE_STALE;
  if( isDifferentRow ) p->nullRow = 1;
  return rc;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %r14
movb (%r14), %cl
cmpb $0x3, %cl
jb 0x2452ac
movq %r14, %rdi
callq 0x2452c2
testl %eax, %eax
je 0x2452a9
andl $0x0, 0x20(%rbx)
jmp 0x2452b6
movb (%r14), %cl
andl $0x0, 0x20(%rbx)
xorl %eax, %eax
testb %cl, %cl
je 0x2452ba
movb $0x1, 0x2(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: btreeRestoreCursorPosition
static int btreeRestoreCursorPosition(BtCursor *pCur){
  int rc;
  int skipNext = 0;
  assert( cursorOwnsBtShared(pCur) );
  assert( pCur->eState>=CURSOR_REQUIRESEEK );
  if( pCur->eState==CURSOR_FAULT ){
    return pCur->skipNext;
  }
  pCur->eState = CURSOR_INVALID;
  if( sqlite3FaultSim(410) ){
    rc = SQLITE_IOERR;
  }else{
    rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &skipNext);
  }
  if( rc==SQLITE_OK ){
    sqlite3_free(pCur->pKey);
    pCur->pKey = 0;
    assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_INVALID );
    if( skipNext ) pCur->skipNext = skipNext;
    if( pCur->skipNext && pCur->eState==CURSOR_VALID ){
      pCur->eState = CURSOR_SKIPNEXT;
    }
  }
  return rc;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
andl $0x0, 0xc(%rsp)
movq %rdi, %rbx
cmpb $0x4, (%rdi)
jne 0x2452d9
movl 0x4(%rbx), %eax
jmp 0x245342
movb $0x1, (%rbx)
movq 0x1f54b5(%rip), %rax    # 0x43a798
testq %rax, %rax
je 0x2452f8
movl $0x19a, %edi            # imm = 0x19A
callq *%rax
testl %eax, %eax
je 0x2452f8
pushq $0xa
popq %rax
jmp 0x245342
movq 0x18(%rbx), %rsi
movq 0x48(%rbx), %rdx
leaq 0xc(%rsp), %r8
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x245348
testl %eax, %eax
jne 0x245342
movq 0x18(%rbx), %rdi
callq 0x21f7f9
andq $0x0, 0x18(%rbx)
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x24532e
movl %eax, 0x4(%rbx)
jmp 0x245334
cmpl $0x0, 0x4(%rbx)
je 0x245340
xorl %eax, %eax
cmpb $0x0, (%rbx)
jne 0x245342
movb $0x2, (%rbx)
jmp 0x245342
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: btreeMoveto
static int btreeMoveto(
  BtCursor *pCur,     /* Cursor open on the btree to be searched */
  const void *pKey,   /* Packed key if the btree is an index */
  i64 nKey,           /* Integer key for tables.  Size of pKey for indices */
  int bias,           /* Bias search to the high end */
  int *pRes           /* Write search results here */
){
  int rc;                    /* Status code */
  UnpackedRecord *pIdxKey;   /* Unpacked index key */

  if( pKey ){
    KeyInfo *pKeyInfo = pCur->pKeyInfo;
    assert( nKey==(i64)(int)nKey );
    pIdxKey = sqlite3VdbeAllocUnpackedRecord(pKeyInfo);
    if( pIdxKey==0 ) return SQLITE_NOMEM_BKPT;
    sqlite3VdbeRecordUnpack(pKeyInfo, (int)nKey, pKey, pIdxKey);
    if( pIdxKey->nField==0 || pIdxKey->nField>pKeyInfo->nAllField ){
      rc = SQLITE_CORRUPT_BKPT;
      goto moveto_done;
    }
  }else{
    pIdxKey = 0;
  }
  rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias, pRes);
moveto_done:
  if( pIdxKey ){
    sqlite3DbFree(pCur->pKeyInfo->db, pIdxKey);
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r12
movq %rdi, %rbx
testq %rsi, %rsi
je 0x2453ae
movq %rsi, %r15
movq %r8, (%rsp)
movq 0x80(%rbx), %r13
movq %r13, %rdi
callq 0x24332d
testq %rax, %rax
je 0x2453b3
movq %rax, %r14
movq %r13, %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %rax, %rcx
callq 0x243365
movzwl 0x10(%r14), %eax
testw %ax, %ax
je 0x2453a0
cmpw 0x8(%r13), %ax
jbe 0x2453b8
movl $0xff15, %edi           # imm = 0xFF15
callq 0x232547
movl %eax, %ebp
jmp 0x2453d3
xorl %r14d, %r14d
jmp 0x2453bc
pushq $0x7
popq %rbp
jmp 0x2453e6
movq (%rsp), %r8
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x242e02
movl %eax, %ebp
testq %r14, %r14
je 0x2453e6
movq 0x80(%rbx), %rax
movq 0x10(%rax), %rdi
movq %r14, %rsi
callq 0x22d0fc
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: moveToChild
static int moveToChild(BtCursor *pCur, u32 newPgno){
  BtShared *pBt = pCur->pBt;

  assert( cursorOwnsBtShared(pCur) );
  assert( pCur->eState==CURSOR_VALID );
  assert( pCur->iPage<BTCURSOR_MAX_DEPTH );
  assert( pCur->iPage>=0 );
  if( pCur->iPage>=(BTCURSOR_MAX_DEPTH-1) ){
    return SQLITE_CORRUPT_BKPT;
  }
  pCur->info.nSize = 0;
  pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);
  pCur->aiIdx[pCur->iPage] = pCur->ix;
  pCur->apPage[pCur->iPage] = pCur->pPage;
  pCur->ix = 0;
  pCur->iPage++;
  return getAndInitPage(pBt, newPgno, &pCur->pPage, pCur, pCur->curPagerFlags);
}

// Assembly:
movsbq 0x54(%rdi), %rax
cmpq $0x13, %rax
jl 0x2455db
movl $0x10fd1, %edi          # imm = 0x10FD1
jmp 0x232547
movq %rdi, %rcx
movq 0x20(%rdi), %rdi
andw $0x0, 0x46(%rcx)
andb $-0x7, 0x1(%rcx)
movzwl 0x56(%rcx), %edx
movw %dx, 0x58(%rcx,%rax,2)
leaq 0x88(%rcx), %rdx
movq 0x88(%rcx), %r8
movq %r8, 0x90(%rcx,%rax,8)
andw $0x0, 0x56(%rcx)
incl %eax
movb %al, 0x54(%rcx)
movzbl 0x2(%rcx), %r8d
jmp 0x24561b
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: getAndInitPage
static int getAndInitPage(
  BtShared *pBt,                  /* The database file */
  Pgno pgno,                      /* Number of the page to get */
  MemPage **ppPage,               /* Write the page pointer here */
  BtCursor *pCur,                 /* Cursor to receive the page, or NULL */
  int bReadOnly                   /* True for a read-only page */
){
  int rc;
  DbPage *pDbPage;
  assert( sqlite3_mutex_held(pBt->mutex) );
  assert( pCur==0 || ppPage==&pCur->pPage );
  assert( pCur==0 || bReadOnly==pCur->curPagerFlags );
  assert( pCur==0 || pCur->iPage>0 );

  if( pgno>btreePagecount(pBt) ){
    rc = SQLITE_CORRUPT_BKPT;
    goto getAndInitPage_error1;
  }
  rc = sqlite3PagerGet(pBt->pPager, pgno, (DbPage**)&pDbPage, bReadOnly);
  if( rc ){
    goto getAndInitPage_error1;
  }
  *ppPage = (MemPage*)sqlite3PagerGetExtra(pDbPage);
  if( (*ppPage)->isInit==0 ){
    btreePageFromDbPage(pDbPage, pgno, pBt);
    rc = btreeInitPage(*ppPage);
    if( rc!=SQLITE_OK ){
      goto getAndInitPage_error2;
    }
  }
  assert( (*ppPage)->pgno==pgno );
  assert( (*ppPage)->aData==sqlite3PagerGetData(pDbPage) );

  /* If obtaining a child page for a cursor, we must verify that the page is
  ** compatible with the root page. */
  if( pCur && ((*ppPage)->nCell<1 || (*ppPage)->intKey!=pCur->curIntKey) ){
    rc = SQLITE_CORRUPT_PGNO(pgno);
    goto getAndInitPage_error2;
  }
  return SQLITE_OK;

getAndInitPage_error2:
  releasePage(*ppPage);
getAndInitPage_error1:
  if( pCur ){
    pCur->iPage--;
    pCur->pPage = pCur->apPage[pCur->iPage];
  }
  testcase( pgno==0 );
  assert( pgno!=0 || rc==SQLITE_CORRUPT );
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
cmpl %esi, 0x40(%rdi)
jae 0x24563d
movl $0x10464, %edi          # imm = 0x10464
callq 0x232547
movl %eax, %ebp
jmp 0x2456b6
movq %rdx, %r14
movl %esi, %r12d
movq %rdi, %r15
movq (%rdi), %rdi
leaq 0x8(%rsp), %rdx
movl %r8d, %ecx
callq *0x108(%rdi)
movl %eax, %ebp
testl %eax, %eax
jne 0x2456b6
movq 0x8(%rsp), %rdi
movq 0x10(%rdi), %rax
movq %rax, (%r14)
cmpb $0x0, (%rax)
je 0x245695
xorl %ebp, %ebp
testq %rbx, %rbx
je 0x2456d6
movq (%r14), %rax
cmpw $0x0, 0x18(%rax)
je 0x245687
movb 0x2(%rax), %al
cmpb 0x55(%rbx), %al
je 0x2456d6
movl $0x10479, %edi          # imm = 0x10479
callq 0x232547
movl %eax, %ebp
jmp 0x2456ae
movl %r12d, %esi
movq %r15, %rdx
callq 0x2364f5
movq (%r14), %rdi
callq 0x23499e
movl %eax, %ebp
testl %eax, %eax
je 0x24566e
movq (%r14), %rdi
callq 0x2376c6
testq %rbx, %rbx
je 0x2456d6
movb 0x54(%rbx), %al
decb %al
movb %al, 0x54(%rbx)
movsbq %al, %rax
movq 0x90(%rbx,%rax,8), %rax
movq %rax, 0x88(%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: invalidateIncrblobCursors
static void invalidateIncrblobCursors(
  Btree *pBtree,          /* The database file to check */
  Pgno pgnoRoot,          /* The table that might be changing */
  i64 iRow,               /* The rowid that might be changing */
  int isClearTable        /* True if all rows are being deleted */
){
  BtCursor *p;
  if( pBtree->hasIncrblobCur==0 ) return;
  assert( sqlite3BtreeHoldsMutex(pBtree) );
  pBtree->hasIncrblobCur = 0;
  for(p=pBtree->pBt->pCursor; p; p=p->pNext){
    if( (p->curFlags & BTCF_Incrblob)!=0 ){
      pBtree->hasIncrblobCur = 1;
      if( p->pgnoRoot==pgnoRoot && (isClearTable || p->info.nKey==iRow) ){
        p->eState = CURSOR_INVALID;
      }
    }
  }
}

// Assembly:
cmpb $0x0, 0x13(%rdi)
je 0x245809
movb $0x0, 0x13(%rdi)
movq 0x8(%rdi), %rax
addq $0x10, %rax
movq (%rax), %rax
testq %rax, %rax
je 0x245809
testb $0x10, 0x1(%rax)
je 0x245803
movb $0x1, 0x13(%rdi)
cmpl %esi, 0x50(%rax)
jne 0x245803
testl %ecx, %ecx
jne 0x245800
cmpq %rdx, 0x30(%rax)
jne 0x245803
movb $0x1, (%rax)
addq $0x28, %rax
jmp 0x2457df
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: moveToRightmost
static int moveToRightmost(BtCursor *pCur){
  Pgno pgno;
  int rc = SQLITE_OK;
  MemPage *pPage = 0;

  assert( cursorOwnsBtShared(pCur) );
  assert( pCur->eState==CURSOR_VALID );
  while( !(pPage = pCur->pPage)->leaf ){
    pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
    pCur->ix = pPage->nCell;
    rc = moveToChild(pCur, pgno);
    if( rc ) return rc;
  }
  pCur->ix = pPage->nCell-1;
  assert( pCur->info.nSize==0 );
  assert( (pCur->curFlags & BTCF_ValidNKey)==0 );
  return SQLITE_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x88(%rbx), %r14
cmpb $0x0, 0x8(%r14)
jne 0x245e56
movq 0x50(%r14), %rax
movzbl 0x9(%r14), %ecx
leaq (%rax,%rcx), %rdi
addq $0x8, %rdi
callq 0x22fc59
movzwl 0x18(%r14), %ecx
movw %cx, 0x56(%rbx)
movq %rbx, %rdi
movl %eax, %esi
callq 0x2455c6
testl %eax, %eax
je 0x245e19
jmp 0x245e62
movl 0x18(%r14), %eax
decl %eax
movw %ax, 0x56(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeRecordCompareString
static int vdbeRecordCompareString(
  int nKey1, const void *pKey1, /* Left key */
  UnpackedRecord *pPKey2        /* Right key */
){
  const u8 *aKey1 = (const u8*)pKey1;
  int serial_type;
  int res;

  assert( pPKey2->aMem[0].flags & MEM_Str );
  vdbeAssertFieldCountWithinLimits(nKey1, pKey1, pPKey2->pKeyInfo);
  serial_type = (u8)(aKey1[1]);
  if( serial_type >= 0x80 ){
    sqlite3GetVarint32(&aKey1[1], (u32*)&serial_type);
  }
  if( serial_type<12 ){
    res = pPKey2->r1;      /* (pKey1/nKey1) is a number or a null */
  }else if( !(serial_type & 0x01) ){
    res = pPKey2->r2;      /* (pKey1/nKey1) is a blob */
  }else{
    int nCmp;
    int nStr;
    int szHdr = aKey1[0];

    nStr = (serial_type-12) / 2;
    if( (szHdr + nStr) > nKey1 ){
      pPKey2->errCode = (u8)SQLITE_CORRUPT_BKPT;
      return 0;    /* Corruption */
    }
    nCmp = MIN( pPKey2->aMem[0].n, nStr );
    res = memcmp(&aKey1[szHdr], pPKey2->aMem[0].z, nCmp);

    if( res>0 ){
      res = pPKey2->r2;
    }else if( res<0 ){
      res = pPKey2->r1;
    }else{
      res = nStr - pPKey2->aMem[0].n;
      if( res==0 ){
        if( pPKey2->nField>1 ){
          res = sqlite3VdbeRecordCompareWithSkip(nKey1, pKey1, pPKey2, 1);
        }else{
          res = pPKey2->default_rc;
          pPKey2->eqSeen = 1;
        }
      }else if( res>0 ){
        res = pPKey2->r2;
      }else{
        res = pPKey2->r1;
      }
    }
  }

  assert( vdbeRecordCompareDebug(nKey1, pKey1, pPKey2, res)
       || CORRUPT_DB
       || pPKey2->pKeyInfo->db->mallocFailed
  );
  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
movzbl 0x1(%rsi), %r15d
movl %r15d, 0xc(%rsp)
testb %r15b, %r15b
jns 0x245f89
leaq 0x1(%r14), %rdi
leaq 0xc(%rsp), %r15
movq %r15, %rsi
callq 0x2425d2
movl (%r15), %r15d
cmpl $0xb, %r15d
jg 0x245f95
movsbl 0x14(%rbx), %eax
jmp 0x245fc3
testb $0x1, %r15b
jne 0x245fa1
movsbl 0x15(%rbx), %eax
jmp 0x245fc3
movzbl (%r14), %edi
addl $-0xc, %r15d
shrl %r15d
leal (%r15,%rdi), %eax
cmpl %ebp, %eax
jle 0x245fd0
movl $0x14275, %edi          # imm = 0x14275
callq 0x232547
movb %al, 0x13(%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rax
movl 0xc(%rax), %r12d
cmpl %r15d, %r12d
movl %r15d, %ecx
cmovll %r12d, %ecx
addq %r14, %rdi
movq 0x10(%rax), %rsi
movslq %ecx, %rdx
callq 0x172e0
testl %eax, %eax
jg 0x245f9b
js 0x245f8f
cmpl %r12d, %r15d
jne 0x24601c
cmpw $0x2, 0x10(%rbx)
jb 0x246027
pushq $0x1
popq %rcx
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x246031
jle 0x245f8f
jmp 0x245f9b
movsbl 0x12(%rbx), %eax
movb $0x1, 0x16(%rbx)
jmp 0x245fc3
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: moveToLeftmost
static int moveToLeftmost(BtCursor *pCur){
  Pgno pgno;
  int rc = SQLITE_OK;
  MemPage *pPage;

  assert( cursorOwnsBtShared(pCur) );
  assert( pCur->eState==CURSOR_VALID );
  while( rc==SQLITE_OK && !(pPage = pCur->pPage)->leaf ){
    assert( pCur->ix<pPage->nCell );
    pgno = get4byte(findCell(pPage, pCur->ix));
    rc = moveToChild(pCur, pgno);
  }
  return rc;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
testl %eax, %eax
jne 0x2466ac
movq 0x88(%rbx), %rcx
cmpb $0x0, 0x8(%rcx)
jne 0x2466ac
movzwl 0x1a(%rcx), %eax
movq 0x60(%rcx), %rdx
movzwl 0x56(%rbx), %esi
movzbl (%rdx,%rsi,2), %r8d
shll $0x8, %r8d
movzbl 0x1(%rdx,%rsi,2), %edi
orl %r8d, %edi
andl %eax, %edi
addq 0x50(%rcx), %rdi
callq 0x22fc59
movq %rbx, %rdi
movl %eax, %esi
callq 0x2455c6
jmp 0x246667
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: btreePrevious
static SQLITE_NOINLINE int btreePrevious(BtCursor *pCur){
  int rc;
  MemPage *pPage;

  assert( cursorOwnsBtShared(pCur) );
  assert( (pCur->curFlags & (BTCF_AtLast|BTCF_ValidOvfl|BTCF_ValidNKey))==0 );
  assert( pCur->info.nSize==0 );
  if( pCur->eState!=CURSOR_VALID ){
    rc = restoreCursorPosition(pCur);
    if( rc!=SQLITE_OK ){
      return rc;
    }
    if( CURSOR_INVALID==pCur->eState ){
      return SQLITE_DONE;
    }
    if( CURSOR_SKIPNEXT==pCur->eState ){
      pCur->eState = CURSOR_VALID;
      if( pCur->skipNext<0 ) return SQLITE_OK;
    }
  }

  pPage = pCur->pPage;
  assert( pPage->isInit );
  if( !pPage->leaf ){
    int idx = pCur->ix;
    rc = moveToChild(pCur, get4byte(findCell(pPage, idx)));
    if( rc ) return rc;
    rc = moveToRightmost(pCur);
  }else{
    while( pCur->ix==0 ){
      if( pCur->iPage==0 ){
        pCur->eState = CURSOR_INVALID;
        return SQLITE_DONE;
      }
      moveToParent(pCur);
    }
    assert( pCur->info.nSize==0 );
    assert( (pCur->curFlags & (BTCF_ValidOvfl))==0 );

    pCur->ix--;
    pPage = pCur->pPage;
    if( pPage->intKey && !pPage->leaf ){
      rc = sqlite3BtreePrevious(pCur, 0);
    }else{
      rc = SQLITE_OK;
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb (%rdi), %al
pushq $0x65
popq %rbp
testb %al, %al
je 0x2466ec
cmpb $0x3, %al
jb 0x2466cf
movq %rbx, %rdi
callq 0x2452c2
testl %eax, %eax
jne 0x246748
movb (%rbx), %al
cmpb $0x1, %al
je 0x24678a
movzbl %al, %eax
cmpl $0x2, %eax
jne 0x2466ec
movb $0x0, (%rbx)
cmpl $0x0, 0x4(%rbx)
js 0x246788
movq 0x88(%rbx), %rax
cmpb $0x0, 0x8(%rax)
je 0x246712
movzwl 0x56(%rbx), %eax
testw %ax, %ax
jne 0x24674c
cmpb $0x0, 0x54(%rbx)
je 0x246775
movq %rbx, %rdi
callq 0x245588
jmp 0x2466f9
movzwl 0x56(%rbx), %ecx
movzwl 0x1a(%rax), %edx
movq 0x60(%rax), %rsi
movzbl (%rsi,%rcx,2), %r8d
shll $0x8, %r8d
movzbl 0x1(%rsi,%rcx,2), %edi
orl %r8d, %edi
andl %edx, %edi
addq 0x50(%rax), %rdi
callq 0x22fc59
movq %rbx, %rdi
movl %eax, %esi
callq 0x2455c6
testl %eax, %eax
je 0x24677a
movl %eax, %ebp
jmp 0x24678a
decl %eax
movw %ax, 0x56(%rbx)
movq 0x88(%rbx), %rax
xorl %ebp, %ebp
cmpb $0x0, 0x2(%rax)
je 0x24678a
cmpb $0x0, 0x8(%rax)
jne 0x24678a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2432f4
movb $0x1, (%rbx)
jmp 0x24678a
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x245e12
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: dropCell
static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
  u32 pc;         /* Offset to cell content of cell being deleted */
  u8 *data;       /* pPage->aData */
  u8 *ptr;        /* Used to move bytes around within data[] */
  int rc;         /* The return code */
  int hdr;        /* Beginning of the header.  0 most pages.  100 page 1 */

  if( *pRC ) return;
  assert( idx>=0 && idx<pPage->nCell );
  assert( CORRUPT_DB || sz==cellSize(pPage, idx) );
  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
  assert( pPage->nFree>=0 );
  data = pPage->aData;
  ptr = &pPage->aCellIdx[2*idx];
  pc = get2byte(ptr);
  hdr = pPage->hdrOffset;
  testcase( pc==get2byte(&data[hdr+5]) );
  testcase( pc+sz==pPage->pBt->usableSize );
  if( pc+sz > pPage->pBt->usableSize ){
    *pRC = SQLITE_CORRUPT_BKPT;
    return;
  }
  rc = freeSpace(pPage, pc, sz);
  if( rc ){
    *pRC = rc;
    return;
  }
  pPage->nCell--;
  if( pPage->nCell==0 ){
    memset(&data[hdr+1], 0, 4);
    data[hdr+7] = 0;
    put2byte(&data[hdr+5], pPage->pBt->usableSize);
    pPage->nFree = pPage->pBt->usableSize - pPage->hdrOffset
                       - pPage->childPtrSize - 8;
  }else{
    memmove(ptr, ptr+2, 2*(pPage->nCell - idx));
    put2byte(&data[hdr+3], pPage->nCell);
    pPage->nFree += 2;
  }
}

// Assembly:
cmpl $0x0, (%rcx)
je 0x2469cd
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdi, %rbx
movq 0x48(%rdi), %rax
movq 0x60(%rdi), %rbp
movslq %esi, %r13
movzwl (%rbp,%r13,2), %ecx
rolw $0x8, %cx
movzwl %cx, %esi
leal (%rsi,%rdx), %ecx
cmpl 0x38(%rax), %ecx
jbe 0x246a0a
movl $0x115f2, %edi          # imm = 0x115F2
callq 0x232547
jmp 0x246a22
movq 0x50(%rbx), %r15
movzbl 0x9(%rbx), %r12d
movzwl %dx, %edx
movq %rbx, %rdi
callq 0x24898e
testl %eax, %eax
je 0x246a34
movl %eax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzwl 0x18(%rbx), %eax
decw %ax
movw %ax, 0x18(%rbx)
je 0x246a76
leaq (,%r13,2), %rdi
addq %rbp, %rdi
movzwl %ax, %eax
leaq 0x2(%rdi), %rsi
subl %r13d, %eax
addl %eax, %eax
movslq %eax, %rdx
callq 0x17c50
movb 0x19(%rbx), %al
movb %al, 0x3(%r15,%r12)
movb 0x18(%rbx), %al
movb %al, 0x4(%r15,%r12)
addl $0x2, 0x14(%rbx)
jmp 0x246a25
andl $0x0, 0x1(%r15,%r12)
movb $0x0, 0x7(%r15,%r12)
movq 0x48(%rbx), %rax
movb 0x39(%rax), %al
movb %al, 0x5(%r15,%r12)
movq 0x48(%rbx), %rax
movb 0x38(%rax), %al
movb %al, 0x6(%r15,%r12)
movq 0x48(%rbx), %rax
movl 0x38(%rax), %eax
movzbl 0x9(%rbx), %ecx
movzbl 0xa(%rbx), %edx
addl %ecx, %edx
negl %edx
addl %edx, %eax
addl $-0x8, %eax
movl %eax, 0x14(%rbx)
jmp 0x246a25
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: btreeOverwriteContent
static int btreeOverwriteContent(
  MemPage *pPage,           /* MemPage on which writing will occur */
  u8 *pDest,                /* Pointer to the place to start writing */
  const BtreePayload *pX,   /* Source of data to write */
  int iOffset,              /* Offset of first byte to write */
  int iAmt                  /* Number of bytes to be written */
){
  int nData = pX->nData - iOffset;
  if( nData<=0 ){
    /* Overwritting with zeros */
    int i;
    for(i=0; i<iAmt && pDest[i]==0; i++){}
    if( i<iAmt ){
      int rc = sqlite3PagerWrite(pPage->pDbPage);
      if( rc ) return rc;
      memset(pDest + i, 0, iAmt - i);
    }
  }else{
    if( nData<iAmt ){
      /* Mixed read data and zeros at the end.  Make a recursive call
      ** to write the zeros then fall through to write the real data */
      int rc = btreeOverwriteContent(pPage, pDest+nData, pX, iOffset+nData,
                                 iAmt-nData);
      if( rc ) return rc;
      iAmt = nData;
    }
    if( memcmp(pDest, ((u8*)pX->pData) + iOffset, iAmt)!=0 ){
      int rc = sqlite3PagerWrite(pPage->pDbPage);
      if( rc ) return rc;
      /* In a corrupt database, it is possible for the source and destination
      ** buffers to overlap.  This is harmless since the database is already
      ** corrupt but it does cause valgrind and ASAN warnings.  So use
      ** memmove(). */
      memmove(pDest, ((u8*)pX->pData) + iOffset, iAmt);
    }
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r15d
movl %ecx, %r13d
movq %rsi, %rbx
movl 0x24(%rdx), %ecx
movl %ecx, %ebp
subl %r13d, %ebp
jle 0x248931
movq %rdx, %r12
movl %r15d, %r8d
subl %ebp, %r8d
jle 0x2488e7
movl %ebp, %esi
addq %rbx, %rsi
movq %rdi, %r14
movq %r12, %rdx
callq 0x2488a4
movq %r14, %rdi
movl %ebp, %r15d
testl %eax, %eax
jne 0x248961
movq %rdi, (%rsp)
movslq %r13d, %r13
movq 0x10(%r12), %rsi
addq %r13, %rsi
movslq %r15d, %rbp
movq %rbx, %rdi
movq %rbp, %rdx
callq 0x177e0
xorl %r14d, %r14d
testl %eax, %eax
je 0x248964
movq (%rsp), %rax
movq 0x70(%rax), %rdi
callq 0x2236f2
testl %eax, %eax
jne 0x248961
addq 0x10(%r12), %r13
movq %rbx, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x17c50
jmp 0x248964
xorl %r14d, %r14d
testl %r15d, %r15d
movl $0x0, %eax
cmovgl %r15d, %eax
xorl %r12d, %r12d
cmpq %r12, %rax
je 0x248964
cmpb $0x0, (%rbx,%r12)
jne 0x248954
incq %r12
jmp 0x248943
movq 0x70(%rdi), %rdi
callq 0x2236f2
testl %eax, %eax
je 0x248976
movl %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq %r12, %rbx
movslq %r15d, %rdx
subq %r12, %rdx
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x17380
jmp 0x248964
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pageFreeArray
static int pageFreeArray(
  MemPage *pPg,                   /* Page to edit */
  int iFirst,                     /* First cell to delete */
  int nCell,                      /* Cells to delete */
  CellArray *pCArray              /* Array of cells */
){
  u8 * const aData = pPg->aData;
  u8 * const pEnd = &aData[pPg->pBt->usableSize];
  u8 * const pStart = &aData[pPg->hdrOffset + 8 + pPg->childPtrSize];
  int nRet = 0;
  int i;
  int iEnd = iFirst + nCell;
  u8 *pFree = 0;
  int szFree = 0;

  for(i=iFirst; i<iEnd; i++){
    u8 *pCell = pCArray->apCell[i];
    if( SQLITE_WITHIN(pCell, pStart, pEnd) ){
      int sz;
      /* No need to use cachedCellSize() here.  The sizes of all cells that
      ** are to be freed have already been computing while deciding which
      ** cells need freeing */
      sz = pCArray->szCell[i];  assert( sz>0 );
      if( pFree!=(pCell + sz) ){
        if( pFree ){
          assert( pFree>aData && (pFree - aData)<65536 );
          freeSpace(pPg, (u16)(pFree - aData), szFree);
        }
        pFree = pCell;
        szFree = sz;
        if( pFree+sz>pEnd ) return 0;
      }else{
        pFree = pCell;
        szFree += sz;
      }
      nRet++;
    }
  }
  if( pFree ){
    assert( pFree>aData && (pFree - aData)<65536 );
    freeSpace(pPg, (u16)(pFree - aData), szFree);
  }
  return nRet;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %r8
movl 0x38(%rax), %r14d
addq %r8, %r14
movzbl 0x9(%rdi), %eax
movq %rdi, 0x10(%rsp)
movzbl 0xa(%rdi), %r10d
movq %r8, 0x8(%rsp)
addq %r8, %rax
leaq (%r10,%rax), %rbx
addq $0x8, %rbx
addl %esi, %edx
movslq %esi, %r15
movslq %edx, %r10
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
movq %rcx, 0x20(%rsp)
movq %r10, 0x18(%rsp)
cmpq %r10, %r15
jge 0x249368
movq 0x10(%rcx), %rdi
movq (%rdi,%r15,8), %rbp
cmpq %rbx, %rbp
jb 0x249350
cmpq %r14, %rbp
jae 0x249350
movq 0x18(%rcx), %rdi
movzwl (%rdi,%r15,2), %r12d
movq %r12, %r13
addq %rbp, %r13
cmpq %r13, %rsi
je 0x249355
testq %rsi, %rsi
je 0x249349
subl 0x8(%rsp), %esi
movl $0xffff, %edi           # imm = 0xFFFF
andl %edi, %edx
andl %edi, %esi
movq 0x10(%rsp), %rdi
movl %eax, 0x4(%rsp)
callq 0x24898e
movq 0x18(%rsp), %r10
movq 0x20(%rsp), %rcx
movl 0x4(%rsp), %eax
cmpq %r14, %r13
jbe 0x24935b
jmp 0x24938a
movq %rsi, %rbp
jmp 0x249360
addl %r12d, %edx
movl %edx, %r12d
incl %eax
movl %r12d, %edx
incq %r15
movq %rbp, %rsi
jmp 0x2492f0
testq %rsi, %rsi
je 0x24938c
subl 0x8(%rsp), %esi
movl $0xffff, %ecx           # imm = 0xFFFF
andl %ecx, %edx
andl %ecx, %esi
movq 0x10(%rsp), %rdi
movl %eax, %ebx
callq 0x24898e
movl %ebx, %eax
jmp 0x24938c
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeSorterSort
static int vdbeSorterSort(SortSubtask *pTask, SorterList *pList){
  int i;
  SorterRecord *p;
  int rc;
  SorterRecord *aSlot[64];

  rc = vdbeSortAllocUnpacked(pTask);
  if( rc!=SQLITE_OK ) return rc;

  p = pList->pList;
  pTask->xCompare = vdbeSorterGetCompare(pTask->pSorter);
  memset(aSlot, 0, sizeof(aSlot));

  while( p ){
    SorterRecord *pNext;
    if( pList->aMemory ){
      if( (u8*)p==pList->aMemory ){
        pNext = 0;
      }else{
        assert( p->u.iNext<sqlite3MallocSize(pList->aMemory) );
        pNext = (SorterRecord*)&pList->aMemory[p->u.iNext];
      }
    }else{
      pNext = p->u.pNext;
    }

    p->u.pNext = 0;
    for(i=0; aSlot[i]; i++){
      p = vdbeSorterMerge(pTask, p, aSlot[i]);
      aSlot[i] = 0;
    }
    aSlot[i] = p;
    p = pNext;
  }

  p = 0;
  for(i=0; i<ArraySize(aSlot); i++){
    if( aSlot[i]==0 ) continue;
    p = p ? vdbeSorterMerge(pTask, p, aSlot[i]) : aSlot[i];
  }
  pList->pList = p;

  assert( pTask->pUnpacked->errCode==SQLITE_OK
       || pTask->pUnpacked->errCode==SQLITE_NOMEM
  );
  return pTask->pUnpacked->errCode;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x18(%rdi)
movq 0x10(%rdi), %rcx
jne 0x249570
movq 0x28(%rcx), %rdi
callq 0x24332d
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x249650
movq 0x10(%rbx), %rcx
movq 0x28(%rcx), %rdx
movzwl 0x6(%rdx), %edx
movw %dx, 0x10(%rax)
movb $0x0, 0x13(%rax)
movq (%r14), %r15
movb 0x5c(%rcx), %al
cmpb $0x2, %al
leaq 0x38e(%rip), %rcx       # 0x24990d
leaq 0x479(%rip), %rdx       # 0x2499ff
cmoveq %rcx, %rdx
cmpb $0x1, %al
leaq 0x287(%rip), %rax       # 0x24981a
cmovneq %rdx, %rax
movq %rax, 0x40(%rbx)
movq %rsp, %r12
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
xorl %esi, %esi
callq 0x17380
testq %r15, %r15
je 0x249605
movq 0x8(%r14), %r13
testq %r13, %r13
je 0x2495c9
cmpq %r13, %r15
je 0x2495cf
movslq 0x8(%r15), %rax
addq %rax, %r13
jmp 0x2495d2
movq 0x8(%r15), %r13
jmp 0x2495d2
xorl %r13d, %r13d
andq $0x0, 0x8(%r15)
movq %r12, %rbp
movq (%rbp), %rdx
testq %rdx, %rdx
je 0x2495fc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x24977d
movq %rax, %r15
andq $0x0, (%rbp)
addq $0x8, %rbp
jmp 0x2495da
movq %r15, (%rbp)
movq %r13, %r15
jmp 0x2495ad
xorl %r15d, %r15d
xorl %eax, %eax
cmpq $0x40, %r15
je 0x249633
movq (%rsp,%r15,8), %rdx
testq %rdx, %rdx
je 0x24962e
testq %rax, %rax
je 0x24962b
movq %rbx, %rdi
movq %rax, %rsi
callq 0x24977d
jmp 0x24962e
movq %rdx, %rax
incq %r15
jmp 0x24960a
movq %rax, (%r14)
movq 0x18(%rbx), %rax
movzbl 0x13(%rax), %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x7
popq %rax
jmp 0x24963e