// File: /workspace/github_c_makefile_star2_O3/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, %r14d
movq %rsi, %r15
movq %rdi, %rbx
movl 0x14(%rdi), %r12d
movslq 0x18(%rdi), %rax
cmpl %eax, %r12d
jl 0x640e4
movq (%rbx), %rcx
movq 0x20(%rbx), %r13
movq (%rcx), %rcx
movq (%rcx), %r12
imulq $0x70, %rax, %rsi
movq %r12, %rdi
callq 0x145aa
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x6419e
movslq 0x14(%rbx), %rcx
imulq $0x38, %rcx, %rdx
movq %rax, %rdi
movq %r13, %rsi
callq 0xa320
leaq 0x28(%rbx), %rax
cmpq %rax, %r13
je 0x64079
movq %r12, %rdi
movq %r13, %rsi
callq 0xb752
movq 0x20(%rbx), %rdi
testq %r12, %r12
je 0x640a1
cmpq %rdi, 0x170(%r12)
ja 0x640a1
cmpq %rdi, 0x178(%r12)
jbe 0x640a1
movzwl 0x150(%r12), %eax
jmp 0x640ab
callq *0x2d2c9(%rip)          # 0x91370
movq 0x20(%rbx), %rdi
cltq
shrq $0x3, %rax
movabsq $0x2492492492492493, %rcx # imm = 0x2492492492492493
mulq %rcx
movl %edx, 0x18(%rbx)
movslq 0x14(%rbx), %rcx
imulq $0x38, %rcx, %rax
addq %rdi, %rax
movslq %edx, %rdx
subq %rcx, %rdx
imulq $0x38, %rdx, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0xa220
movl 0x14(%rbx), %r12d
leal 0x1(%r12), %eax
movl %eax, 0x14(%rbx)
movslq %r12d, %rax
imulq $0x38, %rax, %r13
addq 0x20(%rbx), %r13
testq %r15, %r15
je 0x64132
testb $0x4, 0x6(%r15)
jne 0x6413b
movw $0x1, 0x18(%r13)
movl 0x4(%r15), %eax
btl $0xc, %eax
jae 0x64177
btl $0x12, %eax
jb 0x64120
addq $0x10, %r15
jmp 0x64128
movq 0x20(%r15), %rax
movq 0x8(%rax), %r15
movq (%r15), %r15
testq %r15, %r15
jne 0x6410a
jmp 0x64174
movw $0x1, 0x18(%r13)
jmp 0x64174
movslq 0x2c(%r15), %rdi
callq 0x3c565
addl $0xfffffef2, %eax       # imm = 0xFFFFFEF2
movw %ax, 0x18(%r13)
movl 0x4(%r15), %eax
btl $0xc, %eax
jae 0x64177
btl $0x12, %eax
jb 0x64164
addq $0x10, %r15
jmp 0x6416c
movq 0x20(%r15), %rax
movq 0x8(%rax), %r15
movq (%r15), %r15
testq %r15, %r15
jne 0x6414e
xorl %r15d, %r15d
movq %r15, (%r13)
movw %r14w, 0x1c(%r13)
movq %rbx, 0x20(%r13)
movl $0xffffffff, 0x8(%r13)  # imm = 0xFFFFFFFF
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x1, %r14b
je 0x641af
movq %r12, %rdi
movq %r15, %rsi
callq 0x3c8fe
movq %r13, 0x20(%rbx)
xorl %r12d, %r12d
jmp 0x6418c