// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x40bdfe
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x40bdfe
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x40be0a
movl $0x0, -0x4(%rbp)
jmp 0x40bf88
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x3d38b0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x40be3c
movl $0x0, -0x4(%rbp)
jmp 0x40bf88
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x40be51
movq $0x0, -0x38(%rbp)
jmp 0x40be9b
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3c3e00
cmpl $0x0, %eax
jne 0x40be79
movq -0x40(%rbp), %rdi
callq 0x3cef20
movq %rax, -0x38(%rbp)
jmp 0x40be99
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x40b960
movq %rax, -0x38(%rbp)
jmp 0x40be9b
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x40bf3b
movq $0x0, -0x50(%rbp)
movq -0x38(%rbp), %rax
movzwl 0x5e(%rax), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
movq -0x38(%rbp), %rax
movw 0x63(%rax), %cx
andw $-0x5, %cx
orw $0x0, %cx
movw %cx, 0x63(%rax)
movq -0x48(%rbp), %rdi
movl -0x54(%rbp), %esi
movq -0x50(%rbp), %rdx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x38(%rbp), %r8
callq 0x40c0b0
movq -0x38(%rbp), %rax
movw 0x63(%rax), %cx
andw $0xff7f, %cx            # imm = 0xFF7F
orw $0x80, %cx
movw %cx, 0x63(%rax)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x40bf39
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movw (%rax), %cx
movq -0x40(%rbp), %rax
movw %cx, 0x4a(%rax)
movq -0x40(%rbp), %rax
movl 0x40(%rax), %ecx
orl $0x10, %ecx
movl %ecx, 0x40(%rax)
jmp 0x40bf81
movq -0x40(%rbp), %rax
movw 0x4c(%rax), %ax
movw %ax, -0x6c(%rbp)
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rcx
addq $0x4a, %rcx
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
leaq -0xc8(%rbp), %r8
callq 0x40c0b0
movw -0x6c(%rbp), %cx
movq -0x40(%rbp), %rax
movw %cx, 0x4c(%rax)
movq -0x40(%rbp), %rax
movl 0x40(%rax), %ecx
orl $0x10, %ecx
movl %ecx, 0x40(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)