// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
movzwl 0x24(%rdi), %eax
cmpl $0x2, %eax
jne 0x267ebe
testb $0x1, 0x4(%r15)
jne 0x267f59
movzbl (%r15), %ecx
xorl %ebx, %ebx
leal -0xa4(%rcx), %edx
cmpl $0xc, %edx
ja 0x267efd
leaq 0x10953a(%rip), %rcx    # 0x371410
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
testb $0x8, 0x4(%r15)
movzwl 0x24(%r14), %eax
jne 0x267f22
cmpw $0x3, %ax
jne 0x267f59
movl 0x2c(%r15), %eax
cmpl 0x28(%r14), %eax
jne 0x267f59
jmp 0x267f62
cmpl $0x3b, %ecx
je 0x267f6a
cmpl $0x8b, %ecx
je 0x267f59
cmpl $0x99, %ecx
jne 0x267f62
cmpl $0x4, %eax
je 0x267f59
cmpl $0x5, %eax
jne 0x267f62
movb $0x77, (%r15)
jmp 0x267f62
cmpw $0x2, %ax
jne 0x267f62
jmp 0x267f59
cmpw $0x4, %ax
setb %dl
movl 0x4(%r15), %ecx
btl $0x13, %ecx
setae %sil
testb %sil, %dl
jne 0x267f59
btl $0x18, %ecx
jb 0x267f59
cmpl $0x5, %eax
jne 0x267f62
orl $0x40000000, %ecx       # imm = 0x40000000
movl %ecx, 0x4(%r15)
jmp 0x267f62
andw $0x0, 0x24(%r14)
pushq $0x2
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x254a68
testl %eax, %eax
je 0x267edf
pushq $0x1
jmp 0x267f61