// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x483c67
movq $0x0, -0x8(%rbp)
jmp 0x483e9d
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x483c99
movq -0x18(%rbp), %rax
movswl 0x34(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x483c99
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, 0x34(%rax)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x9e, %eax
jne 0x483df5
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x483df5
movq -0x18(%rbp), %rax
movswl 0x30(%rax), %eax
cmpl $0x0, %eax
jge 0x483cd8
movq -0x18(%rbp), %rax
movb $0x6e, (%rax)
jmp 0x483df0
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x8, %rax
movq -0x18(%rbp), %rcx
movswq 0x30(%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x46df00
cmpl $0x0, %eax
je 0x483d1e
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x473a60
jmp 0x483dee
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x483d72
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x9e, %eax
je 0x483d72
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x4010b0
movb $-0x59, -0x78(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x4c(%rbp)
leaq -0x78(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x80(%rbp), %rdi
movq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x4717d0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x483da6
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x483da6
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x100000, %ecx         # imm = 0x100000
movl %ecx, 0x4(%rax)
cmpq $0x0, -0x20(%rbp)
je 0x483dd9
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x483dd9
movq -0x18(%rbp), %rax
movw 0x34(%rax), %cx
movq -0x20(%rbp), %rax
movw %cx, 0x34(%rax)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x4(%rax)
movq -0x80(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x44fdb0
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x483df0
jmp 0x483e95
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa7, %eax
jne 0x483e21
movq -0x18(%rbp), %rax
movl 0x2c(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jne 0x483e21
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x483c40
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x483c40
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x483e82
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
movl $0x1, %edx
callq 0x483a80
jmp 0x483e93
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0x483bc0
jmp 0x483e95
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)