// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: exprNodeIsConstant
static int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){

  /* If pWalker->eCode is 2 then any term of the expression that comes from
  ** the ON or USING clauses of a left join disqualifies the expression
  ** from being considered constant. */
  if( pWalker->eCode==2 && ExprHasProperty(pExpr, EP_FromJoin) ){
    pWalker->eCode = 0;
    return WRC_Abort;
  }

  switch( pExpr->op ){
    /* Consider functions to be constant if all their arguments are constant
    ** and either pWalker->eCode==4 or 5 or the function has the
    ** SQLITE_FUNC_CONST flag. */
    case TK_FUNCTION:
      if( (pWalker->eCode>=4 || ExprHasProperty(pExpr,EP_ConstFunc))
       && !ExprHasProperty(pExpr, EP_WinFunc)
      ){
        if( pWalker->eCode==5 ) ExprSetProperty(pExpr, EP_FromDDL);
        return WRC_Continue;
      }else{
        pWalker->eCode = 0;
        return WRC_Abort;
      }
    case TK_ID:
      /* Convert "true" or "false" in a DEFAULT clause into the
      ** appropriate TK_TRUEFALSE operator */
      if( sqlite3ExprIdToTrueFalse(pExpr) ){
        return WRC_Prune;
      }
      /* no break */ deliberate_fall_through
    case TK_COLUMN:
    case TK_AGG_FUNCTION:
    case TK_AGG_COLUMN:
      testcase( pExpr->op==TK_ID );
      testcase( pExpr->op==TK_COLUMN );
      testcase( pExpr->op==TK_AGG_FUNCTION );
      testcase( pExpr->op==TK_AGG_COLUMN );
      if( ExprHasProperty(pExpr, EP_FixedCol) && pWalker->eCode!=2 ){
        return WRC_Continue;
      }
      if( pWalker->eCode==3 && pExpr->iTable==pWalker->u.iCur ){
        return WRC_Continue;
      }
      /* no break */ deliberate_fall_through
    case TK_IF_NULL_ROW:
    case TK_REGISTER:
    case TK_DOT:
      testcase( pExpr->op==TK_REGISTER );
      testcase( pExpr->op==TK_IF_NULL_ROW );
      testcase( pExpr->op==TK_DOT );
      pWalker->eCode = 0;
      return WRC_Abort;
    case TK_VARIABLE:
      if( pWalker->eCode==5 ){
        /* Silently convert bound parameters that appear inside of CREATE
        ** statements into a NULL when parsing the CREATE statement text out
        ** of the sqlite_schema table */
        pExpr->op = TK_NULL;
      }else if( pWalker->eCode==4 ){
        /* A bound parameter in a CREATE statement that originates from
        ** sqlite3_prepare() causes an error */
        pWalker->eCode = 0;
        return WRC_Abort;
      }
      /* no break */ deliberate_fall_through
    default:
      testcase( pExpr->op==TK_SELECT ); /* sqlite3SelectWalkFail() disallows */
      testcase( pExpr->op==TK_EXISTS ); /* sqlite3SelectWalkFail() disallows */
      return WRC_Continue;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzwl 0x24(%rdi), %ecx
cmpl $0x2, %ecx
jne 0x2c09a5
testb $0x1, 0x4(%r14)
jne 0x2c0a55
movzbl (%r14), %edx
xorl %eax, %eax
cmpl $0xa3, %edx
jle 0x2c09f3
addl $0xffffff5c, %edx       # imm = 0xFFFFFF5C
cmpl $0xc, %edx
ja 0x2c0a60
leaq 0x11061b(%rip), %rsi    # 0x3d0fe4
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
testb $0x8, 0x4(%r14)
movzwl 0x24(%rbx), %ecx
jne 0x2c0a18
cmpw $0x3, %cx
jne 0x2c0a55
movl 0x2c(%r14), %ecx
movl $0x0, %eax
cmpl 0x28(%rbx), %ecx
jne 0x2c0a55
jmp 0x2c0a60
cmpl $0x3b, %edx
je 0x2c0a68
cmpl $0x8b, %edx
je 0x2c0a55
cmpl $0x99, %edx
jne 0x2c0a60
cmpl $0x4, %ecx
je 0x2c0a55
cmpl $0x5, %ecx
jne 0x2c0a60
movb $0x77, (%r14)
jmp 0x2c0a60
movl $0x0, %eax
cmpw $0x2, %cx
je 0x2c0a55
jmp 0x2c0a60
cmpw $0x4, %cx
setb %sil
movl 0x4(%r14), %edx
btl $0x13, %edx
setae %dil
testb %dil, %sil
jne 0x2c0a55
btl $0x18, %edx
jb 0x2c0a55
cmpl $0x5, %ecx
jne 0x2c0a60
orl $0x40000000, %edx       # imm = 0x40000000
movl %edx, 0x4(%r14)
jmp 0x2c0a60
movw $0x0, 0x24(%rbx)
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x2ad54d
movl %eax, %ecx
movl $0x1, %eax
testl %ecx, %ecx
jne 0x2c0a60
jmp 0x2c09d2