// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pragmaVtabBestIndex
static int pragmaVtabBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
  PragmaVtab *pTab = (PragmaVtab*)tab;
  const struct sqlite3_index_constraint *pConstraint;
  int i, j;
  int seen[2];

  pIdxInfo->estimatedCost = (double)1;
  if( pTab->nHidden==0 ){ return SQLITE_OK; }
  pConstraint = pIdxInfo->aConstraint;
  seen[0] = 0;
  seen[1] = 0;
  for(i=0; i<pIdxInfo->nConstraint; i++, pConstraint++){
    if( pConstraint->usable==0 ) continue;
    if( pConstraint->op!=SQLITE_INDEX_CONSTRAINT_EQ ) continue;
    if( pConstraint->iColumn < pTab->iHidden ) continue;
    j = pConstraint->iColumn - pTab->iHidden;
    assert( j < 2 );
    seen[j] = i+1;
  }
  if( seen[0]==0 ){
    pIdxInfo->estimatedCost = (double)2147483647;
    pIdxInfo->estimatedRows = 2147483647;
    return SQLITE_OK;
  }
  j = seen[0]-1;
  pIdxInfo->aConstraintUsage[j].argvIndex = 1;
  pIdxInfo->aConstraintUsage[j].omit = 1;
  if( seen[1]==0 ) return SQLITE_OK;
  pIdxInfo->estimatedCost = (double)20;
  pIdxInfo->estimatedRows = 20;
  j = seen[1]-1;
  pIdxInfo->aConstraintUsage[j].argvIndex = 2;
  pIdxInfo->aConstraintUsage[j].omit = 1;
  return SQLITE_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movsd 0x1060f0(%rip), %xmm0   # 0x517240
movsd %xmm0, 0x40(%rax)
movq -0x20(%rbp), %rax
movzbl 0x28(%rax), %eax
cmpl $0x0, %eax
jne 0x41116e
movl $0x0, -0x4(%rbp)
jmp 0x4112c0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x411204
movq -0x28(%rbp), %rax
movzbl 0x5(%rax), %eax
cmpl $0x0, %eax
jne 0x4111a9
jmp 0x4111ed
movq -0x28(%rbp), %rax
movzbl 0x4(%rax), %eax
cmpl $0x2, %eax
je 0x4111b8
jmp 0x4111ed
movq -0x28(%rbp), %rax
movl (%rax), %eax
movq -0x20(%rbp), %rcx
movzbl 0x29(%rcx), %ecx
cmpl %ecx, %eax
jge 0x4111cc
jmp 0x4111ed
movq -0x28(%rbp), %rax
movl (%rax), %eax
movq -0x20(%rbp), %rcx
movzbl 0x29(%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movslq -0x30(%rbp), %rax
movl %ecx, -0x38(%rbp,%rax,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x28(%rbp)
jmp 0x41118f
cmpl $0x0, -0x38(%rbp)
jne 0x411233
movq -0x18(%rbp), %rax
movsd 0x12c1e2(%rip), %xmm0   # 0x53d3f8
movsd %xmm0, 0x40(%rax)
movq -0x18(%rbp), %rax
movq $0x7fffffff, 0x48(%rax) # imm = 0x7FFFFFFF
movl $0x0, -0x4(%rbp)
jmp 0x4112c0
movl -0x38(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x30(%rbp), %rcx
movl $0x1, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x30(%rbp), %rcx
movb $0x1, 0x4(%rax,%rcx,8)
cmpl $0x0, -0x34(%rbp)
jne 0x41126f
movl $0x0, -0x4(%rbp)
jmp 0x4112c0
movq -0x18(%rbp), %rax
movsd 0x168185(%rip), %xmm0   # 0x579400
movsd %xmm0, 0x40(%rax)
movq -0x18(%rbp), %rax
movq $0x14, 0x48(%rax)
movl -0x34(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x30(%rbp), %rcx
movl $0x2, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x30(%rbp), %rcx
movb $0x1, 0x4(%rax,%rcx,8)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)