// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: pragmaVtabFilter
static int pragmaVtabFilter(
  sqlite3_vtab_cursor *pVtabCursor,
  int idxNum, const char *idxStr,
  int argc, sqlite3_value **argv
){
  PragmaVtabCursor *pCsr = (PragmaVtabCursor*)pVtabCursor;
  PragmaVtab *pTab = (PragmaVtab*)(pVtabCursor->pVtab);
  int rc;
  int i, j;
  StrAccum acc;
  char *zSql;

  UNUSED_PARAMETER(idxNum);
  UNUSED_PARAMETER(idxStr);
  pragmaVtabCursorClear(pCsr);
  j = (pTab->pName->mPragFlg & PragFlg_Result1)!=0 ? 0 : 1;
  for(i=0; i<argc; i++, j++){
    const char *zText = (const char*)sqlite3_value_text(argv[i]);
    assert( j<ArraySize(pCsr->azArg) );
    assert( pCsr->azArg[j]==0 );
    if( zText ){
      pCsr->azArg[j] = sqlite3_mprintf("%s", zText);
      if( pCsr->azArg[j]==0 ){
        return SQLITE_NOMEM;
      }
    }
  }
  sqlite3StrAccumInit(&acc, 0, 0, 0, pTab->db->aLimit[SQLITE_LIMIT_SQL_LENGTH]);
  sqlite3_str_appendall(&acc, "PRAGMA ");
  if( pCsr->azArg[1] ){
    sqlite3_str_appendf(&acc, "%Q.", pCsr->azArg[1]);
  }
  sqlite3_str_appendall(&acc, pTab->pName->zName);
  if( pCsr->azArg[0] ){
    sqlite3_str_appendf(&acc, "=%Q", pCsr->azArg[0]);
  }
  zSql = sqlite3StrAccumFinish(&acc);
  if( zSql==0 ) return SQLITE_NOMEM;
  rc = sqlite3_prepare_v2(pTab->db, zSql, -1, &pCsr->pPragma, 0);
  sqlite3_free(zSql);
  if( rc!=SQLITE_OK ){
    pTab->base.zErrMsg = sqlite3_mprintf("%s", sqlite3_errmsg(pTab->db));
    return rc;
  }
  return pragmaVtabNext(pVtabCursor);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, %r14
movl %ecx, %ebp
movq %rdi, %rbx
movq (%rdi), %rax
movq %rax, 0x8(%rsp)
callq 0x2a8fdc
testl %ebp, %ebp
jle 0x2a8e02
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
xorl %ecx, %ecx
testb $0x20, 0x9(%rax)
sete %cl
movl %ebp, %r13d
leaq (%rbx,%rcx,8), %rbp
addq $0x18, %rbp
leaq 0x11fce0(%rip), %r15    # 0x3c8aa9
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdi
movl $0x1, %esi
callq 0x278305
testq %rax, %rax
je 0x2a8dfa
movq %r15, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x274b53
movq %rax, (%rbp,%r12,8)
testq %rax, %rax
je 0x2a8f0f
incq %r12
cmpq %r12, %r13
jne 0x2a8dcc
movq 0x8(%rsp), %r15
movq 0x18(%r15), %rax
movl 0x80(%rax), %eax
xorl %ecx, %ecx
leaq 0x10(%rsp), %rdi
movl %ecx, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movl %eax, 0x14(%rdi)
movl %ecx, 0x18(%rdi)
movw $0x0, 0x1c(%rdi)
leaq 0x12e45b(%rip), %rsi    # 0x3d728f
movl $0x7, %edx
callq 0x274722
movq 0x20(%rbx), %rdx
testq %rdx, %rdx
je 0x2a8e5a
leaq 0x12e449(%rip), %rsi    # 0x3d7297
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x274dfa
movq 0x20(%r15), %rax
movq (%rax), %rsi
leaq 0x10(%rsp), %rdi
callq 0x2747f8
movq 0x18(%rbx), %rdx
testq %rdx, %rdx
je 0x2a8e87
leaq 0x12f786(%rip), %rsi    # 0x3d8601
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x274dfa
leaq 0x10(%rsp), %rdi
callq 0x2749f9
testq %rax, %rax
je 0x2a8f0f
movq %rax, %r14
movq 0x18(%r15), %rdi
leaq 0x8(%rbx), %r9
movq $0x0, (%rsp)
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x80, %ecx
xorl %r8d, %r8d
callq 0x27d0b1
movl %eax, %ebp
cmpl $0x0, 0x212799(%rip)    # 0x4bb660
je 0x2a8ee2
movq %r14, %rdi
callq *0x2127c6(%rip)         # 0x4bb698
cltq
subq %rax, 0x215c1d(%rip)    # 0x4beaf8
decq 0x215c5e(%rip)          # 0x4beb40
movq %r14, %rdi
callq *0x21279d(%rip)         # 0x4bb688
testl %ebp, %ebp
je 0x2a8f25
movq 0x18(%r15), %rdi
callq 0x27c968
leaq 0x11fbaa(%rip), %rdi    # 0x3c8aa9
movq %rax, %rsi
xorl %eax, %eax
callq 0x274b53
movq %rax, 0x10(%r15)
jmp 0x2a8f14
movl $0x7, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2a8f38