LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemStringify
SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem *pMem, u8 enc, u8 bForce){
  const int nByte = 32;

  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
  assert( !(pMem->flags&MEM_Zero) );
  assert( !(pMem->flags&(MEM_Str|MEM_Blob)) );
  assert( pMem->flags&(MEM_Int|MEM_Real|MEM_IntReal) );
  assert( !sqlite3VdbeMemIsRowSet(pMem) );
  assert( EIGHT_BYTE_ALIGNMENT(pMem) );


  if( sqlite3VdbeMemClearAndResize(pMem, nByte) ){
    pMem->enc = 0;
    return SQLITE_NOMEM_BKPT;
  }

  vdbeMemRenderNum(nByte, pMem->z, pMem);
  assert( pMem->z!=0 );
  pMem->n = sqlite3Strlen30NN(pMem->z);
  pMem->enc = SQLITE_UTF8;
  pMem->flags |= MEM_Str|MEM_Term;
  if( bForce ) pMem->flags &= ~(MEM_Int|MEM_Real|MEM_IntReal);
  sqlite3VdbeChangeEncoding(pMem, enc);
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x20, 0x20(%rdi)
jge 0x291afc
movq %rbx, %rdi
movl $0x20, %esi
xorl %edx, %edx
callq 0x291865
testl %eax, %eax
je 0x291b11
movb $0x0, 0xa(%rbx)
movl $0x7, %r14d
jmp 0x291bb7
movq 0x18(%rbx), %r15
movq %r15, 0x10(%rbx)
movzwl 0x8(%rbx), %eax
andl $0x2d, %eax
movw %ax, 0x8(%rbx)
jmp 0x291b19
movq 0x10(%rbx), %r15
movzwl 0x8(%rbx), %eax
testb $0x4, %al
jne 0x291b46
movq %r15, 0x8(%rsp)
xorl %ecx, %ecx
movq %rcx, (%rsp)
movl $0x20, 0x10(%rsp)
movq %rcx, 0x14(%rsp)
movw $0x0, 0x1c(%rsp)
testb $0x20, %al
jne 0x291b53
movsd (%rbx), %xmm0
jmp 0x291b58
movq (%rbx), %rdi
movq %r15, %rsi
callq 0x2921b2
jmp 0x291b76
cvtsi2sdq (%rbx), %xmm0
leaq 0x14426a(%rip), %rsi    # 0x3d5dc9
movq %rsp, %r12
movq %r12, %rdi
movb $0x1, %al
callq 0x274dfa
movl 0x18(%r12), %eax
movb $0x0, (%r15,%rax)
movq 0x10(%rbx), %rdi
callq 0x172f0
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, 0xc(%rbx)
movb $0x1, 0xa(%rbx)
movl $0x202, %eax            # imm = 0x202
orl 0x8(%rbx), %eax
movl %eax, %ecx
andl $-0x2d, %ecx
testb %r14b, %r14b
cmovel %eax, %ecx
movw %cx, 0x8(%rbx)
xorl %r14d, %r14d
cmpb $0x1, %bpl
je 0x291bb7
movzbl %bpl, %esi
movq %rbx, %rdi
callq 0x291bc7
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeMemAddTerminator
static SQLITE_NOINLINE int vdbeMemAddTerminator(Mem *pMem){
  if( sqlite3VdbeMemGrow(pMem, pMem->n+3, 1) ){
    return SQLITE_NOMEM_BKPT;
  }
  pMem->z[pMem->n] = 0;
  pMem->z[pMem->n+1] = 0;
  pMem->z[pMem->n+2] = 0;
  pMem->flags |= MEM_Term;
  return SQLITE_OK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0xc(%rdi), %esi
addl $0x3, %esi
movl $0x1, %edx
callq 0x291865
movl %eax, %ecx
movl $0x7, %eax
testl %ecx, %ecx
jne 0x292194
movq 0x10(%rbx), %rcx
movslq 0xc(%rbx), %rdx
xorl %eax, %eax
movb %al, (%rcx,%rdx)
movq 0x10(%rbx), %rcx
movslq 0xc(%rbx), %rdx
movb %al, 0x1(%rcx,%rdx)
movq 0x10(%rbx), %rcx
movslq 0xc(%rbx), %rdx
movb %al, 0x2(%rcx,%rdx)
orb $0x2, 0x9(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3Int64ToText
SQLITE_PRIVATE void sqlite3Int64ToText(i64 v, char *zOut){
  int i;
  u64 x;
  char zTemp[22];
  if( v<0 ){
    x = (v==SMALLEST_INT64) ? ((u64)1)<<63 : (u64)-v;
  }else{
    x = v;
  }
  i = sizeof(zTemp)-2;
  zTemp[sizeof(zTemp)-1] = 0;
  do{
    zTemp[i--] = (x%10) + '0';
    x = x/10;
  }while( x );
  if( v<0 ) zTemp[i--] = '-';
  memcpy(zOut, &zTemp[i+1], sizeof(zTemp)-1-i);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r8
movq %rdi, %rcx
negq %rcx
cmovsq %rdi, %rcx
movb $0x0, 0x15(%rsp)
movl $0x14, %r9d
movl $0x13, %esi
movabsq $0x1400000000, %r10     # imm = 0x1400000000
movabsq $-0x3333333333333333, %r11 # imm = 0xCCCCCCCCCCCCCCCD
movabsq $-0x100000000, %rbx     # imm = 0xFFFFFFFF00000000
addq %rbx, %r10
movq %rcx, %rax
mulq %r11
shrq $0x3, %rdx
leal (%rdx,%rdx), %eax
leal (%rax,%rax,4), %eax
movl %ecx, %ebp
subl %eax, %ebp
orb $0x30, %bpl
movb %bpl, (%rsp,%r9)
decq %r9
decl %esi
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x2921f3
testq %rdi, %rdi
js 0x29222a
movl %r9d, %esi
jmp 0x292233
sarq $0x20, %r10
movb $0x2d, (%rsp,%r10)
movslq %esi, %rax
movq %rsp, %rcx
leaq (%rax,%rcx), %rsi
incq %rsi
movl $0x15, %edx
subq %rax, %rdx
movq %r8, %rdi
callq 0x17660
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: memRealValue
static SQLITE_NOINLINE double memRealValue(Mem *pMem){
  /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
  double val = (double)0;
  sqlite3AtoF(pMem->z, &val, pMem->n, pMem->enc);
  return val;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movq 0x10(%rdi), %rax
movl 0xc(%rdi), %edx
movzbl 0xa(%rdi), %ecx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x292288
movsd (%rbx), %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemShallowCopy
SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){
  assert( !sqlite3VdbeMemIsRowSet(pFrom) );
  assert( pTo->db==pFrom->db );
  if( VdbeMemDynamic(pTo) ){ vdbeClrCopy(pTo,pFrom,srcType); return; }
  memcpy(pTo, pFrom, MEMCELLSIZE);
  if( (pFrom->flags&MEM_Static)==0 ){
    pTo->flags &= ~(MEM_Dyn|MEM_Static|MEM_Ephem);
    assert( srcType==MEM_Ephem || srcType==MEM_Static );
    pTo->flags |= srcType;
  }
}

// Assembly:
testb $0x24, 0x9(%rdi)
jne 0x29ebcc
movq 0x10(%rsi), %rax
movq %rax, 0x10(%rdi)
movups (%rsi), %xmm0
movups %xmm0, (%rdi)
testb $0x8, 0x9(%rsi)
jne 0x29b245
movl $0xffffe3ff, %eax       # imm = 0xFFFFE3FF
andl 0x8(%rdi), %eax
orl %edx, %eax
movw %ax, 0x8(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3SubInt64
SQLITE_PRIVATE int sqlite3SubInt64(i64 *pA, i64 iB){
#if GCC_VERSION>=5004000 && !defined(__INTEL_COMPILER)
  return __builtin_sub_overflow(*pA, iB, pA);
#else
  testcase( iB==SMALLEST_INT64+1 );
  if( iB==SMALLEST_INT64 ){
    testcase( (*pA)==(-1) ); testcase( (*pA)==0 );
    if( (*pA)>=0 ) return 1;
    *pA -= iB;
    return 0;
  }else{
    return sqlite3AddInt64(pA, -iB);
  }
#endif
}

// Assembly:
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x1(%rdx), %rax
movq (%rdi), %rcx
cmpq %rax, %rsi
jne 0x29b267
movl $0x1, %eax
testq %rcx, %rcx
js 0x29b28d
retq
testq %rsi, %rsi
jle 0x29b292
testq %rcx, %rcx
jns 0x29b2aa
subq %rcx, %rdx
addq $0x2, %rdx
movl $0x1, %r8d
subq %rsi, %r8
movl $0x1, %eax
cmpq %r8, %rdx
jg 0x29b266
jmp 0x29b2aa
andq %rdx, %rcx
jmp 0x29b2ad
testq %rcx, %rcx
jle 0x29b2aa
movq %rsi, %r8
negq %r8
subq %rcx, %rdx
movl $0x1, %eax
cmpq %r8, %rdx
jb 0x29b266
subq %rsi, %rcx
movq %rcx, (%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3MulInt64
SQLITE_PRIVATE int sqlite3MulInt64(i64 *pA, i64 iB){
#if GCC_VERSION>=5004000 && !defined(__INTEL_COMPILER)
  return __builtin_mul_overflow(*pA, iB, pA);
#else
  i64 iA = *pA;
  if( iB>0 ){
    if( iA>LARGEST_INT64/iB ) return 1;
    if( iA<SMALLEST_INT64/iB ) return 1;
  }else if( iB<0 ){
    if( iA>0 ){
      if( iB<SMALLEST_INT64/iA ) return 1;
    }else if( iA<0 ){
      if( iB==SMALLEST_INT64 ) return 1;
      if( iA==SMALLEST_INT64 ) return 1;
      if( -iA>LARGEST_INT64/-iB ) return 1;
    }
  }
  *pA = iA*iB;
  return 0;
#endif
}

// Assembly:
movq (%rdi), %r8
testq %rsi, %rsi
jle 0x29b2ed
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
divq %rsi
movl $0x1, %ecx
cmpq %rax, %r8
jg 0x29b2f8
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
xorl %edx, %edx
divq %rsi
negq %rax
cmpq %rax, %r8
jge 0x29b2ef
jmp 0x29b2f8
js 0x29b2fb
imulq %rsi, %r8
movq %r8, (%rdi)
xorl %ecx, %ecx
movl %ecx, %eax
retq
testq %r8, %r8
jle 0x29b31e
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
xorl %edx, %edx
divq %r8
negq %rax
movl $0x1, %ecx
cmpq %rsi, %rax
jbe 0x29b2ef
jmp 0x29b2f8
jns 0x29b2ef
movq %rsi, %r9
negq %r9
seto %al
movq %r8, %r10
negq %r10
seto %cl
orb %al, %cl
movl $0x1, %ecx
jne 0x29b2f8
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
divq %r9
cmpq %r10, %rax
jae 0x29b2ef
jmp 0x29b2f8
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: applyAffinity
static void applyAffinity(
  Mem *pRec,          /* The value to apply affinity to */
  char affinity,      /* The affinity to be applied */
  u8 enc              /* Use this text encoding */
){
  if( affinity>=SQLITE_AFF_NUMERIC ){
    assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL
             || affinity==SQLITE_AFF_NUMERIC );
    if( (pRec->flags & MEM_Int)==0 ){ /*OPTIMIZATION-IF-FALSE*/
      if( (pRec->flags & MEM_Real)==0 ){
        if( pRec->flags & MEM_Str ) applyNumericAffinity(pRec,1);
      }else{
        sqlite3VdbeIntegerAffinity(pRec);
      }
    }
  }else if( affinity==SQLITE_AFF_TEXT ){
    /* Only attempt the conversion to TEXT if there is an integer or real
    ** representation (blob and NULL do not get converted) but no string
    ** representation.  It would be harmless to repeat the conversion if
    ** there is already a string rep, but it is pointless to waste those
    ** CPU cycles. */
    if( 0==(pRec->flags&MEM_Str) ){ /*OPTIMIZATION-IF-FALSE*/
      if( (pRec->flags&(MEM_Real|MEM_Int|MEM_IntReal)) ){
        testcase( pRec->flags & MEM_Int );
        testcase( pRec->flags & MEM_Real );
        testcase( pRec->flags & MEM_IntReal );
        sqlite3VdbeMemStringify(pRec, enc, 1);
      }
    }
    pRec->flags &= ~(MEM_Real|MEM_Int|MEM_IntReal);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x43, %sil
jl 0x29b379
movzwl 0x8(%rbx), %eax
testb $0x4, %al
jne 0x29b3b2
testb $0x8, %al
jne 0x29b3b4
testb $0x2, %al
je 0x29b3b2
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x27aaf8
cmpb $0x42, %sil
jne 0x29b3b2
movzwl 0x8(%rbx), %eax
movl %eax, %ecx
andl $0x2, %ecx
shrl %ecx
testb $0x2c, %al
sete %sil
orb %cl, %sil
jne 0x29b3a9
movzbl %dl, %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x291ac0
movzwl 0x8(%rbx), %eax
andl $0xffd3, %eax           # imm = 0xFFD3
movw %ax, 0x8(%rbx)
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x29ec6b
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemCast
SQLITE_PRIVATE int sqlite3VdbeMemCast(Mem *pMem, u8 aff, u8 encoding){
  if( pMem->flags & MEM_Null ) return SQLITE_OK;
  switch( aff ){
    case SQLITE_AFF_BLOB: {   /* Really a cast to BLOB */
      if( (pMem->flags & MEM_Blob)==0 ){
        sqlite3ValueApplyAffinity(pMem, SQLITE_AFF_TEXT, encoding);
        assert( pMem->flags & MEM_Str || pMem->db->mallocFailed );
        if( pMem->flags & MEM_Str ) MemSetTypeFlag(pMem, MEM_Blob);
      }else{
        pMem->flags &= ~(MEM_TypeMask&~MEM_Blob);
      }
      break;
    }
    case SQLITE_AFF_NUMERIC: {
      sqlite3VdbeMemNumerify(pMem);
      break;
    }
    case SQLITE_AFF_INTEGER: {
      sqlite3VdbeMemIntegerify(pMem);
      break;
    }
    case SQLITE_AFF_REAL: {
      sqlite3VdbeMemRealify(pMem);
      break;
    }
    default: {
      assert( aff==SQLITE_AFF_TEXT );
      assert( MEM_Str==(MEM_Blob>>3) );
      pMem->flags |= (pMem->flags&MEM_Blob)>>3;
      sqlite3ValueApplyAffinity(pMem, SQLITE_AFF_TEXT, encoding);
      assert( pMem->flags & MEM_Str || pMem->db->mallocFailed );
      pMem->flags &= ~(MEM_Int|MEM_Real|MEM_IntReal|MEM_Blob|MEM_Zero);
      return sqlite3VdbeChangeEncoding(pMem, encoding);
    }
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movzwl 0x8(%rdi), %eax
testb $0x1, %al
jne 0x29b4b1
movl %edx, %ebp
movq %rdi, %rbx
movzbl %sil, %ecx
addl $-0x41, %ecx
cmpl $0x4, %ecx
ja 0x29b45d
leaq 0x135147(%rip), %rdx    # 0x3d052c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
testb $0x10, %al
jne 0x29b4a8
movzbl %bpl, %edx
movq %rbx, %rdi
movl $0x42, %esi
callq 0x29b351
movzwl 0x8(%rbx), %eax
testb $0x2, %al
je 0x29b4b1
andl $0x3e40, %eax           # imm = 0x3E40
orl $0x10, %eax
jmp 0x29b4ad
movq %rbx, %rdi
callq 0x27828c
movq %rax, (%rbx)
movzwl 0x8(%rbx), %eax
andl $0x3e40, %eax           # imm = 0x3E40
orl $0x4, %eax
jmp 0x29b4ad
movq %rbx, %rdi
callq 0x29ecc9
jmp 0x29b4b1
movq %rbx, %rdi
callq 0x278267
movsd %xmm0, (%rbx)
movzwl 0x8(%rbx), %eax
andl $0x3e40, %eax           # imm = 0x3E40
orl $0x8, %eax
jmp 0x29b4ad
movl %eax, %ecx
shrl $0x3, %ecx
andl $0x2, %ecx
orl %eax, %ecx
movw %cx, 0x8(%rbx)
movzbl %bpl, %r14d
movq %rbx, %rdi
movl $0x42, %esi
movl %r14d, %edx
callq 0x29b351
movzwl 0x8(%rbx), %eax
movl %eax, %ecx
andl $0xbfc3, %ecx           # imm = 0xBFC3
movw %cx, 0x8(%rbx)
testb $0x2, %al
je 0x29b4b1
cmpb %bpl, 0xa(%rbx)
je 0x29b4b1
movq %rbx, %rdi
movl %r14d, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x291bc7
andl $0x3e50, %eax           # imm = 0x3E50
movw %ax, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeBooleanValue
SQLITE_PRIVATE int sqlite3VdbeBooleanValue(Mem *pMem, int ifNull){
  testcase( pMem->flags & MEM_IntReal );
  if( pMem->flags & (MEM_Int|MEM_IntReal) ) return pMem->u.i!=0;
  if( pMem->flags & MEM_Null ) return ifNull;
  return sqlite3VdbeRealValue(pMem)!=0.0;
}

// Assembly:
movzwl 0x8(%rdi), %ecx
testb $0x24, %cl
je 0x29b5e6
xorl %eax, %eax
cmpq $0x0, (%rdi)
setne %al
retq
movl %esi, %eax
testb $0x1, %cl
jne 0x29b5e5
pushq %rax
callq 0x278267
xorpd %xmm1, %xmm1
cmpneqsd %xmm0, %xmm1
movq %xmm1, %rax
andl $0x1, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeMemFromBtree
SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(
  BtCursor *pCur,   /* Cursor pointing at record to retrieve. */
  u32 offset,       /* Offset from the start of data to return bytes from. */
  u32 amt,          /* Number of bytes to return. */
  Mem *pMem         /* OUT: Return data in this Mem structure. */
){
  int rc;
  pMem->flags = MEM_Null;
  if( sqlite3BtreeMaxRecordSize(pCur)<offset+amt ){
    return SQLITE_CORRUPT_BKPT;
  }
  if( SQLITE_OK==(rc = sqlite3VdbeMemClearAndResize(pMem, amt+1)) ){
    rc = sqlite3BtreePayload(pCur, offset, amt, pMem->z);
    if( rc==SQLITE_OK ){
      pMem->z[amt] = 0;   /* Overrun area used when reading malformed records */
      pMem->flags = MEM_Blob;
      pMem->n = (int)amt;
    }else{
      sqlite3VdbeMemRelease(pMem);
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %r14d
movl %esi, %r15d
movw $0x1, 0x8(%rcx)
movq 0x20(%rdi), %rax
movl 0x34(%rax), %ecx
movl 0x40(%rax), %eax
imulq %rcx, %rax
leal (%r14,%r15), %ecx
cmpq %rcx, %rax
jae 0x29b8a5
leaq 0x13a34c(%rip), %rsi    # 0x3d5bcb
leaq 0x13a456(%rip), %rdx    # 0x3d5cdc
leaq 0x13a1a4(%rip), %r8     # 0x3d5a31
movl $0xb, %ebp
movl $0xb, %edi
movl $0x12cd7, %ecx          # imm = 0x12CD7
xorl %eax, %eax
callq 0x274d08
jmp 0x29b919
movq %rdi, %r12
leal 0x1(%r14), %esi
cmpl %esi, 0x20(%rbx)
jge 0x29b8c7
movq %rbx, %rdi
xorl %edx, %edx
callq 0x291865
movl %eax, %ebp
testl %eax, %eax
jne 0x29b919
movq 0x10(%rbx), %rcx
jmp 0x29b8d5
movq 0x18(%rbx), %rcx
movq %rcx, 0x10(%rbx)
movw $0x1, 0x8(%rbx)
movq %r12, %rdi
movl %r15d, %esi
movl %r14d, %edx
xorl %r8d, %r8d
callq 0x28e1f6
testl %eax, %eax
je 0x29b902
movl %eax, %ebp
testb $0x24, 0x9(%rbx)
jne 0x29b8f8
cmpl $0x0, 0x20(%rbx)
je 0x29b919
movq %rbx, %rdi
callq 0x291775
jmp 0x29b919
movq 0x10(%rbx), %rax
movl %r14d, %ecx
movb $0x0, (%rax,%rcx)
movw $0x10, 0x8(%rbx)
movl %r14d, 0xc(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PutVarint
SQLITE_PRIVATE int sqlite3PutVarint(unsigned char *p, u64 v){
  if( v<=0x7f ){
    p[0] = v&0x7f;
    return 1;
  }
  if( v<=0x3fff ){
    p[0] = ((v>>7)&0x7f)|0x80;
    p[1] = v&0x7f;
    return 2;
  }
  return putVarint64(p,v);
}

// Assembly:
cmpq $0x7f, %rsi
ja 0x29b933
movb %sil, (%rdi)
movl $0x1, %eax
retq
cmpq $0x3fff, %rsi           # imm = 0x3FFF
ja 0x29f0fd
movl %esi, %eax
shrl $0x7, %eax
orb $-0x80, %al
movb %al, (%rdi)
andb $0x7f, %sil
movb %sil, 0x1(%rdi)
movl $0x2, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3BtreeRowCountEst
SQLITE_PRIVATE i64 sqlite3BtreeRowCountEst(BtCursor *pCur){
  i64 n;
  u8 i;

  assert( cursorOwnsBtShared(pCur) );
  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );

  /* Currently this interface is only called by the OP_IfSmaller
  ** opcode, and it that case the cursor will always be valid and
  ** will always point to a leaf node. */
  if( NEVER(pCur->eState!=CURSOR_VALID) ) return -1;
  if( NEVER(pCur->pPage->leaf==0) ) return -1;

  n = pCur->pPage->nCell;
  for(i=0; i<pCur->iPage; i++){
    n *= pCur->apPage[i]->nCell;
  }
  return n;
}

// Assembly:
movq $-0x1, %rax
cmpb $0x0, (%rdi)
je 0x29b964
retq
movq 0x88(%rdi), %rcx
cmpb $0x0, 0x8(%rcx)
je 0x29b963
movzwl 0x18(%rcx), %eax
movsbq 0x54(%rdi), %rcx
testq %rcx, %rcx
jle 0x29b963
xorl %edx, %edx
movq 0x90(%rdi,%rdx,8), %rsi
movzwl 0x18(%rsi), %esi
imulq %rsi, %rax
incq %rdx
cmpq %rdx, %rcx
jne 0x29b981
jmp 0x29b963
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ResetOneSchema
SQLITE_PRIVATE void sqlite3ResetOneSchema(sqlite3 *db, int iDb){
  int i;
  assert( iDb<db->nDb );

  if( iDb>=0 ){
    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
    DbSetProperty(db, iDb, DB_ResetWanted);
    DbSetProperty(db, 1, DB_ResetWanted);
    db->mDbFlags &= ~DBFLAG_SchemaKnownOk;
  }

  if( db->nSchemaLock==0 ){
    for(i=0; i<db->nDb; i++){
      if( DbHasProperty(db, i, DB_ResetWanted) ){
        sqlite3SchemaClear(db->aDb[i].pSchema);
      }
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
js 0x29baf8
movq 0x20(%rbx), %rax
movl %esi, %ecx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rcx
orw $0x8, 0x72(%rcx)
movq 0x38(%rax), %rax
orw $0x8, 0x72(%rax)
andb $-0x11, 0x2c(%rbx)
cmpl $0x0, 0x48(%rbx)
jne 0x29bb33
movl 0x28(%rbx), %eax
testl %eax, %eax
jle 0x29bb33
movl $0x18, %r14d
xorl %r15d, %r15d
movq 0x20(%rbx), %rcx
movq (%rcx,%r14), %rdi
testb $0x8, 0x72(%rdi)
je 0x29bb24
callq 0x29d6d4
movl 0x28(%rbx), %eax
incq %r15
movslq %eax, %rcx
addq $0x20, %r14
cmpq %rcx, %r15
jl 0x29bb0e
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3BtreePrevious
SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor *pCur, int flags){
  assert( cursorOwnsBtShared(pCur) );
  assert( flags==0 || flags==1 );
  UNUSED_PARAMETER( flags );  /* Used in COMDB2 but not native SQLite */
  pCur->curFlags &= ~(BTCF_AtLast|BTCF_ValidOvfl|BTCF_ValidNKey);
  pCur->info.nSize = 0;
  if( pCur->eState!=CURSOR_VALID
   || pCur->ix==0
   || pCur->pPage->leaf==0
  ){
    return btreePrevious(pCur);
  }
  pCur->ix--;
  return SQLITE_OK;
}

// Assembly:
andb $-0xf, 0x1(%rdi)
movw $0x0, 0x46(%rdi)
cmpb $0x0, (%rdi)
jne 0x2a06ff
movzwl 0x56(%rdi), %eax
testw %ax, %ax
je 0x2a06ff
movq 0x88(%rdi), %rcx
cmpb $0x0, 0x8(%rcx)
je 0x2a06ff
decl %eax
movw %ax, 0x56(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VdbeAllocUnpackedRecord
SQLITE_PRIVATE UnpackedRecord *sqlite3VdbeAllocUnpackedRecord(
  KeyInfo *pKeyInfo               /* Description of the record */
){
  UnpackedRecord *p;              /* Unpacked record to return */
  int nByte;                      /* Number of bytes required for *p */
  nByte = ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*(pKeyInfo->nKeyField+1);
  p = (UnpackedRecord *)sqlite3DbMallocRaw(pKeyInfo->db, nByte);
  if( !p ) return 0;
  p->aMem = (Mem*)&((char*)p)[ROUND8(sizeof(UnpackedRecord))];
  assert( pKeyInfo->aSortFlags!=0 );
  p->pKeyInfo = pKeyInfo;
  p->nField = pKeyInfo->nKeyField + 1;
  return p;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movzwl 0x6(%rdi), %eax
imulq $0x38, %rax, %rsi
addq $0x50, %rsi
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x29c70b
callq 0x282a35
jmp 0x29c713
movq %rsi, %rdi
callq 0x272ae6
testq %rax, %rax
je 0x29c72d
leaq 0x18(%rax), %rcx
movq %rcx, 0x8(%rax)
movq %rbx, (%rax)
movzwl 0x6(%rbx), %ecx
incl %ecx
movw %cx, 0x10(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x29c766
movl $0x1, %ebp
jmp 0x29c77d
leaq 0x24(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x29b609
movzbl %al, %ebp
movl (%r13), %r12d
xorl %r13d, %r13d
movl %r12d, %ebx
cmpl %r12d, %ebp
jae 0x29c7fc
cmpl 0x8(%rsp), %ebx
ja 0x29c7fc
movl %ebp, %edi
movsbl (%r15,%rdi), %esi
testl %esi, %esi
js 0x29c7a0
movl $0x1, %eax
jmp 0x29c7b4
addq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x29b609
movzbl %al, %eax
movl 0xc(%rsp), %esi
addl %eax, %ebp
movq 0x18(%rsp), %rcx
movb 0x4(%rcx), %al
movb %al, 0xa(%r14)
movq 0x10(%rcx), %rax
movq %rax, 0x28(%r14)
movl $0x0, 0x20(%r14)
movq $0x0, 0x10(%r14)
movl %ebx, %edi
addq %r15, %rdi
movq %r14, %rdx
callq 0x29b6b7
addl %eax, %ebx
addq $0x38, %r14
incl %r13d
movq 0x10(%rsp), %rax
cmpw 0x10(%rax), %r13w
jb 0x29c783
cmpl 0x8(%rsp), %ebx
setbe %al
testw %r13w, %r13w
sete %cl
orb %al, %cl
jne 0x29c82a
testb $0x24, -0x2f(%r14)
je 0x29c823
addq $-0x38, %r14
movq %r14, %rdi
callq 0x2917ab
jmp 0x29c82a
movw $0x1, -0x30(%r14)
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_O3/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 0x29f169
cmpl $0x10, %eax
je 0x29d43f
testl %eax, %eax
jne 0x29d447
movl $0x0, (%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2a06b7
movl $0x1, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x29d45e
cmpq $0x2, %rdi
jae 0x29d487
xorl %eax, %eax
retq
movw $0x28, %ax
cmpq $0x100, %rdi            # imm = 0x100
jb 0x29d49d
movw $0x28, %ax
movq %rdi, %rcx
addl $0x28, %eax
shrq $0x4, %rcx
cmpq $0xfff, %rdi            # imm = 0xFFF
movq %rcx, %rdi
ja 0x29d472
jmp 0x29d4a0
movw $0x28, %ax
addl $-0xa, %eax
leaq (%rdi,%rdi), %rdx
cmpq $0x4, %rdi
movq %rdx, %rdi
jb 0x29d48b
jmp 0x29d4bd
movq %rdi, %rcx
cmpq $0x10, %rcx
jb 0x29d4ba
movq %rcx, %rdx
addl $0xa, %eax
shrq %rdx
cmpq $0x1f, %rcx
movq %rdx, %rcx
ja 0x29d4a9
jmp 0x29d4bd
movq %rcx, %rdx
andl $0x7, %edx
leaq 0x1382c9(%rip), %rcx    # 0x3d5790
addw (%rcx,%rdx,2), %ax
addl $-0xa, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x30(%rdi), %rdi
movq 0x50(%rbx), %rdx
leaq 0x4(%rsp), %r8
xorl %esi, %esi
xorl %ecx, %ecx
callq 0x29c0b4
movl %eax, %ebp
testl %eax, %eax
jne 0x29d68a
cmpl $0x0, 0x4(%rsp)
je 0x29d67d
leaq 0x138574(%rip), %rsi    # 0x3d5bcb
leaq 0x13867e(%rip), %rdx    # 0x3d5cdc
leaq 0x1383cc(%rip), %r8     # 0x3d5a31
movl $0xb, %ebp
movl $0xb, %edi
movl $0x13d63, %ecx          # imm = 0x13D63
xorl %eax, %eax
callq 0x274d08
jmp 0x29d68a
movb $0x0, 0x3(%rbx)
movl $0x0, 0x20(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3RootPageMoved
SQLITE_PRIVATE void sqlite3RootPageMoved(sqlite3 *db, int iDb, Pgno iFrom, Pgno iTo){
  HashElem *pElem;
  Hash *pHash;
  Db *pDb;

  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
  pDb = &db->aDb[iDb];
  pHash = &pDb->pSchema->tblHash;
  for(pElem=sqliteHashFirst(pHash); pElem; pElem=sqliteHashNext(pElem)){
    Table *pTab = sqliteHashData(pElem);
    if( pTab->tnum==iFrom ){
      pTab->tnum = iTo;
    }
  }
  pHash = &pDb->pSchema->idxHash;
  for(pElem=sqliteHashFirst(pHash); pElem; pElem=sqliteHashNext(pElem)){
    Index *pIdx = sqliteHashData(pElem);
    if( pIdx->tnum==iFrom ){
      pIdx->tnum = iTo;
    }
  }
}

// Assembly:
movslq %esi, %rax
shlq $0x5, %rax
movq 0x18(%rdi,%rax), %rax
movq 0x10(%rax), %rsi
testq %rsi, %rsi
je 0x29d6b9
movq 0x10(%rsi), %rdi
cmpl %edx, 0x38(%rdi)
jne 0x29d6b4
movl %ecx, 0x38(%rdi)
movq (%rsi), %rsi
jmp 0x29d6a3
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x29d6d3
movq 0x10(%rax), %rsi
cmpl %edx, 0x58(%rsi)
jne 0x29d6ce
movl %ecx, 0x58(%rsi)
movq (%rax), %rax
jmp 0x29d6bd
retq
// File: /workspace/github_c_makefile_star2_O3/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
testb $0x24, 0x9(%rdi)
jne 0x29dfc3
cmpl $0x0, 0x20(%rbx)
je 0x29dfcb
movq %rbx, %rdi
callq 0x291775
movl $0x38, %esi
movq %r15, %rdi
callq 0x282a35
testq %rax, %rax
je 0x29e073
movq %rax, %r14
testq %r15, %r15
je 0x29e009
cmpq %r14, 0x1c0(%r15)
jbe 0x29e009
movl $0x80, %eax
cmpq %r14, 0x1b0(%r15)
jbe 0x29e012
cmpq %r14, 0x1b8(%r15)
jbe 0x29e080
movq %r14, %rdi
callq *0x21d686(%rip)         # 0x4bb698
xorl %ecx, %ecx
movq %rcx, (%r14)
movq %r15, 0x8(%r14)
movq %rcx, 0x28(%r14)
movq %r14, %rdx
addq $0x38, %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movq %rdx, 0x20(%r14)
cltq
addq $-0x38, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrl $0x4, %edx
movw %dx, 0x30(%r14)
movw $0x1, 0x32(%r14)
movl $0x0, 0x34(%r14)
movq %r14, 0x10(%rbx)
movw $0x410, 0x8(%rbx)       # imm = 0x410
leaq 0x91b9(%rip), %rax      # 0x2a7226
movq %rax, 0x30(%rbx)
jmp 0x29e078
movl $0x7, %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %r15
retq
movzwl 0x176(%r15), %eax
jmp 0x29e012
// File: /workspace/github_c_makefile_star2_O3/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 0x2a727e
testq %rax, %rax
je 0x29e0cc
movq %r14, (%rax)
movq $0x0, 0x8(%rax)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x29e0c1
cmpq %r14, (%rcx)
jl 0x29e0bb
andb $-0x2, 0x32(%rbx)
addq $0x8, %rcx
jmp 0x29e0c5
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_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3RowSetNext
SQLITE_PRIVATE int sqlite3RowSetNext(RowSet *p, i64 *pRowid){
  assert( p!=0 );
  assert( p->pForest==0 );  /* Cannot be used with sqlite3RowSetText() */

  /* Merge the forest into a single sorted list on first call */
  if( (p->rsFlags & ROWSET_NEXT)==0 ){  /*OPTIMIZATION-IF-FALSE*/
    if( (p->rsFlags & ROWSET_SORTED)==0 ){  /*OPTIMIZATION-IF-FALSE*/
      p->pEntry = rowSetEntrySort(p->pEntry);
    }
    p->rsFlags |= ROWSET_SORTED|ROWSET_NEXT;
  }

  /* Return the next entry on the list */
  if( p->pEntry ){
    *pRowid = p->pEntry->v;
    p->pEntry = p->pEntry->pRight;
    if( p->pEntry==0 ){ /*OPTIMIZATION-IF-TRUE*/
      /* Free memory immediately, rather than waiting on sqlite3_finalize() */
      sqlite3RowSetClear(p);
    }
    return 1;
  }else{
    return 0;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x32(%rdi), %eax
movzwl %ax, %ecx
testb $0x2, %cl
jne 0x29e107
testb $0x1, %cl
jne 0x29e100
movq 0x10(%rbx), %rdi
callq 0x2a72c9
movq %rax, 0x10(%rbx)
movzwl 0x32(%rbx), %eax
orl $0x3, %eax
movw %ax, 0x32(%rbx)
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x29e132
movq (%rax), %rcx
movq %rcx, (%r14)
movq 0x8(%rax), %rax
movq %rax, 0x10(%rbx)
movl $0x1, %ebp
testq %rax, %rax
jne 0x29e134
movq %rbx, %rdi
callq 0x2a723c
jmp 0x29e134
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3PagerCloseWal
SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager, sqlite3 *db){
  int rc = SQLITE_OK;

  assert( pPager->journalMode==PAGER_JOURNALMODE_WAL );

  /* If the log file is not already open, but does exist in the file-system,
  ** it may need to be checkpointed before the connection can switch to
  ** rollback mode. Open it now so this can happen.
  */
  if( !pPager->pWal ){
    int logexists = 0;
    rc = pagerLockDb(pPager, SHARED_LOCK);
    if( rc==SQLITE_OK ){
      rc = sqlite3OsAccess(
          pPager->pVfs, pPager->zWal, SQLITE_ACCESS_EXISTS, &logexists
      );
    }
    if( rc==SQLITE_OK && logexists ){
      rc = pagerOpenWal(pPager);
    }
  }

  /* Checkpoint and close the log. Because an EXCLUSIVE lock is held on
  ** the database file, the log and log-summary files will be deleted.
  */
  if( rc==SQLITE_OK && pPager->pWal ){
    rc = pagerExclusiveLock(pPager);
    if( rc==SQLITE_OK ){
      rc = sqlite3WalClose(pPager->pWal, db, pPager->walSyncFlags,
                           pPager->pageSize, (u8*)pPager->pTmpSpace);
      pPager->pWal = 0;
      pagerFixMaplimit(pPager);
      if( rc && !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK);
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x120(%rdi)
je 0x29e35f
movq %rbx, %rdi
callq 0x28d259
movl %eax, %ebp
testl %eax, %eax
jne 0x29e3bb
movq 0x120(%rbx), %rdi
movzbl 0xf(%rbx), %edx
movl 0xbc(%rbx), %ecx
movq 0x110(%rbx), %r8
movq %r14, %rsi
callq 0x28b802
movl %eax, %ebp
movq $0x0, 0x120(%rbx)
movq %rbx, %rdi
callq 0x28b67b
testl %ebp, %ebp
je 0x29e3b9
cmpb $0x0, 0x8(%rbx)
jne 0x29e3bb
movq 0x48(%rbx), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x29e357
cmpb $0x0, 0x11(%rbx)
jne 0x29e34d
movl $0x1, %esi
callq *0x40(%rax)
cmpb $0x5, 0x15(%rbx)
je 0x29e357
movb $0x1, 0x15(%rbx)
movb 0x10(%rbx), %al
movb %al, 0x16(%rbx)
jmp 0x29e3bb
movl $0x0, 0xc(%rsp)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x288c38
testl %eax, %eax
je 0x29e37c
movl %eax, %ebp
jmp 0x29e3bb
movq (%rbx), %rdi
movq 0x128(%rbx), %rsi
leaq 0xc(%rsp), %rcx
xorl %edx, %edx
callq *0x38(%rdi)
movl %eax, %ebp
testl %eax, %eax
jne 0x29e3a7
cmpl $0x0, 0xc(%rsp)
je 0x29e3a7
movq %rbx, %rdi
callq 0x28d0c5
movl %eax, %ebp
testl %ebp, %ebp
jne 0x29e3bb
cmpq $0x0, 0x120(%rbx)
jne 0x29e2da
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x29ec04
movq %rbx, %rdi
callq 0x2781c2
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
movq %rbx, %rsi
callq 0x292288
movw $0x8, %bp
testl %eax, %eax
jle 0x29ec3d
cmpl $0x1, %eax
jne 0x29ec62
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
movq %rsp, %rsi
callq 0x2927e4
testl %eax, %eax
jne 0x29ec62
jmp 0x29ec57
jne 0x29ec62
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
movq %rsp, %rsi
callq 0x2927e4
cmpl $0x2, %eax
jge 0x29ec62
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_O3/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 0x292788
xorps %xmm0, %xmm0
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 0x29ecc3
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_O3/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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movzwl 0x8(%rdi), %eax
testb $0x2d, %al
jne 0x29ed75
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
movq %rbx, %rsi
callq 0x292288
cmpl $0x1, %eax
ja 0x29ed16
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
leaq 0x8(%rsp), %rsi
callq 0x2927e4
cmpl $0x1, %eax
jg 0x29ed16
movq 0x8(%rsp), %rax
jmp 0x29ed5f
movsd (%rbx), %xmm0
cvttsd2si %xmm0, %rax
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x29ed2b
jnp 0x29ed5f
movabsq $-0x8000000000000, %rdx # imm = 0xFFF8000000000000
addq %rax, %rdx
shrq $0x34, %rdx
movw $0x8, %cx
cmpl $0xfff, %edx            # imm = 0xFFF
jb 0x29ed66
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
movq %xmm0, %rdx
movq %xmm1, %rsi
cmpq %rsi, %rdx
jne 0x29ed66
movq %rax, (%rbx)
movw $0x4, %cx
movzwl 0x8(%rbx), %edx
andl $0x3e40, %edx           # imm = 0x3E40
movzwl %cx, %eax
orl %edx, %eax
andl $0xbfed, %eax           # imm = 0xBFED
movw %ax, 0x8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rax
movb 0xa(%rdi), %cl
cmpb 0x8(%rdx), %cl
jne 0x29edd0
movq 0x10(%r14), %rdi
movq 0x18(%r14), %r9
movl 0xc(%rax), %esi
movq 0x10(%rax), %rdx
movl 0xc(%r12), %ecx
movq 0x10(%r12), %r8
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%r9
movq 0x28(%rax), %rcx
movw $0x1, %dx
leaq 0x40(%rsp), %r13
movw %dx, 0x8(%r13)
movq %rcx, 0x28(%r13)
xorl %ebx, %ebx
movl %ebx, 0x20(%r13)
leaq 0x8(%rsp), %rbp
movw %dx, 0x8(%rbp)
movq %rcx, 0x28(%rbp)
movl %ebx, 0x20(%rbp)
movq %r13, %rdi
movq %rax, %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x29b219
movq %rbp, %rdi
movq %r12, %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x29b219
movzbl 0x8(%r14), %esi
movq %r13, %rdi
callq 0x278305
movq %rax, %r12
movzbl 0x8(%r14), %esi
movq %rbp, %rdi
callq 0x278305
testq %r12, %r12
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x29ee57
testq %r15, %r15
je 0x29ee6f
movb $0x7, (%r15)
jmp 0x29ee6f
movq 0x10(%r14), %rdi
movl 0x4c(%rsp), %esi
movl 0x14(%rsp), %ecx
movq %r12, %rdx
movq %rax, %r8
callq *0x18(%r14)
movl %eax, %ebx
testb $0x24, 0x49(%rsp)
jne 0x29ee7d
cmpl $0x0, 0x60(%rsp)
je 0x29ee87
leaq 0x40(%rsp), %rdi
callq 0x291775
testb $0x24, 0x11(%rsp)
jne 0x29ee95
cmpl $0x0, 0x28(%rsp)
je 0x29ee9f
leaq 0x8(%rsp), %rdi
callq 0x291775
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movl 0xc(%rdi), %eax
movl 0xc(%rsi), %ecx
movzwl 0x8(%rdi), %edx
movzwl 0x8(%rsi), %r8d
movl %r8d, %r9d
orl %edx, %r9d
btl $0xe, %r9d
jb 0x29eeed
movq 0x10(%rdi), %rdi
movq 0x10(%rsi), %rsi
movl %eax, %ebx
subl %ecx, %ebx
cmovll %eax, %ecx
movslq %ecx, %rdx
callq 0x17300
testl %eax, %eax
cmovnel %eax, %ebx
movl %ebx, %eax
jmp 0x29eefc
andl $0x4000, %edx           # imm = 0x4000
testl %r8d, %edx
je 0x29eefe
movl (%rdi), %eax
subl (%rsi), %eax
popq %rbx
retq
testl %edx, %edx
jne 0x29ef1c
testl %eax, %eax
jle 0x29eefa
movq 0x10(%rdi), %rcx
xorl %edx, %edx
cmpb $0x0, (%rcx,%rdx)
jne 0x29ef3a
incq %rdx
cmpq %rdx, %rax
jne 0x29ef0c
jmp 0x29eefa
testl %ecx, %ecx
jle 0x29ef34
movq 0x10(%rsi), %rax
xorl %edx, %edx
cmpb $0x0, (%rax,%rdx)
jne 0x29ef41
incq %rdx
cmpq %rdx, %rcx
jne 0x29ef26
movl (%rdi), %eax
subl %ecx, %eax
jmp 0x29eefc
movl $0x1, %eax
jmp 0x29eefc
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x29eefc
// File: /workspace/github_c_makefile_star2_O3/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 0x29ef73
movq %r14, %rdi
callq 0x29ef8c
testl %eax, %eax
je 0x29ef70
movl $0x0, 0x20(%rbx)
jmp 0x29ef80
movb (%r14), %cl
xorl %eax, %eax
movl $0x0, 0x20(%rbx)
testb %cl, %cl
je 0x29ef84
movb $0x1, 0x2(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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
movq %rdi, %rbx
movl $0x0, 0xc(%rsp)
cmpb $0x4, (%rdi)
jne 0x29efa6
movl 0x4(%rbx), %eax
jmp 0x29f014
movb $0x1, (%rbx)
movq 0x21c838(%rip), %rax    # 0x4bb7e8
testq %rax, %rax
je 0x29efc7
movl $0x19a, %edi            # imm = 0x19A
callq *%rax
movl %eax, %ecx
movl $0xa, %eax
testl %ecx, %ecx
jne 0x29f014
movq 0x18(%rbx), %rsi
movq 0x48(%rbx), %rdx
leaq 0xc(%rsp), %r8
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x29f01a
testl %eax, %eax
jne 0x29f014
movq 0x18(%rbx), %rdi
callq 0x272c00
movq $0x0, 0x18(%rbx)
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x29f000
movl %eax, 0x4(%rbx)
jmp 0x29f006
cmpl $0x0, 0x4(%rbx)
je 0x29f012
xorl %eax, %eax
cmpb $0x0, (%rbx)
jne 0x29f014
movb $0x2, (%rbx)
jmp 0x29f014
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq