// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
testq %rsi, %rsi
je 0x46178a
movq %rsi, %rbx
movq %rdi, %r14
testb $0x1, 0x4(%rsi)
je 0x461729
movswl 0x34(%rbx), %eax
cmpl %eax, 0x8(%r14)
jne 0x461729
movzwl 0xc(%r14), %eax
movw %ax, 0x34(%rbx)
movzbl (%rbx), %eax
cmpl $0xa7, %eax
je 0x46178e
cmpl $0x9e, %eax
jne 0x46179e
movl 0x2c(%rbx), %eax
cmpl 0x8(%r14), %eax
jne 0x46179e
movswq 0x30(%rbx), %rax
testq %rax, %rax
js 0x46181c
movq 0x18(%r14), %rcx
shlq $0x5, %rax
movq 0x8(%rcx,%rax), %rsi
movb (%rsi), %al
movl %eax, %ecx
cmpb $-0x5c, %al
jne 0x461769
movb 0x36(%rsi), %cl
cmpb $0x7f, %cl
je 0x461821
movzbl %cl, %ecx
cmpl $0xa5, %ecx
jne 0x461831
leaq 0x20(%rsi), %rcx
jmp 0x461825
xorl %ebx, %ebx
jmp 0x46180b
movl 0x2c(%rbx), %eax
cmpl 0x8(%r14), %eax
jne 0x46179e
movl 0xc(%r14), %eax
movl %eax, 0x2c(%rbx)
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x4616f4
movq %rax, 0x10(%rbx)
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x4616f4
movq %rax, 0x18(%rbx)
testb $0x8, 0x5(%rbx)
movq 0x20(%rbx), %r15
jne 0x4617fb
testq %r15, %r15
je 0x46180b
cmpl $0x0, (%r15)
jle 0x46180b
leaq 0x8(%r15), %r12
xorl %r13d, %r13d
movq (%r12), %rsi
movq %r14, %rdi
callq 0x4616f4
movq %rax, (%r12)
incq %r13
movslq (%r15), %rax
addq $0x20, %r12
cmpq %rax, %r13
jl 0x4617da
jmp 0x46180b
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x461571
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movb $0x6e, (%rbx)
jmp 0x46180b
movq 0x20(%rsi), %rcx
movq (%rcx), %rcx
cmpl $0x2, (%rcx)
jge 0x4618b6
movq (%r14), %rcx
movq (%rcx), %r15
cmpb $-0x62, %al
je 0x46186c
cmpl $0x0, 0x10(%r14)
je 0x46186c
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 %rsi, 0x10(%rax)
movl 0xc(%r14), %ecx
movl %ecx, 0x2c(%rax)
movq %rax, %rsi
movq %r15, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x452376
movq %rax, %r12
testq %rax, %rax
je 0x4618a3
cmpl $0x0, 0x10(%r14)
je 0x46188d
orb $0x10, 0x6(%r12)
testb $0x1, 0x4(%rbx)
je 0x4618a3
movzwl 0x34(%rbx), %eax
movw %ax, 0x34(%r12)
orb $0x1, 0x4(%r12)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x4381eb
movq %r12, %rbx
jmp 0x46180b
movq (%r14), %rdi
callq 0x453905
jmp 0x46180b