// File: /workspace/github_c_makefile_star2_O2/ukontainer[P]sqlite-bench/sqlite3.c
// Function: exprCodeBetween
static void exprCodeBetween(
  Parse *pParse,    /* Parsing and code generating context */
  Expr *pExpr,      /* The BETWEEN expression */
  int dest,         /* Jump destination or storage location */
  void (*xJump)(Parse*,Expr*,int,int), /* Action to take */
  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 */


  memset(&compLeft, 0, sizeof(Expr));
  memset(&compRight, 0, sizeof(Expr));
  memset(&exprAnd, 0, sizeof(Expr));

  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;
  exprToRegister(&exprX, exprCodeVector(pParse, &exprX, &regFree1));
  if( xJump ){
    xJump(pParse, &exprAnd, dest, jumpIfNull);
  }else{
    /* Mark the expression is being from the ON or USING clause of a join
    ** so that the sqlite3ExprCodeTarget() routine will not attempt to move
    ** it into the Parse.pConstExpr list.  We should use a new bit for this,
    ** for clarity, but we are out of bits in the Expr.flags field so we
    ** have to reuse the EP_FromJoin bit.  Bummer. */
    exprX.flags |= EP_FromJoin;
    sqlite3ExprCodeTarget(pParse, &exprAnd, dest);
  }
  sqlite3ReleaseTempReg(pParse, regFree1);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movl %r8d, %r15d
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
andl $0x0, (%rdx)
xorps %xmm0, %xmm0
leaq 0x100(%rsp), %r8
movaps %xmm0, (%r8)
movaps %xmm0, 0x10(%r8)
movaps %xmm0, 0x20(%r8)
movaps %xmm0, 0x30(%r8)
movaps %xmm0, 0x40(%r8)
leaq 0xb0(%rsp), %r9
movaps %xmm0, (%r9)
movaps %xmm0, 0x10(%r9)
movaps %xmm0, 0x20(%r9)
movaps %xmm0, 0x30(%r9)
movaps %xmm0, 0x40(%r9)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x50(%rsp)
movq 0x10(%rsi), %rsi
pushq $0xa
popq %rcx
leaq 0x60(%rsp), %r12
movq %r12, %rdi
rep  movsq (%rsi), %es:(%rdi)
movb $0x2c, 0x10(%rsp)
movq %r8, 0x20(%rsp)
movq %r9, 0x28(%rsp)
movb $0x39, (%r8)
movq %r12, 0x10(%r8)
movq 0x20(%rax), %rax
movq 0x8(%rax), %rcx
movq %rcx, 0x18(%r8)
movb $0x37, (%r9)
movq %r12, 0x10(%r9)
movq 0x28(%rax), %rax
movq %rax, 0x18(%r9)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x44af75
movb (%r12), %cl
movb %cl, 0x36(%r12)
movb $-0x5c, (%r12)
movl %eax, 0x2c(%r12)
movl $0xffffefff, %eax       # imm = 0xFFFFEFFF
andl 0x4(%r12), %eax
movl %eax, 0x4(%r12)
testq %r14, %r14
je 0x44af30
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
movl %r15d, %ecx
callq *%r14
jmp 0x44af46
orl $0x1, %eax
movl %eax, 0x64(%rsp)
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x448a28
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x44af65
movzbl 0x1f(%rbx), %ecx
cmpq $0x7, %rcx
ja 0x44af65
leal 0x1(%rcx), %edx
movb %dl, 0x1f(%rbx)
movl %eax, 0xc4(%rbx,%rcx,4)
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq