// File: /workspace/github_c_makefile_star2_O1/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 0x45b57
testq %rax, %rax
je 0x633eb
movq %rax, %rbx
movq 0x68(%r14), %rax
testq %rax, %rax
movq %r12, -0x30(%rbp)
je 0x632dc
movq (%r15), %rdx
movl 0x28(%rdx), %ecx
testl %ecx, %ecx
jle 0x632e4
movq 0x20(%rdx), %rdx
addq $0x18, %rdx
xorl %r13d, %r13d
cmpq %rax, (%rdx)
je 0x632e7
incq %r13
addq $0x20, %rdx
cmpq %r13, %rcx
jne 0x632c6
movl %ecx, %r13d
jmp 0x632e7
movl $0xfff0bdc0, %r13d      # imm = 0xFFF0BDC0
jmp 0x632e7
xorl %r13d, %r13d
movq %r15, %rdi
movq %r14, -0x38(%rbp)
movq %r14, %rsi
callq 0x4fd20
testq %rax, %rax
je 0x63369
movq %rax, %r12
movq 0x28(%r12), %rax
testq %rax, %rax
je 0x63331
movq (%r15), %rdx
movl 0x28(%rdx), %ecx
testl %ecx, %ecx
jle 0x63338
movq 0x20(%rdx), %rsi
addq $0x18, %rsi
xorl %edx, %edx
cmpq %rax, (%rsi)
je 0x6333a
incq %rdx
addq $0x20, %rsi
cmpq %rdx, %rcx
jne 0x6331c
movl %ecx, %edx
jmp 0x6333a
movl $0xfff0bdc0, %edx       # imm = 0xFFF0BDC0
jmp 0x6333a
xorl %edx, %edx
movq (%r12), %r14
movq %rbx, %rdi
movl $0x74, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x11975
movq 0x40(%r12), %r12
testq %r12, %r12
jne 0x632fe
movq -0x38(%rbp), %r12
movq (%r12), %r14
movq %rbx, %rdi
movl $0x72, %esi
movl %r13d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x11975
movq (%r15), %rdi
leaq 0x197cc(%rip), %rsi     # 0x7cb6b
movq -0x30(%rbp), %rdx
xorl %eax, %eax
callq 0x117e2
testq %rax, %rax
je 0x633eb
movq %rbx, %rdi
movl %r13d, %esi
movq %rax, %rdx
callq 0x4679b
movq %r15, %rdi
movq %r12, %rsi
callq 0x631df
testq %rax, %rax
je 0x633eb
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 0x4679b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq