// File: /workspace/github_c_makefile_star2_O2/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: getRowTrigger
static TriggerPrg *getRowTrigger(
  Parse *pParse,       /* Current parse context */
  Trigger *pTrigger,   /* Trigger to code */
  Table *pTab,         /* The table trigger pTrigger is attached to */
  int orconf           /* ON CONFLICT algorithm. */
){
  Parse *pRoot = sqlite3ParseToplevel(pParse);
  TriggerPrg *pPrg;

  assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );

  /* It may be that this trigger has already been coded (or is in the
  ** process of being coded). If this is the case, then an entry with
  ** a matching TriggerPrg.pTrigger field will be present somewhere
  ** in the Parse.pTriggerPrg list. Search for such an entry.  */
  for(pPrg=pRoot->pTriggerPrg; 
      pPrg && (pPrg->pTrigger!=pTrigger || pPrg->orconf!=orconf); 
      pPrg=pPrg->pNext
  );

  /* If an existing TriggerPrg could not be located, create a new one. */
  if( !pPrg ){
    pPrg = codeRowTrigger(pParse, pTrigger, pTab, orconf);
  }

  return pPrg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq 0x1d8(%rdi), %rax
testq %rax, %rax
cmoveq %rdi, %rax
leaq 0x290(%rax), %r12
movq %r12, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x543f0
cmpq %r14, (%rbx)
jne 0x543ea
cmpl %ecx, 0x18(%rbx)
je 0x5483d
addq $0x8, %rbx
jmp 0x543d4
movl %ecx, -0x3c(%rbp)
movq %rax, -0x60(%rbp)
movq %rdi, -0x78(%rbp)
movq (%rdi), %r13
pushq $0x28
popq %rsi
movq %r13, %rdi
callq 0xf4ae
testq %rax, %rax
je 0x5474f
movq %rax, %rbx
movq (%r12), %rax
movq %rax, 0x8(%rbx)
movq %rbx, (%r12)
pushq $0x28
popq %rsi
movq %r13, %rdi
callq 0xf4ae
movq %rax, 0x10(%rbx)
testq %rax, %rax
je 0x5474f
movq %r13, %r12
movq -0x60(%rbp), %r13
movq 0x10(%r13), %rdx
movq 0x108(%rdx), %rcx
movq %rcx, 0x20(%rax)
movq %rax, -0x58(%rbp)
movq %rax, 0x108(%rdx)
movq %r14, (%rbx)
movl -0x3c(%rbp), %eax
movl %eax, 0x18(%rbx)
orq $-0x1, 0x1c(%rbx)
movq %r12, %rdi
movl $0x298, %esi            # imm = 0x298
callq 0xf4ae
testq %rax, %rax
je 0x5474f
movq %r12, %rcx
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, -0xb0(%rbp)
movups %xmm0, -0xc0(%rbp)
movups %xmm0, -0xd0(%rbp)
movq %rax, -0xd8(%rbp)
movq %rcx, (%rax)
movq %r15, 0x1e0(%rax)
movq %r13, 0x1d8(%rax)
movq (%r14), %rax
movq %rax, 0x248(%r12)
movb 0x10(%r14), %al
movb %al, 0x1f4(%r12)
movq -0x78(%rbp), %rax
movl 0x1e8(%rax), %eax
movl %eax, 0x1e8(%r12)
movq %rcx, %r13
movq %r12, %rdi
callq 0x41ef4
movq %r13, %rdi
testq %rax, %rax
je 0x54835
movq %rax, %r15
movq (%r14), %rdx
leaq 0x1989b(%rip), %rsi     # 0x6dd9c
movl $0x0, -0x2c(%rbp)
movq %r13, %rdi
xorl %eax, %eax
callq 0x10594
pushq $-0x1
popq %rcx
movq %r15, -0x38(%rbp)
movq %r15, %rdi
movl %ecx, %esi
movq %rax, %rdx
callq 0x1074b
movq 0x18(%r14), %rsi
testq %rsi, %rsi
movq %r13, -0x50(%rbp)
je 0x54589
movq %r13, %rdi
movl $0x0, -0x2c(%rbp)
xorl %edx, %edx
callq 0x440d6
movq %rax, %r15
leaq -0xd8(%rbp), %rdi
movq %rax, %rsi
callq 0x42880
testl %eax, %eax
jne 0x5457d
cmpb $0x0, 0x50(%r13)
jne 0x5457d
movq -0x38(%rbp), %rdi
callq 0x47934
pushq $0x8
popq %rcx
movq %r12, %rdi
movq %r15, %rsi
movl %eax, -0x2c(%rbp)
movl %eax, %edx
callq 0x4797e
movq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x2f476
leaq 0x38(%r14), %r15
movq (%r12), %rax
movq %rax, -0x48(%rbp)
movq 0x10(%r12), %rax
movq %rax, -0x90(%rbp)
movl -0x3c(%rbp), %ecx
movq %r14, -0x80(%rbp)
movq (%r15), %r15
testq %r15, %r15
je 0x54756
movl %ecx, %eax
cmpl $0x63, %ecx
jne 0x545bf
movb 0x1(%r15), %al
movb %al, 0x1f5(%r12)
andl $0x0, 0x16c(%r12)
movzbl (%r15), %eax
cmpl $0x69, %eax
je 0x5466f
cmpl $0x6a, %eax
je 0x5463f
cmpl $0x6b, %eax
jne 0x546da
movq %r12, %rdi
movq %r15, %rsi
callq 0x54852
movq %rax, -0x70(%rbp)
movq 0x30(%r15), %rsi
movq -0x48(%rbp), %r13
movq %r13, %rdi
xorl %edx, %edx
callq 0x44502
movq %rax, -0x68(%rbp)
movq 0x28(%r15), %rsi
movq %r13, %rdi
xorl %edx, %edx
callq 0x440d6
movzbl 0x1f5(%r12), %r8d
movq %r12, %rdi
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq %rax, %rcx
callq 0x3be7b
jmp 0x5472e
movq %r12, %rdi
movq %r15, %rsi
callq 0x54852
movq %rax, %r13
movq 0x28(%r15), %rsi
movq -0x48(%rbp), %rdi
xorl %edx, %edx
callq 0x440d6
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x3b914
jmp 0x5472e
movq %r12, %rdi
movq %r15, %rsi
callq 0x54852
movq %rax, -0x70(%rbp)
movq 0x30(%r15), %rsi
movq -0x48(%rbp), %r13
movq %r13, %rdi
xorl %edx, %edx
callq 0x44502
movq %rax, -0x68(%rbp)
movq 0x10(%r15), %rsi
movq %r13, %rdi
xorl %edx, %edx
callq 0x443e4
movq %rax, -0x88(%rbp)
movq 0x38(%r15), %rsi
movq %r13, %rdi
callq 0x44823
movzbl 0x1f5(%r12), %r9d
movq %r12, %rdi
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x88(%rbp), %rcx
movq %rax, %r8
callq 0x3cff0
jmp 0x5472e
movq 0x10(%r15), %rsi
movq %r12, %r14
movq -0x48(%rbp), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0x443e4
movw $0x4, -0xa0(%rbp)
andl $0x0, -0x9c(%rbp)
movq %rax, %r13
andq $0x0, -0x98(%rbp)
movq %r14, %rdi
movq %rax, %rsi
leaq -0xa0(%rbp), %rdx
callq 0x380ad
movq %r12, %rdi
movq %r14, %r12
movq -0x80(%rbp), %r14
movq %r13, %rsi
callq 0x2f500
cmpb $0x74, (%r15)
je 0x54743
movq -0x90(%rbp), %rdi
pushq $0x47
popq %rsi
callq 0x41f34
addq $0x40, %r15
movl -0x3c(%rbp), %ecx
jmp 0x545a8
xorl %ebx, %ebx
jmp 0x5483d
cmpl $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %r15
je 0x54779
jns 0x54779
movq 0x40(%r15), %rax
testq %rax, %rax
je 0x54779
movl -0x2c(%rbp), %edx
notl %edx
movl 0x34(%r15), %ecx
movl %edx, %edx
movl %ecx, (%rax,%rdx,4)
pushq $0x14
popq %rsi
movq %r15, %rdi
callq 0x41f34
movq -0x78(%rbp), %rcx
cmpl $0x0, 0x50(%rcx)
je 0x5479e
movq (%r12), %rdi
movq 0x8(%r12), %rsi
callq 0x968b
jmp 0x547af
movq 0x8(%r12), %rax
movq %rax, 0x8(%rcx)
movl 0x50(%r12), %eax
movl %eax, 0x50(%rcx)
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rcx
movq -0x50(%rbp), %rax
cmpb $0x0, 0x50(%rax)
jne 0x547f7
addq $0x1a8, %rsi            # imm = 0x1A8
movq -0x38(%rbp), %rax
movq 0x8(%rax), %r15
movq -0x38(%rbp), %rdi
callq 0x31116
movq -0x58(%rbp), %rcx
movq -0x38(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, 0x8(%rcx)
movq -0x38(%rbp), %rax
andq $0x0, 0x8(%rax)
movq %r15, (%rcx)
movq -0x38(%rbp), %r15
movl 0x58(%r12), %eax
movl %eax, 0xc(%rcx)
movl 0x54(%r12), %eax
movl %eax, 0x10(%rcx)
movl 0x60(%r12), %eax
movl %eax, 0x14(%rcx)
movq %r14, 0x18(%rcx)
movl 0x1ec(%r12), %eax
movl %eax, 0x1c(%rbx)
movl 0x1f0(%r12), %eax
movl %eax, 0x20(%rbx)
movq %r15, %rdi
callq 0x1fcce
movq -0x50(%rbp), %rdi
movq %r12, %rsi
callq 0x968b
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq