// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: analysisLoader
static int analysisLoader(void *pData, int argc, char **argv, char **NotUsed){
  analysisInfo *pInfo = (analysisInfo*)pData;
  Index *pIndex;
  Table *pTable;
  int i, c, n;
  tRowcnt v;
  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] ){
    pIndex = sqlite3FindIndex(pInfo->db, argv[1], pInfo->zDatabase);
  }else{
    pIndex = 0;
  }
  n = pIndex ? pIndex->nColumn : 0;
  z = argv[2];
  for(i=0; *z && i<=n; i++){
    v = 0;
    while( (c=z[0])>='0' && c<='9' ){
      v = v*10 + c - '0';
      z++;
    }
    if( i==0 && (pIndex==0 || pIndex->pPartIdxWhere==0) ){
      if( v>0 ) pTable->nRowEst = v;
      if( pIndex==0 ) break;
    }
    pIndex->aiRowEst[i] = v;
    if( *z==' ' ) z++;
    if( strcmp(z, "unordered")==0 ){
      pIndex->bUnordered = 1;
      break;
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %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 0x46c3b
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x46c3b
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x46c47
movl $0x0, -0x4(%rbp)
jmp 0x46def
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x46b20
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x46c79
movl $0x0, -0x4(%rbp)
jmp 0x46def
movq -0x20(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x46ca6
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x465f0
movq %rax, -0x38(%rbp)
jmp 0x46cae
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x46cc2
movq -0x38(%rbp), %rax
movzwl 0x54(%rax), %eax
movl %eax, -0x5c(%rbp)
jmp 0x46cc9
xorl %eax, %eax
movl %eax, -0x5c(%rbp)
jmp 0x46cc9
movl -0x5c(%rbp), %eax
movl %eax, -0x4c(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x58(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x58(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x5d(%rbp)
je 0x46cff
movl -0x44(%rbp), %eax
cmpl -0x4c(%rbp), %eax
setle %al
movb %al, -0x5d(%rbp)
movb -0x5d(%rbp), %al
testb $0x1, %al
jne 0x46d0b
jmp 0x46de8
movl $0x0, -0x50(%rbp)
movq -0x58(%rbp), %rax
movsbl (%rax), %ecx
movl %ecx, -0x48(%rbp)
xorl %eax, %eax
cmpl $0x30, %ecx
movb %al, -0x5e(%rbp)
jl 0x46d30
cmpl $0x39, -0x48(%rbp)
setle %al
movb %al, -0x5e(%rbp)
movb -0x5e(%rbp), %al
testb $0x1, %al
jne 0x46d39
jmp 0x46d54
imull $0xa, -0x50(%rbp), %eax
addl -0x48(%rbp), %eax
subl $0x30, %eax
movl %eax, -0x50(%rbp)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x46d12
cmpl $0x0, -0x44(%rbp)
jne 0x46d87
cmpq $0x0, -0x38(%rbp)
je 0x46d6c
movq -0x38(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x46d87
cmpl $0x0, -0x50(%rbp)
jbe 0x46d7c
movl -0x50(%rbp), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x38(%rax)
cmpq $0x0, -0x38(%rbp)
jne 0x46d85
jmp 0x46de8
jmp 0x46d87
movl -0x50(%rbp), %edx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x44(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x20, %eax
jne 0x46db1
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
leaq 0x67dbd(%rip), %rsi     # 0xaeb79
callq 0x85d0
cmpl $0x0, %eax
jne 0x46dd8
movq -0x38(%rbp), %rax
movb 0x57(%rax), %cl
andb $-0x5, %cl
orb $0x4, %cl
movb %cl, 0x57(%rax)
jmp 0x46de8
jmp 0x46dda
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x46ce2
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)