// File: /workspace/github_c_makefile_star2_O2/ukontainer[P]sqlite-bench/sqlite3.c
// Function: substExpr
static Expr *substExpr(
  SubstContext *pSubst,  /* Description of the substitution */
  Expr *pExpr            /* Expr in which substitution occurs */
){
  if( pExpr==0 ) return 0;
  if( ExprHasProperty(pExpr, EP_FromJoin)
   && pExpr->iRightJoinTable==pSubst->iTable
  ){
    pExpr->iRightJoinTable = pSubst->iNewTable;
  }
  if( pExpr->op==TK_COLUMN && pExpr->iTable==pSubst->iTable ){
    if( pExpr->iColumn<0 ){
      pExpr->op = TK_NULL;
    }else{
      Expr *pNew;
      Expr *pCopy = pSubst->pEList->a[pExpr->iColumn].pExpr;
      Expr ifNullRow;
      assert( pSubst->pEList!=0 && pExpr->iColumn<pSubst->pEList->nExpr );
      assert( pExpr->pRight==0 );
      if( sqlite3ExprIsVector(pCopy) ){
        sqlite3VectorErrorMsg(pSubst->pParse, pCopy);
      }else{
        sqlite3 *db = pSubst->pParse->db;
        if( pSubst->isLeftJoin && pCopy->op!=TK_COLUMN ){
          memset(&ifNullRow, 0, sizeof(ifNullRow));
          ifNullRow.op = TK_IF_NULL_ROW;
          ifNullRow.pLeft = pCopy;
          ifNullRow.iTable = pSubst->iNewTable;
          pCopy = &ifNullRow;
        }
        pNew = sqlite3ExprDup(db, pCopy, 0);
        if( pNew && pSubst->isLeftJoin ){
          ExprSetProperty(pNew, EP_CanBeNull);
        }
        if( pNew && ExprHasProperty(pExpr,EP_FromJoin) ){
          pNew->iRightJoinTable = pExpr->iRightJoinTable;
          ExprSetProperty(pNew, EP_FromJoin);
        }
        sqlite3ExprDelete(db, pExpr);
        pExpr = pNew;
      }
    }
  }else{
    if( pExpr->op==TK_IF_NULL_ROW && pExpr->iTable==pSubst->iTable ){
      pExpr->iTable = pSubst->iNewTable;
    }
    pExpr->pLeft = substExpr(pSubst, pExpr->pLeft);
    pExpr->pRight = substExpr(pSubst, pExpr->pRight);
    if( ExprHasProperty(pExpr, EP_xIsSelect) ){
      substSelect(pSubst, pExpr->x.pSelect, 1);
    }else{
      substExprList(pSubst, pExpr->x.pList);
    }
  }
  return pExpr;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
testq %rsi, %rsi
je 0x457a5b
movq %rsi, %rbx
movq %rdi, %r14
testb $0x1, 0x4(%rsi)
je 0x457a0d
movswl 0x34(%rbx), %eax
cmpl %eax, 0x8(%r14)
jne 0x457a0d
movzwl 0xc(%r14), %eax
movw %ax, 0x34(%rbx)
movzbl (%rbx), %eax
cmpl $0xa7, %eax
je 0x457a5f
cmpl $0x9e, %eax
jne 0x457a6f
movl 0x2c(%rbx), %eax
cmpl 0x8(%r14), %eax
jne 0x457a6f
movswq 0x30(%rbx), %rax
testq %rax, %rax
js 0x457abd
movq 0x18(%r14), %rcx
shlq $0x5, %rax
movq 0x8(%rcx,%rax), %r12
movq %r12, %rdi
callq 0x449e89
movq (%r14), %rdi
testl %eax, %eax
je 0x457ac2
movq %r12, %rsi
callq 0x44d4ac
jmp 0x457aae
xorl %ebx, %ebx
jmp 0x457aae
movl 0x2c(%rbx), %eax
cmpl 0x8(%r14), %eax
jne 0x457a6f
movl 0xc(%r14), %eax
movl %eax, 0x2c(%rbx)
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x4579de
movq %rax, 0x10(%rbx)
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x4579de
movq %rax, 0x18(%rbx)
testb $0x8, 0x5(%rbx)
movq 0x20(%rbx), %rsi
jne 0x457aa3
movq %r14, %rdi
callq 0x457999
jmp 0x457aae
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x4578da
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movb $0x6e, (%rbx)
jmp 0x457aae
movq (%rdi), %r15
cmpl $0x0, 0x10(%r14)
je 0x457afd
cmpb $-0x62, (%r12)
je 0x457afd
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x40(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x20(%rax)
movb $-0x59, (%rax)
movq %r12, 0x10(%rax)
movl 0xc(%r14), %ecx
movl %ecx, 0x2c(%rax)
movq %rax, %r12
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x44c0b2
movq %rax, %r12
testq %rax, %rax
je 0x457b35
cmpl $0x0, 0x10(%r14)
je 0x457b1f
orb $0x10, 0x6(%r12)
testb $0x1, 0x4(%rbx)
je 0x457b35
movzwl 0x34(%rbx), %eax
movw %ax, 0x34(%r12)
orb $0x1, 0x4(%r12)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x430b80
movq %r12, %rbx
jmp 0x457aae