// File: /workspace/github_c_makefile_star2_O3/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
movl %ecx, %r13d
movq %rsi, %r14
movq 0x1d8(%rdi), %r12
testq %r12, %r12
cmoveq %rdi, %r12
movq 0x290(%r12), %rbx
testq %rbx, %rbx
je 0x5d832
cmpq %r14, (%rbx)
jne 0x5d82c
cmpl %r13d, 0x18(%rbx)
je 0x5dcf4
movq 0x8(%rbx), %rbx
jmp 0x5d818
movq %rdx, -0x30(%rbp)
movq %rdi, -0x70(%rbp)
movq (%rdi), %r15
movq %r15, %rdi
movl $0x28, %esi
callq 0x11721
testq %rax, %rax
je 0x5dc5b
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x20(%rax)
movq 0x290(%r12), %rax
movq %rax, 0x8(%rbx)
movq %rbx, 0x290(%r12)
movq %r15, %rdi
movl $0x28, %esi
callq 0x11721
testq %rax, %rax
je 0x5dc53
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq $0x0, 0x20(%rax)
movq %rax, 0x10(%rbx)
movq 0x10(%r12), %rdx
movq 0x108(%rdx), %rcx
movq %rcx, 0x20(%rax)
movq %rax, -0x50(%rbp)
movq %rax, 0x108(%rdx)
movq %r14, (%rbx)
movl %r13d, -0x34(%rbp)
movl %r13d, 0x18(%rbx)
movq $-0x1, 0x1c(%rbx)
movq %r15, %rdi
movl $0x298, %esi            # imm = 0x298
callq 0x11721
testq %rax, %rax
je 0x5dc5b
movq %r12, %r13
movq %rax, %r12
movq %rax, %rdi
addq $0x8, %rdi
movq $0x0, -0x48(%rbp)
movl $0x290, %edx            # imm = 0x290
xorl %esi, %esi
callq 0x8200
xorps %xmm0, %xmm0
movups %xmm0, -0xd0(%rbp)
movups %xmm0, -0xc0(%rbp)
movups %xmm0, -0xb0(%rbp)
movq %r12, -0xd8(%rbp)
movq %r15, (%r12)
movq -0x30(%rbp), %rax
movq %rax, 0x1e0(%r12)
movq %r13, -0x78(%rbp)
movq %r13, 0x1d8(%r12)
movq (%r14), %rax
movq %rax, 0x248(%r12)
movb 0x10(%r14), %al
movb %al, 0x1f4(%r12)
movq -0x70(%rbp), %rax
movl 0x1e8(%rax), %eax
movl %eax, 0x1e8(%r12)
movq %r12, %rdi
callq 0x45ece
testq %rax, %rax
je 0x5dce9
movq %rax, %r13
movq (%r14), %rdx
leaq 0x1e3ed(%rip), %rsi     # 0x7bd7c
movq %r15, %rdi
xorl %eax, %eax
callq 0x11900
movq %r13, -0x68(%rbp)
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rax, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x11a9f
movq 0x18(%r14), %rsi
testq %rsi, %rsi
movq %r15, -0x40(%rbp)
je 0x5da1e
movq %r15, %r13
movq $0x0, -0x48(%rbp)
movq %r15, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4848c
movq %rax, %r15
leaq -0xd8(%rbp), %rdi
movq %rax, %rsi
callq 0x46b2f
testl %eax, %eax
jne 0x5da12
cmpb $0x0, 0x50(%r13)
jne 0x5da12
movq -0x68(%rbp), %rdi
callq 0x4c5eb
movq %r12, %rdi
movq %r15, %rsi
movq %rax, -0x48(%rbp)
movl %eax, %edx
movl $0x8, %ecx
callq 0x4c638
movq -0x40(%rbp), %rdi
movq %r15, %rsi
callq 0x3479d
movq 0x38(%r14), %r15
testq %r15, %r15
movl -0x34(%rbp), %r13d
je 0x5dbff
movq (%r12), %rax
movq %rax, -0x30(%rbp)
movq 0x10(%r12), %rax
movq %rax, -0x90(%rbp)
movq %r14, -0x80(%rbp)
movl %r13d, %eax
cmpl $0x63, %r13d
jne 0x5da54
movb 0x1(%r15), %al
movb %al, 0x1f5(%r12)
movl $0x0, 0x16c(%r12)
movzbl (%r15), %eax
cmpl $0x69, %eax
je 0x5db0b
cmpl $0x6a, %eax
je 0x5dad9
cmpl $0x6b, %eax
jne 0x5db76
movq %r12, %rdi
movq %r15, %rsi
callq 0x5dd09
movq %rax, -0x60(%rbp)
movq 0x30(%r15), %rsi
movq -0x30(%rbp), %r13
movq %r13, %rdi
xorl %edx, %edx
callq 0x4887b
movq %rax, -0x58(%rbp)
movq 0x28(%r15), %rsi
movq %r13, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4848c
movzbl 0x1f5(%r12), %r8d
movq %r12, %rdi
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %rax, %rcx
callq 0x3e4f7
jmp 0x5dbd0
movq %r12, %rdi
movq %r15, %rsi
callq 0x5dd09
movq %rax, %r13
movq 0x28(%r15), %rsi
movq -0x30(%rbp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4848c
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x3df0a
jmp 0x5dbd0
movq %r12, %rdi
movq %r15, %rsi
callq 0x5dd09
movq %rax, -0x60(%rbp)
movq 0x30(%r15), %rsi
movq -0x30(%rbp), %r13
movq %r13, %rdi
xorl %edx, %edx
callq 0x4887b
movq %rax, -0x58(%rbp)
movq 0x10(%r15), %rsi
movq %r13, %rdi
xorl %edx, %edx
callq 0x48744
movq %rax, -0x88(%rbp)
movq 0x38(%r15), %rsi
movq %r13, %rdi
callq 0x48be7
movzbl 0x1f5(%r12), %r9d
movq %r12, %rdi
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x88(%rbp), %rcx
movq %rax, %r8
callq 0x3f481
jmp 0x5dbd0
movq 0x10(%r15), %rsi
movq %r12, %r14
movq -0x30(%rbp), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0x48744
movq %rax, %r13
movw $0x4, -0xa0(%rbp)
movl $0x0, -0x9c(%rbp)
movq $0x0, -0x98(%rbp)
movq %r14, %rdi
movq %rax, %rsi
leaq -0xa0(%rbp), %rdx
callq 0x3bffc
movq %r12, %rdi
movq %r14, %r12
movq -0x80(%rbp), %r14
movq %r13, %rsi
callq 0x34827
cmpb $0x74, (%r15)
movl -0x34(%rbp), %r13d
je 0x5dbf2
movq -0x90(%rbp), %rdi
movl $0x47, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq 0x40(%r15), %r15
testq %r15, %r15
jne 0x5da47
movq -0x48(%rbp), %rdx
testl %edx, %edx
movq -0x68(%rbp), %r13
je 0x5dc21
jns 0x5dc21
movq 0x40(%r13), %rax
testq %rax, %rax
je 0x5dc21
notl %edx
movl 0x34(%r13), %ecx
movl %edx, %edx
movl %ecx, (%rax,%rdx,4)
movq %r13, %rdi
movl $0x14, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq -0x70(%rbp), %rcx
cmpl $0x0, 0x50(%rcx)
movq -0x40(%rbp), %r15
je 0x5dc62
movq (%r12), %rdi
movq 0x8(%r12), %rsi
callq 0x9ca4
jmp 0x5dc73
movq $0x0, 0x10(%rbx)
xorl %ebx, %ebx
jmp 0x5dcf4
movq 0x8(%r12), %rax
movq %rax, 0x8(%rcx)
movl 0x50(%r12), %eax
movl %eax, 0x50(%rcx)
movq -0x50(%rbp), %rcx
cmpb $0x0, 0x50(%r15)
jne 0x5dcaf
movq -0x78(%rbp), %rsi
addq $0x1a8, %rsi            # imm = 0x1A8
movq 0x8(%r13), %r15
movq %r13, %rdi
callq 0x36753
movq -0x50(%rbp), %rcx
movl 0x34(%r13), %eax
movl %eax, 0x8(%rcx)
movq $0x0, 0x8(%r13)
movq %r15, (%rcx)
movq -0x40(%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 %r13, %rdi
callq 0x22dfd
movq %r15, %rdi
movq %r12, %rsi
callq 0x9ca4
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq