// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3Analyze
SQLITE_PRIVATE void sqlite3Analyze(Parse *pParse, Token *pName1, Token *pName2){
  sqlite3 *db = pParse->db;
  int iDb;
  int i;
  char *z, *zDb;
  Table *pTab;
  Index *pIdx;
  Token *pTableName;

  /* Read the database schema. If an error occurs, leave an error message
  ** and code in pParse and return NULL. */
  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
    return;
  }

  assert( pName2!=0 || pName1==0 );
  if( pName1==0 ){
    /* Form 1:  Analyze everything */
    for(i=0; i<db->nDb; i++){
      if( i==1 ) continue;  /* Do not analyze the TEMP database */
      analyzeDatabase(pParse, i);
    }
  }else if( pName2->n==0 ){
    /* Form 2:  Analyze the database or table named */
    iDb = sqlite3FindDb(db, pName1);
    if( iDb>=0 ){
      analyzeDatabase(pParse, iDb);
    }else{
      z = sqlite3NameFromToken(db, pName1);
      if( z ){
        if( (pIdx = sqlite3FindIndex(db, z, 0))!=0 ){
          analyzeTable(pParse, pIdx->pTable, pIdx);
        }else if( (pTab = sqlite3LocateTable(pParse, 0, z, 0))!=0 ){
          analyzeTable(pParse, pTab, 0);
        }
        sqlite3DbFree(db, z);
      }
    }
  }else{
    /* Form 3: Analyze the fully qualified table name */
    iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pTableName);
    if( iDb>=0 ){
      zDb = db->aDb[iDb].zName;
      z = sqlite3NameFromToken(db, pTableName);
      if( z ){
        if( (pIdx = sqlite3FindIndex(db, z, zDb))!=0 ){
          analyzeTable(pParse, pIdx->pTable, pIdx);
        }else if( (pTab = sqlite3LocateTable(pParse, 0, z, zDb))!=0 ){
          analyzeTable(pParse, pTab, 0);
        }
        sqlite3DbFree(db, z);
      }
    }   
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4ab20
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
je 0x5ce25
jmp 0x5cfef
cmpq $0x0, -0x10(%rbp)
jne 0x5ce63
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x5ce5e
cmpl $0x1, -0x28(%rbp)
jne 0x5ce47
jmp 0x5ce53
movq -0x8(%rbp), %rdi
movl -0x28(%rbp), %esi
callq 0x83e00
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x5ce33
jmp 0x5cfef
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x5cf26
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5edc0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x5ce98
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x83e00
jmp 0x5cf21
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5e840
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x5cf1f
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x465f0
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x5cee2
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x48(%rbp), %rdx
callq 0x83ee0
jmp 0x5cf12
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x13620
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x5cf10
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x83ee0
jmp 0x5cf12
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x9cd0
jmp 0x5cf21
jmp 0x5cfed
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0x5e9c0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jl 0x5cfeb
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x24(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x5e840
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x5cfe9
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x465f0
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x5cfac
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x48(%rbp), %rdx
callq 0x83ee0
jmp 0x5cfdc
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rcx
xorl %esi, %esi
callq 0x13620
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x5cfda
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x83ee0
jmp 0x5cfdc
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x9cd0
jmp 0x5cfeb
jmp 0x5cfed
jmp 0x5cfef
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)