// File: /workspace/github_c_makefile_star2_O1/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 0x44b10
movl %edx, %r13d
movq %rdi, %r15
callq 0x36175
testl %eax, %eax
jne 0x44b10
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
movq %r15, -0x40(%rbp)
movl %r13d, -0x34(%rbp)
je 0x449f8
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movq %rcx, %rax
incl %r12d
cmpb $0x0, (%rax)
leaq 0x1(%rax), %rax
jne 0x449e3
andl $0x3fffffff, %r12d      # imm = 0x3FFFFFFF
jmp 0x449fb
xorl %r12d, %r12d
movq %rbx, -0x30(%rbp)
movq 0x10(%rbx), %rbx
movl 0x28(%r14), %eax
xorl %r13d, %r13d
movl %eax, -0x38(%rbp)
testl %eax, %eax
jle 0x44abd
movq %rcx, -0x48(%rbp)
leaq 0x31640(%rip), %r15     # 0x76060
xorl %eax, %eax
xorl %ecx, %ecx
cmpl $0x2, %r13d
setb %cl
xorl %r13d, %ecx
movl %ecx, %ecx
testq %rbx, %rbx
je 0x44a83
movq 0x20(%r14), %rdx
movq %rcx, %rsi
shlq $0x5, %rsi
movq (%rdx,%rsi), %rdi
movb (%rdi), %dl
testb %dl, %dl
je 0x44a70
incq %rdi
movq %rbx, %rsi
movzbl %dl, %r8d
movb (%r8,%r15), %r8b
movzbl (%rsi), %r9d
cmpb (%r9,%r15), %r8b
jne 0x44a73
incq %rsi
movb (%rdi), %dl
incq %rdi
testb %dl, %dl
jne 0x44a50
jmp 0x44a73
movq %rbx, %rsi
movzbl %dl, %edx
movb (%rdx,%r15), %dl
movzbl (%rsi), %esi
cmpb (%rsi,%r15), %dl
jne 0x44aa8
movq 0x20(%r14), %rax
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rdi
addq $0x38, %rdi
movq -0x48(%rbp), %rsi
movl %r12d, %edx
callq 0x3396f
testq %rax, %rax
setne %cl
jmp 0x44aaa
xorl %ecx, %ecx
testb %cl, %cl
jne 0x44abf
incl %r13d
cmpl -0x38(%rbp), %r13d
jne 0x44a22
jmp 0x44abf
xorl %eax, %eax
testq %rax, %rax
je 0x44ad6
movq -0x40(%rbp), %rdi
movq %rax, %rsi
callq 0x4fdd7
movq -0x30(%rbp), %rbx
jmp 0x44b10
cmpl $0x0, -0x34(%rbp)
movq -0x40(%rbp), %r15
je 0x44af1
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4f7ee
movq -0x30(%rbp), %rbx
jmp 0x44b0b
leaq 0x37b4a(%rip), %rsi     # 0x7c642
movq %r15, %rdi
movq -0x30(%rbp), %rbx
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x11724
movb $0x1, 0x1d(%r15)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x341f5