// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3DropTrigger
SQLITE_PRIVATE void sqlite3DropTrigger(Parse *pParse, SrcList *pName, int noErr){
  Trigger *pTrigger = 0;
  int i;
  const char *zDb;
  const char *zName;
  int nName;
  sqlite3 *db = pParse->db;

  if( db->mallocFailed ) goto drop_trigger_cleanup;
  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
    goto drop_trigger_cleanup;
  }

  assert( pName->nSrc==1 );
  zDb = pName->a[0].zDatabase;
  zName = pName->a[0].zName;
  nName = sqlite3Strlen30(zName);
  assert( zDb!=0 || sqlite3BtreeHoldsAllMutexes(db) );
  for(i=OMIT_TEMPDB; i<db->nDb; i++){
    int j = (i<2) ? i^1 : i;  /* Search TEMP before MAIN */
    if( zDb && sqlite3StrICmp(db->aDb[j].zName, zDb) ) continue;
    assert( sqlite3SchemaMutexHeld(db, j, 0) );
    pTrigger = sqlite3HashFind(&(db->aDb[j].pSchema->trigHash), zName, nName);
    if( pTrigger ) break;
  }
  if( !pTrigger ){
    if( !noErr ){
      sqlite3ErrorMsg(pParse, "no such trigger: %S", pName, 0);
    }else{
      sqlite3CodeVerifyNamedSchema(pParse, zDb);
    }
    pParse->checkSchema = 1;
    goto drop_trigger_cleanup;
  }
  sqlite3DropTriggerPtr(pParse, pTrigger);

drop_trigger_cleanup:
  sqlite3SrcListDelete(db, pName);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpb $0x0, 0x50(%rax)
je 0x5ca35
jmp 0x5cb5f
movq -0x8(%rbp), %rdi
callq 0x4ab20
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x5ca4b
jmp 0x5cb5f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x92f0
movl %eax, -0x3c(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x48(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x5cb14
cmpl $0x2, -0x24(%rbp)
jge 0x5ca97
movl -0x24(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x5ca9d
movl -0x24(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x4c(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x5cad0
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x4c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0xc970
cmpl $0x0, %eax
je 0x5cad0
jmp 0x5cb06
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x4c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
addq $0x38, %rdi
movq -0x38(%rbp), %rsi
movl -0x3c(%rbp), %edx
callq 0x468b0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x5cb04
jmp 0x5cb14
jmp 0x5cb06
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x5ca76
cmpq $0x0, -0x20(%rbp)
jne 0x5cb52
cmpl $0x0, -0x14(%rbp)
jne 0x5cb3b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x5460e(%rip), %rsi     # 0xb113e
xorl %ecx, %ecx
movb $0x0, %al
callq 0x136f0
jmp 0x5cb48
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x6b6a0
movq -0x8(%rbp), %rax
movb $0x1, 0x1d(%rax)
jmp 0x5cb5f
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x6bc70
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x475c0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)