// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/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;
  Vdbe *v;

  /* 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 && (iDb = sqlite3FindDb(db, pName1))>=0 ){
    /* Analyze the schema named as the argument */
    analyzeDatabase(pParse, iDb);
  }else{
    /* Form 3: Analyze the table or index named as an argument */
    iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pTableName);
    if( iDb>=0 ){
      zDb = pName2->n ? db->aDb[iDb].zDbSName : 0;
      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);
      }
    }
  }
  if( db->nSqlExec==0 && (v = sqlite3GetVdbe(pParse))!=0 ){
    sqlite3VdbeAddOp0(v, OP_Expire);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdi), %r14
callq 0x2a8804
testl %eax, %eax
jne 0x2bb2a2
testq %r12, %r12
je 0x2bb1f3
cmpl $0x0, 0x8(%r15)
je 0x2bb21c
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x2c3833
testl %eax, %eax
js 0x2bb29b
cmpl $0x0, 0x8(%r15)
je 0x2bb237
movq 0x20(%r14), %rcx
movl %eax, %eax
shlq $0x5, %rax
movq (%rcx,%rax), %r12
jmp 0x2bb23a
movl 0x28(%r14), %eax
testl %eax, %eax
jle 0x2bb29b
xorl %ebp, %ebp
cmpl $0x1, %ebp
je 0x2bb214
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2e8e9e
movl 0x28(%r14), %eax
incl %ebp
cmpl %eax, %ebp
jl 0x2bb201
jmp 0x2bb29b
movq %r14, %rdi
movq %r12, %rsi
callq 0x2c3afd
testl %eax, %eax
js 0x2bb1c1
movq %rbx, %rdi
movl %eax, %esi
callq 0x2e8e9e
jmp 0x2bb29b
xorl %r12d, %r12d
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x2b1f02
testq %rax, %rax
je 0x2bb29b
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x2a5b2b
testq %rax, %rax
je 0x2bb26e
movq 0x18(%rax), %rsi
movq %rbx, %rdi
movq %rax, %rdx
jmp 0x2bb28b
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r12, %rcx
callq 0x27b1c7
testq %rax, %rax
je 0x2bb290
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x2e8f53
movq %r14, %rdi
movq %r15, %rsi
callq 0x282904
cmpb $0x0, 0x6a(%r14)
je 0x2bb2af
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2bc630
testq %rax, %rax
je 0x2bb2a2
movq %rax, %rdi
movl $0x9e, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2a83e1