// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/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 = sqlite3DbMallocRaw(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]);
    memset(&pWC->a[pWC->nTerm], 0, sizeof(pWC->a[0])*(pWC->nSlot-pWC->nTerm));
  }
  pTerm = &pWC->a[idx = pWC->nTerm++];
  if( p && ExprHasProperty(p, EP_Unlikely) ){
    pTerm->truthProb = sqlite3LogEst(p->iTable) - 270;
  }else{
    pTerm->truthProb = 1;
  }
  pTerm->pExpr = sqlite3ExprSkipCollate(p);
  pTerm->wtFlags = wtFlags;
  pTerm->pWC = pWC;
  pTerm->iParent = -1;
  return idx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r13d
movq %rsi, %r15
movq %rdi, %r14
movslq 0x18(%rdi), %rax
cmpl %eax, 0x14(%rdi)
jl 0x65638
movl %r13d, -0x2c(%rbp)
movq (%r14), %rcx
movq 0x20(%r14), %rbx
movq (%rcx), %rcx
movq (%rcx), %r13
imulq $0x70, %rax, %rsi
movq %r13, %rdi
callq 0x144ee
movq %rax, %r12
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0x65616
movslq 0x14(%r14), %rax
imulq $0x38, %rax, %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0xa310
leaq 0x28(%r14), %rax
cmpq %rax, %rbx
je 0x655b1
movq %r13, %rdi
movq %rbx, %rsi
callq 0xb6df
movq 0x20(%r14), %rdi
testq %r13, %r13
je 0x655d6
cmpq %rdi, 0x170(%r13)
ja 0x655d6
cmpq %rdi, 0x178(%r13)
jbe 0x655d6
movzwl 0x150(%r13), %eax
jmp 0x655dc
callq *0x2dd84(%rip)          # 0x93360
movl -0x2c(%rbp), %r13d
cltq
shrq $0x3, %rax
movabsq $0x2492492492492493, %rcx # imm = 0x2492492492492493
mulq %rcx
movl %edx, 0x18(%r14)
movslq 0x14(%r14), %rax
imulq $0x38, %rax, %rdi
addq 0x20(%r14), %rdi
movslq %edx, %rcx
subq %rax, %rcx
imulq $0x38, %rcx, %rdx
xorl %esi, %esi
callq 0xa210
jmp 0x6562f
testb $0x1, -0x2c(%rbp)
je 0x65627
movq %r13, %rdi
movq %r15, %rsi
callq 0x3d8f7
movq %rbx, 0x20(%r14)
movl -0x2c(%rbp), %r13d
testq %r12, %r12
je 0x656c2
movslq 0x14(%r14), %r12
leal 0x1(%r12), %eax
movl %eax, 0x14(%r14)
imulq $0x38, %r12, %rbx
addq 0x20(%r14), %rbx
testq %r15, %r15
je 0x65697
movw $0x1, %ax
testb $0x4, 0x6(%r15)
je 0x6566b
movslq 0x2c(%r15), %rdi
callq 0x3d559
addl $0xfffffef2, %eax       # imm = 0xFFFFFEF2
movw %ax, 0x18(%rbx)
testq %r15, %r15
je 0x6569d
movl 0x4(%r15), %eax
btl $0xc, %eax
jae 0x6569d
btl $0x12, %eax
jb 0x6568a
addq $0x10, %r15
jmp 0x65692
movq 0x20(%r15), %rax
movq 0x8(%rax), %r15
movq (%r15), %r15
jmp 0x6566f
movw $0x1, 0x18(%rbx)
movq %r15, (%rbx)
movw %r13w, 0x1c(%rbx)
movq %r14, 0x20(%rbx)
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r12d, %r12d
jmp 0x656b0