// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: exprImpliesNotNull
static int exprImpliesNotNull(
  Parse *pParse,      /* Parsing context */
  Expr *p,            /* The expression to be checked */
  Expr *pNN,          /* The expression that is NOT NULL */
  int iTab,           /* Table being evaluated */
  int seenNot         /* Return true only if p can be any non-NULL value */
){
  assert( p );
  assert( pNN );
  if( sqlite3ExprCompare(pParse, p, pNN, iTab)==0 ){
    return pNN->op!=TK_NULL;
  }
  switch( p->op ){
    case TK_IN: {
      if( seenNot && ExprHasProperty(p, EP_xIsSelect) ) return 0;
      assert( ExprHasProperty(p,EP_xIsSelect)
           || (p->x.pList!=0 && p->x.pList->nExpr>0) );
      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, 1);
    }
    case TK_BETWEEN: {
      ExprList *pList = p->x.pList;
      assert( pList!=0 );
      assert( pList->nExpr==2 );
      if( seenNot ) return 0;
      if( exprImpliesNotNull(pParse, pList->a[0].pExpr, pNN, iTab, 1)
       || exprImpliesNotNull(pParse, pList->a[1].pExpr, pNN, iTab, 1)
      ){
        return 1;
      }
      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, 1);
    }
    case TK_EQ:
    case TK_NE:
    case TK_LT:
    case TK_LE:
    case TK_GT:
    case TK_GE:
    case TK_PLUS:
    case TK_MINUS:
    case TK_BITOR:
    case TK_LSHIFT:
    case TK_RSHIFT:
    case TK_CONCAT:
      seenNot = 1;
      /* no break */ deliberate_fall_through
    case TK_STAR:
    case TK_REM:
    case TK_BITAND:
    case TK_SLASH: {
      if( exprImpliesNotNull(pParse, p->pRight, pNN, iTab, seenNot) ) return 1;
      /* no break */ deliberate_fall_through
    }
    case TK_SPAN:
    case TK_COLLATE:
    case TK_UPLUS:
    case TK_UMINUS: {
      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, seenNot);
    }
    case TK_TRUTH: {
      if( seenNot ) return 0;
      if( p->op2!=TK_IS ) return 0;
      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, 1);
    }
    case TK_BITNOT:
    case TK_NOT: {
      return exprImpliesNotNull(pParse, p->pLeft, pNN, iTab, 1);
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r12d
movl %ecx, %ebp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x2c0d98
testl %eax, %eax
je 0x2c1623
movzbl (%r14), %eax
xorl %r13d, %r13d
cmpl $0x64, %eax
jle 0x2c1522
cmpl $0xa9, %eax
jg 0x2c1566
addl $-0x65, %eax
cmpl $0xb, %eax
ja 0x2c1635
leaq 0x10faff(%rip), %rcx    # 0x3d1018
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x33, %eax
jle 0x2c1584
addl $-0x34, %eax
cmpl $0x6, %eax
jae 0x2c1635
movl $0x1, %r12d
movq 0x18(%r14), %rsi
movq %r15, %rdi
movq %rbx, %rdx
movl %ebp, %ecx
movl %r12d, %r8d
callq 0x2c14cd
testl %eax, %eax
jne 0x2c162f
movq 0x10(%r14), %r14
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
jmp 0x2c14e6
leal -0xaa(%rax), %ecx
cmpl $0x2, %ecx
jb 0x2c1555
cmpl $0xac, %eax
je 0x2c15b6
cmpl $0xb2, %eax
je 0x2c1555
jmp 0x2c1635
cmpl $0x13, %eax
je 0x2c15ae
cmpl $0x30, %eax
je 0x2c15ca
cmpl $0x31, %eax
jne 0x2c1635
testl %r12d, %r12d
je 0x2c15ae
testb $0x8, 0x5(%r14)
movl $0x1, %r12d
je 0x2c1555
jmp 0x2c1635
movl $0x1, %r12d
jmp 0x2c1555
testl %r12d, %r12d
jne 0x2c1635
movl $0x1, %r12d
cmpb $0x2d, 0x2(%r14)
je 0x2c1555
jmp 0x2c1635
testl %r12d, %r12d
jne 0x2c1635
movq 0x20(%r14), %r12
movq 0x8(%r12), %rsi
movl $0x1, %r13d
movq %r15, %rdi
movq %rbx, %rdx
movl %ebp, %ecx
movl $0x1, %r8d
callq 0x2c14cd
testl %eax, %eax
jne 0x2c1635
movq 0x20(%r12), %rsi
movl $0x1, %r12d
movq %r15, %rdi
movq %rbx, %rdx
movl %ebp, %ecx
movl $0x1, %r8d
callq 0x2c14cd
movl $0x1, %r13d
testl %eax, %eax
je 0x2c1555
jmp 0x2c1635
xorl %r13d, %r13d
cmpb $0x77, (%rbx)
setne %r13b
jmp 0x2c1635
movl $0x1, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq