// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ExprCodeRunJustOnce
SQLITE_PRIVATE int sqlite3ExprCodeRunJustOnce(
  Parse *pParse,    /* Parsing context */
  Expr *pExpr,      /* The expression to code when the VDBE initializes */
  int regDest       /* Store the value in this register */
){
  ExprList *p;
  assert( ConstFactorOk(pParse) );
  p = pParse->pConstExpr;
  if( regDest<0 && p ){
    struct ExprList_item *pItem;
    int i;
    for(pItem=p->a, i=p->nExpr; i>0; pItem++, i--){
      if( pItem->reusable && sqlite3ExprCompare(0,pItem->pExpr,pExpr,-1)==0 ){
        return pItem->u.iConstExprReg;
      }
    }
  }
  pExpr = sqlite3ExprDup(pParse->db, pExpr, 0);
  if( pExpr!=0 && ExprHasProperty(pExpr, EP_HasFunc) ){
    Vdbe *v = pParse->pVdbe;
    int addr;
    assert( v );
    addr = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);
    pParse->okConstFactor = 0;
    if( !pParse->db->mallocFailed ){
      if( regDest<0 ) regDest = ++pParse->nMem;
      sqlite3ExprCode(pParse, pExpr, regDest);
    }
    pParse->okConstFactor = 1;
    sqlite3ExprDelete(pParse->db, pExpr);
    sqlite3VdbeJumpHere(v, addr);
  }else{
    p = sqlite3ExprListAppend(pParse, p, pExpr);
    if( p ){
       struct ExprList_item *pItem = &p->a[p->nExpr-1];
       pItem->reusable = regDest<0;
       if( regDest<0 ) regDest = ++pParse->nMem;
       pItem->u.iConstExprReg = regDest;
    }
    pParse->pConstExpr = p;
  }
  return regDest;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r14
movq 0x58(%rdi), %r15
movl %edx, 0x4(%rsp)
testl %edx, %edx
sets %al
testq %r15, %r15
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x266388
movl (%r15), %ebx
movq %r15, %r13
addq $0x1c, %r13
pushq $-0x1
popq %rbp
testl %ebx, %ebx
jle 0x266388
testb $0x8, -0x3(%r13)
je 0x266380
movq -0x14(%r13), %rsi
xorl %edi, %edi
movq %r12, %rdx
movl %ebp, %ecx
callq 0x26823c
testl %eax, %eax
je 0x266455
decl %ebx
addq $0x18, %r13
jmp 0x26635d
movq (%r14), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x267197
movq %rax, %r12
testq %rax, %rax
je 0x2663a5
testb $0x4, 0x4(%r12)
jne 0x2663fb
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x25bc95
testq %rax, %rax
movl 0x4(%rsp), %ebx
je 0x2663f5
movslq (%rax), %rcx
imulq $0x18, %rcx, %rdx
movb 0x1(%rdx,%rax), %sil
movl %ebx, %ecx
shrl $0x1c, %ecx
andb $0x8, %cl
andb $-0x9, %sil
orb %cl, %sil
leaq (%rdx,%rax), %rcx
addq $-0x10, %rcx
movb %sil, 0x1(%rdx,%rax)
testl %ebx, %ebx
jns 0x2663f2
movl 0x38(%r14), %ebx
incl %ebx
movl %ebx, 0x38(%r14)
movl %ebx, 0x14(%rcx)
movq %rax, 0x58(%r14)
jmp 0x266459
movq 0x10(%r14), %r15
pushq $0x11
popq %rsi
movq %r15, %rdi
callq 0x2645ec
movl %eax, %ebp
movb $0x0, 0x23(%r14)
movq (%r14), %rdi
cmpb $0x0, 0x61(%rdi)
movl 0x4(%rsp), %ebx
jne 0x26643c
testl %ebx, %ebx
jns 0x26642c
movl 0x38(%r14), %ebx
incl %ebx
movl %ebx, 0x38(%r14)
movq %r14, %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x26463f
movq (%r14), %rdi
movb $0x1, 0x23(%r14)
movq %r12, %rsi
callq 0x24b649
movq %r15, %rdi
movl %ebp, %esi
callq 0x2645f8
jmp 0x266459
movl (%r13), %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq