// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: analysisLoader
static int analysisLoader(void *pData, int argc, char **argv, char **NotUsed){
  analysisInfo *pInfo = (analysisInfo*)pData;
  Index *pIndex;
  Table *pTable;
  const char *z;

  assert( argc==3 );
  UNUSED_PARAMETER2(NotUsed, argc);

  if( argv==0 || argv[0]==0 || argv[2]==0 ){
    return 0;
  }
  pTable = sqlite3FindTable(pInfo->db, argv[0], pInfo->zDatabase);
  if( pTable==0 ){
    return 0;
  }
  if( argv[1]==0 ){
    pIndex = 0;
  }else if( sqlite3_stricmp(argv[0],argv[1])==0 ){
    pIndex = sqlite3PrimaryKeyIndex(pTable);
  }else{
    pIndex = sqlite3FindIndex(pInfo->db, argv[1], pInfo->zDatabase);
  }
  z = argv[2];

  if( pIndex ){
    tRowcnt *aiRowEst = 0;
    int nCol = pIndex->nKeyCol+1;
#ifdef SQLITE_ENABLE_STAT4
    /* Index.aiRowEst may already be set here if there are duplicate
    ** sqlite_stat1 entries for this index. In that case just clobber
    ** the old data with the new instead of allocating a new array.  */
    if( pIndex->aiRowEst==0 ){
      pIndex->aiRowEst = (tRowcnt*)sqlite3MallocZero(sizeof(tRowcnt) * nCol);
      if( pIndex->aiRowEst==0 ) sqlite3OomFault(pInfo->db);
    }
    aiRowEst = pIndex->aiRowEst;
#endif
    pIndex->bUnordered = 0;
    decodeIntArray((char*)z, nCol, aiRowEst, pIndex->aiRowLogEst, pIndex);
    pIndex->hasStat1 = 1;
    if( pIndex->pPartIdxWhere==0 ){
      pTable->nRowLogEst = pIndex->aiRowLogEst[0];
      pTable->tabFlags |= TF_HasStat1;
    }
  }else{
    Index fakeIdx;
    fakeIdx.szIdxRow = pTable->szTabRow;
#ifdef SQLITE_ENABLE_COSTMULT
    fakeIdx.pTable = pTable;
#endif
    decodeIntArray((char*)z, 1, 0, &pTable->nRowLogEst, &fakeIdx);
    pTable->szTabRow = fakeIdx.szIdxRow;
    pTable->tabFlags |= TF_HasStat1;
  }

  return 0;
}

// Assembly:
testq %rdx, %rdx
je 0x2a5daa
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r14
movq (%rdx), %rsi
testq %rsi, %rsi
je 0x2a5da1
cmpq $0x0, 0x10(%r14)
je 0x2a5da1
movq %rdi, %r15
movq (%rdi), %rdi
movq 0x8(%r15), %rdx
callq 0x2811f8
testq %rax, %rax
je 0x2a5da1
movq %rax, %rbx
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x2a5d70
movq (%r14), %rax
testq %rax, %rax
je 0x2a5cff
xorl %ecx, %ecx
leaq 0x12b605(%rip), %rdx    # 0x3d12e0
movzbl (%rax,%rcx), %edi
movzbl (%rsi,%rcx), %r8d
cmpb %r8b, %dil
jne 0x2a5cf0
testq %rdi, %rdi
jne 0x2a5cfa
jmp 0x2a5d51
movb (%rdi,%rdx), %dil
cmpb (%r8,%rdx), %dil
jne 0x2a5cff
incq %rcx
jmp 0x2a5cdb
movq (%r15), %rdi
movq 0x8(%r15), %rdx
callq 0x2a5b2b
movq 0x10(%r14), %rdi
testq %rax, %rax
je 0x2a5d74
movq %rax, %r15
movzwl 0x63(%rax), %eax
movzwl 0x5e(%r15), %esi
incl %esi
andl $0xfffb, %eax           # imm = 0xFFFB
movw %ax, 0x63(%r15)
movq 0x10(%r15), %rdx
movq %r15, %rcx
callq 0x2a5e5c
orb $-0x80, 0x63(%r15)
cmpq $0x0, 0x48(%r15)
jne 0x2a5da1
movq 0x10(%r15), %rax
movzwl (%rax), %eax
movw %ax, 0x4a(%rbx)
jmp 0x2a5d9d
movq 0x10(%rbx), %r15
testq %r15, %r15
je 0x2a5d70
movzwl 0x63(%r15), %eax
movl %eax, %ecx
andl $0x3, %ecx
cmpw $0x2, %cx
je 0x2a5dad
movq 0x28(%r15), %r15
jmp 0x2a5d55
movq 0x10(%r14), %rdi
movzwl 0x4c(%rbx), %eax
movq %rsp, %r14
movw %ax, 0x5c(%r14)
movq %rbx, %rdx
addq $0x4a, %rdx
movl $0x1, %esi
movq %r14, %rcx
callq 0x2a5e5c
movzwl 0x5c(%r14), %eax
movw %ax, 0x4c(%rbx)
orb $0x10, 0x40(%rbx)
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
xorl %eax, %eax
retq
movq 0x10(%r14), %rdi
jmp 0x2a5d1b