// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movl $0x0, -0x16c(%rbp)
leaq -0xc8(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x4010b0
leaq -0x118(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x4010b0
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
movl $0x50, %edx
callq 0x4010b0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x168(%rbp), %rdi
movl $0x50, %edx
callq 0x401040
movb $0x2c, -0x78(%rbp)
leaq -0xc8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x118(%rbp), %rax
movq %rax, -0x60(%rbp)
movb $0x39, -0xc8(%rbp)
leaq -0x168(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0xb0(%rbp)
movb $0x37, -0x118(%rbp)
leaq -0x168(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x100(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x168(%rbp), %rsi
leaq -0x16c(%rbp), %rdx
callq 0x46fb20
movl %eax, %esi
leaq -0x168(%rbp), %rdi
callq 0x46fae0
cmpq $0x0, -0x20(%rbp)
je 0x46fa73
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
movl -0x24(%rbp), %ecx
leaq -0x78(%rbp), %rsi
callq *%rax
jmp 0x46fa92
movl -0x164(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x164(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
leaq -0x78(%rbp), %rsi
callq 0x46c620
movq -0x8(%rbp), %rdi
movl -0x16c(%rbp), %esi
callq 0x470060
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
nopw (%rax,%rax)