// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: reloadTableSchema
static void reloadTableSchema(Parse *pParse, Table *pTab, const char *zName){
  Vdbe *v;
  char *zWhere;
  int iDb;                   /* Index of database containing pTab */
#ifndef SQLITE_OMIT_TRIGGER
  Trigger *pTrig;
#endif

  v = sqlite3GetVdbe(pParse);
  if( NEVER(v==0) ) return;
  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
  assert( iDb>=0 );

#ifndef SQLITE_OMIT_TRIGGER
  /* Drop any table triggers from the internal schema. */
  for(pTrig=sqlite3TriggerList(pParse, pTab); pTrig; pTrig=pTrig->pNext){
    int iTrigDb = sqlite3SchemaToIndex(pParse->db, pTrig->pSchema);
    assert( iTrigDb==iDb || iTrigDb==1 );
    sqlite3VdbeAddOp4(v, OP_DropTrigger, iTrigDb, 0, 0, pTrig->zName, 0);
  }
#endif

  /* Drop the table and index from the internal schema.  */
  sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);

  /* Reload the table, index and permanent trigger schemas. */
  zWhere = sqlite3MPrintf(pParse->db, "tbl_name=%Q", zName);
  if( !zWhere ) return;
  sqlite3VdbeAddParseSchemaOp(v, iDb, zWhere);

#ifndef SQLITE_OMIT_TRIGGER
  /* Now, if the table is not stored in the temp database, reload any temp 
  ** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBQUERY is defined. 
  */
  if( (zWhere=whereTempTriggers(pParse, pTab))!=0 ){
    sqlite3VdbeAddParseSchemaOp(v, 1, zWhere);
  }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
callq 0x45ece
testq %rax, %rax
je 0x63288
movq %rax, %rbx
movq (%r15), %rax
movq 0x68(%r14), %rcx
testq %rcx, %rcx
movq %r12, -0x30(%rbp)
je 0x6316c
movl 0x28(%rax), %edx
testl %edx, %edx
jle 0x63174
movq 0x20(%rax), %rsi
addq $0x18, %rsi
xorl %r13d, %r13d
cmpq %rcx, (%rsi)
je 0x63177
incq %r13
addq $0x20, %rsi
cmpq %r13, %rdx
jne 0x63156
movl %edx, %r13d
jmp 0x63177
movl $0xfff0bdc0, %r13d      # imm = 0xFFF0BDC0
jmp 0x63177
xorl %r13d, %r13d
movq 0x20(%rax), %rax
movq 0x38(%rax), %rdi
movzbl 0x1f6(%r15), %esi
movq %r14, -0x38(%rbp)
movq %r14, %rdx
callq 0x4fd1a
testq %rax, %rax
je 0x63206
movq %rax, %r12
movq 0x28(%r12), %rax
testq %rax, %rax
je 0x631ce
movq (%r15), %rdx
movl 0x28(%rdx), %ecx
testl %ecx, %ecx
jle 0x631d5
movq 0x20(%rdx), %rsi
addq $0x18, %rsi
xorl %edx, %edx
cmpq %rax, (%rsi)
je 0x631d7
incq %rdx
addq $0x20, %rsi
cmpq %rdx, %rcx
jne 0x631b9
movl %ecx, %edx
jmp 0x631d7
movl $0xfff0bdc0, %edx       # imm = 0xFFF0BDC0
jmp 0x631d7
xorl %edx, %edx
movq (%r12), %r14
movq %rbx, %rdi
movl $0x74, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x11a9f
movq 0x40(%r12), %r12
testq %r12, %r12
jne 0x6319b
movq -0x38(%rbp), %r12
movq (%r12), %r14
movq %rbx, %rdi
movl $0x72, %esi
movl %r13d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x11a9f
movq (%r15), %rdi
leaq 0x1992f(%rip), %rsi     # 0x7cb6b
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x11900
testq %rax, %rax
je 0x63288
movq %rbx, %rdi
movl %r13d, %esi
movq %rax, %rdx
callq 0x46acc
movq %r15, %rdi
movq %r12, %rsi
callq 0x6306c
testq %rax, %rax
je 0x63288
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x46acc
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq