// File: /workspace/github_c_makefile_star2_O1/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 0x5d999
cmpq %r14, (%rbx)
jne 0x5d993
cmpl %r13d, 0x18(%rbx)
je 0x5de5e
movq 0x8(%rbx), %rbx
jmp 0x5d97f
movq %rdx, -0x30(%rbp)
movq %rdi, -0x70(%rbp)
movq (%rdi), %r15
movq %r15, %rdi
movl $0x28, %esi
callq 0x115e9
testq %rax, %rax
je 0x5ddc5
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 0x115e9
testq %rax, %rax
je 0x5ddc1
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 0x115e9
testq %rax, %rax
je 0x5ddc5
movq %r12, %r13
movq %rax, %r12
movq $0x0, -0x48(%rbp)
movl $0x298, %edx            # imm = 0x298
movq %rax, %rdi
xorl %esi, %esi
callq 0x8200
xorps %xmm0, %xmm0
movaps %xmm0, -0xe0(%rbp)
movaps %xmm0, -0xd0(%rbp)
movaps %xmm0, -0xc0(%rbp)
movq $0x0, -0xb0(%rbp)
movq %r12, -0xe0(%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 0x45b57
testq %rax, %rax
je 0x5de53
movq %rax, %r13
movq (%r14), %rdx
leaq 0x1e27f(%rip), %rsi     # 0x7bd7c
movq %r15, %rdi
xorl %eax, %eax
callq 0x117e2
movq %r13, -0x68(%rbp)
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movq %rax, %rdx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x11975
movq 0x18(%r14), %rsi
testq %rsi, %rsi
movq %r15, -0x40(%rbp)
je 0x5db8c
movq %r15, %r13
movq $0x0, -0x48(%rbp)
movq %r15, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x48163
movq %rax, %r15
leaq -0xe0(%rbp), %rdi
movq %rax, %rsi
callq 0x467fe
testl %eax, %eax
jne 0x5db80
cmpb $0x0, 0x50(%r13)
jne 0x5db80
movq -0x68(%rbp), %rdi
callq 0x4c4bf
movq %r12, %rdi
movq %r15, %rsi
movq %rax, -0x48(%rbp)
movl %eax, %edx
movl $0x8, %ecx
callq 0x4c50a
movq -0x40(%rbp), %rdi
movq %r15, %rsi
callq 0x34068
movq 0x38(%r14), %r15
testq %r15, %r15
movl -0x34(%rbp), %r13d
je 0x5dd6d
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 0x5dbc2
movb 0x1(%r15), %al
movb %al, 0x1f5(%r12)
movl $0x0, 0x16c(%r12)
movzbl (%r15), %eax
cmpl $0x69, %eax
je 0x5dc79
cmpl $0x6a, %eax
je 0x5dc47
cmpl $0x6b, %eax
jne 0x5dce4
movq %r12, %rdi
movq %r15, %rsi
callq 0x5de73
movq %rax, -0x60(%rbp)
movq 0x30(%r15), %rsi
movq -0x30(%rbp), %r13
movq %r13, %rdi
xorl %edx, %edx
callq 0x48556
movq %rax, -0x58(%rbp)
movq 0x28(%r15), %rsi
movq %r13, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x48163
movzbl 0x1f5(%r12), %r8d
movq %r12, %rdi
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq %rax, %rcx
callq 0x3dfb8
jmp 0x5dd3e
movq %r12, %rdi
movq %r15, %rsi
callq 0x5de73
movq %rax, %r13
movq 0x28(%r15), %rsi
movq -0x30(%rbp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x48163
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x3d966
jmp 0x5dd3e
movq %r12, %rdi
movq %r15, %rsi
callq 0x5de73
movq %rax, -0x60(%rbp)
movq 0x30(%r15), %rsi
movq -0x30(%rbp), %r13
movq %r13, %rdi
xorl %edx, %edx
callq 0x48556
movq %rax, -0x58(%rbp)
movq 0x10(%r15), %rsi
movq %r13, %rdi
xorl %edx, %edx
callq 0x4841f
movq %rax, -0x88(%rbp)
movq 0x38(%r15), %rsi
movq %r13, %rdi
callq 0x488c4
movzbl 0x1f5(%r12), %r9d
movq %r12, %rdi
movq -0x60(%rbp), %rsi
movq -0x58(%rbp), %rdx
movq -0x88(%rbp), %rcx
movq %rax, %r8
callq 0x3f017
jmp 0x5dd3e
movq 0x10(%r15), %rsi
movq %r12, %r14
movq -0x30(%rbp), %r12
movq %r12, %rdi
xorl %edx, %edx
callq 0x4841f
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 0x3ba12
movq %r12, %rdi
movq %r14, %r12
movq -0x80(%rbp), %r14
movq %r13, %rsi
callq 0x340e4
cmpb $0x74, (%r15)
movl -0x34(%rbp), %r13d
je 0x5dd60
movq -0x90(%rbp), %rdi
movl $0x47, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq 0x40(%r15), %r15
testq %r15, %r15
jne 0x5dbb5
movq -0x48(%rbp), %rdx
testl %edx, %edx
movq -0x68(%rbp), %r13
je 0x5dd8f
jns 0x5dd8f
movq 0x40(%r13), %rax
testq %rax, %rax
je 0x5dd8f
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 0x45b9e
movq -0x70(%rbp), %rcx
cmpl $0x0, 0x50(%rcx)
movq -0x40(%rbp), %r15
je 0x5ddcc
movq (%r12), %rdi
movq 0x8(%r12), %rsi
callq 0x9c3a
jmp 0x5dddd
movq %rax, 0x10(%rbx)
xorl %ebx, %ebx
jmp 0x5de5e
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 0x5de19
movq -0x78(%rbp), %rsi
addq $0x1a8, %rsi            # imm = 0x1A8
movq 0x8(%r13), %r15
movq %r13, %rdi
callq 0x36042
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 0x2325e
movq %r15, %rdi
movq %r12, %rsi
callq 0x9c3a
movq %rbx, %rax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq