// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3DropTable
SQLITE_PRIVATE void sqlite3DropTable(Parse *pParse, SrcList *pName, int isView, int noErr){
  Table *pTab;
  Vdbe *v;
  sqlite3 *db = pParse->db;
  int iDb;

  if( db->mallocFailed ){
    goto exit_drop_table;
  }
  assert( pParse->nErr==0 );
  assert( pName->nSrc==1 );
  if( noErr ) db->suppressErr++;
  pTab = sqlite3LocateTableItem(pParse, isView, &pName->a[0]);
  if( noErr ) db->suppressErr--;

  if( pTab==0 ){
    if( noErr ) sqlite3CodeVerifyNamedSchema(pParse, pName->a[0].zDatabase);
    goto exit_drop_table;
  }
  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
  assert( iDb>=0 && iDb<db->nDb );

  /* If pTab is a virtual table, call ViewGetColumnNames() to ensure
  ** it is initialized.
  */
  if( IsVirtual(pTab) && sqlite3ViewGetColumnNames(pParse, pTab) ){
    goto exit_drop_table;
  }
#ifndef SQLITE_OMIT_AUTHORIZATION
  {
    int code;
    const char *zTab = SCHEMA_TABLE(iDb);
    const char *zDb = db->aDb[iDb].zName;
    const char *zArg2 = 0;
    if( sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb)){
      goto exit_drop_table;
    }
    if( isView ){
      if( !OMIT_TEMPDB && iDb==1 ){
        code = SQLITE_DROP_TEMP_VIEW;
      }else{
        code = SQLITE_DROP_VIEW;
      }
#ifndef SQLITE_OMIT_VIRTUALTABLE
    }else if( IsVirtual(pTab) ){
      code = SQLITE_DROP_VTABLE;
      zArg2 = sqlite3GetVTable(db, pTab)->pMod->zName;
#endif
    }else{
      if( !OMIT_TEMPDB && iDb==1 ){
        code = SQLITE_DROP_TEMP_TABLE;
      }else{
        code = SQLITE_DROP_TABLE;
      }
    }
    if( sqlite3AuthCheck(pParse, code, pTab->zName, zArg2, zDb) ){
      goto exit_drop_table;
    }
    if( sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb) ){
      goto exit_drop_table;
    }
  }
#endif
  if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 
    && sqlite3StrNICmp(pTab->zName, "sqlite_stat", 11)!=0 ){
    sqlite3ErrorMsg(pParse, "table %s may not be dropped", pTab->zName);
    goto exit_drop_table;
  }

#ifndef SQLITE_OMIT_VIEW
  /* Ensure DROP TABLE is not used on a view, and DROP VIEW is not used
  ** on a table.
  */
  if( isView && pTab->pSelect==0 ){
    sqlite3ErrorMsg(pParse, "use DROP TABLE to delete table %s", pTab->zName);
    goto exit_drop_table;
  }
  if( !isView && pTab->pSelect ){
    sqlite3ErrorMsg(pParse, "use DROP VIEW to delete view %s", pTab->zName);
    goto exit_drop_table;
  }
#endif

  /* Generate code to remove the table from the master table
  ** on disk.
  */
  v = sqlite3GetVdbe(pParse);
  if( v ){
    sqlite3BeginWriteOperation(pParse, 1, iDb);
    sqlite3ClearStatTables(pParse, iDb, "tbl", pTab->zName);
    sqlite3FkDropTable(pParse, pName, pTab);
    sqlite3CodeDropTable(pParse, pTab, iDb, isView);
  }

exit_drop_table:
  sqlite3SrcListDelete(db, pName);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, -0x2c(%rbp)
movq %rsi, %rbx
movq (%rdi), %r14
cmpb $0x0, 0x50(%r14)
je 0x3bb60
movq %r14, %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3493b
movq %rdi, %r15
testl %ecx, %ecx
je 0x3bb91
incb 0x53(%r14)
leaq 0x8(%rbx), %rdx
movq %r15, %rdi
movl -0x2c(%rbp), %esi
callq 0x4a479
decb 0x53(%r14)
testq %rax, %rax
jne 0x3bba5
movq 0x10(%rbx), %rsi
movq %r15, %rdi
callq 0x4f7b5
jmp 0x3bb47
leaq 0x8(%rbx), %rdx
movq %r15, %rdi
movl -0x2c(%rbp), %esi
callq 0x4a479
testq %rax, %rax
je 0x3bb47
movq %rax, %rsi
movq 0x68(%rax), %rax
testq %rax, %rax
je 0x3bbda
movl 0x28(%r14), %ecx
testl %ecx, %ecx
jle 0x3bbe2
movq 0x20(%r14), %rdx
addq $0x18, %rdx
xorl %r12d, %r12d
cmpq %rax, (%rdx)
je 0x3bbe5
incq %r12
addq $0x20, %rdx
cmpq %r12, %rcx
jne 0x3bbc4
movl %ecx, %r12d
jmp 0x3bbe5
movl $0xfff0bdc0, %r12d      # imm = 0xFFF0BDC0
jmp 0x3bbe5
xorl %r12d, %r12d
testb $0x10, 0x46(%rsi)
movq %rsi, -0x38(%rbp)
je 0x3bbff
movq %r15, %rdi
callq 0x4a4d2
testl %eax, %eax
jne 0x3bb47
cmpl $0x1, %r12d
leaq 0x3e30f(%rip), %rax     # 0x79f19
leaq 0x3e31b(%rip), %rdx     # 0x79f2c
cmoveq %rax, %rdx
movq 0x20(%r14), %rax
movslq %r12d, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %r13
movq %r15, %rdi
movl $0x9, %esi
xorl %ecx, %ecx
movq %r13, %r8
callq 0x460eb
movq -0x38(%rbp), %rdx
testl %eax, %eax
jne 0x3bb47
cmpl $0x0, -0x2c(%rbp)
je 0x3bc5a
xorl %eax, %eax
cmpl $0x1, %r12d
setne %al
leal 0xf(,%rax,2), %esi
jmp 0x3bc74
testb $0x10, 0x46(%rdx)
jne 0x3bcea
xorl %eax, %eax
cmpl $0x1, %r12d
sete %al
leal 0xb(,%rax,2), %esi
xorl %ecx, %ecx
movq (%rdx), %rdx
movq %r15, %rdi
movq %r13, %r8
callq 0x460eb
movq -0x38(%rbp), %rcx
testl %eax, %eax
jne 0x3bb47
movq (%rcx), %rdx
movq %r15, %rdi
movl $0x9, %esi
xorl %ecx, %ecx
movq %r13, %r8
callq 0x460eb
movq -0x38(%rbp), %r9
testl %eax, %eax
jne 0x3bb47
movq (%r9), %rdx
xorl %ecx, %ecx
leaq 0x3a3f3(%rip), %rax     # 0x760b0
leaq 0x3f128(%rip), %rsi     # 0x7adec
movzbl (%rdx,%rcx), %edi
testq %rdi, %rdi
je 0x3bd0c
movzbl (%rdi,%rax), %edi
movzbl (%rcx,%rsi), %r8d
movb (%r8,%rax), %r8b
cmpb %r8b, %dil
jne 0x3bd16
incq %rcx
cmpq $0x7, %rcx
jne 0x3bcc4
jmp 0x3bd1e
leaq 0x58(%rdx), %rax
movq (%rax), %rcx
leaq 0x28(%rcx), %rax
cmpq %r14, (%rcx)
jne 0x3bcee
movq 0x8(%rcx), %rax
movq 0x8(%rax), %rcx
movl $0x1e, %esi
jmp 0x3bc76
movzbl (%rcx,%rsi), %ecx
movb (%rcx,%rax), %r8b
xorl %edi, %edi
movzbl %r8b, %ecx
cmpl %ecx, %edi
jne 0x3bd63
xorl %ecx, %ecx
leaq 0x3fa5d(%rip), %rsi     # 0x7b784
movzbl (%rdx,%rcx), %edi
testq %rdi, %rdi
je 0x3bd4d
movzbl (%rdi,%rax), %edi
movzbl (%rcx,%rsi), %r8d
movb (%r8,%rax), %r8b
cmpb %r8b, %dil
jne 0x3bd57
incq %rcx
cmpq $0xb, %rcx
jne 0x3bd27
jmp 0x3bd63
movzbl (%rcx,%rsi), %ecx
movb (%rcx,%rax), %r8b
xorl %edi, %edi
movzbl %r8b, %eax
cmpl %eax, %edi
jne 0x3bde8
movq 0x18(%r9), %rax
cmpl $0x0, -0x2c(%rbp)
je 0x3bd7b
testq %rax, %rax
jne 0x3bd89
leaq 0x3fa33(%rip), %rsi     # 0x7b7ac
jmp 0x3bdef
testq %rax, %rax
je 0x3bd89
leaq 0x3fa47(%rip), %rsi     # 0x7b7ce
jmp 0x3bdef
movq %r15, %rdi
callq 0x45ece
movq -0x38(%rbp), %r13
testq %rax, %rax
je 0x3bb47
movq %r15, %rdi
movl $0x1, %esi
movl %r12d, %edx
callq 0x463e1
movq (%r13), %rcx
leaq 0x3fa35(%rip), %rdx     # 0x7b7ee
movq %r15, %rdi
movl %r12d, %esi
callq 0x4f86f
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x4f908
movq %r15, %rdi
movq %r13, %rsi
movl %r12d, %edx
movl -0x2c(%rbp), %ecx
callq 0x4fa33
jmp 0x3bb47
leaq 0x3f9a1(%rip), %rsi     # 0x7b790
movq %r15, %rdi
xorl %eax, %eax
callq 0x11842
jmp 0x3bb47