// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq (%rdi), %r14
cmpb $0x0, 0x50(%r14)
jne 0x44ead
movl %edx, %r12d
movq %rdi, %r15
callq 0x36884
testl %eax, %eax
jne 0x44ead
movl %r12d, -0x44(%rbp)
movq 0x18(%rbx), %rsi
testq %rsi, %rsi
movq %r15, -0x38(%rbp)
je 0x44d92
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq %rsi, %rax
incl %r12d
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x44d7d
andl $0x3fffffff, %r12d      # imm = 0x3FFFFFFF
jmp 0x44d95
xorl %r12d, %r12d
movq %rbx, -0x40(%rbp)
movq 0x10(%rbx), %r13
movq %r14, -0x30(%rbp)
movl 0x28(%r14), %eax
movl %eax, -0x48(%rbp)
testl %eax, %eax
jle 0x44e55
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x50(%rbp)
xorl %ebx, %ebx
leaq 0x312eb(%rip), %r14     # 0x760b0
xorl %eax, %eax
cmpl $0x2, %ebx
setb %al
xorl %ebx, %eax
testq %r13, %r13
je 0x44e26
movq %rax, %rcx
shlq $0x5, %rcx
movq -0x50(%rbp), %rdx
movq (%rdx,%rcx), %rdx
movb (%rdx), %dil
testb %dil, %dil
je 0x44e13
incq %rdx
movq %r13, %rcx
movzbl %dil, %r9d
movb (%r9,%r14), %dil
movzbl (%rcx), %r8d
cmpb (%r8,%r14), %dil
jne 0x44e19
incq %rcx
movb (%rdx), %dil
incq %rdx
testb %dil, %dil
jne 0x44df1
jmp 0x44e16
movq %r13, %rcx
xorl %r9d, %r9d
movb (%r9,%r14), %dl
movzbl (%rcx), %ecx
cmpb (%rcx,%r14), %dl
jne 0x44e4a
shlq $0x5, %rax
movq -0x50(%rbp), %rcx
movq 0x18(%rcx,%rax), %rdi
addq $0x38, %rdi
movl %r12d, %edx
movq %rsi, %r15
callq 0x3406c
movq %r15, %rsi
testq %rax, %rax
jne 0x44e99
incl %ebx
cmpl -0x48(%rbp), %ebx
jne 0x44dc5
cmpl $0x0, -0x44(%rbp)
je 0x44e70
movq -0x38(%rbp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x4f7b5
movq -0x40(%rbp), %rbx
jmp 0x44e8e
leaq 0x377cb(%rip), %rsi     # 0x7c642
movq -0x38(%rbp), %r15
movq %r15, %rdi
movq -0x40(%rbp), %rbx
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x11842
movq -0x30(%rbp), %r14
movb $0x1, 0x1d(%r15)
jmp 0x44ead
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x4fdbc
movq -0x40(%rbp), %rbx
movq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3493b