// File: /workspace/github_c_makefile_star2_O1/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 0x46238a
movq %rsi, %rbx
movq %rdi, %r14
testb $0x1, 0x4(%rsi)
je 0x462327
movswl 0x34(%rbx), %eax
cmpl %eax, 0x8(%r14)
jne 0x462327
movzwl 0xc(%r14), %eax
movw %ax, 0x34(%rbx)
movzbl (%rbx), %eax
cmpl $0xa7, %eax
je 0x462395
cmpl $0x9e, %eax
jne 0x4623a5
movl 0x2c(%rbx), %ecx
cmpl 0x8(%r14), %ecx
jne 0x462391
movswq 0x30(%rbx), %rax
testq %rax, %rax
js 0x462423
movq 0x18(%r14), %rcx
shlq $0x5, %rax
movq 0x8(%rcx,%rax), %rsi
movb (%rsi), %al
movl %eax, %ecx
cmpb $-0x5c, %al
jne 0x462367
movb 0x36(%rsi), %cl
cmpb $0x7f, %cl
je 0x462428
movzbl %cl, %edx
movb $0x1, %cl
cmpl $0xa5, %edx
jne 0x462435
leaq 0x20(%rsi), %rcx
jmp 0x46242c
xorl %ebx, %ebx
jmp 0x462412
cmpb $-0x59, %al
jne 0x4623a5
movl 0x2c(%rbx), %eax
cmpl 0x8(%r14), %eax
jne 0x4623a5
movl 0xc(%r14), %eax
movl %eax, 0x2c(%rbx)
movq 0x10(%rbx), %rsi
movq %r14, %rdi
callq 0x4622f2
movq %rax, 0x10(%rbx)
movq 0x18(%rbx), %rsi
movq %r14, %rdi
callq 0x4622f2
movq %rax, 0x18(%rbx)
testb $0x8, 0x5(%rbx)
movq 0x20(%rbx), %r15
jne 0x462402
testq %r15, %r15
je 0x462412
cmpl $0x0, (%r15)
jle 0x462412
leaq 0x8(%r15), %r12
xorl %r13d, %r13d
movq (%r12), %rsi
movq %r14, %rdi
callq 0x4622f2
movq %rax, (%r12)
incq %r13
movslq (%r15), %rax
addq $0x20, %r12
cmpq %rax, %r13
jl 0x4623e1
jmp 0x462412
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x46216f
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movb $0x6e, (%rbx)
jmp 0x462412
movq 0x20(%rsi), %rcx
movq (%rcx), %rcx
cmpl $0x2, (%rcx)
setl %cl
movq (%r14), %rdi
testb %cl, %cl
je 0x4624c2
movq (%rdi), %r15
cmpb $-0x62, %al
je 0x462478
cmpl $0x0, 0x10(%r14)
je 0x462478
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 0x453111
movq %rax, %r12
testq %rax, %rax
je 0x4624af
cmpl $0x0, 0x10(%r14)
je 0x462499
orb $0x10, 0x6(%r12)
testb $0x1, 0x4(%rbx)
je 0x4624af
movzwl 0x34(%rbx), %eax
movw %ax, 0x34(%r12)
orb $0x1, 0x4(%r12)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x439685
movq %r12, %rbx
jmp 0x462412
callq 0x454623
jmp 0x462412