LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x2a43fe
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
divq %rsi
movl $0x1, %ecx
cmpq %rax, %r8
jg 0x2a4409
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cqto
idivq %rsi
cmpq %rax, %r8
jge 0x2a4400
jmp 0x2a4409
js 0x2a440c
imulq %rsi, %r8
movq %r8, (%rdi)
xorl %ecx, %ecx
movl %ecx, %eax
retq
testq %r8, %r8
jle 0x2a442c
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cqto
idivq %r8
movl $0x1, %ecx
cmpq %rsi, %rax
jle 0x2a4400
jmp 0x2a4409
jns 0x2a4400
movq %rsi, %r9
negq %r9
seto %al
movq %r8, %r10
negq %r10
seto %cl
orb %al, %cl
movl $0x1, %ecx
jne 0x2a4409
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
xorl %edx, %edx
divq %r9
cmpq %r10, %rax
jge 0x2a4400
jmp 0x2a4409
// File: /workspace/github_c_makefile_star2_O1/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 0x2a4487
movzwl 0x8(%rbx), %eax
testb $0x4, %al
jne 0x2a44b5
testb $0x8, %al
jne 0x2a44b7
testb $0x2, %al
je 0x2a44b5
movq %rbx, %rdi
movl $0x1, %esi
popq %rbx
jmp 0x28450b
cmpb $0x42, %sil
jne 0x2a44b5
movzwl 0x8(%rbx), %eax
movl %eax, %ecx
andl $0x2, %ecx
shrl %ecx
testb $0x2c, %al
sete %al
orb %cl, %al
jne 0x2a44b1
movzbl %dl, %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x29b789
andb $-0x2d, 0x8(%rbx)
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x2a849e
// File: /workspace/github_c_makefile_star2_O1/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 0x2a45b4
movl %edx, %ebp
movq %rdi, %rbx
movzbl %sil, %ecx
addl $-0x41, %ecx
cmpl $0x4, %ecx
ja 0x2a4560
leaq 0x1357bc(%rip), %rdx    # 0x3d9ca4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
testb $0x10, %al
jne 0x2a45ab
movzbl %bpl, %edx
movq %rbx, %rdi
movl $0x42, %esi
callq 0x2a445f
movzwl 0x8(%rbx), %eax
testb $0x2, %al
je 0x2a45b4
andl $0x3e40, %eax           # imm = 0x3E40
orl $0x10, %eax
jmp 0x2a45b0
movq %rbx, %rdi
callq 0x281c1d
movq %rax, (%rbx)
movzwl 0x8(%rbx), %eax
andl $0x3e40, %eax           # imm = 0x3E40
orl $0x4, %eax
jmp 0x2a45b0
movq %rbx, %rdi
callq 0x2a84fc
jmp 0x2a45b4
movq %rbx, %rdi
callq 0x281bf8
movsd %xmm0, (%rbx)
movzwl 0x8(%rbx), %eax
andl $0x3e40, %eax           # imm = 0x3E40
orl $0x8, %eax
jmp 0x2a45b0
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 0x2a445f
movzwl 0x8(%rbx), %eax
movl %eax, %ecx
andl $0xbfc3, %ecx           # imm = 0xBFC3
movw %cx, 0x8(%rbx)
testb $0x2, %al
je 0x2a45b4
cmpb %bpl, 0xa(%rbx)
je 0x2a45b4
movq %rbx, %rdi
movl %r14d, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x29b888
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_O1/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 0x2a46e9
xorl %eax, %eax
cmpq $0x0, (%rdi)
setne %al
retq
movl %esi, %eax
testb $0x1, %cl
jne 0x2a46e8
pushq %rax
callq 0x281bf8
xorpd %xmm1, %xmm1
cmpneqsd %xmm0, %xmm1
movq %xmm1, %rax
andl $0x1, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2a49aa
leaq 0x13a99b(%rip), %rsi    # 0x3df31f
leaq 0x13aaa5(%rip), %rdx    # 0x3df430
leaq 0x13a7f3(%rip), %r8     # 0x3df185
movl $0xb, %ebp
movl $0xb, %edi
movl $0x12cd7, %ecx          # imm = 0x12CD7
xorl %eax, %eax
callq 0x27e637
jmp 0x2a4a20
movq %rdi, %r12
leal 0x1(%r14), %esi
cmpl %esi, 0x20(%rbx)
jge 0x2a49c4
movq %rbx, %rdi
xorl %edx, %edx
callq 0x29b54f
movl %eax, %ebp
jmp 0x2a49d4
movq 0x18(%rbx), %rax
movq %rax, 0x10(%rbx)
movw $0x1, 0x8(%rbx)
xorl %ebp, %ebp
testl %ebp, %ebp
jne 0x2a4a20
movq 0x10(%rbx), %rcx
movq %r12, %rdi
movl %r15d, %esi
movl %r14d, %edx
xorl %r8d, %r8d
callq 0x297e3f
testl %eax, %eax
je 0x2a4a09
movl %eax, %ebp
testb $0x24, 0x9(%rbx)
jne 0x2a49ff
cmpl $0x0, 0x20(%rbx)
je 0x2a4a20
movq %rbx, %rdi
callq 0x29b45b
jmp 0x2a4a20
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_O1/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 0x2a4a3a
movb %sil, (%rdi)
movl $0x1, %eax
retq
cmpq $0x3fff, %rsi           # imm = 0x3FFF
ja 0x2a8931
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_O1/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 0x2a4a6b
retq
movq 0x88(%rdi), %rcx
cmpb $0x0, 0x8(%rcx)
je 0x2a4a6a
movzwl 0x18(%rcx), %eax
movsbq 0x54(%rdi), %rcx
testq %rcx, %rcx
jle 0x2a4a6a
xorl %edx, %edx
movq 0x90(%rdi,%rdx,8), %rsi
movzwl 0x18(%rsi), %esi
imulq %rsi, %rax
incq %rdx
cmpq %rdx, %rcx
jne 0x2a4a88
jmp 0x2a4a6a
// File: /workspace/github_c_makefile_star2_O1/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 0x2a4bf3
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 0x2a4c2b
cmpl $0x0, 0x28(%rbx)
jle 0x2a4c2b
movl $0x18, %r14d
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movq (%rax,%r14), %rdi
testb $0x8, 0x72(%rdi)
je 0x2a4c1b
callq 0x2a6f82
incq %r15
movslq 0x28(%rbx), %rax
addq $0x20, %r14
cmpq %rax, %r15
jl 0x2a4c08
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2aa0ed
movzwl 0x56(%rdi), %eax
testw %ax, %ax
je 0x2aa0ed
movq 0x88(%rdi), %rcx
cmpb $0x0, 0x8(%rcx)
je 0x2aa0ed
decl %eax
movw %ax, 0x56(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2a5a5a
callq 0x28c518
jmp 0x2a5a62
movq %rsi, %rdi
callq 0x27c381
testq %rax, %rax
je 0x2a5a7e
leaq 0x18(%rax), %rcx
movq %rcx, 0x8(%rax)
movq %rbx, (%rax)
movzwl 0x6(%rbx), %ecx
incl %ecx
movw %cx, 0x10(%rax)
jmp 0x2a5a80
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 $0x18, %rsp
movq %rdx, %r15
movl %esi, (%rsp)
movq %rdi, %r12
movq 0x8(%rcx), %r14
movq %rcx, 0x10(%rsp)
movb $0x0, 0x12(%rcx)
movsbl (%rdx), %eax
testl %eax, %eax
js 0x2a5ab8
movl %eax, 0x8(%rsp)
movl $0x1, %ebp
jmp 0x2a5ac8
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x2a470c
movzbl %al, %ebp
movl 0x8(%rsp), %ebx
xorl %r13d, %r13d
movl %ebx, 0xc(%rsp)
cmpl 0xc(%rsp), %ebp
jae 0x2a5b4e
cmpl (%rsp), %ebx
ja 0x2a5b4e
movl %ebp, %edi
movsbl (%r15,%rdi), %eax
testl %eax, %eax
js 0x2a5af4
movl %eax, 0x4(%rsp)
movl $0x1, %eax
jmp 0x2a5b04
addq %r15, %rdi
leaq 0x4(%rsp), %rsi
callq 0x2a470c
movzbl %al, %eax
addl %eax, %ebp
movb 0x4(%r12), %al
movb %al, 0xa(%r14)
movq 0x10(%r12), %rax
movq %rax, 0x28(%r14)
movl $0x0, 0x20(%r14)
movq $0x0, 0x10(%r14)
movl %ebx, %edi
addq %r15, %rdi
movl 0x4(%rsp), %esi
movq %r14, %rdx
callq 0x2a47ba
addl %eax, %ebx
addq $0x38, %r14
incl %r13d
movq 0x10(%rsp), %rax
cmpw 0x10(%rax), %r13w
jb 0x2a5ad3
cmpl (%rsp), %ebx
setbe %al
testw %r13w, %r13w
sete %cl
orb %al, %cl
jne 0x2a5b7b
testb $0x24, -0x2f(%r14)
je 0x2a5b74
addq $-0x38, %r14
movq %r14, %rdi
callq 0x29b491
jmp 0x2a5b7b
movw $0x1, -0x30(%r14)
movq 0x10(%rsp), %rax
movw %r13w, 0x10(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2a899d
cmpl $0x10, %eax
je 0x2a67fd
testl %eax, %eax
jne 0x2a6805
movl $0x0, (%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2aa09a
movl $0x1, (%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2a681c
cmpq $0x2, %rdi
jae 0x2a6845
xorl %eax, %eax
retq
movw $0x28, %ax
cmpq $0x100, %rdi            # imm = 0x100
jb 0x2a685b
movw $0x28, %ax
movq %rdi, %rcx
addl $0x28, %eax
shrq $0x4, %rcx
cmpq $0xfff, %rdi            # imm = 0xFFF
movq %rcx, %rdi
ja 0x2a6830
jmp 0x2a685e
movw $0x28, %ax
addl $-0xa, %eax
leaq (%rdi,%rdi), %rdx
cmpq $0x4, %rdi
movq %rdx, %rdi
jb 0x2a6849
jmp 0x2a687b
movq %rdi, %rcx
cmpq $0x10, %rcx
jb 0x2a6878
movq %rcx, %rdx
addl $0xa, %eax
shrq %rdx
cmpq $0x1f, %rcx
movq %rdx, %rcx
ja 0x2a6867
jmp 0x2a687b
movq %rcx, %rdx
andl $0x7, %edx
leaq 0x13874b(%rip), %rcx    # 0x3defd0
addw (%rcx,%rdx,2), %ax
addl $-0xa, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2a533d
movl %eax, %ebp
testl %eax, %eax
jne 0x2a6c6e
cmpl $0x0, 0x4(%rsp)
je 0x2a6c61
leaq 0x1386e4(%rip), %rsi    # 0x3df31f
leaq 0x1387ee(%rip), %rdx    # 0x3df430
leaq 0x13853c(%rip), %r8     # 0x3df185
movl $0xb, %ebp
movl $0xb, %edi
movl $0x13d63, %ecx          # imm = 0x13D63
xorl %eax, %eax
callq 0x27e637
jmp 0x2a6c6e
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_O1/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:
movq 0x20(%rdi), %rax
movslq %esi, %rsi
shlq $0x5, %rsi
movq 0x18(%rax,%rsi), %rax
movq 0x10(%rax), %rsi
testq %rsi, %rsi
je 0x2a6f67
movq 0x10(%rsi), %rdi
cmpl %edx, 0x38(%rdi)
jne 0x2a6f62
movl %ecx, 0x38(%rdi)
movq (%rsi), %rsi
jmp 0x2a6f51
movq 0x28(%rax), %rax
testq %rax, %rax
je 0x2a6f81
movq 0x10(%rax), %rsi
cmpl %edx, 0x58(%rsi)
jne 0x2a6f7c
movl %ecx, 0x58(%rsi)
movq (%rax), %rax
jmp 0x2a6f6b
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %r14
testb $0x24, 0x9(%rdi)
jne 0x2a7809
cmpl $0x0, 0x20(%rbx)
je 0x2a7811
movq %rbx, %rdi
callq 0x29b45b
movl $0x38, %esi
movq %r14, %rdi
callq 0x28c518
movl $0x7, %ebp
testq %rax, %rax
je 0x2a78c0
movq %rax, %r15
testq %r14, %r14
je 0x2a7854
cmpq %r15, 0x1c0(%r14)
jbe 0x2a7854
movl $0x80, %eax
cmpq %r15, 0x1b0(%r14)
jbe 0x2a785d
cmpq %r15, 0x1b8(%r14)
jbe 0x2a78cd
movq %r15, %rdi
callq *0x21ee3b(%rip)         # 0x4c6698
leaq 0x38(%r15), %rcx
cltq
addq $-0x38, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrl $0x4, %edx
xorl %eax, %eax
movq %rax, (%r15)
movq %r14, 0x8(%r15)
movq %rax, 0x28(%r15)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r15)
movq %rcx, 0x20(%r15)
movw %dx, 0x30(%r15)
movw $0x1, 0x32(%r15)
movl $0x0, 0x34(%r15)
testq %r15, %r15
je 0x2a78c0
movq %r15, 0x10(%rbx)
movw $0x410, 0x8(%rbx)       # imm = 0x410
leaq 0x9553(%rip), %rax      # 0x2b0e0d
movq %rax, 0x30(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movzwl 0x176(%r14), %eax
jmp 0x2a785d
// File: /workspace/github_c_makefile_star2_O1/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 0x2b0e6c
testq %rax, %rax
je 0x2a7919
movq %r14, (%rax)
movq $0x0, 0x8(%rax)
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x2a790e
cmpq %r14, (%rcx)
jl 0x2a7908
andb $-0x2, 0x32(%rbx)
addq $0x8, %rcx
jmp 0x2a7912
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_O1/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
testb $0x2, %al
jne 0x2a7948
testb $0x1, %al
jne 0x2a7944
movq 0x10(%rbx), %rdi
callq 0x2b0eb7
movq %rax, 0x10(%rbx)
orb $0x3, 0x32(%rbx)
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x2a7973
movq (%rax), %rcx
movq %rcx, (%r14)
movq 0x8(%rax), %rax
movq %rax, 0x10(%rbx)
movl $0x1, %ebp
testq %rax, %rax
jne 0x2a7975
movq %rbx, %rdi
callq 0x2b0e2a
jmp 0x2a7975
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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
xorl %ebp, %ebp
cmpq $0x0, 0x120(%rdi)
jne 0x2a7b1b
movl $0x0, 0xc(%rsp)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x292a65
movl %eax, %ebp
testl %eax, %eax
jne 0x2a7b06
movq (%rbx), %rdi
movq 0x128(%rbx), %rsi
leaq 0xc(%rsp), %rcx
xorl %edx, %edx
callq *0x38(%rdi)
movl %eax, %ebp
testl %ebp, %ebp
jne 0x2a7b1b
cmpl $0x0, 0xc(%rsp)
je 0x2a7b1b
movq %rbx, %rdi
callq 0x296db3
movl %eax, %ebp
testl %ebp, %ebp
je 0x2a7b2a
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorl %ebp, %ebp
cmpq $0x0, 0x120(%rbx)
je 0x2a7b1f
movq %rbx, %rdi
callq 0x296f24
movl %eax, %ebp
testl %eax, %eax
jne 0x2a7b1f
movq 0x120(%rbx), %rdi
movzbl 0xf(%rbx), %edx
movl 0xbc(%rbx), %ecx
movq 0x110(%rbx), %r8
movq %r14, %rsi
callq 0x29565c
movl %eax, %r14d
movq $0x0, 0x120(%rbx)
movq %rbx, %rdi
callq 0x2954bc
movl $0x0, %ebp
testl %r14d, %r14d
je 0x2a7b1f
movl %r14d, %ebp
cmpb $0x0, 0x8(%rbx)
jne 0x2a7b1f
movq 0x48(%rbx), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x2a7bb1
cmpb $0x0, 0x11(%rbx)
jne 0x2a7ba7
movl $0x1, %esi
callq *0x40(%rax)
cmpb $0x5, 0x15(%rbx)
je 0x2a7bb1
movb $0x1, 0x15(%rbx)
movb 0x10(%rbx), %al
movb %al, 0x16(%rbx)
jmp 0x2a7b1f
// File: /workspace/github_c_makefile_star2_O1/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 0x2a8437
movq %rbx, %rdi
callq 0x281b53
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
movq %rbx, %rsi
callq 0x29bf75
movw $0x8, %bp
testl %eax, %eax
jle 0x2a8470
cmpl $0x1, %eax
jne 0x2a8495
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
movq %rsp, %rsi
callq 0x29c4f4
testl %eax, %eax
jne 0x2a8495
jmp 0x2a848a
jne 0x2a8495
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
movq %rsp, %rsi
callq 0x29c4f4
cmpl $0x2, %eax
jge 0x2a8495
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_O1/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 0x29c498
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 0x2a84f6
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_O1/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
testb $0x2d, 0x8(%rdi)
jne 0x2a85ad
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
movq %rbx, %rsi
callq 0x29bf75
cmpl $0x1, %eax
ja 0x2a8540
movq 0x10(%rbx), %rdi
movl 0xc(%rbx), %edx
movzbl 0xa(%rbx), %ecx
leaq 0x8(%rsp), %rsi
callq 0x29c4f4
cmpl $0x2, %eax
jl 0x2a858e
movsd (%rbx), %xmm0
cvttsd2si %xmm0, %rcx
movq %rcx, 0x8(%rsp)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2a855a
jnp 0x2a858e
movabsq $-0x8000000000000, %rdx # imm = 0xFFF8000000000000
addq %rcx, %rdx
shrq $0x34, %rdx
movw $0x8, %ax
cmpl $0xfff, %edx            # imm = 0xFFF
jb 0x2a859a
xorps %xmm1, %xmm1
cvtsi2sd %rcx, %xmm1
movq %xmm0, %rcx
movq %xmm1, %rdx
cmpq %rdx, %rcx
jne 0x2a859a
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
movw $0x4, %ax
movzwl 0x8(%rbx), %ecx
andl $0x3e40, %ecx           # imm = 0x3E40
movzwl %ax, %eax
orl %ecx, %eax
movw %ax, 0x8(%rbx)
andw $0xbfed, 0x8(%rbx)      # imm = 0xBFED
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2a8605
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 0x2a432d
movq %rbp, %rdi
movq %r12, %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2a432d
movzbl 0x8(%r14), %esi
movq %r13, %rdi
callq 0x281c96
movq %rax, %r12
movzbl 0x8(%r14), %esi
movq %rbp, %rdi
callq 0x281c96
testq %r12, %r12
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
jne 0x2a868c
testq %r15, %r15
je 0x2a86a4
movb $0x7, (%r15)
jmp 0x2a86a4
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 0x2a86b2
cmpl $0x0, 0x60(%rsp)
je 0x2a86bc
leaq 0x40(%rsp), %rdi
callq 0x29b45b
testb $0x24, 0x11(%rsp)
jne 0x2a86ca
cmpl $0x0, 0x28(%rsp)
je 0x2a86d4
leaq 0x8(%rsp), %rdi
callq 0x29b45b
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_O1/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 0x2a8722
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 0x2a8730
andl %edx, %r8d
btl $0xe, %r8d
jae 0x2a8732
movl (%rdi), %eax
subl (%rsi), %eax
popq %rbx
retq
btl $0xe, %edx
jb 0x2a8752
testl %eax, %eax
jle 0x2a872e
movq 0x10(%rdi), %rcx
xorl %edx, %edx
cmpb $0x0, (%rcx,%rdx)
jne 0x2a8770
incq %rdx
cmpq %rdx, %rax
jne 0x2a8742
jmp 0x2a872e
testl %ecx, %ecx
jle 0x2a876a
movq 0x10(%rsi), %rax
xorl %edx, %edx
cmpb $0x0, (%rax,%rdx)
jne 0x2a8777
incq %rdx
cmpq %rdx, %rcx
jne 0x2a875c
movl (%rdi), %eax
subl %ecx, %eax
jmp 0x2a8730
movl $0x1, %eax
jmp 0x2a8730
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2a8730
// File: /workspace/github_c_makefile_star2_O1/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
xorl %eax, %eax
cmpb $0x3, (%r14)
jb 0x2a8799
movq %r14, %rdi
callq 0x2a87bf
xorl %ecx, %ecx
testl %eax, %eax
jne 0x2a87a8
cmpb $0x0, (%r14)
sete %cl
xorl %eax, %eax
movl $0x0, 0x20(%rbx)
testb %cl, %cl
jne 0x2a87b7
movb $0x1, 0x2(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, 0x4(%rsp)
cmpb $0x4, (%rdi)
jne 0x2a87d7
movl 0x4(%rbx), %ebp
jmp 0x2a8813
movb $0x1, (%rbx)
movq 0x21e007(%rip), %rax    # 0x4c67e8
testq %rax, %rax
je 0x2a87f6
movl $0x19a, %edi            # imm = 0x19A
callq *%rax
movl $0xa, %ebp
testl %eax, %eax
jne 0x2a880f
movq 0x18(%rbx), %rsi
movq 0x48(%rbx), %rdx
leaq 0x4(%rsp), %r8
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x2a8848
movl %eax, %ebp
testl %ebp, %ebp
je 0x2a881c
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x18(%rbx), %rdi
callq 0x27c490
movq $0x0, 0x18(%rbx)
movl 0x4(%rsp), %eax
testl %eax, %eax
je 0x2a8838
movl %eax, 0x4(%rbx)
cmpl $0x0, 0x4(%rbx)
je 0x2a8813
cmpb $0x0, (%rbx)
jne 0x2a8813
movb $0x2, (%rbx)
jmp 0x2a8813
// File: /workspace/github_c_makefile_star2_O1/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 0x2a88cf
movq %rsi, %r15
movq %r8, (%rsp)
movq 0x80(%rbx), %r13
movq %r13, %rdi
callq 0x2a5a3a
movq %rax, %r14
testq %rax, %rax
je 0x2a88d4
movq %r13, %rdi
movl %r12d, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x2a5a82
movzwl 0x10(%r14), %ecx
testw %cx, %cx
je 0x2a88a2
xorl %eax, %eax
cmpw 0x8(%r13), %cx
jbe 0x2a88d9
leaq 0x136a76(%rip), %rsi    # 0x3df31f
leaq 0x136b80(%rip), %rdx    # 0x3df430
leaq 0x1368ce(%rip), %r8     # 0x3df185
movl $0xb, %edi
movl $0xff15, %ecx           # imm = 0xFF15
xorl %eax, %eax
callq 0x27e637
movl $0x2, %eax
jmp 0x2a88d9
xorl %r14d, %r14d
jmp 0x2a88ec
movl $0x1, %eax
cmpl $0x2, %eax
je 0x2a8901
movl $0x7, %r13d
testl %eax, %eax
movq (%rsp), %r8
jne 0x2a891f
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x2a533d
movl %eax, %r13d
jmp 0x2a8907
movl $0xb, %r13d
testq %r14, %r14
je 0x2a891f
movq 0x80(%rbx), %rax
movq 0x10(%rax), %rdi
movq %r14, %rsi
callq 0x28c3e7
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2a8b9d
pushq %rax
leaq 0x1367a8(%rip), %rsi    # 0x3df31f
leaq 0x1368b2(%rip), %rdx    # 0x3df430
leaq 0x136600(%rip), %r8     # 0x3df185
movl $0xb, %edi
movl $0x10fd1, %ecx          # imm = 0x10FD1
xorl %eax, %eax
callq 0x27e637
movl $0xb, %eax
popq %rcx
retq
movq %rdi, %rcx
movq 0x20(%rdi), %rdi
xorl %r8d, %r8d
movw %r8w, 0x46(%rcx)
andb $-0x7, 0x1(%rcx)
movzwl 0x56(%rcx), %edx
movw %dx, 0x58(%rcx,%rax,2)
leaq 0x88(%rcx), %rdx
movq 0x88(%rcx), %r9
movq %r9, 0x90(%rcx,%rax,8)
movw %r8w, 0x56(%rcx)
incl %eax
movb %al, 0x54(%rcx)
movzbl 0x2(%rcx), %r8d
jmp 0x2a8be0
// File: /workspace/github_c_makefile_star2_O1/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 0x2a8e5f
movb $0x0, 0x13(%rdi)
movq 0x8(%rdi), %rax
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2a8e5f
testb $0x10, 0x1(%rax)
je 0x2a8e59
movb $0x1, 0x13(%rdi)
cmpl %esi, 0x50(%rax)
jne 0x2a8e59
testl %ecx, %ecx
jne 0x2a8e56
cmpq %rdx, 0x30(%rax)
jne 0x2a8e59
movb $0x1, (%rax)
movq 0x28(%rax), %rax
jmp 0x2a8e38
retq
// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: btreeSetHasContent
static int btreeSetHasContent(BtShared *pBt, Pgno pgno){
  int rc = SQLITE_OK;
  if( !pBt->pHasContent ){
    assert( pgno<=pBt->nPage );
    pBt->pHasContent = sqlite3BitvecCreate(pBt->nPage);
    if( !pBt->pHasContent ){
      rc = SQLITE_NOMEM_BKPT;
    }
  }
  if( rc==SQLITE_OK && pgno<=sqlite3BitvecSize(pBt->pHasContent) ){
    rc = sqlite3BitvecSet(pBt->pHasContent, pgno);
  }
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpq $0x0, 0x60(%rdi)
je 0x2a9584
xorl %ebp, %ebp
movb $0x1, %r12b
jmp 0x2a95bd
movl 0x40(%r14), %r13d
movl $0x200, %edi            # imm = 0x200
callq 0x27c381
movq %rax, %r15
testq %rax, %rax
setne %r12b
je 0x2a95b4
xorl %ebp, %ebp
movl $0x200, %edx            # imm = 0x200
movq %r15, %rdi
xorl %esi, %esi
callq 0x173a0
movl %r13d, (%r15)
jmp 0x2a95b9
movl $0x7, %ebp
movq %r15, 0x60(%r14)
testb %r12b, %r12b
je 0x2a95cc
movq 0x60(%r14), %rdi
xorl %ebp, %ebp
cmpl %ebx, (%rdi)
jae 0x2a95dd
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x290c97
// File: /workspace/github_c_makefile_star2_O1/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 %rbx
movq %rdi, %rbx
movq 0x88(%rbx), %rax
cmpb $0x0, 0x8(%rax)
jne 0x2a9627
movq 0x50(%rax), %rcx
movzbl 0x9(%rax), %edx
movl 0x8(%rcx,%rdx), %esi
bswapl %esi
movzwl 0x18(%rax), %eax
movw %ax, 0x56(%rbx)
movq %rbx, %rdi
callq 0x2a8b64
testl %eax, %eax
je 0x2a95f6
jmp 0x2a9632
movl 0x18(%rax), %eax
decl %eax
movw %ax, 0x56(%rbx)
xorl %eax, %eax
popq %rbx
retq