// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: whereClauseInsert
static int whereClauseInsert(WhereClause *pWC, Expr *p, u16 wtFlags){
  WhereTerm *pTerm;
  int idx;
  testcase( wtFlags & TERM_VIRTUAL );
  if( pWC->nTerm>=pWC->nSlot ){
    WhereTerm *pOld = pWC->a;
    sqlite3 *db = pWC->pWInfo->pParse->db;
    pWC->a = sqlite3DbMallocRawNN(db, sizeof(pWC->a[0])*pWC->nSlot*2 );
    if( pWC->a==0 ){
      if( wtFlags & TERM_DYNAMIC ){
        sqlite3ExprDelete(db, p);
      }
      pWC->a = pOld;
      return 0;
    }
    memcpy(pWC->a, pOld, sizeof(pWC->a[0])*pWC->nTerm);
    if( pOld!=pWC->aStatic ){
      sqlite3DbFree(db, pOld);
    }
    pWC->nSlot = sqlite3DbMallocSize(db, pWC->a)/sizeof(pWC->a[0]);
  }
  pTerm = &pWC->a[idx = pWC->nTerm++];
  if( p && ExprHasProperty(p, EP_Unlikely) ){
    pTerm->truthProb = sqlite3LogEst(p->iTable) - 270;
  }else{
    pTerm->truthProb = 1;
  }
  pTerm->pExpr = sqlite3ExprSkipCollateAndLikely(p);
  pTerm->wtFlags = wtFlags;
  pTerm->pWC = pWC;
  pTerm->iParent = -1;
  memset(&pTerm->eOperator, 0,
         sizeof(WhereTerm) - offsetof(WhereTerm,eOperator));
  return idx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl 0x14(%rdi), %r15d
movslq 0x18(%rdi), %rsi
cmpl %esi, %r15d
jl 0x2d777b
movq (%rbx), %rax
movq 0x20(%rbx), %r12
movq (%rax), %rax
movq (%rax), %r15
shlq $0x7, %rsi
movq %r15, %rdi
callq 0x282a35
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x2d7842
movslq 0x14(%rbx), %rdx
shlq $0x6, %rdx
movq %rax, %rdi
movq %r12, %rsi
callq 0x17660
leaq 0x28(%rbx), %rax
cmpq %rax, %r12
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
jne 0x2d773e
movq %r15, %rdi
movq %r12, %rsi
callq 0x282904
movq 0x20(%rbx), %rdi
testq %r15, %r15
je 0x2d776b
cmpq %rdi, 0x1c0(%r15)
jbe 0x2d776b
movl $0x80, %eax
cmpq %rdi, 0x1b0(%r15)
jbe 0x2d7771
cmpq %rdi, 0x1b8(%r15)
jbe 0x2d7867
callq *0x1e3f27(%rip)         # 0x4bb698
sarl $0x6, %eax
movl %eax, 0x18(%rbx)
movl 0x14(%rbx), %r15d
leal 0x1(%r15), %eax
movl %eax, 0x14(%rbx)
movslq %r15d, %r12
shlq $0x6, %r12
addq 0x20(%rbx), %r12
testq %r14, %r14
je 0x2d77ca
testb $0x4, 0x6(%r14)
jne 0x2d77d4
movw $0x1, 0x10(%r12)
movl 0x4(%r14), %eax
testl $0x41000, %eax          # imm = 0x41000
je 0x2d7812
btl $0x12, %eax
jb 0x2d77b8
addq $0x10, %r14
jmp 0x2d77c0
movq 0x20(%r14), %r14
addq $0x8, %r14
movq (%r14), %r14
testq %r14, %r14
jne 0x2d77a1
jmp 0x2d780f
movw $0x1, 0x10(%r12)
jmp 0x2d780f
movslq 0x2c(%r14), %rdi
callq 0x29d44f
addl $0xfffffef2, %eax       # imm = 0xFFFFFEF2
movw %ax, 0x10(%r12)
movl 0x4(%r14), %eax
testl $0x41000, %eax          # imm = 0x41000
je 0x2d7812
btl $0x12, %eax
jb 0x2d77ff
addq $0x10, %r14
jmp 0x2d7807
movq 0x20(%r14), %r14
addq $0x8, %r14
movq (%r14), %r14
testq %r14, %r14
jne 0x2d77e8
xorl %r14d, %r14d
movq %r14, (%r12)
movw %bp, 0x12(%r12)
movq %rbx, 0x8(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x14(%r12)
movups %xmm0, 0x24(%r12)
movups %xmm0, 0x30(%r12)
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testb $0x1, %bpl
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x2d785e
movq %r15, %rdi
movq %r14, %rsi
callq 0x2a6164
movq %r12, 0x20(%rbx)
xorl %r15d, %r15d
jmp 0x2d7836
movzwl 0x176(%r15), %eax
jmp 0x2d7771