// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: exprCodeBetween
static void exprCodeBetween(
  Parse *pParse,    /* Parsing and code generating context */
  Expr *pExpr,      /* The BETWEEN expression */
  int dest,         /* Jump here if the jump is taken */
  int jumpIfTrue,   /* Take the jump if the BETWEEN is true */
  int jumpIfNull    /* Take the jump if the BETWEEN is NULL */
){
  Expr exprAnd;     /* The AND operator in  x>=y AND x<=z  */
  Expr compLeft;    /* The  x>=y  term */
  Expr compRight;   /* The  x<=z  term */
  Expr exprX;       /* The  x  subexpression */
  int regFree1 = 0; /* Temporary use register */

  assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
  exprX = *pExpr->pLeft;
  exprAnd.op = TK_AND;
  exprAnd.pLeft = &compLeft;
  exprAnd.pRight = &compRight;
  compLeft.op = TK_GE;
  compLeft.pLeft = &exprX;
  compLeft.pRight = pExpr->x.pList->a[0].pExpr;
  compRight.op = TK_LE;
  compRight.pLeft = &exprX;
  compRight.pRight = pExpr->x.pList->a[1].pExpr;
  exprX.iTable = sqlite3ExprCodeTemp(pParse, &exprX, &regFree1);
  exprX.op2 = exprX.op;
  exprX.op = TK_REGISTER;
  if( jumpIfTrue ){
    sqlite3ExprIfTrue(pParse, &exprAnd, dest, jumpIfNull);
  }else{
    sqlite3ExprIfFalse(pParse, &exprAnd, dest, jumpIfNull);
  }
  sqlite3ReleaseTempReg(pParse, regFree1);

  /* Ensure adequate test coverage */
  testcase( jumpIfTrue==0 && jumpIfNull==0 && regFree1==0 );
  testcase( jumpIfTrue==0 && jumpIfNull==0 && regFree1!=0 );
  testcase( jumpIfTrue==0 && jumpIfNull!=0 && regFree1==0 );
  testcase( jumpIfTrue==0 && jumpIfNull!=0 && regFree1!=0 );
  testcase( jumpIfTrue!=0 && jumpIfNull==0 && regFree1==0 );
  testcase( jumpIfTrue!=0 && jumpIfNull==0 && regFree1!=0 );
  testcase( jumpIfTrue!=0 && jumpIfNull!=0 && regFree1==0 );
  testcase( jumpIfTrue!=0 && jumpIfNull!=0 && regFree1!=0 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl $0x0, -0x144(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x140(%rbp), %rdi
movl $0x48, %edx
callq 0x82f0
movb $0x45, -0x68(%rbp)
leaq -0xb0(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0xf8(%rbp), %rax
movq %rax, -0x50(%rbp)
movb $0x50, -0xb0(%rbp)
leaq -0x140(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x98(%rbp)
movb $0x4e, -0xf8(%rbp)
leaq -0x140(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, -0xe0(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x140(%rbp), %rsi
leaq -0x144(%rbp), %rdx
callq 0x682b0
movl %eax, -0x114(%rbp)
movb -0x140(%rbp), %al
movb %al, -0x109(%rbp)
movb $-0x7c, -0x140(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x684bc
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
movl -0x1c(%rbp), %ecx
leaq -0x68(%rbp), %rsi
callq 0x67f00
jmp 0x684cf
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
movl -0x1c(%rbp), %ecx
leaq -0x68(%rbp), %rsi
callq 0x67920
movq -0x8(%rbp), %rdi
movl -0x144(%rbp), %esi
callq 0x66ac0
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopw (%rax,%rax)