// File: /workspace/github_c_makefile_star2_O1/ukontainer[P]sqlite-bench/sqlite3.c
// Function: sqlite3ExprIfTrue
SQLITE_PRIVATE void sqlite3ExprIfTrue(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){
  Vdbe *v = pParse->pVdbe;
  int op = 0;
  int regFree1 = 0;
  int regFree2 = 0;
  int r1, r2;

  assert( jumpIfNull==SQLITE_JUMPIFNULL || jumpIfNull==0 );
  if( NEVER(v==0) )     return;  /* Existence of VDBE checked by caller */
  if( NEVER(pExpr==0) ) return;  /* No way this can happen */
  op = pExpr->op;
  switch( op ){
    case TK_AND: {
      int d2 = sqlite3VdbeMakeLabel(v);
      testcase( jumpIfNull==0 );
      sqlite3ExprIfFalse(pParse, pExpr->pLeft, d2,jumpIfNull^SQLITE_JUMPIFNULL);
      sqlite3ExprIfTrue(pParse, pExpr->pRight, dest, jumpIfNull);
      sqlite3VdbeResolveLabel(v, d2);
      break;
    }
    case TK_OR: {
      testcase( jumpIfNull==0 );
      sqlite3ExprIfTrue(pParse, pExpr->pLeft, dest, jumpIfNull);
      sqlite3ExprIfTrue(pParse, pExpr->pRight, dest, jumpIfNull);
      break;
    }
    case TK_NOT: {
      testcase( jumpIfNull==0 );
      sqlite3ExprIfFalse(pParse, pExpr->pLeft, dest, jumpIfNull);
      break;
    }
    case TK_TRUTH: {
      int isNot;      /* IS NOT TRUE or IS NOT FALSE */
      int isTrue;     /* IS TRUE or IS NOT TRUE */
      testcase( jumpIfNull==0 );
      isNot = pExpr->op2==TK_ISNOT;
      isTrue = sqlite3ExprTruthValue(pExpr->pRight);
      testcase( isTrue && isNot );
      testcase( !isTrue && isNot );
      if( isTrue ^ isNot ){
        sqlite3ExprIfTrue(pParse, pExpr->pLeft, dest,
                          isNot ? SQLITE_JUMPIFNULL : 0);
      }else{
        sqlite3ExprIfFalse(pParse, pExpr->pLeft, dest,
                           isNot ? SQLITE_JUMPIFNULL : 0);
      }
      break;
    }
    case TK_IS:
    case TK_ISNOT:
      testcase( op==TK_IS );
      testcase( op==TK_ISNOT );
      op = (op==TK_IS) ? TK_EQ : TK_NE;
      jumpIfNull = SQLITE_NULLEQ;
      /* Fall thru */
    case TK_LT:
    case TK_LE:
    case TK_GT:
    case TK_GE:
    case TK_NE:
    case TK_EQ: {
      if( sqlite3ExprIsVector(pExpr->pLeft) ) goto default_expr;
      testcase( jumpIfNull==0 );
      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
      r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);
      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
                  r1, r2, dest, jumpIfNull);
      assert(TK_LT==OP_Lt); testcase(op==OP_Lt); VdbeCoverageIf(v,op==OP_Lt);
      assert(TK_LE==OP_Le); testcase(op==OP_Le); VdbeCoverageIf(v,op==OP_Le);
      assert(TK_GT==OP_Gt); testcase(op==OP_Gt); VdbeCoverageIf(v,op==OP_Gt);
      assert(TK_GE==OP_Ge); testcase(op==OP_Ge); VdbeCoverageIf(v,op==OP_Ge);
      assert(TK_EQ==OP_Eq); testcase(op==OP_Eq);
      VdbeCoverageIf(v, op==OP_Eq && jumpIfNull==SQLITE_NULLEQ);
      VdbeCoverageIf(v, op==OP_Eq && jumpIfNull!=SQLITE_NULLEQ);
      assert(TK_NE==OP_Ne); testcase(op==OP_Ne);
      VdbeCoverageIf(v, op==OP_Ne && jumpIfNull==SQLITE_NULLEQ);
      VdbeCoverageIf(v, op==OP_Ne && jumpIfNull!=SQLITE_NULLEQ);
      testcase( regFree1==0 );
      testcase( regFree2==0 );
      break;
    }
    case TK_ISNULL:
    case TK_NOTNULL: {
      assert( TK_ISNULL==OP_IsNull );   testcase( op==TK_ISNULL );
      assert( TK_NOTNULL==OP_NotNull ); testcase( op==TK_NOTNULL );
      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
      sqlite3VdbeAddOp2(v, op, r1, dest);
      VdbeCoverageIf(v, op==TK_ISNULL);
      VdbeCoverageIf(v, op==TK_NOTNULL);
      testcase( regFree1==0 );
      break;
    }
    case TK_BETWEEN: {
      testcase( jumpIfNull==0 );
      exprCodeBetween(pParse, pExpr, dest, sqlite3ExprIfTrue, jumpIfNull);
      break;
    }
#ifndef SQLITE_OMIT_SUBQUERY
    case TK_IN: {
      int destIfFalse = sqlite3VdbeMakeLabel(v);
      int destIfNull = jumpIfNull ? dest : destIfFalse;
      sqlite3ExprCodeIN(pParse, pExpr, destIfFalse, destIfNull);
      sqlite3VdbeGoto(v, dest);
      sqlite3VdbeResolveLabel(v, destIfFalse);
      break;
    }
#endif
    default: {
    default_expr:
      if( exprAlwaysTrue(pExpr) ){
        sqlite3VdbeGoto(v, dest);
      }else if( exprAlwaysFalse(pExpr) ){
        /* No-op */
      }else{
        r1 = sqlite3ExprCodeTemp(pParse, pExpr, &regFree1);
        sqlite3VdbeAddOp3(v, OP_If, r1, dest, jumpIfNull!=0);
        VdbeCoverage(v);
        testcase( regFree1==0 );
        testcase( jumpIfNull==0 );
      }
      break;
    }
  }
  sqlite3ReleaseTempReg(pParse, regFree1);
  sqlite3ReleaseTempReg(pParse, regFree2);  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r12d
movq 0x10(%rdi), %r15
xorl %eax, %eax
movl %eax, (%rsp)
movl %eax, 0x4(%rsp)
testq %r15, %r15
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x4549c3
movl %edx, %r14d
movq %rsi, %r13
movq %rdi, %rbx
movzbl (%rsi), %ebp
cmpl $0x9b, %ebp
jg 0x454777
leal -0x2b(%rbp), %eax
cmpl $0xe, %eax
ja 0x454844
leaq 0xf7a85(%rip), %rcx     # 0x54c1d8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r13), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x450618
movq %r15, %rdi
movl %ebp, %esi
movl %eax, %edx
jmp 0x454876
cmpl $0x9c, %ebp
je 0x4547c0
cmpl $0xa3, %ebp
jne 0x454860
xorl %ecx, %ecx
cmpb $-0x64, 0x36(%r13)
sete %cl
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rax
movq 0x8(%rax), %rax
cmpb $0x0, 0x4(%rax)
setne %al
xorb %cl, %al
shll $0x4, %ecx
movq %rbx, %rdi
movl %r14d, %edx
testb %al, %al
jne 0x454856
jmp 0x4548f9
xorl %eax, %eax
cmpl $0x2d, %ebp
sete %al
orl $0x34, %eax
movl $0x80, %r12d
movl %eax, %ebp
movq 0x10(%r13), %rsi
movb (%rsi), %al
cmpb $-0x5c, %al
jne 0x4547e0
movb 0x36(%rsi), %al
cmpb $0x7f, %al
je 0x4547f4
movzbl %al, %eax
cmpl $0xa5, %eax
jne 0x454800
leaq 0x20(%rsi), %rax
jmp 0x4547f8
movq 0x20(%rsi), %rax
movq (%rax), %rax
cmpl $0x1, (%rax)
jg 0x454860
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x450618
movl %eax, %r15d
movq 0x18(%r13), %rsi
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
callq 0x450618
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rdx
movq %rbx, %rdi
movl %ebp, %ecx
movl %r15d, %r8d
movl %eax, %r9d
pushq %r12
pushq %r14
callq 0x450723
addq $0x10, %rsp
jmp 0x454986
cmpl $0x13, %ebp
jne 0x454860
movq 0x10(%r13), %rsi
movq %rbx, %rdi
movl %r14d, %edx
movl %r12d, %ecx
callq 0x451d1c
jmp 0x454986
movq %r13, %rdi
callq 0x454a07
testl %eax, %eax
je 0x454886
movq %r15, %rdi
movl $0xb, %esi
xorl %edx, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x43bae0
jmp 0x454986
movq %r13, %rdi
callq 0x4549d2
testl %eax, %eax
jne 0x454986
movq %rsp, %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x450618
xorl %r8d, %r8d
testl %r12d, %r12d
setne %r8b
movq %r15, %rdi
movl $0x12, %esi
movl %eax, %edx
movl %r14d, %ecx
jmp 0x45487c
leaq -0x1c7(%rip), %rcx      # 0x4546fd
movq %rbx, %rdi
movq %r13, %rsi
movl %r14d, %edx
movl %r12d, %r8d
callq 0x451af4
jmp 0x454986
movq 0x10(%r13), %rsi
movq %rbx, %rdi
movl %r14d, %edx
movl %r12d, %ecx
callq 0x4546fd
movq 0x18(%r13), %rsi
movq %rbx, %rdi
movl %r14d, %edx
movl %r12d, %ecx
callq 0x4546fd
jmp 0x454986
movq %r15, %rdi
callq 0x450901
movl %eax, %ebp
movq 0x10(%r13), %rsi
movl %r12d, %ecx
xorl $0x10, %ecx
movq %rbx, %rdi
movl %eax, %edx
callq 0x451d1c
movq 0x18(%r13), %rsi
movq %rbx, %rdi
movl %r14d, %edx
movl %r12d, %ecx
callq 0x4546fd
jmp 0x45496a
movq %r15, %rdi
callq 0x450901
movl %eax, %ebp
testl %r12d, %r12d
movl %r14d, %ecx
cmovel %eax, %ecx
movq %rbx, %rdi
movq %r13, %rsi
movl %eax, %edx
callq 0x45135e
movq %r15, %rdi
movl $0xb, %esi
xorl %edx, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x43bae0
movq 0x18(%r15), %rax
movq 0x50(%rax), %rax
testq %rax, %rax
je 0x454986
notl %ebp
movl 0xb8(%r15), %ecx
movslq %ebp, %rdx
movl %ecx, (%rax,%rdx,4)
movl (%rsp), %eax
testl %eax, %eax
je 0x4549a4
movzbl 0x1f(%rbx), %ecx
cmpq $0x7, %rcx
ja 0x4549a4
leal 0x1(%rcx), %edx
movb %dl, 0x1f(%rbx)
movl %eax, 0xc4(%rbx,%rcx,4)
movl 0x4(%rsp), %eax
testl %eax, %eax
je 0x4549c3
movzbl 0x1f(%rbx), %ecx
cmpq $0x7, %rcx
ja 0x4549c3
leal 0x1(%rcx), %edx
movb %dl, 0x1f(%rbx)
movl %eax, 0xc4(%rbx,%rcx,4)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq