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: groupConcatValue
static void groupConcatValue(sqlite3_context *context){
  sqlite3_str *pAccum;
  pAccum = (sqlite3_str*)sqlite3_aggregate_context(context, 0);
  if( pAccum ){
    if( pAccum->accError==SQLITE_TOOBIG ){
      sqlite3_result_error_toobig(context);
    }else if( pAccum->accError==SQLITE_NOMEM ){
      sqlite3_result_error_nomem(context);
    }else{
      const char *zText = sqlite3_str_value(pAccum);
      sqlite3_result_text(context, zText, -1, SQLITE_TRANSIENT);
    }
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ebeed
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2799b4
jmp 0x2ebef1
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2ebf28
movzbl 0x1c(%rax), %ecx
cmpl $0x7, %ecx
je 0x2ebf2a
cmpl $0x12, %ecx
jne 0x2ebf33
movl $0x12, 0x24(%rbx)
movq (%rbx), %rdi
leaq 0xe99e5(%rip), %rsi     # 0x3d58fa
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
popq %rbx
jmp 0x278594
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x278af1
movl 0x18(%rax), %ecx
testq %rcx, %rcx
je 0x2ebf49
movq 0x8(%rax), %rdx
movb $0x0, (%rdx,%rcx)
movq 0x8(%rax), %rsi
jmp 0x2ebf4b
xorl %esi, %esi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
popq %rbx
jmp 0x278487
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: groupConcatInverse
static void groupConcatInverse(
  sqlite3_context *context,
  int argc,
  sqlite3_value **argv
){
  int n;
  StrAccum *pAccum;
  assert( argc==1 || argc==2 );
  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
  pAccum = (StrAccum*)sqlite3_aggregate_context(context, sizeof(*pAccum));
  /* pAccum is always non-NULL since groupConcatStep() will have always
  ** run frist to initialize it */
  if( ALWAYS(pAccum) ){
    n = sqlite3_value_bytes(argv[0]);
    if( argc==2 ){
      n += sqlite3_value_bytes(argv[1]);
    }else{
      n++;
    }
    if( n>=(int)pAccum->nChar ){
      pAccum->nChar = 0;
    }else{
      pAccum->nChar -= n;
      memmove(pAccum->zText, &pAccum->zText[n], pAccum->nChar);
    }
    if( pAccum->nChar==0 ) pAccum->mxAlloc = 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdx), %rax
movl 0x8(%rax), %eax
movabsq $-0x5555555555555556, %rcx # imm = 0xAAAAAAAAAAAAAAAA
btq %rax, %rcx
jb 0x2ec00d
movq %rdx, %r14
movl %esi, %ebp
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ebfa5
movl $0x20, %esi
callq 0x2799b4
movq %rax, %rbx
jmp 0x2ebfa9
movq 0x10(%rax), %rbx
testq %rbx, %rbx
je 0x2ec00d
movq (%r14), %rdi
movl $0x1, %r15d
movl $0x1, %esi
callq 0x278229
movl %eax, %r12d
cmpl $0x2, %ebp
jne 0x2ebfda
movq 0x8(%r14), %rdi
movl $0x1, %esi
callq 0x278229
movl %eax, %r15d
addl %r12d, %r15d
movl 0x18(%rbx), %edx
subl %r15d, %edx
jle 0x2ebfff
movl %edx, 0x18(%rbx)
movq 0x8(%rbx), %rdi
movslq %r15d, %rsi
addq %rdi, %rsi
callq 0x17cd0
cmpl $0x0, 0x18(%rbx)
jne 0x2ec00d
jmp 0x2ec006
movl $0x0, 0x18(%rbx)
movl $0x0, 0x14(%rbx)
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: sqlite3InsertBuiltinFuncs
SQLITE_PRIVATE void sqlite3InsertBuiltinFuncs(
  FuncDef *aDef,      /* List of global functions to be inserted */
  int nDef            /* Length of the apDef[] list */
){
  int i;
  for(i=0; i<nDef; i++){
    FuncDef *pOther;
    const char *zName = aDef[i].zName;
    int nName = sqlite3Strlen30(zName);
    int h = SQLITE_FUNC_HASH(zName[0], nName);
    assert( zName[0]>='a' && zName[0]<='z' );
    pOther = sqlite3FunctionSearch(h, zName);
    if( pOther ){
      assert( pOther!=&aDef[i] && pOther->pNext!=&aDef[i] );
      aDef[i].pNext = pOther->pNext;
      pOther->pNext = &aDef[i];
    }else{
      aDef[i].pNext = 0;
      aDef[i].u.pHash = sqlite3BuiltinFunctions.a[h];
      sqlite3BuiltinFunctions.a[h] = &aDef[i];
    }
  }
}

// Assembly:
testl %esi, %esi
jle 0x2ec0d5
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl %esi, %r12d
leaq 0x1d2cb4(%rip), %r13    # 0x4bece8
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x2ec04c
movq %r14, %rdi
callq 0x172f0
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
jmp 0x2ec04e
xorl %eax, %eax
movsbl (%r14), %ecx
addl %eax, %ecx
movslq %ecx, %rax
imulq $-0x4de9bd37, %rax, %r15 # imm = 0xB21642C9
shrq $0x20, %r15
addl %eax, %r15d
movl %r15d, %ecx
shrl $0x1f, %ecx
sarl $0x4, %r15d
addl %ecx, %r15d
leal (%r15,%r15,2), %ecx
shll $0x3, %ecx
subl %ecx, %r15d
addl %eax, %r15d
movl %r15d, %edi
movq %r14, %rsi
callq 0x2efd9f
testq %rax, %rax
je 0x2ec09a
addq $0x10, %rax
movl $0x10, %ecx
jmp 0x2ec0b5
movq $0x0, 0x10(%rbx)
movslq %r15d, %rax
leaq (,%rax,8), %rax
addq %r13, %rax
movl $0x40, %ecx
movq (%rax), %rdx
movq %rdx, (%rbx,%rcx)
movq %rbx, (%rax)
addq $0x48, %rbx
decq %r12
jne 0x2ec034
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: contextMalloc
static void *contextMalloc(sqlite3_context *context, i64 nByte){
  char *z;
  sqlite3 *db = sqlite3_context_db_handle(context);
  assert( nByte>0 );
  testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH] );
  testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
  if( nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
    sqlite3_result_error_toobig(context);
    z = 0;
  }else{
    z = sqlite3Malloc(nByte);
    if( !z ){
      sqlite3_result_error_nomem(context);
    }
  }
  return z;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x28(%rdi), %rax
movslq 0x7c(%rax), %rax
cmpq %rsi, %rax
jge 0x2ec112
movl $0x12, 0x24(%r14)
leaq 0xe97fe(%rip), %rsi     # 0x3d58fa
xorl %ebx, %ebx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x278594
jmp 0x2ec12c
movq %rsi, %rdi
callq 0x272ae6
movq %rax, %rbx
testq %rax, %rax
jne 0x2ec12c
movq %r14, %rdi
callq 0x278af1
xorl %ebx, %ebx
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: minMaxValueFinalize
static void minMaxValueFinalize(sqlite3_context *context, int bValue){
  sqlite3_value *pRes;
  pRes = (sqlite3_value *)sqlite3_aggregate_context(context, 0);
  if( pRes ){
    if( pRes->flags ){
      sqlite3_result_value(context, pRes);
    }
    if( bValue==0 ) sqlite3VdbeMemRelease(pRes);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r15
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ec15a
movq %r15, %rdi
xorl %esi, %esi
callq 0x2799b4
movq %rax, %r14
jmp 0x2ec15e
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x2ec17a
cmpw $0x0, 0x8(%r14)
je 0x2ec176
movq (%r15), %rdi
movq %r14, %rsi
callq 0x278985
testl %ebx, %ebx
je 0x2ec180
popq %rbx
popq %r14
popq %r15
retq
testb $0x24, 0x9(%r14)
jne 0x2ec18e
cmpl $0x0, 0x20(%r14)
je 0x2ec17a
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x291775
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: renameParseSql
static int renameParseSql(
  Parse *p,                       /* Memory to use for Parse object */
  const char *zDb,                /* Name of schema SQL belongs to */
  sqlite3 *db,                    /* Database handle */
  const char *zSql,               /* SQL to parse */
  int bTemp                       /* True if SQL is from temp schema */
){
  int rc;
  char *zErr = 0;

  db->init.iDb = bTemp ? 1 : sqlite3FindDbName(db, zDb);

  /* Parse the SQL statement passed as the first argument. If no error
  ** occurs and the parse does not result in a new table, index or
  ** trigger object, the database must be corrupt. */
  memset(p, 0, sizeof(Parse));
  p->eParseMode = PARSE_MODE_RENAME;
  p->db = db;
  p->nQueryLoop = 1;
  rc = sqlite3RunParser(p, zSql, &zErr);
  assert( p->zErrMsg==0 );
  assert( rc!=SQLITE_OK || zErr==0 );
  p->zErrMsg = zErr;
  if( db->mallocFailed ) rc = SQLITE_NOMEM;
  if( rc==SQLITE_OK
   && p->pNewTable==0 && p->pNewIndex==0 && p->pNewTrigger==0
  ){
    rc = SQLITE_CORRUPT_BKPT;
  }

#ifdef SQLITE_DEBUG
  /* Ensure that all mappings in the Parse.pRename list really do map to
  ** a part of the input string.  */
  if( rc==SQLITE_OK ){
    int nSql = sqlite3Strlen30(zSql);
    RenameToken *pToken;
    for(pToken=p->pRename; pToken; pToken=pToken->pNext){
      assert( pToken->t.z>=zSql && &pToken->t.z[pToken->t.n]<=&zSql[nSql] );
    }
  }
#endif

  db->init.iDb = 0;
  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rdi, %r14
movq $0x0, 0x8(%rsp)
movb $0x1, %al
testl %r8d, %r8d
jne 0x2ed133
movq %rbx, %rdi
callq 0x280170
movb %al, 0xb4(%rbx)
leaq 0x8(%r14), %rdi
movl $0x1a0, %edx            # imm = 0x1A0
xorl %esi, %esi
callq 0x173a0
movb $0x2, 0x11c(%r14)
movq %rbx, (%r14)
movl $0x1, 0xc4(%r14)
leaq 0x8(%rsp), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x27daa4
movq (%r12), %rcx
movq %rcx, 0x8(%r14)
cmpb $0x0, 0x61(%rbx)
movl $0x7, %ebp
cmovel %eax, %ebp
testl %ebp, %ebp
jne 0x2ed1a0
cmpq $0x0, 0x148(%r14)
jne 0x2ed19e
cmpq $0x0, 0x150(%r14)
je 0x2ed1b6
xorl %ebp, %ebp
movb $0x0, 0xb4(%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x158(%r14)
movl $0x0, %ebp
jne 0x2ed1a0
leaq 0xe89ff(%rip), %rsi     # 0x3d5bcb
leaq 0xe8b09(%rip), %rdx     # 0x3d5cdc
leaq 0xe8857(%rip), %r8      # 0x3d5a31
movl $0xb, %ebp
movl $0xb, %edi
movl $0x1a164, %ecx          # imm = 0x1A164
xorl %eax, %eax
callq 0x274d08
jmp 0x2ed1a0
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: renameColumnExprCb
static int renameColumnExprCb(Walker *pWalker, Expr *pExpr){
  RenameCtx *p = pWalker->u.pRename;
  if( pExpr->op==TK_TRIGGER
   && pExpr->iColumn==p->iCol
   && pWalker->pParse->pTriggerTab==p->pTab
  ){
    renameTokenFind(pWalker->pParse, p, (void*)pExpr);
  }else if( pExpr->op==TK_COLUMN
   && pExpr->iColumn==p->iCol
   && p->pTab==pExpr->y.pTab
  ){
    renameTokenFind(pWalker->pParse, p, (void*)pExpr);
  }
  return WRC_Continue;
}

// Assembly:
movq 0x28(%rdi), %rax
movzbl (%rsi), %ecx
cmpl $0xa4, %ecx
je 0x2ed24b
cmpl $0x4d, %ecx
jne 0x2ed2a4
movswl 0x30(%rsi), %ecx
cmpl %ecx, 0xc(%rax)
jne 0x2ed2a4
movq (%rdi), %rdx
movq 0xa8(%rdx), %rcx
cmpq 0x10(%rax), %rcx
jne 0x2ed2a4
movq 0x1a0(%rdx), %rcx
testq %rcx, %rcx
je 0x2ed2a4
cmpq %rsi, (%rcx)
je 0x2ed289
movq %rcx, %rdx
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
je 0x2ed2a4
cmpq %rsi, (%rcx)
jne 0x2ed238
jmp 0x2ed283
movswl 0x30(%rsi), %ecx
cmpl %ecx, 0xc(%rax)
jne 0x2ed2a4
movq 0x10(%rax), %rcx
cmpq 0x40(%rsi), %rcx
jne 0x2ed2a4
movq (%rdi), %rdx
movq 0x1a0(%rdx), %rcx
testq %rcx, %rcx
je 0x2ed2a4
cmpq %rsi, (%rcx)
je 0x2ed289
movq %rcx, %rdx
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
je 0x2ed2a4
cmpq %rsi, (%rcx)
jne 0x2ed272
addq $0x18, %rdx
jmp 0x2ed290
addq $0x1a0, %rdx            # imm = 0x1A0
movq 0x18(%rcx), %rsi
movq %rsi, (%rdx)
movq (%rax), %rdx
movq %rdx, 0x18(%rcx)
movq %rcx, (%rax)
incl 0x8(%rax)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: renameColumnElistNames
static void renameColumnElistNames(
  Parse *pParse,
  RenameCtx *pCtx,
  ExprList *pEList,
  const char *zOld
){
  if( pEList ){
    int i;
    for(i=0; i<pEList->nExpr; i++){
      char *zName = pEList->a[i].zEName;
      if( ALWAYS(pEList->a[i].eEName==ENAME_NAME)
       && ALWAYS(zName!=0)
       && 0==sqlite3_stricmp(zName, zOld)
      ){
        renameTokenFind(pParse, pCtx, (void*)zName);
      }
    }
  }
}

// Assembly:
testq %rdx, %rdx
je 0x2ed616
movslq (%rdx), %rax
testq %rax, %rax
jle 0x2ed616
pushq %r14
pushq %rbx
addq $0x8, %rdx
addq $0x1a0, %rdi            # imm = 0x1A0
xorl %r8d, %r8d
leaq 0xe3d58(%rip), %r9      # 0x3d12e0
testq %rcx, %rcx
je 0x2ed607
leaq (%r8,%r8,2), %r10
movb 0x11(%rdx,%r10,8), %r11b
andb $0x3, %r11b
jne 0x2ed607
movq 0x8(%rdx,%r10,8), %r10
testq %r10, %r10
je 0x2ed607
xorl %r11d, %r11d
movzbl (%r10,%r11), %ebx
movzbl (%rcx,%r11), %r14d
cmpb %r14b, %bl
jne 0x2ed5bf
testq %rbx, %rbx
jne 0x2ed5c9
jmp 0x2ed5ce
movb (%rbx,%r9), %bl
cmpb (%r14,%r9), %bl
jne 0x2ed607
incq %r11
jmp 0x2ed5a9
movq (%rdi), %r11
testq %r11, %r11
je 0x2ed607
movq %rdi, %rbx
cmpq %r10, (%r11)
je 0x2ed5f3
movq %r11, %rbx
movq 0x18(%r11), %r11
testq %r11, %r11
je 0x2ed607
cmpq %r10, (%r11)
jne 0x2ed5de
addq $0x18, %rbx
movq 0x18(%r11), %r10
movq %r10, (%rbx)
movq (%rsi), %r10
movq %r10, 0x18(%r11)
movq %r11, (%rsi)
incl 0x8(%rsi)
incq %r8
cmpq %rax, %r8
jne 0x2ed588
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: renameColumnIdlistNames
static void renameColumnIdlistNames(
  Parse *pParse,
  RenameCtx *pCtx,
  IdList *pIdList,
  const char *zOld
){
  if( pIdList ){
    int i;
    for(i=0; i<pIdList->nId; i++){
      char *zName = pIdList->a[i].zName;
      if( 0==sqlite3_stricmp(zName, zOld) ){
        renameTokenFind(pParse, pCtx, (void*)zName);
      }
    }
  }
}

// Assembly:
testq %rdx, %rdx
je 0x2ed6ce
movslq 0x8(%rdx), %rax
testq %rax, %rax
jle 0x2ed6ce
pushq %r14
pushq %rbx
addq $0x1a0, %rdi            # imm = 0x1A0
xorl %r8d, %r8d
leaq 0xe3c9f(%rip), %r9      # 0x3d12e0
movq (%rdx), %r10
movq %r8, %r11
shlq $0x4, %r11
movq (%r10,%r11), %r10
testq %r10, %r10
je 0x2ed681
testq %rcx, %rcx
je 0x2ed6bf
xorl %r11d, %r11d
movzbl (%r10,%r11), %ebx
movzbl (%rcx,%r11), %r14d
cmpb %r14b, %bl
jne 0x2ed672
testq %rbx, %rbx
jne 0x2ed67c
jmp 0x2ed686
movb (%rbx,%r9), %bl
cmpb (%r14,%r9), %bl
jne 0x2ed6bf
incq %r11
jmp 0x2ed65c
testq %rcx, %rcx
jne 0x2ed6bf
movq (%rdi), %r11
testq %r11, %r11
je 0x2ed6bf
movq %rdi, %rbx
cmpq %r10, (%r11)
je 0x2ed6ab
movq %r11, %rbx
movq 0x18(%r11), %r11
testq %r11, %r11
je 0x2ed6bf
cmpq %r10, (%r11)
jne 0x2ed696
addq $0x18, %rbx
movq 0x18(%r11), %r10
movq %r10, (%rbx)
movq (%rsi), %r10
movq %r10, 0x18(%r11)
movq %r11, (%rsi)
incl 0x8(%rsi)
incq %r8
cmpq %rax, %r8
jne 0x2ed641
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: renameWalkTrigger
static void renameWalkTrigger(Walker *pWalker, Trigger *pTrigger){
  TriggerStep *pStep;

  /* Find tokens to edit in WHEN clause */
  sqlite3WalkExpr(pWalker, pTrigger->pWhen);

  /* Find tokens to edit in trigger steps */
  for(pStep=pTrigger->step_list; pStep; pStep=pStep->pNext){
    sqlite3WalkSelect(pWalker, pStep->pSelect);
    sqlite3WalkExpr(pWalker, pStep->pWhere);
    sqlite3WalkExprList(pWalker, pStep->pExprList);
    if( pStep->pUpsert ){
      Upsert *pUpsert = pStep->pUpsert;
      sqlite3WalkExprList(pWalker, pUpsert->pUpsertTarget);
      sqlite3WalkExprList(pWalker, pUpsert->pUpsertSet);
      sqlite3WalkExpr(pWalker, pUpsert->pUpsertWhere);
      sqlite3WalkExpr(pWalker, pUpsert->pUpsertTargetWhere);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rsi), %rsi
testq %rsi, %rsi
je 0x2ed6eb
movq %rbx, %rdi
callq 0x2c0a8c
movq 0x38(%r14), %r14
testq %r14, %r14
je 0x2ed765
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x2c0b5b
movq 0x28(%r14), %rsi
testq %rsi, %rsi
je 0x2ed711
movq %rbx, %rdi
callq 0x2c0a8c
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x2c0cc0
movq 0x40(%r14), %r15
testq %r15, %r15
je 0x2ed75f
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x2c0cc0
movq 0x10(%r15), %rsi
movq %rbx, %rdi
callq 0x2c0cc0
movq 0x18(%r15), %rsi
testq %rsi, %rsi
je 0x2ed74e
movq %rbx, %rdi
callq 0x2c0a8c
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0x2ed75f
movq %rbx, %rdi
callq 0x2c0a8c
movq 0x50(%r14), %r14
jmp 0x2ed6ef
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: renameColumnParseError
static void renameColumnParseError(
  sqlite3_context *pCtx,
  int bPost,
  sqlite3_value *pType,
  sqlite3_value *pObject,
  Parse *pParse
){
  const char *zT = (const char*)sqlite3_value_text(pType);
  const char *zN = (const char*)sqlite3_value_text(pObject);
  char *zErr;

  zErr = sqlite3_mprintf("error in %s %s%s: %s",
      zT, zN, (bPost ? " after rename" : ""),
      pParse->zErrMsg
  );
  sqlite3_result_error(pCtx, zErr, -1);
  sqlite3_free(zErr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rcx, %r15
movl %esi, %ebp
movq %rdi, %rbx
movq %rdx, %rdi
movl $0x1, %esi
callq 0x278305
movq %rax, %r12
movq %r15, %rdi
movl $0x1, %esi
callq 0x278305
testl %ebp, %ebp
leaq 0xdc75d(%rip), %rdx     # 0x3ca170
leaq 0xec6eb(%rip), %rcx     # 0x3da105
cmoveq %rdx, %rcx
movq 0x8(%r14), %r8
leaq 0xec6c7(%rip), %rdi     # 0x3da0f0
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x274b53
movq %rax, %r14
movl $0x1, 0x24(%rbx)
movq (%rbx), %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
callq 0x278594
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x272c00
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: renameParseCleanup
static void renameParseCleanup(Parse *pParse){
  sqlite3 *db = pParse->db;
  Index *pIdx;
  if( pParse->pVdbe ){
    sqlite3VdbeFinalize(pParse->pVdbe);
  }
  sqlite3DeleteTable(db, pParse->pNewTable);
  while( (pIdx = pParse->pNewIndex)!=0 ){
    pParse->pNewIndex = pIdx->pNext;
    sqlite3FreeIndex(db, pIdx);
  }
  sqlite3DeleteTrigger(db, pParse->pNewTrigger);
  sqlite3DbFree(db, pParse->zErrMsg);
  renameTokenFree(db, pParse->pRename);
  sqlite3ParserReset(pParse);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x2eda85
callq 0x277f75
movq 0x148(%rbx), %rsi
movq %r14, %rdi
callq 0x272447
movq 0x150(%rbx), %rsi
testq %rsi, %rsi
je 0x2edab5
movq 0x28(%rsi), %rax
movq %rax, 0x150(%rbx)
movq %r14, %rdi
callq 0x2a60fe
jmp 0x2eda94
movq 0x158(%rbx), %rsi
movq %r14, %rdi
callq 0x2723de
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x2edad5
movq %r14, %rdi
callq 0x282904
movq 0x1a0(%rbx), %rsi
testq %rsi, %rsi
je 0x2edaf5
movq 0x18(%rsi), %r15
movq %r14, %rdi
callq 0x282904
movq %r15, %rsi
testq %r15, %r15
jne 0x2edae1
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x27bd9d
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: renameTableExprCb
static int renameTableExprCb(Walker *pWalker, Expr *pExpr){
  RenameCtx *p = pWalker->u.pRename;
  if( pExpr->op==TK_COLUMN && p->pTab==pExpr->y.pTab ){
    renameTokenFind(pWalker->pParse, p, (void*)&pExpr->y.pTab);
  }
  return WRC_Continue;
}

// Assembly:
cmpb $-0x5c, (%rsi)
jne 0x2edb5f
movq 0x28(%rdi), %rax
movq 0x10(%rax), %rcx
cmpq 0x40(%rsi), %rcx
jne 0x2edb5f
movq (%rdi), %rdx
movq 0x1a0(%rdx), %rcx
testq %rcx, %rcx
je 0x2edb5f
addq $0x40, %rsi
cmpq %rsi, (%rcx)
je 0x2edb44
movq %rcx, %rdx
movq 0x18(%rcx), %rcx
testq %rcx, %rcx
je 0x2edb5f
cmpq %rsi, (%rcx)
jne 0x2edb2d
addq $0x18, %rdx
jmp 0x2edb4b
addq $0x1a0, %rdx            # imm = 0x1A0
movq 0x18(%rcx), %rsi
movq %rsi, (%rdx)
movq (%rax), %rdx
movq %rdx, 0x18(%rcx)
movq %rcx, (%rax)
incl 0x8(%rax)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: renameTableSelectCb
static int renameTableSelectCb(Walker *pWalker, Select *pSelect){
  int i;
  RenameCtx *p = pWalker->u.pRename;
  SrcList *pSrc = pSelect->pSrc;
  if( pSelect->selFlags & SF_View ) return WRC_Prune;
  if( pSrc==0 ){
    assert( pWalker->pParse->db->mallocFailed );
    return WRC_Abort;
  }
  for(i=0; i<pSrc->nSrc; i++){
    struct SrcList_item *pItem = &pSrc->a[i];
    if( pItem->pTab==p->pTab ){
      renameTokenFind(pWalker->pParse, p, pItem->zName);
    }
  }
  renameWalkWith(pWalker, pSelect);

  return WRC_Continue;
}

// Assembly:
movl $0x1, %eax
testb $0x20, 0x6(%rsi)
jne 0x2edc05
movq 0x28(%rsi), %rax
testq %rax, %rax
je 0x2edc06
pushq %rax
movslq (%rax), %rcx
testq %rcx, %rcx
jle 0x2edbf6
movq 0x28(%rdi), %rdx
addq $0x8, %rax
xorl %r8d, %r8d
imulq $0x70, %r8, %r11
movq 0x20(%rax,%r11), %r9
cmpq 0x10(%rdx), %r9
jne 0x2edbee
movq (%rdi), %r10
movq 0x1a0(%r10), %r9
testq %r9, %r9
je 0x2edbee
addq %rax, %r11
movq 0x10(%r11), %r11
cmpq %r11, (%r9)
je 0x2edbd3
movq %r9, %r10
movq 0x18(%r9), %r9
testq %r9, %r9
je 0x2edbee
cmpq %r11, (%r9)
jne 0x2edbbc
addq $0x18, %r10
jmp 0x2edbda
addq $0x1a0, %r10            # imm = 0x1A0
movq 0x18(%r9), %r11
movq %r11, (%r10)
movq (%rdx), %r10
movq %r10, 0x18(%r9)
movq %r9, (%rdx)
incl 0x8(%rdx)
incq %r8
cmpq %rcx, %r8
jne 0x2edb92
movq 0x68(%rsi), %rsi
callq 0x2c9ade
xorl %eax, %eax
addq $0x8, %rsp
retq
movl $0x2, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: row_numberStepFunc
static void row_numberStepFunc(
  sqlite3_context *pCtx,
  int nArg,
  sqlite3_value **apArg
){
  i64 *p = (i64*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p ) (*p)++;
  UNUSED_PARAMETER(nArg);
  UNUSED_PARAMETER(apArg);
}

// Assembly:
pushq %rax
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2edc23
movl $0x8, %esi
callq 0x2799b4
jmp 0x2edc27
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2edc2f
incq (%rax)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: dense_rankStepFunc
static void dense_rankStepFunc(
  sqlite3_context *pCtx,
  int nArg,
  sqlite3_value **apArg
){
  struct CallCount *p;
  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p ) p->nStep = 1;
  UNUSED_PARAMETER(nArg);
  UNUSED_PARAMETER(apArg);
}

// Assembly:
pushq %rax
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2edc8f
movl $0x18, %esi
callq 0x2799b4
jmp 0x2edc93
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2edca0
movq $0x1, 0x8(%rax)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: dense_rankValueFunc
static void dense_rankValueFunc(sqlite3_context *pCtx){
  struct CallCount *p;
  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p ){
    if( p->nStep ){
      p->nValue++;
      p->nStep = 0;
    }
    sqlite3_result_int64(pCtx, p->nValue);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2edcbf
movq %rbx, %rdi
movl $0x18, %esi
callq 0x2799b4
jmp 0x2edcc3
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2edcf8
cmpq $0x0, 0x8(%rax)
movq (%rax), %rsi
je 0x2edce0
incq %rsi
movq %rsi, (%rax)
movq $0x0, 0x8(%rax)
movq (%rbx), %rdi
testb $0x24, 0x9(%rdi)
je 0x2edcef
popq %rbx
jmp 0x2929ee
movq %rsi, (%rdi)
movw $0x4, 0x8(%rdi)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: rankStepFunc
static void rankStepFunc(
  sqlite3_context *pCtx,
  int nArg,
  sqlite3_value **apArg
){
  struct CallCount *p;
  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p ){
    p->nStep++;
    if( p->nValue==0 ){
      p->nValue = p->nStep;
    }
  }
  UNUSED_PARAMETER(nArg);
  UNUSED_PARAMETER(apArg);
}

// Assembly:
pushq %rax
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2edd11
movl $0x18, %esi
callq 0x2799b4
jmp 0x2edd15
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2edd2e
movq 0x8(%rax), %rcx
incq %rcx
movq %rcx, 0x8(%rax)
cmpq $0x0, (%rax)
jne 0x2edd2e
movq %rcx, (%rax)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: rankValueFunc
static void rankValueFunc(sqlite3_context *pCtx){
  struct CallCount *p;
  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p ){
    sqlite3_result_int64(pCtx, p->nValue);
    p->nValue = 0;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2edd53
movq %r14, %rdi
movl $0x18, %esi
callq 0x2799b4
movq %rax, %rbx
jmp 0x2edd57
movq 0x10(%rax), %rbx
testq %rbx, %rbx
je 0x2edd7f
movq (%rbx), %rsi
movq (%r14), %rdi
testb $0x24, 0x9(%rdi)
je 0x2edd6f
callq 0x2929ee
jmp 0x2edd78
movq %rsi, (%rdi)
movw $0x4, 0x8(%rdi)
movq $0x0, (%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: percent_rankStepFunc
static void percent_rankStepFunc(
  sqlite3_context *pCtx,
  int nArg,
  sqlite3_value **apArg
){
  struct CallCount *p;
  UNUSED_PARAMETER(nArg); assert( nArg==0 );
  UNUSED_PARAMETER(apArg);
  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p ){
    p->nTotal++;
  }
}

// Assembly:
pushq %rax
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2edd9e
movl $0x18, %esi
callq 0x2799b4
jmp 0x2edda2
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2eddab
incq 0x10(%rax)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: percent_rankValueFunc
static void percent_rankValueFunc(sqlite3_context *pCtx){
  struct CallCount *p;
  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p ){
    p->nValue = p->nStep;
    if( p->nTotal>1 ){
      double r = (double)p->nValue / (double)(p->nTotal-1);
      sqlite3_result_double(pCtx, r);
    }else{
      sqlite3_result_double(pCtx, 0.0);
    }
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2eddca
movq %rbx, %rdi
movl $0x18, %esi
callq 0x2799b4
jmp 0x2eddce
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2ede1c
movq 0x8(%rax), %rdx
movq 0x10(%rax), %rcx
movq %rdx, (%rax)
cmpq $0x2, %rcx
jl 0x2eddfe
cvtsi2sd %rdx, %xmm0
decq %rcx
cvtsi2sd %rcx, %xmm1
divsd %xmm1, %xmm0
movq (%rbx), %rdi
popq %rbx
jmp 0x27851c
movq (%rbx), %rbx
testb $0x24, 0x9(%rbx)
je 0x2ede0f
movq %rbx, %rdi
callq 0x2917ab
movq $0x0, (%rbx)
movw $0x8, 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: percent_rankInvFunc
static void percent_rankInvFunc(
  sqlite3_context *pCtx,
  int nArg,
  sqlite3_value **apArg
){
  struct CallCount *p;
  UNUSED_PARAMETER(nArg); assert( nArg==0 );
  UNUSED_PARAMETER(apArg);
  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  p->nStep++;
}

// Assembly:
pushq %rax
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ede35
movl $0x18, %esi
callq 0x2799b4
jmp 0x2ede39
movq 0x10(%rax), %rax
incq 0x8(%rax)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: cume_distValueFunc
static void cume_distValueFunc(sqlite3_context *pCtx){
  struct CallCount *p;
  p = (struct CallCount*)sqlite3_aggregate_context(pCtx, 0);
  if( p ){
    double r = (double)(p->nStep) / (double)(p->nTotal);
    sqlite3_result_double(pCtx, r);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ede7f
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2799b4
jmp 0x2ede83
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2edea1
cvtsi2sdq 0x8(%rax), %xmm0
cvtsi2sdq 0x10(%rax), %xmm1
divsd %xmm1, %xmm0
movq (%rbx), %rdi
popq %rbx
jmp 0x27851c
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: ntileStepFunc
static void ntileStepFunc(
  sqlite3_context *pCtx,
  int nArg,
  sqlite3_value **apArg
){
  struct NtileCtx *p;
  assert( nArg==1 ); UNUSED_PARAMETER(nArg);
  p = (struct NtileCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p ){
    if( p->nTotal==0 ){
      p->nParam = sqlite3_value_int64(apArg[0]);
      if( p->nParam<=0 ){
        sqlite3_result_error(
            pCtx, "argument of ntile must be a positive integer", -1
        );
      }
    }
    p->nTotal++;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2edeeb
movq %rbx, %rdi
movl $0x18, %esi
callq 0x2799b4
movq %rax, %r14
jmp 0x2edeef
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x2edf35
cmpq $0x0, (%r14)
jne 0x2edf32
movq (%r15), %rdi
callq 0x27828c
movq %rax, 0x8(%r14)
testq %rax, %rax
jg 0x2edf32
movl $0x1, 0x24(%rbx)
movq (%rbx), %rdi
leaq 0xec1f7(%rip), %rsi     # 0x3da113
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
callq 0x278594
incq (%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: ntileValueFunc
static void ntileValueFunc(sqlite3_context *pCtx){
  struct NtileCtx *p;
  p = (struct NtileCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p && p->nParam>0 ){
    int nSize = (p->nTotal / p->nParam);
    if( nSize==0 ){
      sqlite3_result_int64(pCtx, p->iRow+1);
    }else{
      i64 nLarge = p->nTotal - p->nParam*nSize;
      i64 iSmall = nLarge*(nSize+1);
      i64 iRow = p->iRow;

      assert( (nLarge*(nSize+1) + (p->nParam-nLarge)*nSize)==p->nTotal );

      if( iRow<iSmall ){
        sqlite3_result_int64(pCtx, 1 + iRow/(nSize+1));
      }else{
        sqlite3_result_int64(pCtx, 1 + nLarge + (iRow-iSmall)/nSize);
      }
    }
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2edf5b
movq %rbx, %rdi
movl $0x18, %esi
callq 0x2799b4
movq %rax, %rcx
jmp 0x2edf5f
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x2edfee
movq 0x8(%rcx), %rdi
testq %rdi, %rdi
jle 0x2edfee
movq (%rcx), %rsi
movq %rsi, %rax
cqto
idivq %rdi
testl %eax, %eax
je 0x2edfba
movslq %eax, %r8
imulq %r8, %rdi
subq %rdi, %rsi
leal 0x1(%r8), %eax
movslq %eax, %rdi
movq %rsi, %rdx
imulq %rdi, %rdx
movq 0x10(%rcx), %rax
movq %rax, %rcx
subq %rdx, %rcx
jge 0x2edfc3
cqto
idivq %rdi
incq %rax
movq (%rbx), %rdi
testb $0x24, 0x9(%rdi)
je 0x2edfe5
movq %rax, %rsi
jmp 0x2edfda
movq 0x10(%rcx), %rsi
incq %rsi
jmp 0x2edfd1
movq %rcx, %rax
cqto
idivq %r8
addq %rax, %rsi
incq %rsi
movq (%rbx), %rdi
testb $0x24, 0x9(%rdi)
je 0x2edfe0
popq %rbx
jmp 0x2929ee
movq %rsi, (%rdi)
jmp 0x2edfe8
movq %rax, (%rdi)
movw $0x4, 0x8(%rdi)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: ntileInvFunc
static void ntileInvFunc(
  sqlite3_context *pCtx,
  int nArg,
  sqlite3_value **apArg
){
  struct NtileCtx *p;
  assert( nArg==1 ); UNUSED_PARAMETER(nArg);
  UNUSED_PARAMETER(apArg);
  p = (struct NtileCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  p->iRow++;
}

// Assembly:
pushq %rax
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ee007
movl $0x18, %esi
callq 0x2799b4
jmp 0x2ee00b
movq 0x10(%rax), %rax
incq 0x10(%rax)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: last_valueStepFunc
static void last_valueStepFunc(
  sqlite3_context *pCtx,
  int nArg,
  sqlite3_value **apArg
){
  struct LastValueCtx *p;
  UNUSED_PARAMETER(nArg);
  p = (struct LastValueCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p ){
    sqlite3_value_free(p->pVal);
    p->pVal = sqlite3_value_dup(apArg[0]);
    if( p->pVal==0 ){
      sqlite3_result_error_nomem(pCtx);
    }else{
      p->nVal++;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ee038
movq %rbx, %rdi
movl $0x10, %esi
callq 0x2799b4
movq %rax, %r15
jmp 0x2ee03c
movq 0x10(%rax), %r15
testq %r15, %r15
je 0x2ee05d
movq (%r15), %rdi
callq 0x278453
movq (%r14), %rdi
callq 0x278377
movq %rax, (%r15)
testq %rax, %rax
je 0x2ee063
incl 0x8(%r15)
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x278af1
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: last_valueFinalizeFunc
static void last_valueFinalizeFunc(sqlite3_context *pCtx){
  struct LastValueCtx *p;
  p = (struct LastValueCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p && p->pVal ){
    sqlite3_result_value(pCtx, p->pVal);
    sqlite3_value_free(p->pVal);
    p->pVal = 0;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ee093
movq %rbx, %rdi
movl $0x10, %esi
callq 0x2799b4
movq %rax, %r14
jmp 0x2ee097
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x2ee0bb
movq (%r14), %rsi
testq %rsi, %rsi
je 0x2ee0bb
movq (%rbx), %rdi
callq 0x278985
movq (%r14), %rdi
callq 0x278453
movq $0x0, (%r14)
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: last_valueValueFunc
static void last_valueValueFunc(sqlite3_context *pCtx){
  struct LastValueCtx *p;
  p = (struct LastValueCtx*)sqlite3_aggregate_context(pCtx, 0);
  if( p && p->pVal ){
    sqlite3_result_value(pCtx, p->pVal);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ee0dd
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2799b4
jmp 0x2ee0e1
movq 0x10(%rax), %rax
testq %rax, %rax
je 0x2ee0f7
movq (%rax), %rsi
testq %rsi, %rsi
je 0x2ee0f7
movq (%rbx), %rdi
popq %rbx
jmp 0x278985
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: last_valueInvFunc
static void last_valueInvFunc(
  sqlite3_context *pCtx,
  int nArg,
  sqlite3_value **apArg
){
  struct LastValueCtx *p;
  UNUSED_PARAMETER(nArg);
  UNUSED_PARAMETER(apArg);
  p = (struct LastValueCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( ALWAYS(p) ){
    p->nVal--;
    if( p->nVal==0 ){
      sqlite3_value_free(p->pVal);
      p->pVal = 0;
    }
  }
}

// Assembly:
pushq %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ee113
movl $0x10, %esi
callq 0x2799b4
movq %rax, %rbx
jmp 0x2ee117
movq 0x10(%rax), %rbx
testq %rbx, %rbx
je 0x2ee130
decl 0x8(%rbx)
jne 0x2ee130
movq (%rbx), %rdi
callq 0x278453
movq $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: nth_valueStepFunc
static void nth_valueStepFunc(
  sqlite3_context *pCtx,
  int nArg,
  sqlite3_value **apArg
){
  struct NthValueCtx *p;
  p = (struct NthValueCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p ){
    i64 iVal;
    switch( sqlite3_value_numeric_type(apArg[1]) ){
      case SQLITE_INTEGER:
        iVal = sqlite3_value_int64(apArg[1]);
        break;
      case SQLITE_FLOAT: {
        double fVal = sqlite3_value_double(apArg[1]);
        if( ((i64)fVal)!=fVal ) goto error_out;
        iVal = (i64)fVal;
        break;
      }
      default:
        goto error_out;
    }
    if( iVal<=0 ) goto error_out;

    p->nStep++;
    if( iVal==p->nStep ){
      p->pValue = sqlite3_value_dup(apArg[0]);
      if( !p->pValue ){
        sqlite3_result_error_nomem(pCtx);
      }
    }
  }
  UNUSED_PARAMETER(nArg);
  UNUSED_PARAMETER(apArg);
  return;

 error_out:
  sqlite3_result_error(
      pCtx, "second argument to nth_value must be a positive integer", -1
  );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ee159
movq %rbx, %rdi
movl $0x10, %esi
callq 0x2799b4
movq %rax, %r15
jmp 0x2ee15d
movq 0x10(%rax), %r15
testq %r15, %r15
je 0x2ee1bf
movq 0x8(%r14), %rdi
callq 0x27aac2
cmpl $0x2, %eax
je 0x2ee180
cmpl $0x1, %eax
jne 0x2ee1c5
movq 0x8(%r14), %rdi
callq 0x27828c
jmp 0x2ee19b
movq 0x8(%r14), %rdi
callq 0x278267
cvttsd2si %xmm0, %rax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jne 0x2ee1c5
jp 0x2ee1c5
testq %rax, %rax
jle 0x2ee1c5
movq (%r15), %rcx
incq %rcx
movq %rcx, (%r15)
cmpq %rcx, %rax
jne 0x2ee1bf
movq (%r14), %rdi
callq 0x278377
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0x2ee1f1
popq %rbx
popq %r14
popq %r15
retq
movl $0x1, 0x24(%rbx)
movq (%rbx), %rdi
leaq 0xea94e(%rip), %rsi     # 0x3d8b24
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
popq %rbx
popq %r14
popq %r15
jmp 0x278594
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x278af1
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: nth_valueFinalizeFunc
static void nth_valueFinalizeFunc(sqlite3_context *pCtx){
  struct NthValueCtx *p;
  p = (struct NthValueCtx*)sqlite3_aggregate_context(pCtx, 0);
  if( p && p->pValue ){
    sqlite3_result_value(pCtx, p->pValue);
    sqlite3_value_free(p->pValue);
    p->pValue = 0;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ee21e
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2799b4
movq %rax, %r14
jmp 0x2ee222
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x2ee249
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x2ee249
movq (%rbx), %rdi
callq 0x278985
movq 0x8(%r14), %rdi
callq 0x278453
movq $0x0, 0x8(%r14)
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: first_valueStepFunc
static void first_valueStepFunc(
  sqlite3_context *pCtx,
  int nArg,
  sqlite3_value **apArg
){
  struct NthValueCtx *p;
  p = (struct NthValueCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p && p->pValue==0 ){
    p->pValue = sqlite3_value_dup(apArg[0]);
    if( !p->pValue ){
      sqlite3_result_error_nomem(pCtx);
    }
  }
  UNUSED_PARAMETER(nArg);
  UNUSED_PARAMETER(apArg);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ee279
movq %rbx, %rdi
movl $0x10, %esi
callq 0x2799b4
movq %rax, %r15
jmp 0x2ee27d
movq 0x10(%rax), %r15
testq %r15, %r15
je 0x2ee29a
cmpq $0x0, 0x8(%r15)
jne 0x2ee29a
movq (%r14), %rdi
callq 0x278377
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0x2ee2a0
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x278af1
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: first_valueFinalizeFunc
static void first_valueFinalizeFunc(sqlite3_context *pCtx){
  struct NthValueCtx *p;
  p = (struct NthValueCtx*)sqlite3_aggregate_context(pCtx, sizeof(*p));
  if( p && p->pValue ){
    sqlite3_result_value(pCtx, p->pValue);
    sqlite3_value_free(p->pValue);
    p->pValue = 0;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rax
testb $0x20, 0x9(%rax)
jne 0x2ee2d0
movq %rbx, %rdi
movl $0x10, %esi
callq 0x2799b4
movq %rax, %r14
jmp 0x2ee2d4
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x2ee2fb
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x2ee2fb
movq (%rbx), %rdi
callq 0x278985
movq 0x8(%r14), %rdi
callq 0x278453
movq $0x0, 0x8(%r14)
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: computeJD
static void computeJD(DateTime *p){
  int Y, M, D, A, B, X1, X2;

  if( p->validJD ) return;
  if( p->validYMD ){
    Y = p->Y;
    M = p->M;
    D = p->D;
  }else{
    Y = 2000;  /* If no YMD specified, assume 2000-Jan-01 */
    M = 1;
    D = 1;
  }
  if( Y<-4713 || Y>9999 || p->rawS ){
    datetimeError(p);
    return;
  }
  if( M<=2 ){
    Y--;
    M += 12;
  }
  A = Y/100;
  B = 2 - A + (A/4);
  X1 = 36525*(Y+4716)/100;
  X2 = 306001*(M+1)/10000;
  p->iJD = (sqlite3_int64)((X1 + X2 + D + B - 1524.5 ) * 86400000);
  p->validJD = 1;
  if( p->validHMS ){
    p->iJD += p->h*3600000 + p->m*60000 + (sqlite3_int64)(p->s*1000);
    if( p->validTZ ){
      p->iJD -= p->tz*60000;
      p->validYMD = 0;
      p->validHMS = 0;
      p->validTZ = 0;
    }
  }
}

// Assembly:
cmpb $0x0, 0x28(%rdi)
je 0x2ef4d2
retq
cmpb $0x0, 0x2a(%rdi)
je 0x2ef4f0
movl 0x8(%rdi), %ecx
leal -0x2710(%rcx), %eax
cmpl $0xffffc687, %eax       # imm = 0xFFFFC687
jb 0x2ef505
movl 0xc(%rdi), %esi
movl 0x10(%rdi), %eax
jmp 0x2ef4ff
movl $0x1, %esi
movl $0x7d0, %ecx            # imm = 0x7D0
movl $0x1, %eax
cmpb $0x0, 0x29(%rdi)
je 0x2ef518
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movb $0x1, 0x2e(%rdi)
retq
leal 0xc(%rsi), %edx
xorl %r8d, %r8d
cmpl $0x3, %esi
setl %r8b
cmovgel %esi, %edx
subl %r8d, %ecx
movswl %cx, %esi
imull $0xffffeb85, %esi, %r8d # imm = 0xFFFFEB85
movl %r8d, %r9d
sarl $0x13, %r9d
shrl $0x1f, %r8d
addl %r9d, %r8d
addl $0x2, %r8d
movswl %r8w, %r8d
imull $0x147b, %esi, %esi     # imm = 0x147B
movl %esi, %r9d
shrl $0x1f, %r9d
sarl $0x15, %esi
addl %r9d, %esi
addl %r8d, %esi
imull $0x8ead, %ecx, %ecx     # imm = 0x8EAD
addl $0xa445afc, %ecx        # imm = 0xA445AFC
imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F
shrq $0x25, %rcx
imull $0x4ab51, %edx, %edx    # imm = 0x4AB51
addl $0x4ab51, %edx          # imm = 0x4AB51
movslq %edx, %rdx
imulq $0x68db8bad, %rdx, %rdx # imm = 0x68DB8BAD
movq %rdx, %r8
shrq $0x3f, %r8
sarq $0x2c, %rdx
addl %r8d, %edx
addl %ecx, %eax
addl %edx, %eax
addl %esi, %eax
cvtsi2sd %eax, %xmm0
addsd 0xe6272(%rip), %xmm0    # 0x3d5820
mulsd 0xe6212(%rip), %xmm0    # 0x3d57c8
cvttsd2si %xmm0, %rax
movq %rax, (%rdi)
movb $0x1, 0x28(%rdi)
cmpb $0x0, 0x2b(%rdi)
je 0x2ef4d1
movslq 0x14(%rdi), %rcx
imulq $0x36ee80, %rcx, %rcx   # imm = 0x36EE80
movslq 0x18(%rdi), %rdx
imulq $0xea60, %rdx, %rdx     # imm = 0xEA60
movsd 0x20(%rdi), %xmm0
mulsd 0x94cc1(%rip), %xmm0    # 0x3842b0
addq %rcx, %rdx
cvttsd2si %xmm0, %rcx
addq %rdx, %rcx
addq %rax, %rcx
movq %rcx, (%rdi)
cmpb $0x0, 0x2c(%rdi)
je 0x2ef4d1
movslq 0x1c(%rdi), %rax
imulq $0xea60, %rax, %rax     # imm = 0xEA60
subq %rax, %rcx
movq %rcx, (%rdi)
movw $0x0, 0x2a(%rdi)
movb $0x0, 0x2c(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: parseHhMmSs
static int parseHhMmSs(const char *zDate, DateTime *p){
  int h, m, s;
  double ms = 0.0;
  if( getDigits(zDate, "20c:20e", &h, &m)!=2 ){
    return 1;
  }
  zDate += 5;
  if( *zDate==':' ){
    zDate++;
    if( getDigits(zDate, "20e", &s)!=1 ){
      return 1;
    }
    zDate += 2;
    if( *zDate=='.' && sqlite3Isdigit(zDate[1]) ){
      double rScale = 1.0;
      zDate++;
      while( sqlite3Isdigit(*zDate) ){
        ms = ms*10.0 + *zDate - '0';
        rScale *= 10.0;
        zDate++;
      }
      ms /= rScale;
    }
  }else{
    s = 0;
  }
  p->validJD = 0;
  p->rawS = 0;
  p->validHMS = 1;
  p->h = h;
  p->m = m;
  p->s = s + ms;
  if( parseTimezone(zDate, p) ) return 1;
  p->validTZ = (p->tz!=0)?1:0;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xeab01(%rip), %rsi     # 0x3da198
leaq 0x14(%rsp), %rdx
leaq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0x2ef8da
movl $0x1, %ebp
cmpl $0x2, %eax
jne 0x2ef830
cmpb $0x3a, 0x5(%r15)
jne 0x2ef753
leaq 0x6(%r15), %rdi
leaq 0xea9e4(%rip), %rsi     # 0x3da0b0
leaq 0xc(%rsp), %rdx
xorl %eax, %eax
callq 0x2ef8da
cmpl $0x1, %eax
jne 0x2ef830
leaq 0x8(%r15), %r14
xorpd %xmm0, %xmm0
cmpb $0x2e, 0x8(%r15)
jne 0x2ef766
movzbl 0x9(%r15), %eax
leaq -0x3a(%rax), %rcx
cmpq $-0xa, %rcx
jb 0x2ef766
addq $0x9, %r15
movsd 0x56b1d(%rip), %xmm1    # 0x346228
movsd 0x6588d(%rip), %xmm2    # 0x354fa0
movsd 0xe610d(%rip), %xmm3    # 0x3d5828
movq %r15, %r14
movsbl %al, %eax
xorps %xmm4, %xmm4
cvtsi2sd %eax, %xmm4
mulsd %xmm2, %xmm0
addsd %xmm4, %xmm0
addsd %xmm3, %xmm0
mulsd %xmm2, %xmm1
movzbl 0x1(%r14), %eax
incq %r14
movq %rax, %rcx
addq $-0x3a, %rcx
cmpq $-0xb, %rcx
ja 0x2ef71e
divsd %xmm1, %xmm0
jmp 0x2ef766
addq $0x5, %r15
movl $0x0, 0xc(%rsp)
xorpd %xmm0, %xmm0
movq %r15, %r14
movw $0x0, 0x28(%rbx)
movb $0x1, 0x2b(%rbx)
movl 0x14(%rsp), %eax
movl %eax, 0x14(%rbx)
movl 0x10(%rsp), %eax
movl %eax, 0x18(%rbx)
xorps %xmm1, %xmm1
cvtsi2sdl 0xc(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rbx)
leaq 0xe1ca9(%rip), %r15     # 0x3d1440
movzbl (%r14), %eax
incq %r14
testb $0x1, (%rax,%r15)
jne 0x2ef797
movl $0x0, 0x1c(%rbx)
movzbl -0x1(%r14), %ecx
cmpl $0x2d, %ecx
je 0x2ef7c3
cmpl $0x2b, %ecx
jne 0x2ef805
movl $0x1, %r12d
jmp 0x2ef7c9
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
leaq 0xea9d0(%rip), %rsi     # 0x3da1a0
leaq 0x1c(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2ef8da
cmpl $0x2, %eax
jne 0x2ef830
addq $0x5, %r14
imull $0x3c, 0x1c(%rsp), %eax
addl 0x18(%rsp), %eax
imull %eax, %r12d
movl %r12d, 0x1c(%rbx)
testl %eax, %eax
setne %al
jmp 0x2ef811
movl %ecx, %edx
andb $-0x21, %dl
xorl %eax, %eax
cmpb $0x5a, %dl
jne 0x2ef827
movzbl (%r14), %ecx
incq %r14
testb $0x1, (%rcx,%r15)
jne 0x2ef811
movb $0x1, 0x2d(%rbx)
movb -0x1(%r14), %cl
testb %cl, %cl
jne 0x2ef830
movb %al, 0x2c(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3NotPureFunc
SQLITE_PRIVATE int sqlite3NotPureFunc(sqlite3_context *pCtx){
  const VdbeOp *pOp;
#ifdef SQLITE_ENABLE_STAT4
  if( pCtx->pVdbe==0 ) return 1;
#endif
  pOp = pCtx->pVdbe->aOp + pCtx->iOp;
  if( pOp->opcode==OP_PureFunc ){
    const char *zContext;
    char *zMsg;
    if( pOp->p5 & NC_IsCheck ){
      zContext = "a CHECK constraint";
    }else if( pOp->p5 & NC_GenCol ){
      zContext = "a generated column";
    }else{
      zContext = "an index";
    }
    zMsg = sqlite3_mprintf("non-deterministic use of %s() in %s",
                           pCtx->pFunc->zName, zContext);
    sqlite3_result_error(pCtx, zMsg, -1);
    sqlite3_free(zMsg);
    return 0;
  }
  return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq 0x18(%rdi), %rax
movq 0x88(%rax), %rax
movslq 0x20(%rdi), %rcx
leaq (%rcx,%rcx,2), %rcx
movl $0x1, %ebp
cmpb $0x3f, (%rax,%rcx,8)
jne 0x2ef8d3
movq %rdi, %rbx
leaq (%rax,%rcx,8), %rax
movzwl 0x2(%rax), %eax
testb $0x8, %al
leaq 0x6d189(%rip), %rcx     # 0x35c9fe
leaq 0xe88e7(%rip), %rsi     # 0x3d8163
cmoveq %rcx, %rsi
testb $0x4, %al
leaq 0xea91f(%rip), %rdx     # 0x3da1a8
cmoveq %rsi, %rdx
movq 0x8(%rdi), %rax
movq 0x38(%rax), %rsi
leaq 0xea91f(%rip), %rdi     # 0x3da1bb
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x274b53
movq %rax, %r14
movl $0x1, 0x24(%rbx)
movq (%rbx), %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
movq $-0x1, %r8
callq 0x278594
movq %r14, %rdi
callq 0x272c00
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq