LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeSorterMerge
static SorterRecord *vdbeSorterMerge(
  SortSubtask *pTask,             /* Calling thread context */
  SorterRecord *p1,               /* First list to merge */
  SorterRecord *p2                /* Second list to merge */
){
  SorterRecord *pFinal = 0;
  SorterRecord **pp = &pFinal;
  int bCached = 0;

  assert( p1!=0 && p2!=0 );
  for(;;){
    int res;
    res = pTask->xCompare(
        pTask, &bCached, SRVAL(p1), p1->nVal, SRVAL(p2), p2->nVal
    );

    if( res<=0 ){
      *pp = p1;
      pp = &p1->u.pNext;
      p1 = p1->u.pNext;
      if( p1==0 ){
        *pp = p2;
        break;
      }
    }else{
      *pp = p2;
      pp = &p2->u.pNext;
      p2 = p2->u.pNext;
      bCached = 0;
      if( p2==0 ){
        *pp = p1;
        break;
      }
    }
  }
  return pFinal;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x10(%rsp), %rbp
andq $0x0, (%rbp)
leaq 0xc(%rsp), %r12
andl $0x0, (%r12)
leaq 0x10(%rbx), %r13
leaq 0x10(%r15), %rdx
movl (%r15), %ecx
movl (%rbx), %r9d
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %r8
callq *0x40(%r14)
testl %eax, %eax
jg 0x2497e0
movq %r15, (%rbp)
movq %r15, %rbp
movq 0x8(%r15), %rax
addq $0x8, %rbp
movq %rax, %r15
testq %rax, %rax
jne 0x2497ac
jmp 0x249802
movq %rbx, (%rbp)
movq 0x8(%rbx), %rax
andl $0x0, 0xc(%rsp)
movq %rbx, %rbp
addq $0x8, %rbp
movq %rax, %rbx
testq %rax, %rax
jne 0x2497a8
movq %r15, (%rbp)
jmp 0x249806
movq %rbx, (%rbp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeSorterCompareText
static int vdbeSorterCompareText(
  SortSubtask *pTask,             /* Subtask context (for pKeyInfo) */
  int *pbKey2Cached,              /* True if pTask->pUnpacked is pKey2 */
  const void *pKey1, int nKey1,   /* Left side of comparison */
  const void *pKey2, int nKey2    /* Right side of comparison */
){
  const u8 * const p1 = (const u8 * const)pKey1;
  const u8 * const p2 = (const u8 * const)pKey2;
  const u8 * const v1 = &p1[ p1[0] ];   /* Pointer to value 1 */
  const u8 * const v2 = &p2[ p2[0] ];   /* Pointer to value 2 */

  int n1;
  int n2;
  int res;

  getVarint32NR(&p1[1], n1);
  getVarint32NR(&p2[1], n2);
  res = memcmp(v1, v2, (MIN(n1, n2) - 13)/2);
  if( res==0 ){
    res = n1 - n2;
  }

  if( res==0 ){
    if( pTask->pSorter->pKeyInfo->nKeyField>1 ){
      res = vdbeSorterCompareTail(
          pTask, pbKey2Cached, pKey1, nKey1, pKey2, nKey2
      );
    }
  }else{
    assert( !(pTask->pSorter->pKeyInfo->aSortFlags[0]&KEYINFO_ORDER_BIGNULL) );
    if( pTask->pSorter->pKeyInfo->aSortFlags[0] ){
      res = res * -1;
    }
  }

  return res;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, 0x8(%rsp)
movq %r8, %r14
movl %ecx, 0x4(%rsp)
movq %rdx, %r15
movq %rsi, 0x10(%rsp)
movq %rdi, %r13
movzbl (%rdx), %ebx
movzbl (%r8), %ebp
movzbl 0x1(%rdx), %eax
movl %eax, (%rsp)
testb %al, %al
jns 0x249950
leaq 0x1(%r15), %rdi
movq %rsp, %rsi
callq 0x2425d2
addq %r15, %rbx
addq %r14, %rbp
movzbl 0x1(%r14), %eax
movl %eax, 0xc(%rsp)
testb %al, %al
jns 0x249978
leaq 0x1(%r14), %rdi
leaq 0xc(%rsp), %r12
movq %r12, %rsi
callq 0x2425d2
movl (%r12), %eax
movl (%rsp), %ecx
movl %ecx, %r12d
subl %eax, %r12d
cmovll %ecx, %eax
addl $-0xd, %eax
pushq $0x2
popq %rcx
cltd
idivl %ecx
movslq %eax, %rdx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x172e0
testl %eax, %eax
cmovnel %eax, %r12d
movq 0x10(%r13), %rax
movq 0x28(%rax), %rcx
testl %r12d, %r12d
je 0x2499c0
movq 0x18(%rcx), %rcx
movl %r12d, %eax
negl %eax
cmpb $0x0, (%rcx)
cmovel %r12d, %eax
jmp 0x2499f0
xorl %eax, %eax
cmpw $0x2, 0x6(%rcx)
jb 0x2499f0
movq %r13, %rdi
movq 0x10(%rsp), %rsi
movq %r15, %rdx
movl 0x4(%rsp), %ecx
movq %r14, %r8
movl 0x8(%rsp), %r9d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x249a4b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeSorterCompare
static int vdbeSorterCompare(
  SortSubtask *pTask,             /* Subtask context (for pKeyInfo) */
  int *pbKey2Cached,              /* True if pTask->pUnpacked is pKey2 */
  const void *pKey1, int nKey1,   /* Left side of comparison */
  const void *pKey2, int nKey2    /* Right side of comparison */
){
  UnpackedRecord *r2 = pTask->pUnpacked;
  if( !*pbKey2Cached ){
    sqlite3VdbeRecordUnpack(pTask->pSorter->pKeyInfo, nKey2, pKey2, r2);
    *pbKey2Cached = 1;
  }
  return sqlite3VdbeRecordCompare(nKey1, pKey1, r2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq 0x18(%rdi), %r14
cmpl $0x0, (%rsi)
jne 0x249a34
movq %rsi, %r15
movq 0x10(%rdi), %rax
movq 0x28(%rax), %rdi
movl %r9d, %esi
movq %r8, %rdx
movq %r14, %rcx
callq 0x243365
movl $0x1, (%r15)
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x245e6a
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeSorterCompareTail
static int vdbeSorterCompareTail(
  SortSubtask *pTask,             /* Subtask context (for pKeyInfo) */
  int *pbKey2Cached,              /* True if pTask->pUnpacked is pKey2 */
  const void *pKey1, int nKey1,   /* Left side of comparison */
  const void *pKey2, int nKey2    /* Right side of comparison */
){
  UnpackedRecord *r2 = pTask->pUnpacked;
  if( *pbKey2Cached==0 ){
    sqlite3VdbeRecordUnpack(pTask->pSorter->pKeyInfo, nKey2, pKey2, r2);
    *pbKey2Cached = 1;
  }
  return sqlite3VdbeRecordCompareWithSkip(nKey1, pKey1, r2, 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %rbx
movq 0x18(%rdi), %r14
cmpl $0x0, (%rsi)
jne 0x249a80
movq %rsi, %r15
movq 0x10(%rdi), %rax
movq 0x28(%rax), %rdi
movl %r9d, %esi
movq %r8, %rdx
movq %r14, %rcx
callq 0x243365
movl $0x1, (%r15)
pushq $0x1
popq %rcx
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x246031
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeSorterOpenTempFile
static int vdbeSorterOpenTempFile(
  sqlite3 *db,                    /* Database handle doing sort */
  i64 nExtend,                    /* Attempt to extend file to this size */
  sqlite3_file **ppFd
){
  int rc;
  if( sqlite3FaultSim(202) ) return SQLITE_IOERR_ACCESS;
  rc = sqlite3OsOpenMalloc(db->pVfs, 0, ppFd,
      SQLITE_OPEN_TEMP_JOURNAL |
      SQLITE_OPEN_READWRITE    | SQLITE_OPEN_CREATE |
      SQLITE_OPEN_EXCLUSIVE    | SQLITE_OPEN_DELETEONCLOSE, &rc
  );
  if( rc==SQLITE_OK ){
    i64 max = SQLITE_MAX_MMAP_SIZE;
    sqlite3OsFileControlHint(*ppFd, SQLITE_FCNTL_MMAP_SIZE, (void*)&max);
    if( nExtend>0 ){
      vdbeSorterExtendFile(db, *ppFd, nExtend);
    }
  }
  return rc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1f0ce3(%rip), %rax    # 0x43a798
testq %rax, %rax
je 0x249acc
movl $0xca, %edi
callq *%rax
movl %eax, %ecx
movl $0xd0a, %eax            # imm = 0xD0A
testl %ecx, %ecx
jne 0x249b24
movq (%r14), %rdi
leaq 0xc(%rsp), %r12
xorl %esi, %esi
movq %r15, %rdx
movl $0x101e, %ecx           # imm = 0x101E
movq %r12, %r8
callq 0x239c7c
movl %eax, (%r12)
testl %eax, %eax
jne 0x249b24
movq $0x7fff0000, 0x10(%rsp) # imm = 0x7FFF0000
movq (%r15), %rdi
movq (%rdi), %rax
testq %rax, %rax
je 0x249b0d
pushq $0x12
popq %rsi
leaq 0x10(%rsp), %rdx
callq *0x50(%rax)
testq %rbx, %rbx
jle 0x249b20
movq (%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x249b30
movl 0xc(%rsp), %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeSorterExtendFile
static void vdbeSorterExtendFile(sqlite3 *db, sqlite3_file *pFd, i64 nByte){
  if( nByte<=(i64)(db->nMaxSorterMmap) && pFd->pMethods->iVersion>=3 ){
    void *p = 0;
    int chunksize = 4*1024;
    sqlite3OsFileControlHint(pFd, SQLITE_FCNTL_CHUNK_SIZE, &chunksize);
    sqlite3OsFileControlHint(pFd, SQLITE_FCNTL_SIZE_HINT, &nByte);
    sqlite3OsFetch(pFd, 0, (int)nByte, &p);
    sqlite3OsUnfetch(pFd, 0, p);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, 0x8(%rsp)
movslq 0xac(%rdi), %rax
cmpq %rdx, %rax
jl 0x249bab
movq %rsi, %rbx
movq (%rsi), %rax
cmpl $0x3, (%rax)
jl 0x249bab
leaq 0x18(%rsp), %r14
andq $0x0, (%r14)
leaq 0x14(%rsp), %rdx
movl $0x1000, (%rdx)         # imm = 0x1000
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq *0x50(%rax)
movq (%rbx), %rax
pushq $0x5
popq %rsi
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rdx
callq *0x50(%rax)
movl (%r15), %edx
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rcx
callq *0x88(%rax)
movq (%r14), %rdx
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x90(%rax)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbePmaWriterInit
static void vdbePmaWriterInit(
  sqlite3_file *pFd,              /* File handle to write to */
  PmaWriter *p,                   /* Object to populate */
  int nBuf,                       /* Buffer size */
  i64 iStart                      /* Offset of pFd to begin writing at */
){
  memset(p, 0, sizeof(PmaWriter));
  p->aBuffer = (u8*)sqlite3Malloc(nBuf);
  if( !p->aBuffer ){
    p->eFWErr = SQLITE_NOMEM_BKPT;
  }else{
    p->iBufEnd = p->iBufStart = (iStart % nBuf);
    p->iWriteOff = iStart - p->iBufStart;
    p->nBuffer = nBuf;
    p->pFd = pFd;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsi)
movups %xmm0, 0x10(%rsi)
movups %xmm0, (%rsi)
movslq %edx, %r12
movq %r12, %rdi
callq 0x21f6df
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x249c07
movq %r15, %rax
cqto
idivq %r12
movl %edx, 0x14(%rbx)
movl %edx, 0x18(%rbx)
subq %rdx, %r15
movq %r15, 0x20(%rbx)
movl %r12d, 0x10(%rbx)
movq %r14, 0x28(%rbx)
jmp 0x249c0d
movl $0x7, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbePmaWriteBlob
static void vdbePmaWriteBlob(PmaWriter *p, u8 *pData, int nData){
  int nRem = nData;
  while( nRem>0 && p->eFWErr==0 ){
    int nCopy = nRem;
    if( nCopy>(p->nBuffer - p->iBufEnd) ){
      nCopy = p->nBuffer - p->iBufEnd;
    }

    memcpy(&p->aBuffer[p->iBufEnd], &pData[nData-nRem], nCopy);
    p->iBufEnd += nCopy;
    if( p->iBufEnd==p->nBuffer ){
      p->eFWErr = sqlite3OsWrite(p->pFd,
          &p->aBuffer[p->iBufStart], p->iBufEnd - p->iBufStart,
          p->iWriteOff + p->iBufStart
      );
      p->iBufStart = p->iBufEnd = 0;
      p->iWriteOff += p->nBuffer;
    }
    assert( p->iBufEnd<p->nBuffer );

    nRem -= nCopy;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl %edx, %ebp
testl %ebp, %ebp
jle 0x249cd1
cmpl $0x0, (%r15)
jne 0x249cd1
movl 0x10(%r15), %r13d
movslq 0x18(%r15), %rdi
subl %edi, %r13d
cmpl %r13d, %ebp
cmovll %ebp, %r13d
addq 0x8(%r15), %rdi
movl %ebx, %eax
subl %ebp, %eax
movslq %eax, %rsi
addq %r14, %rsi
movslq %r13d, %r12
movq %r12, %rdx
callq 0x17630
addl 0x18(%r15), %r12d
movl %r12d, 0x18(%r15)
cmpl 0x10(%r15), %r12d
jne 0x249ccc
movq 0x28(%r15), %rdi
movslq 0x14(%r15), %rcx
movq 0x8(%r15), %rsi
addq %rcx, %rsi
subl %ecx, %r12d
addq 0x20(%r15), %rcx
movq (%rdi), %rax
movl %r12d, %edx
callq *0x18(%rax)
movl %eax, (%r15)
andq $0x0, 0x14(%r15)
movslq 0x10(%r15), %rax
addq %rax, 0x20(%r15)
subl %r13d, %ebp
jmp 0x249c5a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbePmaWriterFinish
static int vdbePmaWriterFinish(PmaWriter *p, i64 *piEof){
  int rc;
  if( p->eFWErr==0 && ALWAYS(p->aBuffer) && p->iBufEnd>p->iBufStart ){
    p->eFWErr = sqlite3OsWrite(p->pFd,
        &p->aBuffer[p->iBufStart], p->iBufEnd - p->iBufStart,
        p->iWriteOff + p->iBufStart
    );
  }
  *piEof = (p->iWriteOff + p->iBufEnd);
  sqlite3_free(p->aBuffer);
  rc = p->eFWErr;
  memset(p, 0, sizeof(PmaWriter));
  return rc;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpl $0x0, (%rdi)
je 0x249d1b
movslq 0x18(%rbx), %rax
addq 0x20(%rbx), %rax
movq %rax, (%r14)
movq 0x8(%rbx), %rdi
callq 0x21f7f9
movl (%rbx), %eax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x249cef
movl 0x18(%rbx), %edx
movslq 0x14(%rbx), %rcx
cmpl %ecx, %edx
jle 0x249cef
movq 0x28(%rbx), %rdi
addq %rcx, %rsi
subl %ecx, %edx
addq 0x20(%rbx), %rcx
movq (%rdi), %rax
callq *0x18(%rax)
movl %eax, (%rbx)
jmp 0x249cef
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeMergeEngineLevel0
static int vdbeMergeEngineLevel0(
  SortSubtask *pTask,             /* Sorter task to read from */
  int nPMA,                       /* Number of PMAs to read */
  i64 *piOffset,                  /* IN/OUT: Readr offset in pTask->file */
  MergeEngine **ppOut             /* OUT: New merge-engine */
){
  MergeEngine *pNew;              /* Merge engine to return */
  i64 iOff = *piOffset;
  int i;
  int rc = SQLITE_OK;

  *ppOut = pNew = vdbeMergeEngineNew(nPMA);
  if( pNew==0 ) rc = SQLITE_NOMEM_BKPT;

  for(i=0; i<nPMA && rc==SQLITE_OK; i++){
    i64 nDummy = 0;
    PmaReader *pReadr = &pNew->aReadr[i];
    rc = vdbePmaReaderInit(pTask, &pTask->file, iOff, pReadr, &nDummy);
    iOff = pReadr->iEof;
  }

  if( rc!=SQLITE_OK ){
    vdbeMergeEngineFree(pNew);
    *ppOut = 0;
  }
  *piOffset = iOff;
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movl %esi, %ebp
movq %rdi, %r15
movq %rdx, 0x18(%rsp)
movq (%rdx), %rbx
movl %esi, %edi
callq 0x249fe6
movq %r14, 0x10(%rsp)
movq %rax, (%r14)
xorl %r12d, %r12d
movq %rax, (%rsp)
testq %rax, %rax
pushq $0x7
popq %r14
cmovnel %r12d, %r14d
movq %r15, 0x28(%rsp)
leaq 0x48(%r15), %rax
movq %rax, 0x20(%rsp)
movslq %ebp, %rax
movq %rax, 0x30(%rsp)
xorl %r13d, %r13d
cmpq 0x30(%rsp), %r13
jge 0x249fb5
testl %r14d, %r14d
jne 0x249fb5
movq (%rsp), %rax
movq 0x18(%rax), %r15
leaq (%r15,%r12), %rbp
movq 0x28(%rsp), %rdi
movq %rbp, %rsi
movq 0x20(%rsp), %rdx
movq %rbx, %rcx
callq 0x24a042
testl %eax, %eax
je 0x249f74
movl %eax, %r14d
jmp 0x249f9d
andq $0x0, 0x8(%rsp)
movq %rbp, %rdi
leaq 0x8(%rsp), %rsi
callq 0x24a178
movl %eax, %r14d
movq 0x8(%rsp), %rax
addq (%r15,%r12), %rax
movq %rax, 0x8(%r15,%r12)
testl %r14d, %r14d
je 0x249fab
movq 0x8(%r15,%r12), %rbx
incq %r13
addq $0x50, %r12
jmp 0x249f3e
movq %rbp, %rdi
callq 0x24a224
jmp 0x249f6f
testl %r14d, %r14d
je 0x249fcc
movq (%rsp), %rdi
callq 0x239a54
movq 0x10(%rsp), %rax
andq $0x0, (%rax)
movq 0x18(%rsp), %rax
movq %rbx, (%rax)
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeMergeEngineNew
static MergeEngine *vdbeMergeEngineNew(int nReader){
  int N = 2;                      /* Smallest power of two >= nReader */
  int nByte;                      /* Total bytes of space to allocate */
  MergeEngine *pNew;              /* Pointer to allocated object to return */

  assert( nReader<=SORTER_MAX_MERGE_COUNT );

  while( N<nReader ) N += N;
  nByte = sizeof(MergeEngine) + N * (sizeof(int) + sizeof(PmaReader));

  pNew = sqlite3FaultSim(100) ? 0 : (MergeEngine*)sqlite3MallocZero(nByte);
  if( pNew ){
    pNew->nTree = N;
    pNew->pTask = 0;
    pNew->aReadr = (PmaReader*)&pNew[1];
    pNew->aTree = (int*)&pNew->aReadr[N];
  }
  return pNew;
}

// Assembly:
pushq %rbx
pushq $0x2
popq %rax
movl %eax, %ebx
leal (%rbx,%rbx), %eax
cmpl %edi, %ebx
jl 0x249fea
movq 0x1f079e(%rip), %rax    # 0x43a798
testq %rax, %rax
je 0x24a008
pushq $0x64
popq %rdi
callq *%rax
testl %eax, %eax
jne 0x24a03e
imull $0x54, %ebx, %eax
addl $0x20, %eax
movslq %eax, %rdi
callq 0x2227e2
testq %rax, %rax
je 0x24a03e
movslq %ebx, %rcx
movl %ebx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x20(%rax), %rdx
movq %rdx, 0x18(%rax)
imulq $0x50, %rcx, %rcx
addq %rax, %rcx
addq $0x20, %rcx
movq %rcx, 0x10(%rax)
jmp 0x24a040
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbePmaReaderSeek
static int vdbePmaReaderSeek(
  SortSubtask *pTask,             /* Task context */
  PmaReader *pReadr,              /* Reader whose cursor is to be moved */
  SorterFile *pFile,              /* Sorter file to read from */
  i64 iOff                        /* Offset in pFile */
){
  int rc = SQLITE_OK;

  assert( pReadr->pIncr==0 || pReadr->pIncr->bEof==0 );

  if( sqlite3FaultSim(201) ) return SQLITE_IOERR_READ;
  if( pReadr->aMap ){
    sqlite3OsUnfetch(pReadr->pFd, 0, pReadr->aMap);
    pReadr->aMap = 0;
  }
  pReadr->iReadOff = iOff;
  pReadr->iEof = pFile->iEof;
  pReadr->pFd = pFile->pFd;

  rc = vdbeSorterMapFile(pTask, pFile, &pReadr->aMap);
  if( rc==SQLITE_OK && pReadr->aMap==0 ){
    int pgsz = pTask->pSorter->pgsz;
    int iBuf = pReadr->iReadOff % pgsz;
    if( pReadr->aBuffer==0 ){
      pReadr->aBuffer = (u8*)sqlite3Malloc(pgsz);
      if( pReadr->aBuffer==0 ) rc = SQLITE_NOMEM_BKPT;
      pReadr->nBuffer = pgsz;
    }
    if( rc==SQLITE_OK && iBuf ){
      int nRead = pgsz - iBuf;
      if( (pReadr->iReadOff + nRead) > pReadr->iEof ){
        nRead = (int)(pReadr->iEof - pReadr->iReadOff);
      }
      rc = sqlite3OsRead(
          pReadr->pFd, &pReadr->aBuffer[iBuf], nRead, pReadr->iReadOff
      );
      testcase( rc!=SQLITE_OK );
    }
  }

  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq 0x1f073b(%rip), %rax    # 0x43a798
testq %rax, %rax
je 0x24a078
movl $0xc9, %edi
callq *%rax
movl %eax, %ecx
movl $0x10a, %eax            # imm = 0x10A
testl %ecx, %ecx
jne 0x24a16f
movq 0x40(%rbx), %rdx
testq %rdx, %rdx
je 0x24a095
movq 0x18(%rbx), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x90(%rax)
andq $0x0, 0x40(%rbx)
movq %r12, (%rbx)
movq 0x8(%r15), %rdx
movq %rdx, 0x8(%rbx)
movq (%r15), %rdi
movq %rdi, 0x18(%rbx)
movq 0x10(%r14), %rax
movq 0x20(%rax), %rax
movslq 0xac(%rax), %rax
cmpq %rax, %rdx
jg 0x24a0e9
movq (%rdi), %rax
cmpl $0x3, (%rax)
jl 0x24a0e9
leaq 0x40(%rbx), %r15
xorl %esi, %esi
movq %r15, %rcx
callq *0x88(%rax)
testl %eax, %eax
jne 0x24a16f
cmpq $0x0, (%r15)
movl $0x0, %eax
jne 0x24a16f
movq 0x10(%r14), %rax
movl 0xc(%rax), %ebp
movslq %ebp, %r15
movq (%rbx), %rax
movq 0x30(%rbx), %rsi
cqto
idivq %r15
movq %rdx, %r14
xorl %eax, %eax
testq %rsi, %rsi
jne 0x24a127
movq %r15, %rdi
callq 0x21f6df
movq %rax, %rsi
movq %rax, 0x30(%rbx)
xorl %ecx, %ecx
testq %rax, %rax
pushq $0x7
popq %rax
cmovnel %ecx, %eax
movl %r15d, 0x38(%rbx)
testl %eax, %eax
sete %cl
testq %r14, %r14
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x24a16f
subl %r14d, %ebp
movslq %ebp, %rdx
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
leaq (%rcx,%rdx), %rdi
movl %eax, %r8d
subl %ecx, %r8d
cmpq %rax, %rdi
cmovgl %r8d, %edx
movq 0x18(%rbx), %rdi
addq %r14, %rsi
movq (%rdi), %rax
movq 0x10(%rax), %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *%rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbePmaReadVarint
static int vdbePmaReadVarint(PmaReader *p, u64 *pnOut){
  int iBuf;

  if( p->aMap ){
    p->iReadOff += sqlite3GetVarint(&p->aMap[p->iReadOff], pnOut);
  }else{
    iBuf = p->iReadOff % p->nBuffer;
    if( iBuf && (p->nBuffer-iBuf)>=9 ){
      p->iReadOff += sqlite3GetVarint(&p->aBuffer[iBuf], pnOut);
    }else{
      u8 aVarint[16], *a;
      int i = 0, rc;
      do{
        rc = vdbePmaReadBlob(p, 1, &a);
        if( rc ) return rc;
        aVarint[(i++)&0xf] = a[0];
      }while( (a[0]&0x80)!=0 );
      sqlite3GetVarint(aVarint, pnOut);
    }
  }

  return SQLITE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x40(%rdi), %rdi
testq %rdi, %rdi
je 0x24a19b
addq %rax, %rdi
jmp 0x24a1c0
movslq 0x38(%rbx), %rcx
cqto
idivq %rcx
testq %rdx, %rdx
setne %al
subl %edx, %ecx
cmpl $0x9, %ecx
setge %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x24a1dd
addq 0x30(%rbx), %rdx
movq %rdx, %rdi
movq %r14, %rsi
callq 0x234e18
movzbl %al, %eax
addq %rax, (%rbx)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %r12d, %r12d
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x24a3d6
testl %eax, %eax
jne 0x24a1d0
movq 0x8(%rsp), %rax
movb (%rax), %al
leal 0x1(%r12), %ecx
andl $0xf, %r12d
movb %al, 0x10(%rsp,%r12)
movl %ecx, %r12d
testb %al, %al
js 0x24a1e8
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x234e18
jmp 0x24a1ce
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbePmaReaderNext
static int vdbePmaReaderNext(PmaReader *pReadr){
  int rc = SQLITE_OK;             /* Return Code */
  u64 nRec = 0;                   /* Size of record in bytes */


  if( pReadr->iReadOff>=pReadr->iEof ){
    IncrMerger *pIncr = pReadr->pIncr;
    int bEof = 1;
    if( pIncr ){
      rc = vdbeIncrSwap(pIncr);
      if( rc==SQLITE_OK && pIncr->bEof==0 ){
        rc = vdbePmaReaderSeek(
            pIncr->pTask, pReadr, &pIncr->aFile[0], pIncr->iStartOff
        );
        bEof = 0;
      }
    }

    if( bEof ){
      /* This is an EOF condition */
      vdbePmaReaderClear(pReadr);
      testcase( rc!=SQLITE_OK );
      return rc;
    }
  }

  if( rc==SQLITE_OK ){
    rc = vdbePmaReadVarint(pReadr, &nRec);
  }
  if( rc==SQLITE_OK ){
    pReadr->nKey = (int)nRec;
    rc = vdbePmaReadBlob(pReadr, (int)nRec, &pReadr->aKey);
    testcase( rc!=SQLITE_OK );
  }

  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
andq $0x0, 0x8(%rsp)
movq %rdi, %rbx
movq (%rdi), %rax
cmpq 0x8(%rdi), %rax
jge 0x24a261
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x24a178
testl %eax, %eax
je 0x24a399
movl %eax, %r15d
jmp 0x24a387
movq 0x48(%rbx), %r14
testq %r14, %r14
je 0x24a37c
movq %rbx, 0x18(%rsp)
movq 0x10(%r14), %rcx
leaq 0x38(%r14), %rax
movq %rax, 0x10(%rsp)
movq (%r14), %rax
movq 0x8(%r14), %rdx
movq %rdx, 0x28(%rsp)
movq 0x38(%r14), %rdi
movq 0x10(%rax), %rax
movl 0xc(%rax), %edx
leaq 0x38(%rsp), %rsi
movq %rcx, 0x20(%rsp)
callq 0x249bb5
xorl %ebp, %ebp
testl %ebp, %ebp
jne 0x24a335
movq 0x28(%rsp), %rcx
movq 0x10(%rcx), %rax
movq 0x18(%rcx), %r12
movslq 0x4(%rax), %rax
imulq $0x50, %rax, %r15
cmpq $0x0, 0x18(%r12,%r15)
je 0x24a335
movslq 0x14(%r12,%r15), %r13
movslq 0x50(%rsp), %rax
movq 0x58(%rsp), %rbx
addq %r13, %rbx
addq %rax, %rbx
movq %r13, %rdi
callq 0x24289c
cltq
addq %rbx, %rax
movslq 0x18(%r14), %rcx
addq 0x20(%rsp), %rcx
cmpq %rcx, %rax
jg 0x24a335
addq %r15, %r12
leaq 0x38(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x249c19
movq 0x28(%r12), %rsi
movq %rbx, %rdi
movl %r13d, %edx
callq 0x249c45
movq 0x8(%r14), %rdi
leaq 0x34(%rsp), %rsi
callq 0x24a553
movl %eax, %ebp
jmp 0x24a2a8
leaq 0x40(%r14), %rsi
leaq 0x38(%rsp), %rdi
callq 0x249ce0
movl %eax, %r15d
testl %ebp, %ebp
cmovnel %ebp, %r15d
movq 0x10(%rsp), %rax
movups (%rax), %xmm0
movups %xmm0, 0x28(%r14)
movq 0x10(%r14), %rcx
cmpq %rcx, 0x30(%r14)
jne 0x24a36b
movl $0x1, 0x1c(%r14)
testl %r15d, %r15d
movq 0x18(%rsp), %rbx
jne 0x24a37f
cmpl $0x0, 0x1c(%r14)
je 0x24a3b7
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x239ab6
movl %r15d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x8(%rsp), %esi
movl %esi, 0x14(%rbx)
leaq 0x28(%rbx), %rdx
movq %rbx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24a3d6
movq (%r14), %rdi
addq $0x28, %r14
movq %rbx, %rsi
movq %r14, %rdx
callq 0x24a042
testl %eax, %eax
jne 0x24a259
jmp 0x24a244
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: vdbeIncrMergerNew
static int vdbeIncrMergerNew(
  SortSubtask *pTask,     /* The thread that will be using the new IncrMerger */
  MergeEngine *pMerger,   /* The MergeEngine that the IncrMerger will control */
  IncrMerger **ppOut      /* Write the new IncrMerger here */
){
  int rc = SQLITE_OK;
  IncrMerger *pIncr = *ppOut = (IncrMerger*)
       (sqlite3FaultSim(100) ? 0 : sqlite3MallocZero(sizeof(*pIncr)));
  if( pIncr ){
    pIncr->pMerger = pMerger;
    pIncr->pTask = pTask;
    pIncr->mxSz = MAX(pTask->pSorter->mxKeysize+9,pTask->pSorter->mxPmaSize/2);
    pTask->file2.iEof += pIncr->mxSz;
  }else{
    vdbeMergeEngineFree(pMerger);
    rc = SQLITE_NOMEM_BKPT;
  }
  return rc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x1f00d1(%rip), %rax    # 0x43a798
testq %rax, %rax
je 0x24a6db
pushq $0x64
popq %rdi
callq *%rax
testl %eax, %eax
je 0x24a6db
andq $0x0, (%r15)
jmp 0x24a71b
pushq $0x48
popq %rdi
callq 0x2227e2
movq %rax, (%r15)
testq %rax, %rax
je 0x24a71b
movq %rax, %rcx
movq %r14, 0x8(%rax)
movq %rbx, (%rax)
movq 0x10(%rbx), %rdx
movl 0x4(%rdx), %eax
movl 0x8(%rdx), %esi
addl $0x9, %esi
pushq $0x2
popq %rdi
cltd
idivl %edi
cmpl %eax, %esi
cmovlel %eax, %esi
movl %esi, 0x18(%rcx)
movslq %esi, %rax
addq %rax, 0x60(%rbx)
xorl %eax, %eax
jmp 0x24a726
movq %r14, %rdi
callq 0x239a54
pushq $0x7
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3FindCollSeq
SQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(
  sqlite3 *db,          /* Database connection to search */
  u8 enc,               /* Desired text encoding */
  const char *zName,    /* Name of the collating sequence.  Might be NULL */
  int create            /* True to create CollSeq if doesn't already exist */
){
  CollSeq *pColl;
  assert( SQLITE_UTF8==1 && SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );
  assert( enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE );
  if( zName ){
    pColl = findCollSeqEntry(db, zName, create);
    if( pColl ) pColl += enc-1;
  }else{
    pColl = db->pDfltColl;
  }
  return pColl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
testq %rdx, %rdx
je 0x24a8ba
movl %ecx, %ebp
movq %rdx, %r15
movl %esi, %ebx
leaq 0x238(%r14), %r13
movq %r13, %rdi
movq %rdx, %rsi
callq 0x24a8e6
movq %rax, %r12
testq %rax, %rax
setne %al
testl %ebp, %ebp
sete %cl
orb %al, %cl
jne 0x24a8c0
movq %r15, %rdi
callq 0x2211ac
movl %eax, %ebp
leaq 0x79(%rbp), %rsi
movq %r14, %rdi
callq 0x2258ed
testq %rax, %rax
je 0x24a8d5
movq %rax, %r12
incq %rbp
movl %ebx, 0x4(%rsp)
movq %rax, %rbx
addq $0x78, %rbx
movq %rbx, (%rax)
movb $0x1, 0x8(%rax)
movq %rbx, 0x28(%rax)
movb $0x2, 0x30(%rax)
movq %rbx, 0x50(%rax)
movb $0x3, 0x58(%rax)
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x17630
movq %r13, %rdi
movq %rbx, %rsi
movl 0x4(%rsp), %ebx
movq %r12, %rdx
callq 0x24a8f4
testq %rax, %rax
je 0x24a8c5
movq %rax, %r15
movq %r14, %rdi
callq 0x224bb1
movq %r14, %rdi
movq %r15, %rsi
callq 0x22d0fc
jmp 0x24a8d5
movq 0x10(%r14), %rax
jmp 0x24a8d7
testq %r12, %r12
je 0x24a8d5
movzbl %bl, %eax
imulq $0x28, %rax, %rax
addq %r12, %rax
addq $-0x28, %rax
jmp 0x24a8d7
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: findElementWithHash
static HashElem *findElementWithHash(
  const Hash *pH,     /* The pH to be searched */
  const char *pKey,   /* The key we are searching for */
  unsigned int *pHash /* Write the hash value here */
){
  HashElem *elem;                /* Used to loop thru the element list */
  unsigned int count;            /* Number of elements left to test */
  unsigned int h;                /* The computed hash */
  static HashElem nullElement = { 0, 0, 0, 0 };

  if( pH->ht ){   /*OPTIMIZATION-IF-TRUE*/
    struct _ht *pEntry;
    h = strHash(pKey) % pH->htsize;
    pEntry = &pH->ht[h];
    elem = pEntry->chain;
    count = pEntry->count;
  }else{
    h = 0;
    elem = pH->first;
    count = pH->count;
  }
  if( pHash ) *pHash = h;
  while( count-- ){
    assert( elem!=0 );
    if( sqlite3StrICmp(elem->pKey,pKey)==0 ){
      return elem;
    }
    elem = elem->next;
  }
  return &nullElement;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rdi), %r12
testq %r12, %r12
je 0x24ab13
movq %rbx, %rdi
callq 0x24ab59
xorl %edx, %edx
divl (%r15)
movq %rdx, %rax
shlq $0x4, %rax
addq %rax, %r12
movq %r12, %r15
jmp 0x24ab19
leaq 0x4(%r15), %r12
xorl %edx, %edx
movl (%r12), %ebp
movq 0x8(%r15), %r15
testq %r14, %r14
je 0x24ab29
movl %edx, (%r14)
leaq 0x1f32e8(%rip), %r14    # 0x43de18
subl $0x1, %ebp
jb 0x24ab4d
movq 0x18(%r15), %rdi
movq %rbx, %rsi
callq 0x221779
testl %eax, %eax
je 0x24ab4a
movq (%r15), %r15
jmp 0x24ab30
movq %r15, %r14
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: strHash
static unsigned int strHash(const char *z){
  unsigned int h = 0;
  unsigned char c;
  while( (c = (unsigned char)*z++)!=0 ){     /*OPTIMIZATION-IF-TRUE*/
    /* Knuth multiplicative hashing.  (Sorting & Searching, p. 510).
    ** 0x9e3779b1 is 2654435761 which is the closest prime number to
    ** (2**32)*golden_ratio, where golden_ratio = (sqrt(5) - 1)/2. */
    h += sqlite3UpperToLower[c];
    h *= 0x9e3779b1;
  }
  return h;
}

// Assembly:
xorl %eax, %eax
leaq 0x126b8e(%rip), %rcx    # 0x3716f0
movzbl (%rdi), %edx
testq %rdx, %rdx
je 0x24ab7b
incq %rdi
movzbl (%rdx,%rcx), %edx
addl %edx, %eax
imull $0x9e3779b1, %eax, %eax # imm = 0x9E3779B1
jmp 0x24ab62
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: corruptSchema
static void corruptSchema(
  InitData *pData,     /* Initialization context */
  const char *zObj,    /* Object being parsed at the point of error */
  const char *zExtra   /* Error information */
){
  sqlite3 *db = pData->db;
  if( db->mallocFailed ){
    pData->rc = SQLITE_NOMEM_BKPT;
  }else if( pData->pzErrMsg[0]!=0 ){
    /* A error message has already been generated.  Do not overwrite it */
  }else if( pData->mInitFlags & INITFLAG_AlterTable ){
    *pData->pzErrMsg = sqlite3DbStrDup(db, zExtra);
    pData->rc = SQLITE_ERROR;
  }else if( db->flags & SQLITE_WriteSchema ){
    pData->rc = SQLITE_CORRUPT_BKPT;
  }else{
    char *z;
    if( zObj==0 ) zObj = "?";
    z = sqlite3MPrintf(db, "malformed database schema (%s)", zObj);
    if( zExtra && zExtra[0] ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra);
    *pData->pzErrMsg = z;
    pData->rc = SQLITE_CORRUPT_BKPT;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r15
cmpb $0x0, 0x61(%r15)
je 0x24abf5
pushq $0x7
popq %rax
movl %eax, 0x14(%rbx)
jmp 0x24abff
movq 0x8(%rbx), %rax
cmpq $0x0, (%rax)
je 0x24ac05
popq %rbx
popq %r14
popq %r15
retq
movq %rdx, %r14
testb $0x1, 0x18(%rbx)
jne 0x24ac64
testb $0x1, 0x30(%r15)
jne 0x24ac7d
testq %rsi, %rsi
leaq 0xcc22e(%rip), %rdx     # 0x316e4d
cmovneq %rsi, %rdx
leaq 0x12bf09(%rip), %rsi    # 0x376b33
movq %r15, %rdi
xorl %eax, %eax
callq 0x226ec3
testq %r14, %r14
je 0x24ac56
cmpb $0x0, (%r14)
je 0x24ac56
leaq 0x12bf0c(%rip), %rsi    # 0x376b52
movq %r15, %rdi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x226ec3
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
movl $0x1f57e, %edi          # imm = 0x1F57E
jmp 0x24ac82
movq %r15, %rdi
movq %r14, %rsi
callq 0x22572a
movq 0x8(%rbx), %rcx
movq %rax, (%rcx)
pushq $0x1
jmp 0x24abef
movl $0x1f577, %edi          # imm = 0x1F577
callq 0x232547
jmp 0x24abf0
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3GetUInt32
SQLITE_PRIVATE int sqlite3GetUInt32(const char *z, u32 *pI){
  u64 v = 0;
  int i;
  for(i=0; sqlite3Isdigit(z[i]); i++){
    v = v*10 + z[i] - '0';
    if( v>4294967296LL ){ *pI = 0; return 0; }
  }
  if( i==0 || z[i]!=0 ){ *pI = 0; return 0; }
  *pI = (u32)v;
  return 1;
}

// Assembly:
xorl %eax, %eax
movabsq $0x100000000, %rdx      # imm = 0x100000000
xorl %ecx, %ecx
movzbl (%rdi,%rax), %r8d
movq %r8, %r9
addq $-0x3a, %r9
cmpq $-0xa, %r9
jb 0x24acc5
movsbq %r8b, %r8
imulq $0xa, %rcx, %rcx
addq %r8, %rcx
addq $-0x30, %rcx
cmpq %rdx, %rcx
ja 0x24acdd
incq %rax
jmp 0x24ac9a
testq %rax, %rax
setne %al
testb %r8b, %r8b
sete %dl
xorl %edi, %edi
andb %al, %dl
cmovel %edi, %ecx
movzbl %dl, %eax
jmp 0x24ace1
xorl %ecx, %ecx
xorl %eax, %eax
movl %ecx, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3FindIndex
SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3 *db, const char *zName, const char *zDb){
  Index *p = 0;
  int i;
  /* All mutexes are required for schema access.  Make sure we hold them. */
  assert( zDb!=0 || sqlite3BtreeHoldsAllMutexes(db) );
  for(i=OMIT_TEMPDB; i<db->nDb; i++){
    int j = (i<2) ? i^1 : i;  /* Search TEMP before MAIN */
    Schema *pSchema = db->aDb[j].pSchema;
    assert( pSchema );
    if( zDb && sqlite3DbIsNamed(db, j, zDb)==0 ) continue;
    assert( sqlite3SchemaMutexHeld(db, j, 0) );
    p = sqlite3HashFind(&pSchema->idxHash, zName);
    if( p ) break;
  }
  return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %ebx, %ebx
xorl %ebp, %ebp
cmpl 0x28(%r12), %ebp
jge 0x24b0f3
xorl %esi, %esi
cmpl $0x2, %ebp
setb %sil
xorl %ebp, %esi
movq %rsi, %rax
shlq $0x5, %rax
movq 0x20(%r12), %rcx
movq 0x18(%rcx,%rax), %r13
testq %r14, %r14
je 0x24b0d8
movq %r12, %rdi
movq %r14, %rdx
callq 0x24b1aa
testl %eax, %eax
je 0x24b0ec
addq $0x20, %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x24a8e6
testq %rax, %rax
jne 0x24b0f0
incl %ebp
jmp 0x24b0a1
movq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3DbStrNDup
SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3 *db, const char *z, u64 n){
  char *zNew;
  assert( db!=0 );
  assert( z!=0 || n==0 );
  assert( (n&0x7fffffff)==n );
  zNew = z ? sqlite3DbMallocRawNN(db, n+1) : 0;
  if( zNew ){
    memcpy(zNew, z, (size_t)n);
    zNew[n] = 0;
  }
  return zNew;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x24b19e
movq %rdx, %rbx
movq %rsi, %r15
leaq 0x1(%rdx), %rsi
callq 0x22d205
testq %rax, %rax
je 0x24b19e
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x17630
movb $0x0, (%r14,%rbx)
jmp 0x24b1a1
xorl %r14d, %r14d
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: analysisLoader
static int analysisLoader(void *pData, int argc, char **argv, char **NotUsed){
  analysisInfo *pInfo = (analysisInfo*)pData;
  Index *pIndex;
  Table *pTable;
  const char *z;

  assert( argc==3 );
  UNUSED_PARAMETER2(NotUsed, argc);

  if( argv==0 || argv[0]==0 || argv[2]==0 ){
    return 0;
  }
  pTable = sqlite3FindTable(pInfo->db, argv[0], pInfo->zDatabase);
  if( pTable==0 ){
    return 0;
  }
  if( argv[1]==0 ){
    pIndex = 0;
  }else if( sqlite3_stricmp(argv[0],argv[1])==0 ){
    pIndex = sqlite3PrimaryKeyIndex(pTable);
  }else{
    pIndex = sqlite3FindIndex(pInfo->db, argv[1], pInfo->zDatabase);
  }
  z = argv[2];

  if( pIndex ){
    tRowcnt *aiRowEst = 0;
    int nCol = pIndex->nKeyCol+1;
#ifdef SQLITE_ENABLE_STAT4
    /* Index.aiRowEst may already be set here if there are duplicate
    ** sqlite_stat1 entries for this index. In that case just clobber
    ** the old data with the new instead of allocating a new array.  */
    if( pIndex->aiRowEst==0 ){
      pIndex->aiRowEst = (tRowcnt*)sqlite3MallocZero(sizeof(tRowcnt) * nCol);
      if( pIndex->aiRowEst==0 ) sqlite3OomFault(pInfo->db);
    }
    aiRowEst = pIndex->aiRowEst;
#endif
    pIndex->bUnordered = 0;
    decodeIntArray((char*)z, nCol, aiRowEst, pIndex->aiRowLogEst, pIndex);
    pIndex->hasStat1 = 1;
    if( pIndex->pPartIdxWhere==0 ){
      pTable->nRowLogEst = pIndex->aiRowLogEst[0];
      pTable->tabFlags |= TF_HasStat1;
    }
  }else{
    Index fakeIdx;
    fakeIdx.szIdxRow = pTable->szTabRow;
#ifdef SQLITE_ENABLE_COSTMULT
    fakeIdx.pTable = pTable;
#endif
    decodeIntArray((char*)z, 1, 0, &pTable->nRowLogEst, &fakeIdx);
    pTable->szTabRow = fakeIdx.szIdxRow;
    pTable->tabFlags |= TF_HasStat1;
  }

  return 0;
}

// Assembly:
testq %rdx, %rdx
je 0x24b2ec
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x24b2e1
cmpq $0x0, 0x10(%r14)
je 0x24b2e1
movq %rdi, %r15
movq (%rdi), %rdi
movq 0x8(%r15), %rdx
callq 0x22beb2
testq %rax, %rax
je 0x24b2e1
movq %rax, %rbx
movq 0x8(%r14), %r12
testq %r12, %r12
je 0x24b269
movq (%r14), %rdi
movq %r12, %rsi
callq 0x221763
testl %eax, %eax
je 0x24b26f
movq (%r15), %rdi
movq 0x8(%r15), %rdx
movq %r12, %rsi
callq 0x24b089
jmp 0x24b277
movq 0x10(%r14), %rdi
jmp 0x24b2b4
movq %rbx, %rdi
callq 0x2293af
movq %rax, %r15
movq 0x10(%r14), %rdi
testq %rax, %rax
je 0x24b2b4
movzwl 0x5e(%r15), %esi
incl %esi
andb $-0x5, 0x63(%r15)
movq 0x10(%r15), %rdx
movq %r15, %rcx
callq 0x24b393
orb $-0x80, 0x63(%r15)
cmpq $0x0, 0x48(%r15)
jne 0x24b2e1
movq 0x10(%r15), %rax
movzwl (%rax), %eax
movw %ax, 0x4a(%rbx)
jmp 0x24b2dd
movzwl 0x4c(%rbx), %eax
leaq 0x8(%rsp), %r14
movw %ax, 0x5c(%r14)
movq %rbx, %rdx
addq $0x4a, %rdx
pushq $0x1
popq %rsi
movq %r14, %rcx
callq 0x24b393
movzwl 0x5c(%r14), %eax
movw %ax, 0x4c(%rbx)
orb $0x10, 0x40(%rbx)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3DefaultRowEst
SQLITE_PRIVATE void sqlite3DefaultRowEst(Index *pIdx){
               /*                10,  9,  8,  7,  6 */
  static const LogEst aVal[] = { 33, 32, 30, 28, 26 };
  LogEst *a = pIdx->aiRowLogEst;
  LogEst x;
  int nCopy = MIN(ArraySize(aVal), pIdx->nKeyCol);
  int i;

  /* Indexes with default row estimates should not have stat1 data */
  assert( !pIdx->hasStat1 );

  /* Set the first entry (number of rows in the index) to the estimated
  ** number of rows in the table, or half the number of rows in the table
  ** for a partial index.
  **
  ** 2020-05-27:  If some of the stat data is coming from the sqlite_stat1
  ** table but other parts we are having to guess at, then do not let the
  ** estimated number of rows in the table be less than 1000 (LogEst 99).
  ** Failure to do this can cause the indexes for which we do not have
  ** stat1 data to be ignored by the query planner.
  */
  x = pIdx->pTable->nRowLogEst;
  assert( 99==sqlite3LogEst(1000) );
  if( x<99 ){
    pIdx->pTable->nRowLogEst = x = 99;
  }
  if( pIdx->pPartIdxWhere!=0 ) x -= 10;  assert( 10==sqlite3LogEst(2) );
  a[0] = x;

  /* Estimate that a[1] is 10, a[2] is 9, a[3] is 8, a[4] is 7, a[5] is
  ** 6 and each subsequent value (if any) is 5.  */
  memcpy(&a[1], aVal, nCopy*sizeof(LogEst));
  for(i=nCopy+1; i<=pIdx->nKeyCol; i++){
    a[i] = 23;                    assert( 23==sqlite3LogEst(5) );
  }

  assert( 0==sqlite3LogEst(1) );
  if( IsUniqueIndex(pIdx) ) a[pIdx->nKeyCol] = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %r15
movq 0x18(%rdi), %rcx
movzwl 0x5e(%rdi), %ebp
cmpw $0x5, %bp
pushq $0x5
popq %r12
movl %ebp, %edx
cmovael %r12d, %edx
movzwl 0x4a(%rcx), %eax
cmpw $0x62, %ax
jg 0x24b32b
movw $0x63, 0x4a(%rcx)
movw $0x63, %ax
cmpq $0x0, 0x48(%rbx)
leal -0xa(%rax), %ecx
cmovel %eax, %ecx
movw %cx, (%r15)
leaq 0x2(%r15), %r14
addl %edx, %edx
movl $0xffff, %r13d          # imm = 0xFFFF
andl %r13d, %edx
leaq 0x126fba(%rip), %rsi    # 0x37230a
movq %r14, %rdi
callq 0x17630
cmpw $0x5, %bp
cmovbl %ebp, %r12d
andl %r13d, %r12d
movzwl 0x5e(%rbx), %eax
cmpq %rax, %r12
jae 0x24b378
movw $0x17, (%r14,%r12,2)
incq %r12
jmp 0x24b363
cmpb $0x0, 0x62(%rbx)
je 0x24b384
andw $0x0, (%r15,%rax,2)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3GetInt32
SQLITE_PRIVATE int sqlite3GetInt32(const char *zNum, int *pValue){
  sqlite_int64 v = 0;
  int i, c;
  int neg = 0;
  if( zNum[0]=='-' ){
    neg = 1;
    zNum++;
  }else if( zNum[0]=='+' ){
    zNum++;
  }
#ifndef SQLITE_OMIT_HEX_INTEGER
  else if( zNum[0]=='0'
        && (zNum[1]=='x' || zNum[1]=='X')
        && sqlite3Isxdigit(zNum[2])
  ){
    u32 u = 0;
    zNum += 2;
    while( zNum[0]=='0' ) zNum++;
    for(i=0; sqlite3Isxdigit(zNum[i]) && i<8; i++){
      u = u*16 + sqlite3HexToInt(zNum[i]);
    }
    if( (u&0x80000000)==0 && sqlite3Isxdigit(zNum[i])==0 ){
      memcpy(pValue, &u, 4);
      return 1;
    }else{
      return 0;
    }
  }
#endif
  if( !sqlite3Isdigit(zNum[0]) ) return 0;
  while( zNum[0]=='0' ) zNum++;
  for(i=0; i<11 && (c = zNum[i] - '0')>=0 && c<=9; i++){
    v = v*10 + c;
  }

  /* The longest decimal representation of a 32 bit integer is 10 digits:
  **
  **             1234567890
  **     2^31 -> 2147483648
  */
  testcase( i==10 );
  if( i>10 ){
    return 0;
  }
  testcase( v-neg==2147483647 );
  if( v-neg>2147483647 ){
    return 0;
  }
  if( neg ){
    v = -v;
  }
  *pValue = (int)v;
  return 1;
}

// Assembly:
movzbl (%rdi), %ecx
cmpl $0x2d, %ecx
jne 0x24b4dc
incq %rdi
pushq $-0x1
popq %rdx
jmp 0x24b50a
cmpl $0x30, %ecx
je 0x24b4eb
cmpl $0x2b, %ecx
jne 0x24b508
incq %rdi
jmp 0x24b508
movzbl 0x1(%rdi), %eax
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x24b508
movzbl 0x2(%rdi), %edx
leaq 0x12634e(%rip), %rax    # 0x371850
testb $0x8, (%rdx,%rax)
jne 0x24b587
xorl %edx, %edx
movzbl (%rdi), %r8d
leaq -0x3a(%r8), %r9
xorl %eax, %eax
cmpq $-0xa, %r9
jae 0x24b51e
retq
movb (%rdi), %r8b
incq %rdi
cmpb $0x30, %r8b
je 0x24b51b
xorl %eax, %eax
xorl %r8d, %r8d
cmpq $0xb, %rax
je 0x24b555
movzbl -0x1(%rdi,%rax), %r9d
leal -0x30(%r9), %r10d
cmpb $0x9, %r10b
ja 0x24b55a
imulq $0xa, %r8, %r8
andl $0xf, %r9d
addq %r8, %r9
incq %rax
movq %r9, %r8
jmp 0x24b52c
movb $0x1, %dil
jmp 0x24b562
cmpq $0xb, %rax
setae %dil
xorl %eax, %eax
testb %dil, %dil
jne 0x24b51a
addq %r8, %rdx
cmpq $0x7fffffff, %rdx       # imm = 0x7FFFFFFF
jg 0x24b51a
movl %r8d, %edx
negl %edx
cmpl $0x2d, %ecx
cmovnel %r8d, %edx
movl %edx, (%rsi)
pushq $0x1
popq %rax
retq
addq $0x2, %rdi
movb (%rdi), %cl
incq %rdi
cmpb $0x30, %cl
je 0x24b58b
xorl %r8d, %r8d
xorl %edx, %edx
movzbl %cl, %r9d
movb (%r9,%rax), %r9b
andb $0x8, %r9b
cmpq $0x7, %r8
ja 0x24b5d6
testb %r9b, %r9b
je 0x24b5d6
shll $0x4, %edx
leal (%rcx,%rcx), %r9d
sarb $0x7, %r9b
andb $0x9, %r9b
addb %cl, %r9b
andb $0xf, %r9b
movzbl %r9b, %ecx
orl %ecx, %edx
movb (%rdi,%r8), %cl
incq %r8
jmp 0x24b59a
xorl %eax, %eax
testl %edx, %edx
js 0x24b51a
testb %r9b, %r9b
je 0x24b581
jmp 0x24b51a
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3FreeIndex
SQLITE_PRIVATE void sqlite3FreeIndex(sqlite3 *db, Index *p){
#ifndef SQLITE_OMIT_ANALYZE
  sqlite3DeleteIndexSamples(db, p);
#endif
  sqlite3ExprDelete(db, p->pPartIdxWhere);
  sqlite3ExprListDelete(db, p->aColExpr);
  sqlite3DbFree(db, p->zColAff);
  if( p->isResized ) sqlite3DbFree(db, (void *)p->azColl);
#ifdef SQLITE_ENABLE_STAT4
  sqlite3_free(p->aiRowEst);
#endif
  sqlite3DbFree(db, p);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x48(%rsi), %rsi
callq 0x24b639
movq 0x50(%rbx), %rsi
movq %r14, %rdi
callq 0x24b63f
movq 0x20(%rbx), %rsi
movq %r14, %rdi
callq 0x21f26b
testb $0x10, 0x63(%rbx)
je 0x24b627
movq 0x40(%rbx), %rsi
movq %r14, %rdi
callq 0x21f26b
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x22d0fc
// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ExprDeleteNN
static SQLITE_NOINLINE void sqlite3ExprDeleteNN(sqlite3 *db, Expr *p){
  assert( p!=0 );
  /* Sanity check: Assert that the IntValue is non-negative if it exists */
  assert( !ExprHasProperty(p, EP_IntValue) || p->u.iValue>=0 );

  assert( !ExprHasProperty(p, EP_WinFunc) || p->y.pWin!=0 || db->mallocFailed );
  assert( p->op!=TK_FUNCTION || ExprHasProperty(p, EP_TokenOnly|EP_Reduced)
          || p->y.pWin==0 || ExprHasProperty(p, EP_WinFunc) );
#ifdef SQLITE_DEBUG
  if( ExprHasProperty(p, EP_Leaf) && !ExprHasProperty(p, EP_TokenOnly) ){
    assert( p->pLeft==0 );
    assert( p->pRight==0 );
    assert( p->x.pSelect==0 );
  }
#endif
  if( !ExprHasProperty(p, (EP_TokenOnly|EP_Leaf)) ){
    /* The Expr.x union is never used at the same time as Expr.pRight */
    assert( p->x.pList==0 || p->pRight==0 );
    if( p->pLeft && p->op!=TK_SELECT_COLUMN ) sqlite3ExprDeleteNN(db, p->pLeft);
    if( p->pRight ){
      assert( !ExprHasProperty(p, EP_WinFunc) );
      sqlite3ExprDeleteNN(db, p->pRight);
    }else if( ExprHasProperty(p, EP_xIsSelect) ){
      assert( !ExprHasProperty(p, EP_WinFunc) );
      sqlite3SelectDelete(db, p->x.pSelect);
    }else{
      sqlite3ExprListDelete(db, p->x.pList);
#ifndef SQLITE_OMIT_WINDOWFUNC
      if( ExprHasProperty(p, EP_WinFunc) ){
        sqlite3WindowDelete(db, p->y.pWin);
      }
#endif
    }
  }
  if( ExprHasProperty(p, EP_MemToken) ) sqlite3DbFree(db, p->u.zToken);
  if( !ExprHasProperty(p, EP_Static) ){
    sqlite3DbFreeNN(db, p);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movzwl 0x5(%rsi), %eax
testw $0x8040, %ax            # imm = 0x8040
jne 0x24b6b1
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x24b673
cmpb $-0x51, (%rbx)
je 0x24b673
movq %r14, %rdi
callq 0x24b649
movq 0x18(%rbx), %rsi
testq %rsi, %rsi
je 0x24b686
movq %r14, %rdi
callq 0x24b649
jmp 0x24b6b1
testb $0x8, 0x5(%rbx)
movq 0x20(%rbx), %rsi
movq %r14, %rdi
jne 0x24b6ac
callq 0x24b63f
testb $0x1, 0x7(%rbx)
je 0x24b6b1
movq 0x40(%rbx), %rsi
movq %r14, %rdi
callq 0x24b6f4
jmp 0x24b6b1
callq 0x24b6e9
movl 0x4(%rbx), %eax
btl $0x10, %eax
jae 0x24b6c9
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x21f26b
movl 0x4(%rbx), %eax
btl $0x1b, %eax
jb 0x24b6e1
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x22d0fc
addq $0x8, %rsp
popq %rbx
popq %r14
retq