// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: whereIndexExprTrans
static void whereIndexExprTrans(
  Index *pIdx,      /* The Index */
  int iTabCur,      /* Cursor of the table that is being indexed */
  int iIdxCur,      /* Cursor of the index itself */
  WhereInfo *pWInfo /* Transform expressions in this WHERE clause */
){
  int iIdxCol;               /* Column number of the index */
  ExprList *aColExpr;        /* Expressions that are indexed */
  Table *pTab;
  Walker w;
  IdxExprTrans x;
  aColExpr = pIdx->aColExpr;
  if( aColExpr==0 && !pIdx->bHasVCol ){
    /* The index does not reference any expressions or virtual columns
    ** so no translations are needed. */
    return;
  }
  pTab = pIdx->pTable;
  memset(&w, 0, sizeof(w));
  w.u.pIdxTrans = &x;
  x.iTabCur = iTabCur;
  x.iIdxCur = iIdxCur;
  x.pWInfo = pWInfo;
  x.db = pWInfo->pParse->db;
  for(iIdxCol=0; iIdxCol<pIdx->nColumn; iIdxCol++){
    i16 iRef = pIdx->aiColumn[iIdxCol];
    if( iRef==XN_EXPR ){
      assert( aColExpr->a[iIdxCol].pExpr!=0 );
      x.pIdxExpr = aColExpr->a[iIdxCol].pExpr;
      if( sqlite3ExprIsConstant(x.pIdxExpr) ) continue;
      w.xExprCallback = whereIndexExprTransNode;
#ifndef SQLITE_OMIT_GENERATED_COLUMNS
    }else if( iRef>=0
       && (pTab->aCol[iRef].colFlags & COLFLAG_VIRTUAL)!=0
       && (pTab->aCol[iRef].zColl==0
           || sqlite3StrICmp(pTab->aCol[iRef].zColl, sqlite3StrBINARY)==0)
    ){
      /* Check to see if there are direct references to generated columns
      ** that are contained in the index.  Pulling the generated column
      ** out of the index is an optimization only - the main table is always
      ** available if the index cannot be used.  To avoid unnecessary
      ** complication, omit this optimization if the collating sequence for
      ** the column is non-standard */
      x.iTabCol = iRef;
      w.xExprCallback = whereIndexExprTransColumn;
#endif /* SQLITE_OMIT_GENERATED_COLUMNS */
    }else{
      continue;
    }
    x.iIdxCol = iIdxCol;
    sqlite3WalkExpr(&w, pWInfo->pWhere);
    sqlite3WalkExprList(&w, pWInfo->pOrderBy);
    sqlite3WalkExprList(&w, pWInfo->pResultSet);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rcx, (%rsp)
movq %rdi, %r14
movq 0x50(%rdi), %r13
testq %r13, %r13
jne 0x2e7184
testb $0x4, 0x64(%r14)
je 0x2e7313
movq 0x18(%r14), %rax
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
leaq 0x70(%rsp), %rax
movq %rax, 0x38(%rsp)
movl %esi, 0x8(%rax)
movl %edx, 0xc(%rax)
movq (%rsp), %rcx
movq %rcx, 0x18(%rax)
movq (%rcx), %rcx
movq (%rcx), %rcx
movq %rcx, 0x20(%rax)
cmpw $0x0, 0x60(%r14)
je 0x2e7313
addq $0x8, %r13
xorl %r15d, %r15d
leaq 0xf4105(%rip), %rbx     # 0x3db2e0
leaq 0xf387e(%rip), %r12     # 0x3daa60
movq (%rsp), %rbp
movq 0x8(%r14), %rax
movswl (%rax,%r15,2), %eax
cmpl $-0x2, %eax
jne 0x2e724d
leaq (%r15,%r15,2), %rax
movq (%r13,%rax,8), %rsi
movq %rsi, 0x70(%rsp)
movw $0x1, 0x64(%rsp)
leaq -0x1d0ed(%rip), %rax    # 0x2ca123
movq %rax, 0x48(%rsp)
leaq -0x1d017(%rip), %rax    # 0x2ca205
movq %rax, 0x50(%rsp)
movl $0x0, 0x68(%rsp)
testq %rsi, %rsi
je 0x2e7238
leaq 0x40(%rsp), %rdi
callq 0x2ca211
cmpw $0x0, 0x64(%rsp)
jne 0x2e7302
leaq 0x1eb(%rip), %rax       # 0x2e7436
jmp 0x2e72b4
testw %ax, %ax
js 0x2e7302
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rcx
movzwl %ax, %edx
shll $0x5, %edx
testb $0x20, 0x1c(%rcx,%rdx)
je 0x2e7302
addq %rdx, %rcx
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
je 0x2e72a6
xorl %edx, %edx
movzbl (%rcx,%rdx), %esi
movzbl (%rdx,%rbx), %edi
cmpb %dil, %sil
jne 0x2e7292
testq %rsi, %rsi
jne 0x2e729c
jmp 0x2e72a1
movb (%rsi,%r12), %r8b
cmpb (%rdi,%r12), %r8b
jne 0x2e72a1
incq %rdx
jmp 0x2e727e
cmpb %dil, %sil
jne 0x2e7302
movl %eax, 0x84(%rsp)
leaq 0x1ea(%rip), %rax       # 0x2e749e
movq %rax, 0x18(%rsp)
movq %r13, %rbx
movl %r15d, 0x80(%rsp)
movq (%rsp), %rax
movq 0x20(%rax), %rsi
testq %rsi, %rsi
leaq 0x10(%rsp), %rdi
je 0x2e72e0
callq 0x2ca211
leaq 0x10(%rsp), %rdi
movq 0x10(%rbp), %rsi
movq %rdi, %r13
callq 0x2ca44f
movq 0x18(%rbp), %rsi
movq %r13, %rdi
callq 0x2ca44f
movq %rbx, %r13
leaq 0xf3fde(%rip), %rbx     # 0x3db2e0
incq %r15
movzwl 0x60(%r14), %eax
cmpq %rax, %r15
jb 0x2e71e6
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq