// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: evalConstExpr
static int evalConstExpr(Walker *pWalker, Expr *pExpr){
  Parse *pParse = pWalker->pParse;
  switch( pExpr->op ){
    case TK_IN:
    case TK_REGISTER: {
      return WRC_Prune;
    }
    case TK_COLLATE: {
      return WRC_Continue;
    }
    case TK_FUNCTION:
    case TK_AGG_FUNCTION:
    case TK_CONST_FUNC: {
      /* The arguments to a function have a fixed destination.
      ** Mark them this way to avoid generated unneeded OP_SCopy
      ** instructions. 
      */
      ExprList *pList = pExpr->x.pList;
      assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
      if( pList ){
        int i = pList->nExpr;
        struct ExprList_item *pItem = pList->a;
        for(; i>0; i--, pItem++){
          if( ALWAYS(pItem->pExpr) ) pItem->pExpr->flags |= EP_FixedDest;
        }
      }
      break;
    }
  }
  if( isAppropriateForFactoring(pExpr) ){
    int r1 = ++pParse->nMem;
    int r2 = sqlite3ExprCodeTarget(pParse, pExpr, r1);
    /* If r2!=r1, it means that register r1 is never used.  That is harmless
    ** but suboptimal, so we want to know about the situation to fix it.
    ** Hence the following assert: */
    assert( r2==r1 );
    pExpr->op2 = pExpr->op;
    pExpr->op = TK_REGISTER;
    pExpr->iTable = r2;
    return WRC_Prune;
  }
  return WRC_Continue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0x44(%rbp)
subl $0x48, %eax
je 0x752fa
jmp 0x752bd
movl -0x44(%rbp), %eax
subl $0x5c, %eax
je 0x75306
jmp 0x752c7
movl -0x44(%rbp), %eax
subl $0x84, %eax
je 0x752fa
jmp 0x752d3
movl -0x44(%rbp), %eax
subl $0x97, %eax
je 0x75312
jmp 0x752df
movl -0x44(%rbp), %eax
subl $0x99, %eax
je 0x75312
jmp 0x752eb
movl -0x44(%rbp), %eax
subl $0x9b, %eax
je 0x75312
jmp 0x7537c
movl $0x1, -0x4(%rbp)
jmp 0x753db
movl $0x0, -0x4(%rbp)
jmp 0x753db
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x7537a
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x2c(%rbp)
jle 0x75378
movq -0x38(%rbp), %rax
cmpq $0x0, (%rax)
je 0x7535f
movq -0x38(%rbp), %rax
movq (%rax), %rax
movzwl 0x2(%rax), %ecx
orl $0x200, %ecx            # imm = 0x200
movw %cx, 0x2(%rax)
jmp 0x75361
movl -0x2c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x38(%rbp)
jmp 0x7533a
jmp 0x7537a
jmp 0x7537c
movq -0x18(%rbp), %rdi
callq 0x753f0
cmpl $0x0, %eax
je 0x753d4
movq -0x20(%rbp), %rcx
movl 0x58(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x58(%rcx)
movl %eax, -0x3c(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x3c(%rbp), %edx
callq 0x687c0
movl %eax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %cl
movq -0x18(%rbp), %rax
movb %cl, 0x37(%rax)
movq -0x18(%rbp), %rax
movb $-0x7c, (%rax)
movl -0x40(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2c(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x753db
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)