// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3DeleteTable
SQLITE_PRIVATE void sqlite3DeleteTable(sqlite3 *db, Table *pTable){
  Index *pIndex, *pNext;
  TESTONLY( int nLookaside; ) /* Used to verify lookaside not used for schema */

  assert( !pTable || pTable->nRef>0 );

  /* Do not delete the table until the reference count reaches zero. */
  if( !pTable ) return;
  if( ((!db || db->pnBytesFreed==0) && (--pTable->nRef)>0) ) return;

  /* Record the number of outstanding lookaside allocations in schema Tables
  ** prior to doing any free() operations.  Since schema Tables do not use
  ** lookaside, this number should not change. */
  TESTONLY( nLookaside = (db && (pTable->tabFlags & TF_Ephemeral)==0) ?
                         db->lookaside.nOut : 0 );

  /* Delete all indices associated with this table. */
  for(pIndex = pTable->pIndex; pIndex; pIndex=pNext){
    pNext = pIndex->pNext;
    assert( pIndex->pSchema==pTable->pSchema );
    if( !db || db->pnBytesFreed==0 ){
      char *zName = pIndex->zName; 
      TESTONLY ( Index *pOld = ) sqlite3HashInsert(
         &pIndex->pSchema->idxHash, zName, 0
      );
      assert( db==0 || sqlite3SchemaMutexHeld(db, 0, pIndex->pSchema) );
      assert( pOld==pIndex || pOld==0 );
    }
    freeIndex(db, pIndex);
  }

  /* Delete any foreign keys attached to this table. */
  sqlite3FkDelete(db, pTable);

  /* Delete the Table structure itself.
  */
  sqlite3DeleteColumnNames(db, pTable);
  sqlite3DbFree(db, pTable->zName);
  sqlite3DbFree(db, pTable->zColAff);
  sqlite3SelectDelete(db, pTable->pSelect);
  sqlite3ExprListDelete(db, pTable->pCheck);
#ifndef SQLITE_OMIT_VIRTUALTABLE
  sqlite3VtabClear(db, pTable);
#endif
  sqlite3DbFree(db, pTable);

  /* Verify that no lookaside memory was used by schema tables */
  assert( nLookaside==0 || nLookaside==db->lookaside.nOut );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0xb555
movq %rsi, %rbx
movq %rdi, %r14
testq %rdi, %rdi
je 0xb54f
cmpq $0x0, 0x328(%r14)
jne 0xb55e
decw 0x40(%rbx)
je 0xb55e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0xb59f
movq 0x28(%r15), %r12
testq %r14, %r14
je 0xb57a
cmpq $0x0, 0x328(%r14)
jne 0xb58c
movq (%r15), %rsi
movq 0x30(%r15), %rdi
addq $0x20, %rdi
xorl %edx, %edx
callq 0x3c5eb
movq %r14, %rdi
movq %r15, %rsi
callq 0x3c8af
movq %r12, %r15
testq %r12, %r12
jne 0xb567
movq 0x20(%rbx), %r15
testq %r15, %r15
je 0xb62c
testq %r14, %r14
je 0xb5bb
cmpq $0x0, 0x328(%r14)
jne 0xb5fd
movq 0x18(%r15), %rdx
movq 0x20(%r15), %rax
testq %rax, %rax
je 0xb5ce
movq %rdx, 0x18(%rax)
jmp 0xb5ec
movq 0x68(%rbx), %rdi
addq $0x50, %rdi
testq %rdx, %rdx
je 0xb5e1
movq 0x10(%rdx), %rsi
jmp 0xb5e7
movq 0x10(%r15), %rsi
xorl %edx, %edx
callq 0x3c5eb
movq 0x18(%r15), %rax
testq %rax, %rax
je 0xb5fd
movq 0x20(%r15), %rcx
movq %rcx, 0x20(%rax)
movq 0x30(%r15), %rsi
movq %r14, %rdi
callq 0x3f09f
movq 0x38(%r15), %rsi
movq %r14, %rdi
callq 0x3f09f
movq 0x8(%r15), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0xb752
movq %r12, %r15
testq %r12, %r12
jne 0xb5ac
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3ee0a
movq (%rbx), %rsi
movq %r14, %rdi
callq 0xb752
movq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0xb752
movq 0x18(%rbx), %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x3c9f2
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x3c97e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3ee9a
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb752