LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: getDigits
static int getDigits(const char *zDate, const char *zFormat, ...){
  /* The aMx[] array translates the 3rd character of each format
  ** spec into a max size:    a   b   c   d   e     f */
  static const u16 aMx[] = { 12, 14, 24, 31, 59, 9999 };
  va_list ap;
  int cnt = 0;
  char nextC;
  va_start(ap, zFormat);
  do{
    char N = zFormat[0] - '0';
    char min = zFormat[1] - '0';
    int val = 0;
    u16 max;

    assert( zFormat[2]>='a' && zFormat[2]<='f' );
    max = aMx[zFormat[2] - 'a'];
    nextC = zFormat[3];
    val = 0;
    while( N-- ){
      if( !sqlite3Isdigit(*zDate) ){
        goto end_getDigits;
      }
      val = val*10 + *zDate - '0';
      zDate++;
    }
    if( val<(int)min || val>(int)max || (nextC!=0 && nextC!=*zDate) ){
      goto end_getDigits;
    }
    *va_arg(ap,int*) = val;
    zDate++;
    cnt++;
    zFormat += 4;
  }while( nextC );
end_getDigits:
  va_end(ap);
  return cnt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
leaq -0x60(%rsp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x2ef925
movaps %xmm0, -0x30(%rsp)
movaps %xmm1, -0x20(%rsp)
movaps %xmm2, -0x10(%rsp)
movaps %xmm3, (%rsp)
movaps %xmm4, 0x10(%rsp)
movaps %xmm5, 0x20(%rsp)
movaps %xmm6, 0x30(%rsp)
movaps %xmm7, 0x40(%rsp)
movq %r10, -0x70(%rsp)
leaq 0x80(%rsp), %rax
movq %rax, -0x78(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, -0x80(%rsp)
xorl %eax, %eax
leaq 0xe5d85(%rip), %rcx     # 0x3d56d4
movb (%rsi), %r8b
movb 0x1(%rsi), %r10b
movsbq 0x2(%rsi), %rdx
movzwl -0xc2(%rcx,%rdx,2), %r9d
movb 0x3(%rsi), %dl
cmpb $0x30, %r8b
jne 0x2ef972
xorl %r8d, %r8d
jmp 0x2ef9b8
leal -0x31(%r8), %r11d
movzbl %r11b, %r11d
addq %rdi, %r11
incq %r11
addb $-0x30, %r8b
movzbl %r8b, %ebx
xorl %r14d, %r14d
xorl %r8d, %r8d
movzbl (%rdi,%r14), %r15d
leaq -0x3a(%r15), %r12
cmpq $-0xa, %r12
jb 0x2efa15
movsbl %r15b, %r15d
leal (%r8,%r8,4), %r8d
leal (%r15,%r8,2), %r8d
addl $-0x30, %r8d
incq %r14
cmpb %r14b, %bl
jne 0x2ef98e
movq %r11, %rdi
addb $-0x30, %r10b
movsbl %r10b, %r10d
cmpl %r10d, %r8d
jl 0x2efa15
cmpl %r9d, %r8d
jg 0x2efa15
testb %dl, %dl
je 0x2ef9d2
cmpb (%rdi), %dl
jne 0x2efa15
movl -0x80(%rsp), %r10d
cmpq $0x28, %r10
ja 0x2ef9f0
movq %r10, %r9
addq -0x70(%rsp), %r9
addl $0x8, %r10d
movl %r10d, -0x80(%rsp)
jmp 0x2ef9fe
movq -0x78(%rsp), %r9
leaq 0x8(%r9), %r10
movq %r10, -0x78(%rsp)
incq %rdi
incl %eax
addq $0x4, %rsi
movq (%r9), %r9
movl %r8d, (%r9)
testb %dl, %dl
jne 0x2ef94f
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: computeYMD
static void computeYMD(DateTime *p){
  int Z, A, B, C, D, E, X1;
  if( p->validYMD ) return;
  if( !p->validJD ){
    p->Y = 2000;
    p->M = 1;
    p->D = 1;
  }else if( !validJulianDay(p->iJD) ){
    datetimeError(p);
    return;
  }else{
    Z = (int)((p->iJD + 43200000)/86400000);
    A = (int)((Z - 1867216.25)/36524.25);
    A = Z + 1 + A - (A/4);
    B = A + 1524;
    C = (int)((B - 122.1)/365.25);
    D = (36525*(C&32767))/100;
    E = (int)((B-D)/30.6001);
    X1 = (int)(30.6001*E);
    p->D = B - D - X1;
    p->M = E<14 ? E-1 : E-13;
    p->Y = p->M>2 ? C - 4716 : C - 4715;
  }
  p->validYMD = 1;
}

// Assembly:
cmpb $0x0, 0x2a(%rdi)
je 0x2efbba
retq
cmpb $0x0, 0x28(%rdi)
je 0x2efbed
movq (%rdi), %rax
movabsq $0x1a6401072fe00, %rcx  # imm = 0x1A6401072FE00
cmpq %rcx, %rax
jb 0x2efc0a
xorpd %xmm0, %xmm0
movupd %xmm0, 0x20(%rdi)
movupd %xmm0, 0x10(%rdi)
movupd %xmm0, (%rdi)
addq $0x2e, %rdi
jmp 0x2efce2
movabsq $0x1000007d0, %rax      # imm = 0x1000007D0
movq %rax, 0x8(%rdi)
movl $0x1, %ecx
movl $0x10, %eax
jmp 0x2efcdb
addq $0x2932e00, %rax        # imm = 0x2932E00
shrq $0xa, %rax
movabsq $0x31b5d43afe99ef, %rcx # imm = 0x31B5D43AFE99EF
mulq %rcx
shrq $0x6, %rdx
cvtsi2sd %edx, %xmm0
addsd 0xe5bff(%rip), %xmm0    # 0x3d5830
divsd 0xe5bff(%rip), %xmm0    # 0x3d5838
cvttsd2si %xmm0, %eax
leal 0x3(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x2, %ecx
addl %eax, %edx
subl %ecx, %edx
addl $0x5f5, %edx            # imm = 0x5F5
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
addsd 0xe5bdf(%rip), %xmm0    # 0x3d5840
divsd 0xe5bdf(%rip), %xmm0    # 0x3d5848
cvttsd2si %xmm0, %eax
movl %eax, %ecx
andl $0x7fff, %ecx           # imm = 0x7FFF
imull $0x8ead, %ecx, %ecx     # imm = 0x8EAD
imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F
shrq $0x25, %rcx
subl %ecx, %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movsd 0xe5bb9(%rip), %xmm1    # 0x3d5850
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
subl %esi, %edx
movl %edx, 0x10(%rdi)
xorl %edx, %edx
cmpl $0xe, %ecx
setl %dl
negl %edx
orl $-0xd, %edx
addl %ecx, %edx
movl %edx, 0xc(%rdi)
xorl %ecx, %ecx
cmpl $0x3, %edx
setge %cl
xorl $0xffffed95, %ecx       # imm = 0xFFFFED95
addl %eax, %ecx
movl $0x8, %eax
movl %ecx, (%rdi,%rax)
addq $0x2a, %rdi
movb $0x1, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3FunctionSearch
SQLITE_PRIVATE FuncDef *sqlite3FunctionSearch(
  int h,               /* Hash of the name */
  const char *zFunc    /* Name of function */
){
  FuncDef *p;
  for(p=sqlite3BuiltinFunctions.a[h]; p; p=p->u.pHash){
    if( sqlite3StrICmp(p->zName, zFunc)==0 ){
      return p;
    }
  }
  return 0;
}

// Assembly:
movslq %edi, %rax
leaq 0x1cef3f(%rip), %rcx    # 0x4bece8
movq (%rcx,%rax,8), %rax
testq %rax, %rax
je 0x2efded
leaq 0xe1527(%rip), %rcx     # 0x3d12e0
movq 0x38(%rax), %rdx
xorl %edi, %edi
movzbl (%rdx,%rdi), %r8d
movzbl (%rsi,%rdi), %r9d
cmpb %r9b, %r8b
jne 0x2efdd5
testq %r8, %r8
jne 0x2efddf
jmp 0x2efdef
movb (%r8,%rcx), %r8b
cmpb (%r9,%rcx), %r8b
jne 0x2efde4
incq %rdi
jmp 0x2efdbf
movq 0x40(%rax), %rax
testq %rax, %rax
jne 0x2efdb9
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3MemMalloc
static void *sqlite3MemMalloc(int nByte){
#ifdef SQLITE_MALLOCSIZE
  void *p;
  testcase( ROUND8(nByte)==nByte );
  p = SQLITE_MALLOC( nByte );
  if( p==0 ){
    testcase( sqlite3GlobalConfig.xLog!=0 );
    sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
  }
  return p;
#else
  sqlite3_int64 *p;
  assert( nByte>0 );
  testcase( ROUND8(nByte)!=nByte );
  p = SQLITE_MALLOC( nByte+8 );
  if( p ){
    p[0] = nByte;
    p++;
  }else{
    testcase( sqlite3GlobalConfig.xLog!=0 );
    sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
  }
  return (void *)p;
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r14d
leal 0x8(%r14), %eax
movslq %eax, %rdi
callq 0x17ff0
testq %rax, %rax
je 0x2efe17
movq %rax, %rbx
movslq %r14d, %rax
movq %rax, (%rbx)
addq $0x8, %rbx
jmp 0x2efe2f
leaq 0xea444(%rip), %rsi     # 0x3da262
xorl %ebx, %ebx
movl $0x7, %edi
movl %r14d, %edx
xorl %eax, %eax
callq 0x274d08
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pcache1Create
static sqlite3_pcache *pcache1Create(int szPage, int szExtra, int bPurgeable){
  PCache1 *pCache;      /* The newly created page cache */
  PGroup *pGroup;       /* The group the new page cache will belong to */
  int sz;               /* Bytes of memory required to allocate the new cache */

  assert( (szPage & (szPage-1))==0 && szPage>=512 && szPage<=65536 );
  assert( szExtra < 300 );

  sz = sizeof(PCache1) + sizeof(PGroup)*pcache1.separateCache;
  pCache = (PCache1 *)sqlite3MallocZero(sz);
  if( pCache ){
    if( pcache1.separateCache ){
      pGroup = (PGroup*)&pCache[1];
      pGroup->mxPinned = 10;
    }else{
      pGroup = &pcache1.grp;
    }
    pcache1EnterMutex(pGroup);
    if( pGroup->lru.isAnchor==0 ){
      pGroup->lru.isAnchor = 1;
      pGroup->lru.pLruPrev = pGroup->lru.pLruNext = &pGroup->lru;
    }
    pCache->pGroup = pGroup;
    pCache->szPage = szPage;
    pCache->szExtra = szExtra;
    pCache->szAlloc = szPage + szExtra + ROUND8(sizeof(PgHdr1));
    pCache->bPurgeable = (bPurgeable ? 1 : 0);
    pcache1ResizeHash(pCache);
    if( bPurgeable ){
      pCache->nMin = 10;
      pGroup->nMinPage += pCache->nMin;
      pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
      pCache->pnPurgeable = &pGroup->nPurgeable;
    }else{
      pCache->pnPurgeable = &pCache->nPurgeableDummy;
    }
    pcache1LeaveMutex(pGroup);
    if( pCache->nHash==0 ){
      pcache1Destroy((sqlite3_pcache*)pCache);
      pCache = 0;
    }
  }
  return (sqlite3_pcache *)pCache;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
movl 0x1ceee3(%rip), %eax    # 0x4bee04
leal (%rax,%rax,4), %eax
shll $0x4, %eax
addl $0x58, %eax
movslq %eax, %r12
movq %r12, %rdi
callq 0x272ae6
testq %rax, %rax
je 0x2efff5
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x173a0
cmpl $0x0, 0x1ceeaf(%rip)    # 0x4bee04
je 0x2eff64
leaq 0x58(%rbx), %r12
movl $0xa, 0x68(%rbx)
jmp 0x2eff6b
leaq 0x1cee45(%rip), %r12    # 0x4bedb0
cmpw $0x0, 0x2e(%r12)
jne 0x2eff8b
leaq 0x18(%r12), %rax
movw $0x1, 0x2e(%r12)
movq %rax, 0x40(%r12)
movq %rax, 0x48(%r12)
movq %r12, (%rbx)
movl %r15d, 0x10(%rbx)
movl %r14d, 0x14(%rbx)
leal (%r15,%r14), %eax
addl $0x38, %eax
movl %eax, 0x18(%rbx)
xorl %eax, %eax
testl %ebp, %ebp
setne %al
movl %eax, 0x1c(%rbx)
movq %rbx, %rdi
callq 0x2f01e3
testl %ebp, %ebp
je 0x2effdc
movl $0xa, 0x20(%rbx)
movl 0x8(%r12), %eax
movl 0xc(%r12), %ecx
leal 0xa(%rcx), %edx
movl %edx, 0xc(%r12)
subl %ecx, %eax
movl %eax, 0x10(%r12)
addq $0x14, %r12
jmp 0x2effe3
movq %rbx, %r12
addq $0x30, %r12
movq %r12, 0x8(%rbx)
cmpl $0x0, 0x3c(%rbx)
jne 0x2efff7
movq %rbx, %rdi
callq 0x2f0139
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pcache1Fetch
static sqlite3_pcache_page *pcache1Fetch(
  sqlite3_pcache *p,
  unsigned int iKey,
  int createFlag
){
#if PCACHE1_MIGHT_USE_GROUP_MUTEX || defined(SQLITE_DEBUG)
  PCache1 *pCache = (PCache1 *)p;
#endif

  assert( offsetof(PgHdr1,page)==0 );
  assert( pCache->bPurgeable || createFlag!=1 );
  assert( pCache->bPurgeable || pCache->nMin==0 );
  assert( pCache->bPurgeable==0 || pCache->nMin==10 );
  assert( pCache->nMin==0 || pCache->bPurgeable );
  assert( pCache->nHash>0 );
#if PCACHE1_MIGHT_USE_GROUP_MUTEX
  if( pCache->pGroup->mutex ){
    return (sqlite3_pcache_page*)pcache1FetchWithMutex(p, iKey, createFlag);
  }else
#endif
  {
    return (sqlite3_pcache_page*)pcache1FetchNoMutex(p, iKey, createFlag);
  }
}

// Assembly:
movl %edx, %ecx
movq 0x40(%rdi), %r8
movl %esi, %eax
xorl %edx, %edx
divl 0x3c(%rdi)
movq (%r8,%rdx,8), %rax
testq %rax, %rax
je 0x2f0061
cmpl %esi, 0x10(%rax)
je 0x2f006c
movq 0x18(%rax), %rax
jmp 0x2f0051
testl %ecx, %ecx
je 0x2f0091
movl %ecx, %edx
jmp 0x2f0397
movq 0x28(%rax), %rcx
testq %rcx, %rcx
je 0x2f0090
movq 0x30(%rax), %rdx
movq %rcx, 0x28(%rdx)
movq %rdx, 0x30(%rcx)
movq $0x0, 0x28(%rax)
movq 0x20(%rax), %rcx
decl 0x34(%rcx)
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pcache1Destroy
static void pcache1Destroy(sqlite3_pcache *p){
  PCache1 *pCache = (PCache1 *)p;
  PGroup *pGroup = pCache->pGroup;
  assert( pCache->bPurgeable || (pCache->nMax==0 && pCache->nMin==0) );
  pcache1EnterMutex(pGroup);
  if( pCache->nPage ) pcache1TruncateUnsafe(pCache, 0);
  assert( pGroup->nMaxPage >= pCache->nMax );
  pGroup->nMaxPage -= pCache->nMax;
  assert( pGroup->nMinPage >= pCache->nMin );
  pGroup->nMinPage -= pCache->nMin;
  pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
  pcache1EnforceMaxPage(pCache);
  pcache1LeaveMutex(pGroup);
  sqlite3_free(pCache->pBulk);
  sqlite3_free(pCache->apHash);
  sqlite3_free(pCache);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
cmpl $0x0, 0x38(%rdi)
je 0x2f0153
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2f06a5
movl 0x8(%r14), %eax
subl 0x24(%rbx), %eax
movl 0xc(%r14), %ecx
movl %eax, 0x8(%r14)
subl 0x20(%rbx), %ecx
movl %ecx, 0xc(%r14)
subl %ecx, %eax
addl $0xa, %eax
movl %eax, 0x10(%r14)
movq %rbx, %rdi
callq 0x2f02a9
movq 0x50(%rbx), %rdi
callq 0x272c00
movq 0x40(%rbx), %rdi
callq 0x272c00
cmpl $0x0, 0x1cb4cd(%rip)    # 0x4bb660
je 0x2f01ae
movq %rbx, %rdi
callq *0x1cb4fa(%rip)         # 0x4bb698
cltq
subq %rax, 0x1ce951(%rip)    # 0x4beaf8
decq 0x1ce992(%rip)          # 0x4beb40
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x1cb4ca(%rip)         # 0x4bb688
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pcache1Shrink
static void pcache1Shrink(sqlite3_pcache *p){
  PCache1 *pCache = (PCache1*)p;
  if( pCache->bPurgeable ){
    PGroup *pGroup = pCache->pGroup;
    int savedMaxPage;
    pcache1EnterMutex(pGroup);
    savedMaxPage = pGroup->nMaxPage;
    pGroup->nMaxPage = 0;
    pcache1EnforceMaxPage(pCache);
    pGroup->nMaxPage = savedMaxPage;
    pcache1LeaveMutex(pGroup);
  }
}

// Assembly:
cmpl $0x0, 0x1c(%rdi)
je 0x2f01e2
pushq %rbp
pushq %rbx
pushq %rax
movq (%rdi), %rbx
movl 0x8(%rbx), %ebp
movl $0x0, 0x8(%rbx)
callq 0x2f02a9
movl %ebp, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pcache1ResizeHash
static void pcache1ResizeHash(PCache1 *p){
  PgHdr1 **apNew;
  unsigned int nNew;
  unsigned int i;

  assert( sqlite3_mutex_held(p->pGroup->mutex) );

  nNew = p->nHash*2;
  if( nNew<256 ){
    nNew = 256;
  }

  pcache1LeaveMutex(p->pGroup);
  if( p->nHash ){ sqlite3BeginBenignMalloc(); }
  apNew = (PgHdr1 **)sqlite3MallocZero(sizeof(PgHdr1 *)*nNew);
  if( p->nHash ){ sqlite3EndBenignMalloc(); }
  pcache1EnterMutex(p->pGroup);
  if( apNew ){
    for(i=0; i<p->nHash; i++){
      PgHdr1 *pPage;
      PgHdr1 *pNext = p->apHash[i];
      while( (pPage = pNext)!=0 ){
        unsigned int h = pPage->iKey % nNew;
        pNext = pPage->pNext;
        pPage->pNext = apNew[h];
        apNew[h] = pPage;
      }
    }
    sqlite3_free(p->apHash);
    p->apHash = apNew;
    p->nHash = nNew;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x3c(%rdi), %eax
leal (%rax,%rax), %ecx
cmpl $0x101, %ecx            # imm = 0x101
movl $0x100, %ebp            # imm = 0x100
cmovael %ecx, %ebp
testl %eax, %eax
je 0x2f0213
movq 0x1cec3c(%rip), %rax    # 0x4bee48
testq %rax, %rax
je 0x2f0213
callq *%rax
movl %ebp, %r15d
shlq $0x3, %r15
movq %r15, %rdi
callq 0x272ae6
movq %rax, %r14
testq %rax, %rax
je 0x2f0237
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x173a0
cmpl $0x0, 0x3c(%rbx)
je 0x2f024b
movq 0x1cec0c(%rip), %rax    # 0x4bee50
testq %rax, %rax
je 0x2f024b
callq *%rax
testq %r14, %r14
je 0x2f029e
movl 0x3c(%rbx), %ecx
testq %rcx, %rcx
je 0x2f028e
xorl %esi, %esi
movq 0x40(%rbx), %rax
movq (%rax,%rsi,8), %rdi
testq %rdi, %rdi
je 0x2f0286
movl 0x10(%rdi), %eax
xorl %edx, %edx
divl %ebp
movq 0x18(%rdi), %rax
movq (%r14,%rdx,8), %r8
movq %r8, 0x18(%rdi)
movq %rdi, (%r14,%rdx,8)
movq %rax, %rdi
testq %rax, %rax
jne 0x2f0267
incq %rsi
cmpq %rcx, %rsi
jne 0x2f025a
movq 0x40(%rbx), %rdi
callq 0x272c00
movq %r14, 0x40(%rbx)
movl %ebp, 0x3c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pcache1EnforceMaxPage
static void pcache1EnforceMaxPage(PCache1 *pCache){
  PGroup *pGroup = pCache->pGroup;
  PgHdr1 *p;
  assert( sqlite3_mutex_held(pGroup->mutex) );
  while( pGroup->nPurgeable>pGroup->nMaxPage
      && (p=pGroup->lru.pLruPrev)->isAnchor==0
  ){
    assert( p->pCache->pGroup==pGroup );
    assert( PAGE_IS_UNPINNED(p) );
    pcache1PinPage(p);
    pcache1RemoveFromHash(p, 1);
  }
  if( pCache->nPage==0 && pCache->pBulk ){
    sqlite3_free(pCache->pBulk);
    pCache->pBulk = pCache->pFree = 0;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r14
movl 0x14(%r14), %eax
cmpl 0x8(%r14), %eax
jbe 0x2f02f3
movq 0x48(%r14), %rdi
cmpw $0x0, 0x16(%rdi)
jne 0x2f02f3
movq 0x28(%rdi), %rax
movq 0x30(%rdi), %rcx
movq %rax, 0x28(%rcx)
movq %rcx, 0x30(%rax)
movq $0x0, 0x28(%rdi)
movq 0x20(%rdi), %rax
decl 0x34(%rax)
movl $0x1, %esi
callq 0x2f033c
jmp 0x2f02b3
cmpl $0x0, 0x38(%rbx)
jne 0x2f0334
movq 0x50(%rbx), %r14
testq %r14, %r14
je 0x2f0334
cmpl $0x0, 0x1cb357(%rip)    # 0x4bb660
je 0x2f0324
movq %r14, %rdi
callq *0x1cb384(%rip)         # 0x4bb698
cltq
subq %rax, 0x1ce7db(%rip)    # 0x4beaf8
decq 0x1ce81c(%rip)          # 0x4beb40
movq %r14, %rdi
callq *0x1cb35b(%rip)         # 0x4bb688
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pcache1RemoveFromHash
static void pcache1RemoveFromHash(PgHdr1 *pPage, int freeFlag){
  unsigned int h;
  PCache1 *pCache = pPage->pCache;
  PgHdr1 **pp;

  assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
  h = pPage->iKey % pCache->nHash;
  for(pp=&pCache->apHash[h]; (*pp)!=pPage; pp=&(*pp)->pNext);
  *pp = (*pp)->pNext;

  pCache->nPage--;
  if( freeFlag ) pcache1FreePage(pPage);
}

// Assembly:
movq 0x20(%rdi), %rcx
movl 0x10(%rdi), %eax
xorl %edx, %edx
divl 0x3c(%rcx)
shlq $0x3, %rdx
addq 0x40(%rcx), %rdx
movq %rdx, %rax
movq (%rdx), %r8
leaq 0x18(%r8), %rdx
cmpq %rdi, %r8
jne 0x2f0350
movq (%rdx), %rdx
movq %rdx, (%rax)
decl 0x38(%rcx)
testl %esi, %esi
jne 0x2f036d
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pcache1TruncateUnsafe
static void pcache1TruncateUnsafe(
  PCache1 *pCache,             /* The cache to truncate */
  unsigned int iLimit          /* Drop pages with this pgno or larger */
){
  TESTONLY( int nPage = 0; )  /* To assert pCache->nPage is correct */
  unsigned int h, iStop;
  assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
  assert( pCache->iMaxKey >= iLimit );
  assert( pCache->nHash > 0 );
  if( pCache->iMaxKey - iLimit < pCache->nHash ){
    /* If we are just shaving the last few pages off the end of the
    ** cache, then there is no point in scanning the entire hash table.
    ** Only scan those hash slots that might contain pages that need to
    ** be removed. */
    h = iLimit % pCache->nHash;
    iStop = pCache->iMaxKey % pCache->nHash;
    TESTONLY( nPage = -10; )  /* Disable the pCache->nPage validity check */
  }else{
    /* This is the general case where many pages are being removed.
    ** It is necessary to scan the entire hash table */
    h = pCache->nHash/2;
    iStop = h - 1;
  }
  for(;;){
    PgHdr1 **pp;
    PgHdr1 *pPage;
    assert( h<pCache->nHash );
    pp = &pCache->apHash[h];
    while( (pPage = *pp)!=0 ){
      if( pPage->iKey>=iLimit ){
        pCache->nPage--;
        *pp = pPage->pNext;
        if( PAGE_IS_UNPINNED(pPage) ) pcache1PinPage(pPage);
        pcache1FreePage(pPage);
      }else{
        pp = &pPage->pNext;
        TESTONLY( if( nPage>=0 ) nPage++; )
      }
    }
    if( h==iStop ) break;
    h = (h+1) % pCache->nHash;
  }
  assert( nPage<0 || pCache->nPage==(unsigned)nPage );
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movl 0x2c(%rdi), %ecx
movl 0x3c(%rdi), %esi
movl %ecx, %eax
subl %ebx, %eax
cmpl %esi, %eax
jae 0x2f06d3
movl %ebx, %eax
xorl %edx, %edx
divl %esi
movl %edx, %ebp
movl %ecx, %eax
xorl %edx, %edx
divl %esi
movl %edx, %r15d
jmp 0x2f06e9
shrl %esi
leal -0x1(%rsi), %r15d
movl %esi, %ebp
jmp 0x2f06e9
incl %ebp
movl %ebp, %eax
xorl %edx, %edx
divl 0x3c(%r14)
movl %edx, %ebp
movq 0x40(%r14), %rax
movl %ebp, %ecx
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x2f0748
leaq (%rax,%rcx,8), %r12
cmpl %ebx, 0x10(%rdi)
jae 0x2f070a
addq $0x18, %rdi
movq %rdi, %r12
jmp 0x2f073f
decl 0x38(%r14)
movq 0x18(%rdi), %rax
movq %rax, (%r12)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x2f073a
movq 0x30(%rdi), %rcx
movq %rax, 0x28(%rcx)
movq %rcx, 0x30(%rax)
movq $0x0, 0x28(%rdi)
movq 0x20(%rdi), %rax
decl 0x34(%rax)
callq 0x2f036d
movq (%r12), %rdi
testq %rdi, %rdi
jne 0x2f06fc
cmpl %r15d, %ebp
jne 0x2f06dd
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3VtabDisconnect
SQLITE_PRIVATE void sqlite3VtabDisconnect(sqlite3 *db, Table *p){
  VTable **ppVTab;

  assert( IsVirtual(p) );
  assert( sqlite3BtreeHoldsAllMutexes(db) );
  assert( sqlite3_mutex_held(db->mutex) );

  for(ppVTab=&p->pVTable; *ppVTab; ppVTab=&(*ppVTab)->pNext){
    if( (*ppVTab)->db==db  ){
      VTable *pVTab = *ppVTab;
      *ppVTab = pVTab->pNext;
      sqlite3VtabUnlock(pVTab);
      break;
    }
  }
}

// Assembly:
movq %rdi, %rax
movq 0x60(%rsi), %rdi
testq %rdi, %rdi
je 0x2f07ba
cmpq %rax, (%rdi)
je 0x2f07bb
movq %rdi, %rsi
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
je 0x2f07ba
cmpq %rax, (%rdi)
jne 0x2f07a3
addq $0x28, %rsi
jmp 0x2f07bf
retq
addq $0x60, %rsi
movq 0x28(%rdi), %rax
movq %rax, (%rsi)
jmp 0x28fc3f
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: functionDestroy
static void functionDestroy(sqlite3 *db, FuncDef *p){
  FuncDestructor *pDestructor = p->u.pDestructor;
  if( pDestructor ){
    pDestructor->nRef--;
    if( pDestructor->nRef==0 ){
      pDestructor->xDestroy(pDestructor->pUserData);
      sqlite3DbFree(db, pDestructor);
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x2f07db
movq %rsi, %rbx
decl (%rsi)
je 0x2f07e3
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdi, %r14
movq 0x10(%rbx), %rdi
callq *0x8(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x282904
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: rtrimCollFunc
static int rtrimCollFunc(
  void *pUser,
  int nKey1, const void *pKey1,
  int nKey2, const void *pKey2
){
  const u8 *pK1 = (const u8*)pKey1;
  const u8 *pK2 = (const u8*)pKey2;
  while( nKey1 && pK1[nKey1-1]==' ' ) nKey1--;
  while( nKey2 && pK2[nKey2-1]==' ' ) nKey2--;
  return binCollFunc(pUser, nKey1, pKey1, nKey2, pKey2);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdx, %rdi
xorl %ebp, %ebp
testl %esi, %esi
je 0x2f0886
movslq %esi, %rax
cmpb $0x20, -0x1(%rdi,%rax)
jne 0x2f0884
decq %rax
jne 0x2f0876
jmp 0x2f0886
movl %eax, %ebp
testl %ecx, %ecx
je 0x2f089a
movslq %ecx, %rax
cmpb $0x20, -0x1(%r8,%rax)
jne 0x2f08b5
decq %rax
jne 0x2f088d
movl %ebp, %eax
sarl $0x1f, %eax
andl %ebp, %eax
movslq %eax, %rdx
movq %r8, %rsi
callq 0x17300
movl %eax, %ebx
testl %eax, %eax
cmovel %ebp, %ebx
jmp 0x2f08cc
movl %ebp, %ebx
subl %eax, %ebx
cmovll %ebp, %eax
movslq %eax, %rdx
movq %r8, %rsi
callq 0x17300
testl %eax, %eax
cmovnel %eax, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3RegisterPerConnectionBuiltinFunctions
SQLITE_PRIVATE void sqlite3RegisterPerConnectionBuiltinFunctions(sqlite3 *db){
  int rc = sqlite3_overload_function(db, "MATCH", 2);
  assert( rc==SQLITE_NOMEM || rc==SQLITE_OK );
  if( rc==SQLITE_NOMEM ){
    sqlite3OomFault(db);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x5fca6(%rip), %rsi     # 0x350586
movl $0x2, %edx
callq 0x27fc53
cmpl $0x7, %eax
jne 0x2f08f8
movq %rbx, %rdi
popq %rbx
jmp 0x278b1c
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3AutoLoadExtensions
SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3 *db){
  u32 i;
  int go = 1;
  int rc;
  sqlite3_loadext_entry xInit;

  wsdAutoextInit;
  if( wsdAutoext.nExt==0 ){
    /* Common case: early out without every having to acquire a mutex */
    return;
  }
  for(i=0; go; i++){
    char *zErrmsg;
#if SQLITE_THREADSAFE
    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MAIN);
#endif
#ifdef SQLITE_OMIT_LOAD_EXTENSION
    const sqlite3_api_routines *pThunk = 0;
#else
    const sqlite3_api_routines *pThunk = &sqlite3Apis;
#endif
    sqlite3_mutex_enter(mutex);
    if( i>=wsdAutoext.nExt ){
      xInit = 0;
      go = 0;
    }else{
      xInit = (sqlite3_loadext_entry)wsdAutoext.aExt[i];
    }
    sqlite3_mutex_leave(mutex);
    zErrmsg = 0;
    if( xInit && (rc = xInit(db, &zErrmsg, pThunk))!=0 ){
      sqlite3ErrorWithMsg(db, rc,
            "automatic extension loading failed: %s", zErrmsg);
      go = 0;
    }
    sqlite3_free(zErrmsg);
  }
}

// Assembly:
cmpl $0x0, 0x1ce3c7(%rip)    # 0x4becc8
je 0x2f099e
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x1ce3b2(%rip)    # 0x4becc8
je 0x2f096b
movq %rdi, %rbx
xorl %r12d, %r12d
leaq 0x1c6b33(%rip), %r14    # 0x4b7458
movq %rsp, %r15
movq 0x1ce3a1(%rip), %rax    # 0x4becd0
movq (%rax,%r12,8), %rax
movq $0x0, (%rsp)
testq %rax, %rax
je 0x2f0955
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq *%rax
movq (%rsp), %rcx
testl %eax, %eax
je 0x2f0957
jmp 0x2f0977
xorl %ecx, %ecx
movq %rcx, %rdi
callq 0x272c00
incq %r12
cmpl 0x1ce35f(%rip), %r12d   # 0x4becc8
jb 0x2f0928
movq $0x0, (%rsp)
xorl %edi, %edi
jmp 0x2f098e
leaq 0xe9c04(%rip), %rdx     # 0x3da582
movq %rbx, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x2762da
movq (%rsp), %rdi
callq 0x272c00
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/core/bitpackstringop.c
// Function: gt_requiredUInt32Bits
int
gt_requiredUInt32Bits(uint32_t v)
{
  int r;
  static const int MultiplyDeBruijnBitPosition[32] = {
    1, 2, 29, 3, 30, 15, 25, 4, 31, 23, 21, 16, 26, 18, 5, 9,
    32, 28, 14, 24, 22, 20, 17, 8, 27, 13, 19, 7, 12, 6, 11, 10
  };
  v |= v >> 1; /* first round down to power of 2 */
  v |= v >> 2;
  v |= v >> 4;
  v |= v >> 8;
  v |= v >> 16;
  v = (v >> 1) + 1;
  r = MultiplyDeBruijnBitPosition[(v * (uint32_t)0x077CB531UL) >> 27];
  return r;
}

// Assembly:
movl %edi, %eax
shrl %eax
orl %edi, %eax
movl %eax, %ecx
shrl $0x2, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x4, %eax
orl %ecx, %eax
movl %eax, %ecx
shrl $0x8, %ecx
orl %eax, %ecx
movl %ecx, %eax
shrl $0x11, %eax
shrl %ecx
orl %eax, %ecx
imull $0x77cb531, %ecx, %eax  # imm = 0x77CB531
addl $0x77cb531, %eax        # imm = 0x77CB531
shrl $0x1b, %eax
leaq 0xe9d57(%rip), %rcx     # 0x3da730
movl (%rcx,%rax,4), %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/core/bitpackstringop.c
// Function: gt_requiredUInt64Bits
int
gt_requiredUInt64Bits(uint64_t v)
{
  int r;
  static const int MultiplyDeBruijnBitPosition[64] = {
    1, 2, 3, 57, 4, 33, 58, 47, 30, 5, 21, 34, 8, 59, 12, 48,
    63, 31, 19, 6, 17, 22, 35, 24, 54, 9, 60, 37, 26, 13, 49, 40,
    64, 56, 32, 46, 29, 20, 7, 11, 62, 18, 16, 23, 53, 36, 25, 39,
    55, 45, 28, 10, 61, 15, 52, 38, 44, 27, 14, 51, 43, 50, 42, 41
  };
  v |= v >> 1; /* first round down to power of 2 */
  v |= v >> 2;
  v |= v >> 4;
  v |= v >> 8;
  v |= v >> 16;
  v |= v >> 32;
  v = (v >> 1) + 1;
  r = MultiplyDeBruijnBitPosition[(v * (uint64_t)0x26752B916FC7B0DULL) >> 58];
  return r;
}

// Assembly:
movq %rdi, %rax
shrq %rax
orq %rdi, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x10, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x21, %rcx
shrq %rax
orq %rcx, %rax
movabsq $0x26752b916fc7b0d, %rcx # imm = 0x26752B916FC7B0D
imulq %rcx, %rax
addq %rcx, %rax
shrq $0x3a, %rax
leaq 0xe9d79(%rip), %rcx     # 0x3da7b0
movl (%rcx,%rax,4), %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/core/bitpackstringop.c
// Function: gt_bsClear
void
gt_bsClear(BitString str, BitOffset offset, BitOffset numBits, int bitVal)
{
  unsigned bitsLeft = numBits,
    bitTop = offset%bitElemBits;
  size_t elemStart = offset/bitElemBits;
  BitElem *p = str + elemStart;
  GtUword bitPatSource = 0UL;
  gt_assert(str);
  if (bitVal)
    bitPatSource = ~0UL;
  if (bitTop)
  {
    GtUword mask = ~0UL;
    if (bitElemBits < (sizeof (GtUword)*CHAR_BIT))
    {
      mask <<= bitElemBits;
    }
    else
    {
      mask = 0;
    }
    mask = (~mask) >> bitTop;
    if (numBits < bitElemBits - bitTop)
    {
      unsigned backShift = bitElemBits - numBits - bitTop;
      mask &= ~0UL << backShift;
      *p = (*p & ~mask) | (bitPatSource & mask);
      return;
    }
    else
    {
      bitsLeft -= bitElemBits - bitTop;
      *p = (*p & ~mask) | (bitPatSource & mask);
      ++p;
    }
  }
  {
    size_t fullElems = bitsLeft / bitElemBits;
    memset(p, bitPatSource, sizeof (BitElem) * fullElems);
    p += fullElems;
    bitsLeft -= fullElems * bitElemBits;
  }
  if (bitsLeft)
  {
    GtUword mask = ((~0UL)<<(bitElemBits - bitsLeft));
    if (bitElemBits < (sizeof (GtUword)*CHAR_BIT))
      mask &= (~(~0UL<<bitElemBits));
    *p = (*p & ~mask) | (bitPatSource & mask);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2f123d
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %rbx
movl %esi, %edx
andl $0x7, %edx
movq %rsi, %rax
shrq $0x3, %rax
addq %rax, %rbx
testl %edx, %edx
je 0x2f11ee
andl $0x7, %esi
movl $0xff, %eax
movl %esi, %ecx
shrq %cl, %rax
movl $0x8, %ecx
subl %edx, %ecx
cmpq %r14, %rcx
jbe 0x2f11ce
addl %r14d, %esi
movb $0x8, %cl
subb %sil, %cl
movq $-0x1, %rdx
shlq %cl, %rdx
andl %edx, %eax
movzbl (%rbx), %ecx
movl %eax, %edx
notl %edx
andl %ecx, %edx
testl %ebp, %ebp
cmovel %ebp, %eax
orl %edx, %eax
movb %al, (%rbx)
jmp 0x2f1232
subl %ecx, %r14d
movzbl (%rbx), %edx
movq $-0x100, %rdi
movl %esi, %ecx
sarq %cl, %rdi
andl %edx, %edi
testl %ebp, %ebp
cmovel %ebp, %eax
orl %edi, %eax
movb %al, (%rbx)
incq %rbx
movl %r14d, %r15d
shrl $0x3, %r15d
xorl %esi, %esi
movl %ebp, %eax
negl %eax
sbbl %esi, %esi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x173a0
andl $0x7, %r14d
je 0x2f1232
movb $0x8, %cl
subb %r14b, %cl
movl $0xfe, %eax
shrl %cl, %eax
shll %cl, %eax
movzbl (%rbx,%r15), %ecx
movl %eax, %edx
notl %edx
andl %ecx, %edx
testl %ebp, %ebp
cmovel %ebp, %eax
orl %edx, %eax
movb %al, (%rbx,%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x87147
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/core/bitpackstringop.c
// Function: gt_bs1BitsCount
BitOffset gt_bs1BitsCount(constBitString str, BitOffset offset,
                          BitOffset numBits)
{
  uint32_t accum = 0;
  BitOffset weight = 0, bitsLeft = numBits;
  unsigned bitTop = offset%bitElemBits, bitsInAccum = 0;
  size_t elemStart = offset/bitElemBits;
  const BitElem *p = str + elemStart;
  gt_assert(str);
  if (bitTop)
  {
    uint32_t mask;
    unsigned bits2Read = GT_MIN(bitElemBits - bitTop, bitsLeft);
    unsigned unreadRightBits = (bitElemBits - bitTop - bits2Read);
    mask = (~((~(uint32_t)0) << bits2Read)) << unreadRightBits;
    weight += bitCountUInt32(((*p++) & mask) >> unreadRightBits);
    bitsLeft -= bits2Read;
  }
  /* get bits from intervening elems */
  while (bitsLeft >= bitElemBits)
  {
    while (bitsLeft >= bitElemBits
           && sizeof (accum) * CHAR_BIT - bitElemBits >= bitsInAccum)
    {
      accum = accum << bitElemBits | (*p++);
      bitsLeft -= bitElemBits;
      bitsInAccum += bitElemBits;
    }
    weight += bitCountUInt32(accum);
    accum = 0; bitsInAccum = 0;
  }
  /* get bits from last elem */
  if (bitsLeft)
  {
    accum = ((*p) & ((~(uint32_t)0)<<(bitElemBits - bitsLeft)));
    weight += bitCountUInt32(accum);
  }
  return weight;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x2f136b
movl %esi, %ecx
andl $0x7, %ecx
shrq $0x3, %rsi
addq %rsi, %rdi
testl %ecx, %ecx
je 0x2f12a9
movl $0x8, %eax
subl %ecx, %eax
cmpq %rdx, %rax
movq %rdx, %rsi
cmovbq %rax, %rsi
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl %esi, %ecx
shll %cl, %r8d
subl %esi, %eax
notl %r8d
movzbl (%rdi), %r9d
movl %eax, %ecx
shrl %cl, %r9d
incq %rdi
andl %r8d, %r9d
imull $0x8040201, %r9d, %eax  # imm = 0x8040201
shrl $0x3, %eax
andl $0x11111111, %eax       # imm = 0x11111111
imull $0x11111111, %eax, %eax # imm = 0x11111111
shrl $0x1c, %eax
subq %rsi, %rdx
jmp 0x2f12ab
xorl %eax, %eax
cmpq $0x8, %rdx
jb 0x2f1324
movl $0x33333333, %ecx       # imm = 0x33333333
xorl %esi, %esi
xorl %r8d, %r8d
movl %esi, %r9d
shll $0x8, %r9d
movzbl (%rdi), %esi
incq %rdi
orl %r9d, %esi
addq $-0x8, %rdx
cmpq $0x8, %rdx
jb 0x2f12e2
leal 0x8(%r8), %r9d
cmpl $0x11, %r8d
movl %r9d, %r8d
jb 0x2f12bb
movl %esi, %r8d
shrl %r8d
andl $0x55555555, %r8d       # imm = 0x55555555
subl %r8d, %esi
movl %esi, %r8d
andl %ecx, %r8d
shrl $0x2, %esi
andl %ecx, %esi
addl %r8d, %esi
movl %esi, %r8d
shrl $0x4, %r8d
addl %esi, %r8d
andl $0xf0f0f0f, %r8d        # imm = 0xF0F0F0F
imull $0x1010101, %r8d, %esi  # imm = 0x1010101
shrl $0x18, %esi
addq %rsi, %rax
cmpq $0x7, %rdx
ja 0x2f12b6
testq %rdx, %rdx
je 0x2f1369
movzbl (%rdi), %esi
movb $0x8, %cl
subb %dl, %cl
shrl %cl, %esi
shll %cl, %esi
movl %esi, %ecx
shrl %ecx
andl $0x55555555, %ecx       # imm = 0x55555555
subl %ecx, %esi
movl $0x33333333, %ecx       # imm = 0x33333333
movl %esi, %edx
andl %ecx, %edx
shrl $0x2, %esi
andl %ecx, %esi
addl %edx, %esi
movl %esi, %ecx
shrl $0x4, %ecx
addl %esi, %ecx
andl $0xf0f0f0f, %ecx        # imm = 0xF0F0F0F
imull $0x1010101, %ecx, %ecx  # imm = 0x1010101
shrl $0x18, %ecx
addq %rcx, %rax
popq %rcx
retq
callq 0x87180
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/core/bitpackstringop64.c
// Function: gt_bsStoreUInt64
void
gt_bsStoreUInt64(BitString str, BitOffset offset,
                 unsigned numBits, uint64_t val)
{
  unsigned bitsLeft = numBits,
    bitTop = offset%bitElemBits;
  size_t elemStart = offset/bitElemBits;
  BitElem *p = str + elemStart;
  gt_assert(str);
  gt_assert(numBits <= sizeof (val)*CHAR_BIT);
  /* set bits of first element, accounting for bits to be preserved */
  if (bitTop)
  {
    GtUint64 mask = ~(GtUint64)0;
    if (bitElemBits < (sizeof (GtUint64)*CHAR_BIT))
    {
      mask <<= bitElemBits;
    }
    else
    {
      mask = 0;
    }
    mask = (~mask) >> bitTop;
    if (numBits < bitElemBits - bitTop)
    {
      unsigned backShift = bitElemBits - numBits - bitTop;
      mask &= ~(GtUint64)0 << backShift;
      *p = (*p & ~mask) | ((val << backShift) & mask);
      /* TODO: try wether  r = a ^ ((a ^ b) & mask) is faster, see below */
      return;
    }
    else
    {
      bitsLeft -= bitElemBits - bitTop;
      *p = (*p & ~mask) | ((val >> bitsLeft) & mask);
      ++p;
    }
  }
  /* set bits for intervening elems */
  while (bitsLeft >= bitElemBits)
  {
    bitsLeft -= bitElemBits;
    *p++ = val >> bitsLeft;
  }
  /* set bits for last elem */
  if (bitsLeft)
  {
    GtUint64 mask =
      ((~(GtUint64)0)<<(bitElemBits - bitsLeft));
    if (bitElemBits < (sizeof (GtUint64)*CHAR_BIT))
      mask &= (~(~(GtUint64)0<<bitElemBits));
    *p = (*p & ~mask) | ((val << (bitElemBits - bitsLeft)) & mask);
  }
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x2f3950
cmpl $0x41, %edx
jae 0x2f3955
movq %rcx, %rax
movq %rsi, %rcx
movl %ecx, %r9d
andl $0x7, %r9d
shrq $0x3, %rsi
addq %rsi, %rdi
testl %r9d, %r9d
je 0x2f38dc
andl $0x7, %ecx
movl $0xff, %r8d
shrq %cl, %r8
movl $0x8, %r10d
subl %r9d, %r10d
movl %edx, %esi
subl %r10d, %esi
jae 0x2f38e0
addl %edx, %r9d
movl %r9d, %esi
jmp 0x2f392b
movl %edx, %esi
jmp 0x2f3903
movq $-0x100, %rdx
sarq %cl, %rdx
movzbl (%rdi), %ecx
andl %ecx, %edx
movq %rax, %r9
movl %esi, %ecx
shrq %cl, %r9
andl %r9d, %r8d
orl %edx, %r8d
movb %r8b, (%rdi)
incq %rdi
cmpl $0x8, %esi
jb 0x2f3921
movl %esi, %esi
addq $-0x8, %rsi
movq %rax, %rdx
movl %esi, %ecx
shrq %cl, %rdx
movb %dl, (%rdi)
incq %rdi
cmpq $0x7, %rsi
ja 0x2f390a
movl $0xfe, %r8d
testl %esi, %esi
je 0x2f394e
movb $0x8, %cl
subb %sil, %cl
movq $-0x1, %rdx
shlq %cl, %rdx
andl %r8d, %edx
movzbl (%rdi), %esi
notl %edx
shlq %cl, %rax
andl %esi, %edx
andl %r8d, %eax
orl %edx, %eax
movb %al, (%rdi)
popq %rax
retq
callq 0x87e54
callq 0x87e1d
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/affinealign.c
// Function: gt_affinealign_traceback
GtWord gt_affinealign_traceback(GtAlignment *align,
                                GtAffinealignDPentry * const *dptable,
                                GtUword i, GtUword j)
{
  GtWord minvalue;
  GtAffineAlignEdge edge;
  gt_assert(align && dptable);
  /* determine min{A_affine(m,n,x) | x in {R,D,I}} */
  minvalue = GT_MIN3(dptable[i][j].Rvalue, dptable[i][j].Dvalue,
                  dptable[i][j].Ivalue);
  if (dptable[i][j].Rvalue == minvalue)
    edge = Affine_R;
  else if (dptable[i][j].Dvalue == minvalue)
    edge = Affine_D;
  else /* dptable[i][j].Ivalue == minvalue */
    edge = Affine_I;
  /* backtracing */
  while (i > 0 || j > 0) {
    switch (edge) {
      case Affine_R:
        gt_assert(dptable[i][j].Rvalue != LONG_MAX);
        gt_alignment_add_replacement(align);
        edge = dptable[i][j].Redge;
        gt_assert(i > 0 && j > 0);
        i--;
        j--;
        break;
      case Affine_D:
        gt_alignment_add_deletion(align);
        edge = dptable[i][j].Dedge;
        gt_assert(i);
        i--;
        break;
      case Affine_I:
        gt_alignment_add_insertion(align);
        edge = dptable[i][j].Iedge;
        gt_assert(j);
        j--;
        break;
      default:
        gt_assert(false);
    }
  }
  return minvalue;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
testq %rdi, %rdi
je 0x2f92b5
movq %rsi, %r15
testq %rsi, %rsi
je 0x2f92b5
movq %rcx, %rbx
movq %rdx, %r14
movq (%r15,%rdx,8), %rdx
leaq (%rcx,%rcx,2), %rsi
shlq $0x4, %rsi
movq (%rdx,%rsi), %rcx
movq 0x8(%rdx,%rsi), %rax
movq 0x10(%rdx,%rsi), %rdx
cmpq %rax, %rcx
movq %rax, %rsi
cmovlq %rcx, %rsi
cmpq %rdx, %rsi
cmovgeq %rdx, %rsi
movq %rsi, 0x10(%rsp)
movq %r14, %rdx
orq %rbx, %rdx
je 0x2f9288
testq %rbx, %rbx
setne %r13b
testq %r14, %r14
setne %bpl
xorl %edx, %edx
movq 0x10(%rsp), %rsi
cmpq %rsi, %rax
setne %dl
incl %edx
xorl %eax, %eax
cmpq %rsi, %rcx
cmovnel %edx, %eax
cmpl $0x2, %eax
je 0x2f9247
cmpl $0x1, %eax
je 0x2f9220
testl %eax, %eax
jne 0x2f929c
movq (%r15,%r14,8), %rax
leaq (%rbx,%rbx,2), %r12
shlq $0x4, %r12
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, (%rax,%r12)
je 0x2f92b0
movq 0x8(%rsp), %rdi
callq 0x120f2d
andb %r13b, %bpl
testb $0x1, %bpl
je 0x2f92ab
movq (%r15,%r14,8), %rax
addq %r12, %rax
addq $0x20, %rax
decq %r14
jmp 0x2f9269
movq 0x8(%rsp), %rdi
callq 0x120f4a
testq %r14, %r14
je 0x2f92a1
movq (%r15,%r14,8), %rax
leaq (%rbx,%rbx,2), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x24, %rax
decq %r14
jmp 0x2f926c
movq 0x8(%rsp), %rdi
callq 0x120f67
testq %rbx, %rbx
je 0x2f92a6
movq (%r15,%r14,8), %rax
leaq (%rbx,%rbx,2), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x28, %rax
decq %rbx
movl (%rax), %eax
testq %r14, %r14
setne %bpl
testq %rbx, %rbx
setne %r13b
movq %r14, %rcx
orq %rbx, %rcx
jne 0x2f91c7
movq 0x10(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x89575
callq 0x894ca
callq 0x89491
callq 0x89503
callq 0x8953c
callq 0x89458
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/affinealign.c
// Function: gt_affinealign
GtAlignment* gt_affinealign(const GtUchar *u, GtUword ulen,
                            const GtUchar *v, GtUword vlen,
                            GtUword matchcost, GtUword mismatchcost,
                            GtUword gap_opening,
                            GtUword gap_extension)
{
  GtAffinealignDPentry **dptable;
  GtAlignment *align;

  gt_assert(u && v);
  gt_array2dim_malloc(dptable, ulen+1, vlen+1);
  affinealign_fill_table(dptable, u, ulen, v, vlen, matchcost, mismatchcost,
                         gap_opening, gap_extension, Affine_X, NULL);
  align = gt_alignment_new_with_seqs(u, ulen,  v, vlen);
  gt_affinealign_traceback(align, dptable, ulen, vlen);
  gt_array2dim_delete(dptable);
  return align;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x8(%rsp)
testq %rdi, %rdi
je 0x2f93f5
testq %rdx, %rdx
je 0x2f93f5
movq %rcx, %rbx
movq %rsi, %r14
movq %rdi, %r13
movq %rdx, (%rsp)
leaq 0x1(%rsi), %r15
leaq 0x8(,%rsi,8), %rdi
leaq 0xe2d48(%rip), %rbp     # 0x3dc04c
movq %rbp, %rsi
movl $0xc5, %edx
callq 0x104226
movq %rax, %r12
leaq 0x1(%rbx), %rax
imulq %r15, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
movq %rbp, %rsi
movl $0xc5, %edx
callq 0x104226
movq %rax, (%r12)
cmpq $0x2, %r15
jb 0x2f9360
leaq (%rbx,%rbx,2), %rax
shlq $0x4, %rax
addq $0x30, %rax
movq (%r12), %rcx
addq %rax, %rcx
xorl %edx, %edx
movq %rcx, 0x8(%r12,%rdx,8)
addq %rax, %rcx
incq %rdx
cmpq %rdx, %r14
jne 0x2f9350
subq $0x8, %rsp
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq 0x8(%rsp), %r15
movq %r15, %rcx
movq %rbx, %r8
movq 0x10(%rsp), %r9
pushq $0x0
pushq $0x3
pushq 0x70(%rsp)
pushq 0x70(%rsp)
pushq 0x38(%rsp)
callq 0x2f93fa
addq $0x30, %rsp
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x120d76
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x2f9138
movq (%r12), %rdi
leaq 0xe2c86(%rip), %rbx     # 0x3dc04c
movq %rbx, %rsi
movl $0xca, %edx
callq 0x1045eb
movq %r12, %rdi
movq %rbx, %rsi
movl $0xca, %edx
callq 0x1045eb
movq %r15, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x895ae
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/affinealign.c
// Function: gt_affinealign_with_Management
GtWord gt_affinealign_with_Management(GtLinspaceManagement *spacemanager,
                                     const GtScoreHandler *scorehandler,
                                     GtAlignment *align,
                                     const GtUchar *u, GtUword ulen,
                                     const GtUchar *v, GtUword vlen)
{
  GtAffinealignDPentry **dptable;
  GtUword idx;
  gt_assert(u && v && spacemanager && scorehandler);

  gt_assert((ulen+1)*(vlen+1)*sizeof(**dptable) <=
             gt_linspace_management_get_valueTabsize(spacemanager));

  dptable = gt_linspace_management_get_rTabspace(spacemanager);
  *dptable = gt_linspace_management_get_valueTabspace(spacemanager);

  for (idx = 1; idx < ulen + 1; idx++)
    dptable[idx] = dptable[idx-1] + vlen + 1;

  affinealign_fill_table(dptable, u, ulen, v, vlen, GT_WORD_MAX, GT_WORD_MAX,
                         GT_WORD_MAX, GT_WORD_MAX, Affine_X, scorehandler);
  return gt_affinealign_traceback(align, dptable, ulen, vlen);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, 0x10(%rsp)
movq %r9, 0x8(%rsp)
movq %r9, %xmm0
movq %rcx, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq %rsi, (%rsp)
movq %rsi, %xmm0
movq %rdi, %xmm2
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm2
pcmpeqd %xmm0, %xmm1
movdqa %xmm1, %xmm0
shufps $0xdd, %xmm2, %xmm0     # xmm0 = xmm0[1,3],xmm2[1,3]
shufps $0x88, %xmm2, %xmm1     # xmm1 = xmm1[0,2],xmm2[0,2]
andps %xmm0, %xmm1
movmskps %xmm1, %eax
testl %eax, %eax
jne 0x2f9896
movq %r8, %rbx
movq %rcx, %r13
movq %rdi, %r15
movq 0x50(%rsp), %rbp
leaq 0x1(%r8), %r12
leaq 0x1(%rbp), %rax
imulq %r12, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %r14
callq 0x15be4e
cmpq %rax, %r14
ja 0x2f989b
movq %r15, %rdi
callq 0x15be34
movq %rax, %r14
movq %r15, %rdi
callq 0x15be28
movq %rax, (%r14)
cmpq $0x2, %r12
jb 0x2f9841
leaq (,%rbp,2), %rax
addq %rbp, %rax
shlq $0x4, %rax
addq $0x30, %rax
movq (%r14), %rcx
addq %rax, %rcx
xorl %edx, %edx
movq %rcx, 0x8(%r14,%rdx,8)
addq %rax, %rcx
incq %rdx
cmpq %rdx, %rbx
jne 0x2f9831
subq $0x8, %rsp
movabsq $0x7fffffffffffffff, %r9 # imm = 0x7FFFFFFFFFFFFFFF
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq 0x10(%rsp), %rcx
movq %rbp, %r8
pushq 0x8(%rsp)
pushq $0x3
pushq %r9
pushq %r9
pushq %r9
callq 0x2f93fa
addq $0x30, %rsp
movq 0x10(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2f9138
callq 0x896c3
callq 0x896fc
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/aligned_segment.c
// Function: gt_aligned_segment_enable_edit_tracking
void gt_aligned_segment_enable_edit_tracking(GtAlignedSegment *as)
{
  gt_assert(as != NULL);
  gt_assert(as->s_orig == NULL);
  as->s_orig = gt_malloc(sizeof (*as->s_orig) * (as->alen + 1UL));
  memcpy(as->s_orig, as->s, (size_t)(as->alen + 1UL));
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x2fa781
movq %rdi, %rbx
cmpq $0x0, 0x40(%rdi)
jne 0x2fa786
movq 0x20(%rbx), %rdi
incq %rdi
leaq 0xe1ba4(%rip), %rsi     # 0x3dc304
movl $0xda, %edx
callq 0x104226
movq %rax, 0x40(%rbx)
movq (%rbx), %rsi
movq 0x20(%rbx), %rdx
incq %rdx
movq %rax, %rdi
popq %rbx
jmp 0x17660
callq 0x89ced
callq 0x89cb4
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/aligned_segment.c
// Function: gt_aligned_segment_offset_for_refpos
GtUword gt_aligned_segment_offset_for_refpos(const GtAlignedSegment *as,
    GtUword refpos)
{
  GtUword r_offset, pos, ungapped_pos;
  gt_assert(as != NULL);
  if (refpos < as->r_left || refpos > as->r_right)
    return GT_UNDEF_UWORD;
  r_offset = refpos - as->r_left;
  pos = 0;
  ungapped_pos = 0;
  while (ungapped_pos < r_offset)
  {
    if (as->r[pos] != '-')
      ungapped_pos++;
    pos++;
  }
  gt_assert(pos <= as->alen);
  return pos;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x2fa864
movq 0x28(%rdi), %rcx
movq $-0x1, %rax
cmpq %rcx, %rsi
jb 0x2fa862
cmpq %rsi, 0x30(%rdi)
jb 0x2fa862
subq %rcx, %rsi
jne 0x2fa83e
xorl %eax, %eax
jmp 0x2fa862
movq 0x10(%rdi), %rcx
xorl %edx, %edx
xorl %eax, %eax
xorl %r8d, %r8d
cmpb $0x2d, (%rcx,%rax)
setne %r8b
addq %r8, %rdx
incq %rax
cmpq %rsi, %rdx
jb 0x2fa846
cmpq 0x20(%rdi), %rax
ja 0x2fa869
popq %rcx
retq
callq 0x89f60
callq 0x89f27
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/aligned_segment.c
// Function: gt_aligned_segment_orig_seqpos_for_refpos
GtUword gt_aligned_segment_orig_seqpos_for_refpos(
    const GtAlignedSegment *as, GtUword refpos)
{
  GtUword r_offset, gapped_pos, ungapped_pos_on_r, ungapped_pos_on_s_orig;
  gt_assert(as != NULL);
  gt_assert(as->s_orig != NULL);
  if (refpos < as->r_left || refpos > as->r_right)
    return GT_UNDEF_UWORD;
  r_offset = refpos - as->r_left;
  gapped_pos = 0;
  ungapped_pos_on_r = 0;
  ungapped_pos_on_s_orig = 0;
  while (ungapped_pos_on_r < r_offset)
  {
    if (as->r[gapped_pos] != '-')
      ungapped_pos_on_r++;
    if (as->s_orig[gapped_pos] != '-')
      ungapped_pos_on_s_orig++;
    gapped_pos++;
  }
  gt_assert(gapped_pos <= as->alen);
  if (as->r_reverse)
    return as->orig_seqlen - 1UL - ungapped_pos_on_s_orig;
  else
    return ungapped_pos_on_s_orig;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x2fa8f3
movq 0x40(%rdi), %rcx
testq %rcx, %rcx
je 0x2fa8f8
movq 0x28(%rdi), %rdx
movq $-0x1, %rax
cmpq %rdx, %rsi
jb 0x2fa8f1
cmpq %rsi, 0x30(%rdi)
jb 0x2fa8f1
subq %rdx, %rsi
jne 0x2fa8ac
xorl %eax, %eax
jmp 0x2fa8e4
movq 0x10(%rdi), %rdx
xorl %eax, %eax
xorl %r9d, %r9d
xorl %r8d, %r8d
xorl %r10d, %r10d
cmpb $0x2d, (%rdx,%r8)
setne %r10b
addq %r10, %r9
xorl %r10d, %r10d
cmpb $0x2d, (%rcx,%r8)
setne %r10b
addq %r10, %rax
incq %r8
cmpq %rsi, %r9
jb 0x2fa8b8
cmpq 0x20(%rdi), %r8
ja 0x2fa8fd
cmpb $0x1, 0x38(%rdi)
jne 0x2fa8f1
notq %rax
addq 0x48(%rdi), %rax
popq %rcx
retq
callq 0x8a044
callq 0x8a00b
callq 0x89fd2