// File: /workspace/github_c_makefile_star2_O1/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 0xb4e9
movq %rsi, %rbx
movq %rdi, %r14
testq %rdi, %rdi
je 0xb4e3
cmpq $0x0, 0x328(%r14)
jne 0xb4f2
decw 0x40(%rbx)
je 0xb4f2
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0xb533
movq 0x28(%r15), %r12
testq %r14, %r14
je 0xb50e
cmpq $0x0, 0x328(%r14)
jne 0xb520
movq (%r15), %rsi
movq 0x30(%r15), %rdi
addq $0x20, %rdi
xorl %edx, %edx
callq 0x3d5df
movq %r14, %rdi
movq %r15, %rsi
callq 0x3d8a8
movq %r12, %r15
testq %r12, %r12
jne 0xb4fb
movq 0x20(%rbx), %r15
testq %r15, %r15
je 0xb5b9
testq %r14, %r14
je 0xb54b
cmpq $0x0, 0x328(%r14)
jne 0xb58a
movq 0x18(%r15), %rdx
movq 0x20(%r15), %rax
testq %rax, %rax
je 0xb55e
movq %rdx, 0x18(%rax)
jmp 0xb579
testq %rdx, %rdx
movq %rdx, %rax
cmoveq %r15, %rax
movq 0x10(%rax), %rsi
movq 0x68(%rbx), %rdi
addq $0x50, %rdi
callq 0x3d5df
movq 0x18(%r15), %rax
testq %rax, %rax
je 0xb58a
movq 0x20(%r15), %rcx
movq %rcx, 0x20(%rax)
movq 0x30(%r15), %rsi
movq %r14, %rdi
callq 0x40090
movq 0x38(%r15), %rsi
movq %r14, %rdi
callq 0x40090
movq 0x8(%r15), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0xb6df
movq %r12, %r15
testq %r12, %r12
jne 0xb53c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3fe04
movq (%rbx), %rsi
movq %r14, %rdi
callq 0xb6df
movq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0xb6df
movq 0x18(%rbx), %rsi
movq %r14, %rdi
movl $0x1, %edx
callq 0x3d9e2
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x3d971
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3fe91
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb6df