LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VtabBegin
SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){
  int rc = SQLITE_OK;
  const sqlite3_module *pModule;

  /* Special case: If db->aVTrans is NULL and db->nVTrans is greater
  ** than zero, then this function is being called from within a
  ** virtual module xSync() callback. It is illegal to write to 
  ** virtual module tables in this case, so return SQLITE_LOCKED.
  */
  if( sqlite3VtabInSync(db) ){
    return SQLITE_LOCKED;
  }
  if( !pVTab ){
    return SQLITE_OK;
  } 
  pModule = pVTab->pVtab->pModule;

  if( pModule->xBegin ){
    int i;

    /* If pVtab is already in the aVTrans array, return early */
    for(i=0; i<db->nVTrans; i++){
      if( db->aVTrans[i]==pVTab ){
        return SQLITE_OK;
      }
    }

    /* Invoke the xBegin method. If successful, add the vtab to the 
    ** sqlite3.aVTrans[] array. */
    rc = growVTrans(db);
    if( rc==SQLITE_OK ){
      rc = pModule->xBegin(pVTab->pVtab);
      if( rc==SQLITE_OK ){
        int iSvpt = db->nStatement + db->nSavepoint;
        addToVTrans(db, pVTab);
        if( iSvpt ) rc = sqlite3VtabSavepoint(db, SAVEPOINT_BEGIN, iSvpt-1);
      }
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x1a4(%rax)
jle 0x47b1e
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1c8(%rax)
jne 0x47b1e
movl $0x6, -0x4(%rbp)
jmp 0x47c0e
cmpq $0x0, -0x18(%rbp)
jne 0x47b31
movl $0x0, -0x4(%rbp)
jmp 0x47c0e
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x47c08
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x1a4(%rcx), %eax
jge 0x47b97
movq -0x10(%rbp), %rax
movq 0x1c8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x18(%rbp), %rax
jne 0x47b8a
movl $0x0, -0x4(%rbp)
jmp 0x47c0e
jmp 0x47b8c
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x47b56
movq -0x10(%rbp), %rdi
callq 0x557c0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x47c06
movq -0x28(%rbp), %rax
movq 0x70(%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x10(%rcx), %rdi
callq *%rax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x47c04
movq -0x10(%rbp), %rax
movl 0x310(%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x30c(%rcx), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x55870
cmpl $0x0, -0x30(%rbp)
je 0x47c02
movq -0x10(%rbp), %rdi
movl -0x30(%rbp), %edx
subl $0x1, %edx
xorl %esi, %esi
callq 0x37dd0
movl %eax, -0x1c(%rbp)
jmp 0x47c04
jmp 0x47c06
jmp 0x47c08
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: computeNumericType
static u16 SQLITE_NOINLINE computeNumericType(Mem *pMem){
  assert( (pMem->flags & (MEM_Int|MEM_Real))==0 );
  assert( (pMem->flags & (MEM_Str|MEM_Blob))!=0 );
  if( sqlite3AtoF(pMem->z, &pMem->u.r, pMem->n, pMem->enc)==0 ){
    return 0;
  }
  if( sqlite3Atoi64(pMem->z, &pMem->u.i, pMem->n, pMem->enc)==SQLITE_OK ){
    return MEM_Int;
  }
  return MEM_Real;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x10(%rbp), %rax
movzbl 0xa(%rax), %ecx
callq 0x391c0
cmpl $0x0, %eax
jne 0x48389
movw $0x0, -0x2(%rbp)
jmp 0x483bc
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rax
movl 0xc(%rax), %edx
movq -0x10(%rbp), %rax
movzbl 0xa(%rax), %ecx
callq 0x39b90
cmpl $0x0, %eax
jne 0x483b6
movw $0x4, -0x2(%rbp)
jmp 0x483bc
movw $0x8, -0x2(%rbp)
movw -0x2(%rbp), %ax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3IntFloatCompare
static int sqlite3IntFloatCompare(i64 i, double r){
  if( sizeof(LONGDOUBLE_TYPE)>8 ){
    LONGDOUBLE_TYPE x = (LONGDOUBLE_TYPE)i;
    if( x<r ) return -1;
    if( x>r ) return +1;
    return 0;
  }else{
    i64 y;
    double s;
    if( r<-9223372036854775808.0 ) return +1;
    if( r>9223372036854775807.0 ) return -1;
    y = (i64)r;
    if( i<y ) return -1;
    if( i>y ){
      if( y==SMALLEST_INT64 && r>0.0 ) return -1;
      return +1;
    }
    s = (double)i;
    if( s<r ) return -1;
    if( s>r ) return +1;
    return 0;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
fildll -0x38(%rbp)
fstpt -0x30(%rbp)
fldt -0x30(%rbp)
fldl -0x18(%rbp)
fucompi %st(1), %st
fstp %st(0)
jbe 0x484e2
jmp 0x484d9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x48502
fldt -0x30(%rbp)
fldl -0x18(%rbp)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0x484fb
jmp 0x484f2
movl $0x1, -0x4(%rbp)
jmp 0x48502
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: fetchPayload
static const void *fetchPayload(
  BtCursor *pCur,      /* Cursor pointing to entry to read from */
  u32 *pAmt            /* Write the number of available bytes here */
){
  u32 amt;
  assert( pCur!=0 && pCur->iPage>=0 && pCur->apPage[pCur->iPage]);
  assert( pCur->eState==CURSOR_VALID );
  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
  assert( cursorHoldsMutex(pCur) );
  assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
  assert( pCur->info.nSize>0 );
  assert( pCur->info.pPayload>pCur->apPage[pCur->iPage]->aData || CORRUPT_DB );
  assert( pCur->info.pPayload<pCur->apPage[pCur->iPage]->aDataEnd ||CORRUPT_DB);
  amt = (int)(pCur->apPage[pCur->iPage]->aDataEnd - pCur->info.pPayload);
  if( pCur->info.nLocal<amt ) amt = pCur->info.nLocal;
  *pAmt = amt;
  return (void*)pCur->info.pPayload;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movsbq 0x58(%rcx), %rcx
movq 0x98(%rax,%rcx,8), %rax
movq 0x58(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x34(%rax), %eax
cmpl -0x14(%rbp), %eax
jae 0x48adb
movq -0x8(%rbp), %rax
movzwl 0x34(%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: vdbeMemFromBtreeResize
static SQLITE_NOINLINE int vdbeMemFromBtreeResize(
  BtCursor *pCur,   /* Cursor pointing at record to retrieve. */
  u32 offset,       /* Offset from the start of data to return bytes from. */
  u32 amt,          /* Number of bytes to return. */
  int key,          /* If true, retrieve from the btree key, not data. */
  Mem *pMem         /* OUT: Return data in this Mem structure. */
){
  int rc;
  pMem->flags = MEM_Null;
  if( SQLITE_OK==(rc = sqlite3VdbeMemClearAndResize(pMem, amt+2)) ){
    if( key ){
      rc = sqlite3BtreeKey(pCur, offset, amt, pMem->z);
    }else{
      rc = sqlite3BtreeData(pCur, offset, amt, pMem->z);
    }
    if( rc==SQLITE_OK ){
      pMem->z[amt] = 0;
      pMem->z[amt+1] = 0;
      pMem->flags = MEM_Blob|MEM_Term;
      pMem->n = (int)amt;
    }else{
      sqlite3VdbeMemRelease(pMem);
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
movq -0x20(%rbp), %rax
movw $0x1, 0x8(%rax)
movq -0x20(%rbp), %rdi
movl -0x10(%rbp), %esi
addl $0x2, %esi
callq 0x39160
movl %eax, %ecx
movl %ecx, -0x24(%rbp)
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x48bb7
cmpl $0x0, -0x14(%rbp)
je 0x48b53
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
callq 0x333f0
movl %eax, -0x24(%rbp)
jmp 0x48b6d
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
callq 0x18890
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x48bac
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x10(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x10(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
movw $0x210, 0x8(%rax)       # imm = 0x210
movl -0x10(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x48bb5
movq -0x20(%rbp), %rdi
callq 0x13f90
jmp 0x48bb7
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: moveToParent
static void moveToParent(BtCursor *pCur){
  assert( cursorHoldsMutex(pCur) );
  assert( pCur->eState==CURSOR_VALID );
  assert( pCur->iPage>0 );
  assert( pCur->apPage[pCur->iPage] );
  assertParentIndex(
    pCur->apPage[pCur->iPage-1], 
    pCur->aiIdx[pCur->iPage-1], 
    pCur->apPage[pCur->iPage]->pgno
  );
  testcase( pCur->aiIdx[pCur->iPage-1] > pCur->apPage[pCur->iPage-1]->nCell );
  pCur->info.nSize = 0;
  pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);
  releasePageNotNull(pCur->apPage[pCur->iPage--]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movw $0x0, 0x36(%rax)
movq -0x8(%rbp), %rax
movzbl 0x54(%rax), %ecx
andl $-0x7, %ecx
movb %cl, 0x54(%rax)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rdx
movb 0x58(%rdx), %cl
movb %cl, %sil
addb $-0x1, %sil
movb %sil, 0x58(%rdx)
movsbq %cl, %rcx
movq 0x98(%rax,%rcx,8), %rdi
callq 0x316f0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: moveToChild
static int moveToChild(BtCursor *pCur, u32 newPgno){
  BtShared *pBt = pCur->pBt;

  assert( cursorHoldsMutex(pCur) );
  assert( pCur->eState==CURSOR_VALID );
  assert( pCur->iPage<BTCURSOR_MAX_DEPTH );
  assert( pCur->iPage>=0 );
  if( pCur->iPage>=(BTCURSOR_MAX_DEPTH-1) ){
    return SQLITE_CORRUPT_BKPT;
  }
  pCur->info.nSize = 0;
  pCur->curFlags &= ~(BTCF_ValidNKey|BTCF_ValidOvfl);
  pCur->iPage++;
  pCur->aiIdx[pCur->iPage] = 0;
  return getAndInitPage(pBt, newPgno, &pCur->apPage[pCur->iPage],
                        pCur, pCur->curPagerFlags);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x58(%rax), %eax
cmpl $0x13, %eax
jl 0x49077
movl $0xe9e8, %edi           # imm = 0xE9E8
callq 0x2a650
movl %eax, -0x4(%rbp)
jmp 0x490e7
movq -0x10(%rbp), %rax
movw $0x0, 0x36(%rax)
movq -0x10(%rbp), %rax
movzbl 0x54(%rax), %ecx
andl $-0x7, %ecx
movb %cl, 0x54(%rax)
movq -0x10(%rbp), %rax
movb 0x58(%rax), %cl
addb $0x1, %cl
movb %cl, 0x58(%rax)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movsbq 0x58(%rcx), %rcx
movw $0x0, 0x70(%rax,%rcx,2)
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rdx
addq $0x98, %rdx
movq -0x10(%rbp), %rax
movsbq 0x58(%rax), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rax
movzbl 0x55(%rax), %r8d
callq 0x490f0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: moveToRightmost
static int moveToRightmost(BtCursor *pCur){
  Pgno pgno;
  int rc = SQLITE_OK;
  MemPage *pPage = 0;

  assert( cursorHoldsMutex(pCur) );
  assert( pCur->eState==CURSOR_VALID );
  while( !(pPage = pCur->apPage[pCur->iPage])->leaf ){
    pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
    pCur->aiIdx[pCur->iPage] = pPage->nCell;
    rc = moveToChild(pCur, pgno);
    if( rc ) return rc;
  }
  pCur->aiIdx[pCur->iPage] = pPage->nCell-1;
  assert( pCur->info.nSize==0 );
  assert( (pCur->curFlags & BTCF_ValidNKey)==0 );
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movsbq 0x58(%rcx), %rcx
movq 0x98(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
cmpb $0x0, 0x5(%rax)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x4acd3
jmp 0x4ad2f
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x20(%rbp), %rax
movzbl 0x6(%rax), %eax
addl $0x8, %eax
cltq
addq %rax, %rdi
callq 0x26b20
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movw 0x12(%rax), %dx
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movsbq 0x58(%rcx), %rcx
movw %dx, 0x70(%rax,%rcx,2)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x49040
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x4ad2a
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4ad56
jmp 0x4acab
movq -0x20(%rbp), %rax
movzwl 0x12(%rax), %eax
subl $0x1, %eax
movw %ax, %dx
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
movsbq 0x58(%rcx), %rcx
movw %dx, 0x70(%rax,%rcx,2)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: invalidateIncrblobCursors
static void invalidateIncrblobCursors(
  Btree *pBtree,          /* The database file to check */
  i64 iRow,               /* The rowid that might be changing */
  int isClearTable        /* True if all rows are being deleted */
){
  BtCursor *p;
  if( pBtree->hasIncrblobCur==0 ) return;
  assert( sqlite3BtreeHoldsMutex(pBtree) );
  pBtree->hasIncrblobCur = 0;
  for(p=pBtree->pBt->pCursor; p; p=p->pNext){
    if( (p->curFlags & BTCF_Incrblob)!=0 ){
      pBtree->hasIncrblobCur = 1;
      if( isClearTable || p->info.nKey==iRow ){
        p->eState = CURSOR_INVALID;
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movzbl 0x13(%rax), %eax
cmpl $0x0, %eax
jne 0x4ad7e
jmp 0x4ade3
movq -0x8(%rbp), %rax
movb $0x0, 0x13(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x4ade3
movq -0x20(%rbp), %rax
movzbl 0x54(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x4add3
movq -0x8(%rbp), %rax
movb $0x1, 0x13(%rax)
cmpl $0x0, -0x14(%rbp)
jne 0x4adc9
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x4add1
movq -0x20(%rbp), %rax
movb $0x0, 0x56(%rax)
jmp 0x4add3
jmp 0x4add5
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x4ad96
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3PagerDontWrite
SQLITE_PRIVATE void sqlite3PagerDontWrite(PgHdr *pPg){
  Pager *pPager = pPg->pPager;
  if( (pPg->flags&PGHDR_DIRTY) && pPager->nSavepoint==0 ){
    PAGERTRACE(("DONT_WRITE page %d of %d\n", pPg->pgno, PAGERID(pPager)));
    IOTRACE(("CLEAN %p %d\n", pPager, pPg->pgno))
    pPg->flags |= PGHDR_DONT_WRITE;
    pPg->flags &= ~PGHDR_WRITEABLE;
    pager_set_pagehash(pPg);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x2c(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4be2f
movq -0x10(%rbp), %rax
cmpl $0x0, 0x80(%rax)
jne 0x4be2f
movq -0x8(%rbp), %rax
movzwl 0x2c(%rax), %ecx
orl $0x20, %ecx
movw %cx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movzwl 0x2c(%rax), %ecx
andl $-0x5, %ecx
movw %cx, 0x2c(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: vdbeSortAllocUnpacked
static int vdbeSortAllocUnpacked(SortSubtask *pTask){
  if( pTask->pUnpacked==0 ){
    char *pFree;
    pTask->pUnpacked = sqlite3VdbeAllocUnpackedRecord(
        pTask->pSorter->pKeyInfo, 0, 0, &pFree
    );
    assert( pTask->pUnpacked==(UnpackedRecord*)pFree );
    if( pFree==0 ) return SQLITE_NOMEM;
    pTask->pUnpacked->nField = pTask->pSorter->pKeyInfo->nField;
    pTask->pUnpacked->errCode = 0;
  }
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x4fbe5
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
leaq -0x18(%rbp), %rcx
callq 0x44c00
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
cmpq $0x0, -0x18(%rbp)
jne 0x4fbbd
movl $0x7, -0x4(%rbp)
jmp 0x4fbec
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rax
movw 0x6(%rax), %cx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movw %cx, 0x10(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movb $0x0, 0x13(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: vdbeSorterMerge
static void vdbeSorterMerge(
  SortSubtask *pTask,             /* Calling thread context */
  SorterRecord *p1,               /* First list to merge */
  SorterRecord *p2,               /* Second list to merge */
  SorterRecord **ppOut            /* OUT: Head of merged list */
){
  SorterRecord *pFinal = 0;
  SorterRecord **pp = &pFinal;
  int bCached = 0;

  while( p1 && p2 ){
    int res;
    res = pTask->xCompare(
        pTask, &bCached, SRVAL(p1), p1->nVal, SRVAL(p2), p2->nVal
    );

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
leaq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x39(%rbp)
je 0x4fc96
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x4fca2
jmp 0x4fd2e
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x10, %rdx
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
movq -0x18(%rbp), %r8
addq $0x10, %r8
movq -0x18(%rbp), %rsi
movl (%rsi), %r9d
leaq -0x34(%rbp), %rsi
callq *%rax
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x38(%rbp)
jg 0x4fcff
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x4fd29
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x34(%rbp)
jmp 0x4fc7f
cmpq $0x0, -0x10(%rbp)
je 0x4fd3f
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x4fd47
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: vdbeSorterFlushThread
static void *vdbeSorterFlushThread(void *pCtx){
  SortSubtask *pTask = (SortSubtask*)pCtx;
  int rc;                         /* Return code */
  assert( pTask->bDone==0 );
  rc = vdbeSorterListToPMA(pTask, &pTask->list);
  pTask->bDone = 1;
  return SQLITE_INT_TO_PTR(rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x20, %rsi
callq 0x50200
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl $0x1, 0x8(%rax)
movslq -0x14(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3ThreadCreate
SQLITE_PRIVATE int sqlite3ThreadCreate(
  SQLiteThread **ppThread,  /* OUT: Write the thread object here */
  void *(*xTask)(void*),    /* Routine to run in a separate thread */
  void *pIn                 /* Argument passed into xTask() */
){
  SQLiteThread *p;
  int rc;

  assert( ppThread!=0 );
  assert( xTask!=0 );
  /* This routine is never used in single-threaded mode */
  assert( sqlite3GlobalConfig.bCoreMutex!=0 );

  *ppThread = 0;
  p = sqlite3Malloc(sizeof(*p));
  if( p==0 ) return SQLITE_NOMEM;
  memset(p, 0, sizeof(*p));
  p->xTask = xTask;
  p->pIn = pIn;
  /* If the SQLITE_TESTCTRL_FAULT_INSTALL callback is registered to a 
  ** function that returns SQLITE_ERROR when passed the argument 200, that
  ** forces worker threads to run sequentially and deterministically 
  ** for testing purposes. */
  if( sqlite3FaultSim(200) ){
    rc = 1;
  }else{    
    rc = pthread_create(&p->tid, 0, xTask, pIn);
  }
  if( rc ){
    p->done = 1;
    p->pOut = xTask(pIn);
  }
  *ppThread = p;
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movl $0x28, %edi
callq 0xdba0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x50880
movl $0x7, -0x4(%rbp)
jmp 0x50910
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x28, %edx
callq 0xb2b0
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x20(%rax)
movl $0xc8, %edi
callq 0x20ba0
cmpl $0x0, %eax
je 0x508c0
movl $0x1, -0x2c(%rbp)
jmp 0x508d8
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
xorl %eax, %eax
movl %eax, %esi
callq 0xb5f0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x508fe
movq -0x28(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rdi
callq *%rax
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: vdbeIncrSwap
static int vdbeIncrSwap(IncrMerger *pIncr){
  int rc = SQLITE_OK;

#if SQLITE_MAX_WORKER_THREADS>0
  if( pIncr->bUseThread ){
    rc = vdbeSorterJoinThread(pIncr->pTask);

    if( rc==SQLITE_OK ){
      SorterFile f0 = pIncr->aFile[0];
      pIncr->aFile[0] = pIncr->aFile[1];
      pIncr->aFile[1] = f0;
    }

    if( rc==SQLITE_OK ){
      if( pIncr->aFile[0].iEof==pIncr->iStartOff ){
        pIncr->bEof = 1;
      }else{
        rc = vdbeIncrBgPopulate(pIncr);
      }
    }
  }else
#endif
  {
    rc = vdbeIncrPopulate(pIncr);
    pIncr->aFile[0] = pIncr->aFile[1];
    if( pIncr->aFile[0].iEof==pIncr->iStartOff ){
      pIncr->bEof = 1;
    }
  }

  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x51acb
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x37540
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x51a96
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rcx
movq %rcx, -0x20(%rbp)
movq 0x30(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x38(%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x40(%rcx), %rcx
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x40(%rax)
cmpl $0x0, -0xc(%rbp)
jne 0x51ac9
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x51abb
movq -0x8(%rbp), %rax
movl $0x1, 0x1c(%rax)
jmp 0x51ac7
movq -0x8(%rbp), %rdi
callq 0x51b20
movl %eax, -0xc(%rbp)
jmp 0x51ac9
jmp 0x51b0e
movq -0x8(%rbp), %rdi
callq 0x51b60
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
movq 0x38(%rcx), %rdx
movq %rdx, 0x28(%rax)
movq 0x40(%rcx), %rcx
movq %rcx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x51b0c
movq -0x8(%rbp), %rax
movl $0x1, 0x1c(%rax)
jmp 0x51b0e
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: vdbeIncrPopulateThread
static void *vdbeIncrPopulateThread(void *pCtx){
  IncrMerger *pIncr = (IncrMerger*)pCtx;
  void *pRet = SQLITE_INT_TO_PTR( vdbeIncrPopulate(pIncr) );
  pIncr->pTask->bDone = 1;
  return pRet;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x51b60
cltq
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0x1, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: vdbePmaReaderBgIncrInit
static void *vdbePmaReaderBgIncrInit(void *pCtx){
  PmaReader *pReader = (PmaReader*)pCtx;
  void *pRet = SQLITE_INT_TO_PTR(
                  vdbePmaReaderIncrMergeInit(pReader,INCRINIT_TASK)
               );
  pReader->pIncr->pTask->bDone = 1;
  return pRet;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x50d20
cltq
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movl $0x1, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: corruptSchema
static void corruptSchema(
  InitData *pData,     /* Initialization context */
  const char *zObj,    /* Object being parsed at the point of error */
  const char *zExtra   /* Error information */
){
  sqlite3 *db = pData->db;
  if( !db->mallocFailed && (db->flags & SQLITE_RecoveryMode)==0 ){
    char *z;
    if( zObj==0 ) zObj = "?";
    z = sqlite3_mprintf("malformed database schema (%s)", zObj);
    if( z && zExtra ) z = sqlite3_mprintf("%z - %s", z, zExtra);
    sqlite3DbFree(db, *pData->pzErrMsg);
    *pData->pzErrMsg = z;
    if( z==0 ) db->mallocFailed = 1;
  }
  pData->rc = db->mallocFailed ? SQLITE_NOMEM : SQLITE_CORRUPT_BKPT;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpb $0x0, 0x51(%rax)
jne 0x52676
movq -0x20(%rbp), %rax
movl 0x2c(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
cmpl $0x0, %eax
jne 0x52676
cmpq $0x0, -0x10(%rbp)
jne 0x52604
leaq 0x55ebb(%rip), %rax     # 0xa84bb
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rsi
leaq 0x54127(%rip), %rdi     # 0xa6736
movb $0x0, %al
callq 0xb7d0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x52642
cmpq $0x0, -0x18(%rbp)
je 0x52642
movq -0x28(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x5411e(%rip), %rdi     # 0xa6755
movb $0x0, %al
callq 0xb7d0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rsi
callq 0xd260
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
cmpq $0x0, -0x28(%rbp)
jne 0x52674
movq -0x20(%rbp), %rax
movb $0x1, 0x51(%rax)
jmp 0x52676
movq -0x20(%rbp), %rax
movzbl 0x51(%rax), %eax
cmpl $0x0, %eax
je 0x5268d
movl $0x7, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5269a
movl $0x1a906, %edi          # imm = 0x1A906
callq 0x2a650
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3HashFind
SQLITE_PRIVATE void *sqlite3HashFind(const Hash *pH, const char *pKey){
  HashElem *elem;    /* The element that matches key */
  unsigned int h;    /* A hash on key */

  assert( pH!=0 );
  assert( pKey!=0 );
  elem = findElementWithHash(pH, pKey, &h);
  return elem ? elem->data : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
callq 0x52a70
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x52a5a
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x52a62
xorl %eax, %eax
movq %rax, -0x28(%rbp)
jmp 0x52a62
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: findElementWithHash
static HashElem *findElementWithHash(
  const Hash *pH,     /* The pH to be searched */
  const char *pKey,   /* The key we are searching for */
  unsigned int *pHash /* Write the hash value here */
){
  HashElem *elem;                /* Used to loop thru the element list */
  int count;                     /* Number of elements left to test */
  unsigned int h;                /* The computed hash */

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x52ad0
movq -0x18(%rbp), %rdi
callq 0x52b50
movq -0x10(%rbp), %rcx
xorl %edx, %edx
divl (%rcx)
movl %edx, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x30(%rbp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
jmp 0x52aed
movl $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x30(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl -0x2c(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x2c(%rbp)
cmpl $0x0, %eax
je 0x52b33
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xb5c0
cmpl $0x0, %eax
jne 0x52b26
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x52b3b
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x52af6
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: strHash
static unsigned int strHash(const char *z){
  unsigned int h = 0;
  unsigned char c;
  while( (c = (unsigned char)*z++)!=0 ){
    h = (h<<3) ^ h ^ sqlite3UpperToLower[c];
  }
  return h;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x8(%rbp)
movb (%rax), %al
movb %al, -0xd(%rbp)
movzbl %al, %eax
cmpl $0x0, %eax
je 0x52b9c
movl -0xc(%rbp), %eax
shll $0x3, %eax
xorl -0xc(%rbp), %eax
movzbl -0xd(%rbp), %ecx
movl %ecx, %edx
leaq 0x500af(%rip), %rcx     # 0xa2c40
movzbl (%rcx,%rdx), %ecx
xorl %ecx, %eax
movl %eax, -0xc(%rbp)
jmp 0x52b5f
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3DefaultRowEst
SQLITE_PRIVATE void sqlite3DefaultRowEst(Index *pIdx){
  /*                10,  9,  8,  7,  6 */
  LogEst aVal[] = { 33, 32, 30, 28, 26 };
  LogEst *a = pIdx->aiRowLogEst;
  int nCopy = MIN(ArraySize(aVal), pIdx->nKeyCol);
  int i;

  /* Set the first entry (number of rows in the index) to the estimated 
  ** number of rows in the table. Or 10, if the estimated number of rows 
  ** in the table is less than that.  */
  a[0] = pIdx->pTable->nRowLogEst;
  if( a[0]<33 ) a[0] = 33;        assert( 33==sqlite3LogEst(10) );

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq 0x505e9(%rip), %rax     # 0xa31dc
movq %rax, -0x12(%rbp)
movw 0x505e6(%rip), %ax      # 0xa31e4
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x5e(%rax), %ecx
movl $0x5, %eax
cmpl %ecx, %eax
jge 0x52c29
movl $0x5, %eax
movl %eax, -0x2c(%rbp)
jmp 0x52c34
movq -0x8(%rbp), %rax
movzwl 0x5e(%rax), %eax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movw 0x42(%rax), %cx
movq -0x20(%rbp), %rax
movw %cx, (%rax)
movq -0x20(%rbp), %rax
movswl (%rax), %eax
cmpl $0x21, %eax
jge 0x52c62
movq -0x20(%rbp), %rax
movw $0x21, (%rax)
movq -0x20(%rbp), %rdi
addq $0x2, %rdi
leaq -0x12(%rbp), %rsi
movslq -0x24(%rbp), %rdx
shlq %rdx
callq 0xb420
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0x5e(%rcx), %ecx
cmpl %ecx, %eax
jg 0x52cab
movq -0x20(%rbp), %rax
movslq -0x28(%rbp), %rcx
movw $0x17, (%rax,%rcx,2)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x52c83
movq -0x8(%rbp), %rax
movzbl 0x62(%rax), %eax
cmpl $0x0, %eax
je 0x52cca
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
movzwl 0x5e(%rcx), %ecx
movw $0x0, (%rax,%rcx,2)
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: freeIndex
static void freeIndex(sqlite3 *db, Index *p){
#ifndef SQLITE_OMIT_ANALYZE
  sqlite3DeleteIndexSamples(db, p);
#endif
  sqlite3ExprDelete(db, p->pPartIdxWhere);
  sqlite3ExprListDelete(db, p->aColExpr);
  sqlite3DbFree(db, p->zColAff);
  if( p->isResized ) sqlite3DbFree(db, (void *)p->azColl);
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
  sqlite3_free(p->aiRowEst);
#endif
  sqlite3DbFree(db, p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x536b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x536c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rsi
callq 0x53790
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xd260
movq -0x10(%rbp), %rax
movb 0x63(%rax), %al
shrb $0x4, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x53695
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
callq 0xd260
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xd260
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: clearSelect
static void clearSelect(sqlite3 *db, Select *p, int bFree){
  while( p ){
    Select *pPrior = p->pPrior;
    sqlite3ExprListDelete(db, p->pEList);
    sqlite3SrcListDelete(db, p->pSrc);
    sqlite3ExprDelete(db, p->pWhere);
    sqlite3ExprListDelete(db, p->pGroupBy);
    sqlite3ExprDelete(db, p->pHaving);
    sqlite3ExprListDelete(db, p->pOrderBy);
    sqlite3ExprDelete(db, p->pLimit);
    sqlite3ExprDelete(db, p->pOffset);
    sqlite3WithDelete(db, p->pWith);
    if( bFree ) sqlite3DbFree(db, p);
    p = pPrior;
    bFree = 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x53959
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x53790
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x53960
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x536c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rsi
callq 0x53790
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
callq 0x536c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rsi
callq 0x53790
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rsi
callq 0x536c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x536c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x70(%rax), %rsi
callq 0x53a90
cmpl $0x0, -0x14(%rbp)
je 0x53945
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xd260
movq -0x20(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
jmp 0x53883
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: checkAppendMsg
static void checkAppendMsg(
  IntegrityCk *pCheck,
  const char *zFormat,
  ...
){
  va_list ap;
  if( !pCheck->mxErr ) return;
  pCheck->mxErr--;
  pCheck->nErr++;
  va_start(ap, zFormat);
  if( pCheck->errMsg.nChar ){
    sqlite3StrAccumAppend(&pCheck->errMsg, "\n", 1);
  }
  if( pCheck->zPfx ){
    sqlite3XPrintf(&pCheck->errMsg, 0, pCheck->zPfx, pCheck->v1, pCheck->v2);
  }
  sqlite3VXPrintf(&pCheck->errMsg, 1, zFormat, ap);
  va_end(ap);
  if( pCheck->errMsg.accError==STRACCUM_NOMEM ){
    pCheck->mallocFailed = 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
testb %al, %al
je 0x547e8
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
movq %r9, -0xb8(%rbp)
movq %r8, -0xc0(%rbp)
movq %rcx, -0xc8(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x5481b
jmp 0x548e5
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rax
movl 0x20(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x20(%rax)
leaq -0x30(%rbp), %rax
leaq -0xe0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x50(%rax)
je 0x5487c
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
leaq 0x5416c(%rip), %rsi     # 0xa89de
movl $0x1, %edx
callq 0x21830
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x548af
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdx
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x8(%rbp), %rax
movl 0x34(%rax), %r8d
xorl %esi, %esi
movb $0x0, %al
callq 0x54b30
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
movq -0x10(%rbp), %rdx
leaq -0x30(%rbp), %rcx
movl $0x1, %esi
callq 0xe040
leaq -0x30(%rbp), %rax
movq -0x8(%rbp), %rax
movzbl 0x5c(%rax), %eax
cmpl $0x1, %eax
jne 0x548e5
movq -0x8(%rbp), %rax
movl $0x1, 0x24(%rax)
addq $0xe0, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: checkRef
static int checkRef(IntegrityCk *pCheck, Pgno iPage){
  if( iPage==0 ) return 1;
  if( iPage>pCheck->nPage ){
    checkAppendMsg(pCheck, "invalid page number %d", iPage);
    return 1;
  }
  if( getPageReferenced(pCheck, iPage) ){
    checkAppendMsg(pCheck, "2nd reference to page %d", iPage);
    return 1;
  }
  setPageReferenced(pCheck, iPage);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x5490e
movl $0x1, -0x4(%rbp)
jmp 0x5497a
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jbe 0x54938
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x51f64(%rip), %rsi     # 0xa688c
movb $0x0, %al
callq 0x547b0
movl $0x1, -0x4(%rbp)
jmp 0x5497a
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x54770
cmpl $0x0, %eax
je 0x54967
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq 0x51f4c(%rip), %rsi     # 0xa68a3
movb $0x0, %al
callq 0x547b0
movl $0x1, -0x4(%rbp)
jmp 0x5497a
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x53bd0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3BtreeGetOptimalReserve
SQLITE_PRIVATE int sqlite3BtreeGetOptimalReserve(Btree *p){
  int n;
  sqlite3BtreeEnter(p);
  n = sqlite3BtreeGetReserveNoMutex(p);
#ifdef SQLITE_HAS_CODEC
  if( n<p->pBt->optimalReserve ) n = p->pBt->optimalReserve;
#endif
  sqlite3BtreeLeave(p);
  return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x11e30
movq -0x8(%rbp), %rdi
callq 0x55660
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x13330
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3VdbeAddOp3
SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe *p, int op, int p1, int p2, int p3){
  int i;
  VdbeOp *pOp;

  i = p->nOp;
  assert( p->magic==VDBE_MAGIC_INIT );
  assert( op>0 && op<0xff );
  if( p->pParse->nOpAlloc<=i ){
    return growOp3(p, op, p1, p2, p3);
  }
  p->nOp++;
  pOp = &p->aOp[i];
  pOp->opcode = (u8)op;
  pOp->p5 = 0;
  pOp->p1 = p1;
  pOp->p2 = p2;
  pOp->p3 = p3;
  pOp->p4.p = 0;
  pOp->p4type = P4_NOTUSED;
#ifdef SQLITE_ENABLE_EXPLAIN_COMMENTS
  pOp->zComment = 0;
#endif
#ifdef SQLITE_DEBUG
  if( p->db->flags & SQLITE_VdbeAddopTrace ){
    int jj, kk;
    Parse *pParse = p->pParse;
    for(jj=kk=0; jj<SQLITE_N_COLCACHE; jj++){
      struct yColCache *x = pParse->aColCache + jj;
      if( x->iLevel>pParse->iCacheLevel || x->iReg==0 ) continue;
      printf(" r[%d]={%d:%d}", x->iReg, x->iTable, x->iColumn);
      kk++;
    }
    if( kk ) printf("\n");
    sqlite3VdbePrintOp(0, i, &p->aOp[i]);
    test_addop_breakpoint();
  }
#endif
#ifdef VDBE_PROFILE
  pOp->cycles = 0;
  pOp->cnt = 0;
#endif
#ifdef SQLITE_VDBE_COVERAGE
  pOp->iSrcLine = 0;
#endif
  return i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl 0x60(%rax), %eax
cmpl -0x24(%rbp), %eax
jg 0x56c5e
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl -0x20(%rbp), %r8d
callq 0x56ce0
movl %eax, -0x4(%rbp)
jmp 0x56ccd
movq -0x10(%rbp), %rax
movl 0x3c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x3c(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x24(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
movb %al, %cl
movq -0x30(%rbp), %rax
movb %cl, (%rax)
movq -0x30(%rbp), %rax
movb $0x0, 0x3(%rax)
movl -0x18(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x1c(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x8(%rax)
movl -0x20(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x30(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x30(%rbp), %rax
movb $0x0, 0x1(%rax)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: growOpArray
static int growOpArray(Vdbe *v, int nOp){
  VdbeOp *pNew;
  Parse *p = v->pParse;

  /* The SQLITE_TEST_REALLOC_STRESS compile-time option is designed to force
  ** more frequent reallocs and hence provide more opportunities for 
  ** simulated OOM faults.  SQLITE_TEST_REALLOC_STRESS is generally used
  ** during testing only.  With SQLITE_TEST_REALLOC_STRESS grow the op array
  ** by the minimum* amount required until the size reaches 512.  Normal
  ** operation (without SQLITE_TEST_REALLOC_STRESS) is to double the current
  ** size of the op array or add 1KB of space, whichever is smaller. */
#ifdef SQLITE_TEST_REALLOC_STRESS
  int nNew = (p->nOpAlloc>=512 ? p->nOpAlloc*2 : p->nOpAlloc+nOp);
#else
  int nNew = (p->nOpAlloc ? p->nOpAlloc*2 : (int)(1024/sizeof(Op)));
  UNUSED_PARAMETER(nOp);
#endif

  assert( nOp<=(1024/sizeof(Op)) );
  assert( nNew>=(p->nOpAlloc+nOp) );
  pNew = sqlite3DbRealloc(p->db, v->aOp, nNew*sizeof(Op));
  if( pNew ){
    p->szOpAlloc = sqlite3DbMallocSize(p->db, pNew);
    p->nOpAlloc = p->szOpAlloc/sizeof(Op);
    v->aOp = pNew;
  }
  return (pNew ? SQLITE_OK : SQLITE_NOMEM);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x60(%rax)
je 0x56d73
movq -0x20(%rbp), %rax
movl 0x60(%rax), %eax
shll %eax
movl %eax, -0x28(%rbp)
jmp 0x56d7d
movl $0x2a, %eax
movl %eax, -0x28(%rbp)
jmp 0x56d7d
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movslq -0x24(%rbp), %rax
imulq $0x18, %rax, %rdx
callq 0x21e00
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x56dea
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x217d0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x64(%rax)
movq -0x20(%rbp), %rax
movslq 0x64(%rax), %rax
movl $0x18, %ecx
xorl %edx, %edx
divq %rcx
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rdx
movl $0x7, %eax
xorl %ecx, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3DbStrNDup
SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3 *db, const char *z, u64 n){
  char *zNew;
  if( z==0 ){
    return 0;
  }
  assert( (n&0x7fffffff)==n );
  zNew = sqlite3DbMallocRaw(db, n+1);
  if( zNew ){
    memcpy(zNew, z, (size_t)n);
    zNew[n] = 0;
  }
  return zNew;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x56eb5
movq $0x0, -0x8(%rbp)
jmp 0x56ef6
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x1, %rsi
callq 0x175d0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x56eee
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xb420
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: allocSpace
static void *allocSpace(
  void *pBuf,          /* Where return pointer will be stored */
  int nByte,           /* Number of bytes to allocate */
  u8 *pFrom,           /* Memory available for allocation */
  int *pnFrom,         /* IN/OUT: Space available at pFrom */
  int *pnNeeded        /* If allocation cannot be made, increment *pnByte */
){
  assert( EIGHT_BYTE_ALIGNMENT(pFrom) );
  if( pBuf==0 ){
    nByte = ROUND8(nByte);
    if( nByte <= *pnFrom ){
      *pnFrom -= nByte;
      pBuf = &pFrom[*pnFrom];
    }else{
      *pnNeeded += nByte;
    }
  }
  assert( EIGHT_BYTE_ALIGNMENT(pBuf) );
  return pBuf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x571b3
movl -0xc(%rbp), %eax
addl $0x7, %eax
andl $-0x8, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jg 0x571a6
movl -0xc(%rbp), %edx
movq -0x20(%rbp), %rax
movl (%rax), %ecx
subl %edx, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movslq (%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x571b1
movl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
jmp 0x571b3
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)