// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ExprIfFalse
SQLITE_PRIVATE void sqlite3ExprIfFalse(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( pExpr==0 )    return;
  assert( !ExprHasVVAProperty(pExpr,EP_Immutable) );

  /* The value of pExpr->op and op are related as follows:
  **
  **       pExpr->op            op
  **       ---------          ----------
  **       TK_ISNULL          OP_NotNull
  **       TK_NOTNULL         OP_IsNull
  **       TK_NE              OP_Eq
  **       TK_EQ              OP_Ne
  **       TK_GT              OP_Le
  **       TK_LE              OP_Gt
  **       TK_GE              OP_Lt
  **       TK_LT              OP_Ge
  **
  ** For other values of pExpr->op, op is undefined and unused.
  ** The value of TK_ and OP_ constants are arranged such that we
  ** can compute the mapping above using the following expression.
  ** Assert()s verify that the computation is correct.
  */
  op = ((pExpr->op+(TK_ISNULL&1))^1)-(TK_ISNULL&1);

  /* Verify correct alignment of TK_ and OP_ constants
  */
  assert( pExpr->op!=TK_ISNULL || op==OP_NotNull );
  assert( pExpr->op!=TK_NOTNULL || op==OP_IsNull );
  assert( pExpr->op!=TK_NE || op==OP_Eq );
  assert( pExpr->op!=TK_EQ || op==OP_Ne );
  assert( pExpr->op!=TK_LT || op==OP_Ge );
  assert( pExpr->op!=TK_LE || op==OP_Gt );
  assert( pExpr->op!=TK_GT || op==OP_Le );
  assert( pExpr->op!=TK_GE || op==OP_Lt );

  switch( pExpr->op ){
    case TK_AND:
    case TK_OR: {
      Expr *pAlt = sqlite3ExprSimplifiedAndOr(pExpr);
      if( pAlt!=pExpr ){
        sqlite3ExprIfFalse(pParse, pAlt, dest, jumpIfNull);
      }else if( pExpr->op==TK_AND ){
        testcase( jumpIfNull==0 );
        sqlite3ExprIfFalse(pParse, pExpr->pLeft, dest, jumpIfNull);
        sqlite3ExprIfFalse(pParse, pExpr->pRight, dest, jumpIfNull);
      }else{
        int d2 = sqlite3VdbeMakeLabel(pParse);
        testcase( jumpIfNull==0 );
        sqlite3ExprIfTrue(pParse, pExpr->pLeft, d2,
                          jumpIfNull^SQLITE_JUMPIFNULL);
        sqlite3ExprIfFalse(pParse, pExpr->pRight, dest, jumpIfNull);
        sqlite3VdbeResolveLabel(v, d2);
      }
      break;
    }
    case TK_NOT: {
      testcase( jumpIfNull==0 );
      sqlite3ExprIfTrue(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 ){
        /* IS TRUE and IS NOT FALSE */
        sqlite3ExprIfFalse(pParse, pExpr->pLeft, dest,
                           isNot ? 0 : SQLITE_JUMPIFNULL);

      }else{
        /* IS FALSE and IS NOT TRUE */
        sqlite3ExprIfTrue(pParse, pExpr->pLeft, dest,
                          isNot ? 0 : SQLITE_JUMPIFNULL);
      }
      break;
    }
    case TK_IS:
    case TK_ISNOT:
      testcase( pExpr->op==TK_IS );
      testcase( pExpr->op==TK_ISNOT );
      op = (pExpr->op==TK_IS) ? TK_NE : TK_EQ;
      jumpIfNull = SQLITE_NULLEQ;
      /* no break */ deliberate_fall_through
    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,ExprHasProperty(pExpr,EP_Commuted));
      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: {
      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
      sqlite3VdbeAddOp2(v, op, r1, dest);
      testcase( op==TK_ISNULL );   VdbeCoverageIf(v, op==TK_ISNULL);
      testcase( op==TK_NOTNULL );  VdbeCoverageIf(v, op==TK_NOTNULL);
      testcase( regFree1==0 );
      break;
    }
    case TK_BETWEEN: {
      testcase( jumpIfNull==0 );
      exprCodeBetween(pParse, pExpr, dest, sqlite3ExprIfFalse, jumpIfNull);
      break;
    }
#ifndef SQLITE_OMIT_SUBQUERY
    case TK_IN: {
      if( jumpIfNull ){
        sqlite3ExprCodeIN(pParse, pExpr, dest, dest);
      }else{
        int destIfNull = sqlite3VdbeMakeLabel(pParse);
        sqlite3ExprCodeIN(pParse, pExpr, dest, destIfNull);
        sqlite3VdbeResolveLabel(v, destIfNull);
      }
      break;
    }
#endif
    default: {
    default_expr:
      if( ExprAlwaysFalse(pExpr) ){
        sqlite3VdbeGoto(v, dest);
      }else if( ExprAlwaysTrue(pExpr) ){
        /* no-op */
      }else{
        r1 = sqlite3ExprCodeTemp(pParse, pExpr, &regFree1);
        sqlite3VdbeAddOp3(v, OP_IfNot, 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
subq $0x18, %rsp
movl %ecx, %r15d
movq 0x10(%rdi), %r13
andl $0x0, 0x8(%rsp)
andl $0x0, 0xc(%rsp)
testq %r13, %r13
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x26758a
movl %edx, %r8d
movq %rsi, %r12
movq %rdi, %rbx
movb (%rsi), %r14b
movzbl %r14b, %ebp
leal -0x2b(%rbp), %eax
cmpl $0xe, %eax
ja 0x2672d6
xorl $0x1, %ebp
leaq 0x10a111(%rip), %rcx    # 0x3713d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r8, 0x10(%rsp)
jmp 0x267395
cmpl $0x13, %ebp
je 0x2674ab
cmpl $0xa8, %ebp
je 0x26737d
cmpl $0xac, %ebp
jne 0x2673ab
movq %r8, %r15
xorl %ebp, %ebp
xorl %r14d, %r14d
cmpb $-0x58, 0x2(%r12)
setne %bpl
sete %r14b
movq 0x18(%r12), %rdi
callq 0x265f76
shll $0x4, %ebp
movq 0x10(%r12), %rsi
movq %rbx, %rdi
movl %r15d, %edx
movl %ebp, %ecx
cmpl %r14d, %eax
je 0x2674b9
jmp 0x2674e8
movq 0x10(%r12), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r8, %r14
callq 0x2661cb
movq %r13, %rdi
movl %ebp, %esi
movl %eax, %edx
movl %r14d, %ecx
callq 0x24d51a
jmp 0x26754c
movq %r8, %rbp
movq %r12, %rdi
callq 0x26a2ca
cmpq %r12, %rax
je 0x2674c3
movq %rbx, %rdi
movq %rax, %rsi
jmp 0x2674e3
movq %r8, 0x10(%rsp)
xorl %ebp, %ebp
cmpb $0x2d, %r14b
sete %bpl
xorl $0x35, %ebp
movl $0x80, %r15d
movq 0x10(%r12), %r14
movq %r14, %rdi
callq 0x2661b9
testl %eax, %eax
je 0x267412
movq 0x10(%rsp), %r8
movl 0x4(%r12), %eax
movl %eax, %ecx
andl $0x20000001, %ecx       # imm = 0x20000001
cmpl $0x20000000, %ecx       # imm = 0x20000000
jne 0x2673d0
movq %r13, %rdi
movl %r8d, %esi
callq 0x264680
jmp 0x26754c
andl $0x10000001, %eax       # imm = 0x10000001
cmpl $0x10000000, %eax       # imm = 0x10000000
je 0x26754c
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r12, %rsi
movq %r8, %r14
callq 0x2661cb
xorl %r8d, %r8d
testl %r15d, %r15d
setne %r8b
pushq $0x14
popq %rsi
movq %r13, %rdi
movl %eax, %edx
movl %r14d, %ecx
callq 0x24d51f
jmp 0x26754c
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2661cb
movl %eax, %r14d
movq 0x18(%r12), %rsi
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x2661cb
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
movl 0x4(%r12), %r10d
shrl $0x9, %r10d
andl $0x1, %r10d
subq $0x8, %rsp
movq %rbx, %rdi
movl %ebp, %ecx
movl %r14d, %r8d
movl %eax, %r9d
pushq %r10
pushq %r15
pushq 0x28(%rsp)
callq 0x266263
addq $0x20, %rsp
jmp 0x26754c
leaq -0x20c(%rip), %rcx      # 0x26726e
movq %rbx, %rdi
movq %r12, %rsi
movl %r8d, %edx
movl %r15d, %r8d
callq 0x267009
jmp 0x26754c
testl %r15d, %r15d
je 0x2674ef
movq %rbx, %rdi
movq %r12, %rsi
movl %r8d, %edx
movl %r8d, %ecx
callq 0x2669a3
jmp 0x26754c
movq 0x10(%r12), %rsi
movq %rbx, %rdi
movl %r8d, %edx
movl %r15d, %ecx
callq 0x26a356
jmp 0x26754c
cmpb $0x2c, %r14b
jne 0x26750e
movq 0x10(%r12), %rsi
movq %rbx, %rdi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x26726e
movq 0x18(%r12), %rsi
movq %rbx, %rdi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x26726e
jmp 0x26754c
movl 0x44(%rbx), %ebp
decl %ebp
movl %ebp, 0x44(%rbx)
movq %rbx, %rdi
movq %r12, %rsi
movl %r8d, %edx
movl %ebp, %ecx
callq 0x2669a3
movq %r13, %rdi
movl %ebp, %esi
jmp 0x267547
movl 0x44(%rbx), %r14d
decl %r14d
movl %r14d, 0x44(%rbx)
movq 0x10(%r12), %rsi
movl %r15d, %ecx
xorl $0x10, %ecx
movq %rbx, %rdi
movl %r14d, %edx
callq 0x26a356
movq 0x18(%r12), %rsi
movq %rbx, %rdi
movl %ebp, %edx
movl %r15d, %ecx
callq 0x26726e
movq %r13, %rdi
movl %r14d, %esi
callq 0x266fe1
movl 0x8(%rsp), %eax
testl %eax, %eax
je 0x26756b
movzbl 0x1f(%rbx), %ecx
cmpq $0x7, %rcx
ja 0x26756b
leal 0x1(%rcx), %edx
movb %dl, 0x1f(%rbx)
movl %eax, 0xd4(%rbx,%rcx,4)
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x26758a
movzbl 0x1f(%rbx), %ecx
cmpq $0x7, %rcx
ja 0x26758a
leal 0x1(%rcx), %edx
movb %dl, 0x1f(%rbx)
movl %eax, 0xd4(%rbx,%rcx,4)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq