// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3_declare_vtab
SQLITE_STDCALL sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
  VtabCtx *pCtx;
  Parse *pParse;
  int rc = SQLITE_OK;
  Table *pTab;
  char *zErr = 0;

#ifdef SQLITE_ENABLE_API_ARMOR
  if( !sqlite3SafetyCheckOk(db) || zCreateTable==0 ){
    return SQLITE_MISUSE_BKPT;
  }
#endif
  sqlite3_mutex_enter(db->mutex);
  pCtx = db->pVtabCtx;
  if( !pCtx || pCtx->bDeclared ){
    sqlite3Error(db, SQLITE_MISUSE);
    sqlite3_mutex_leave(db->mutex);
    return SQLITE_MISUSE_BKPT;
  }
  pTab = pCtx->pTab;
  assert( (pTab->tabFlags & TF_Virtual)!=0 );

  pParse = sqlite3StackAllocZero(db, sizeof(*pParse));
  if( pParse==0 ){
    rc = SQLITE_NOMEM;
  }else{
    pParse->declareVtab = 1;
    pParse->db = db;
    pParse->nQueryLoop = 1;
  
    if( SQLITE_OK==sqlite3RunParser(pParse, zCreateTable, &zErr) 
     && pParse->pNewTable
     && !db->mallocFailed
     && !pParse->pNewTable->pSelect
     && (pParse->pNewTable->tabFlags & TF_Virtual)==0
    ){
      if( !pTab->aCol ){
        pTab->aCol = pParse->pNewTable->aCol;
        pTab->nCol = pParse->pNewTable->nCol;
        pParse->pNewTable->nCol = 0;
        pParse->pNewTable->aCol = 0;
      }
      pCtx->bDeclared = 1;
    }else{
      sqlite3ErrorWithMsg(db, SQLITE_ERROR, (zErr ? "%s" : 0), zErr);
      sqlite3DbFree(db, zErr);
      rc = SQLITE_ERROR;
    }
    pParse->declareVtab = 0;
  
    if( pParse->pVdbe ){
      sqlite3VdbeFinalize(pParse->pVdbe);
    }
    sqlite3DeleteTable(db, pParse->pNewTable);
    sqlite3ParserReset(pParse);
    sqlite3StackFree(db, pParse);
  }

  assert( (rc&0xff)==rc );
  rc = sqlite3ApiExit(db, rc);
  sqlite3_mutex_leave(db->mutex);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
andq $0x0, -0x30(%rbp)
movq %rsi, %r15
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x15745
callq *0x6dd63(%rip)          # 0x834a8
movq 0x1c0(%rbx), %r12
testq %r12, %r12
je 0x15759
cmpl $0x0, 0x18(%r12)
je 0x15793
pushq $0x15
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0xe9aa
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x15777
callq *0x6dd41(%rip)          # 0x834b8
movl $0x1cf0d, %edi          # imm = 0x1CF0D
callq 0xb14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r12), %r13
movl $0x290, %esi            # imm = 0x290
movq %rbx, %rdi
callq 0x12153
testq %rax, %rax
je 0x15847
movq %rax, %r14
movb $0x1, 0x1ee(%rax)
movq %rbx, (%rax)
movl $0x1, 0x1d4(%rax)
leaq -0x30(%rbp), %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x158d3
testl %eax, %eax
je 0x15871
movq -0x30(%rbp), %r12
testq %r12, %r12
leaq 0x56b99(%rip), %rdx     # 0x6c383
cmoveq %r12, %rdx
pushq $0x1
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
movq %r12, %rcx
xorl %eax, %eax
callq 0xe89d
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb856
movb $0x0, 0x1ee(%r14)
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x15823
callq 0x10895
movq 0x220(%r14), %rsi
movq %rbx, %rdi
callq 0xb647
movq %r14, %rdi
callq 0x13e42
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb856
jmp 0x1584b
pushq $0x7
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x108ce
movl %eax, %r14d
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x15781
callq *0x6dc4c(%rip)          # 0x834b8
jmp 0x15781
movq 0x220(%r14), %rax
testq %rax, %rax
je 0x157dc
cmpb $0x0, 0x51(%rbx)
jne 0x157dc
cmpq $0x0, 0x18(%rax)
jne 0x157dc
testb $0x10, 0x46(%rax)
jne 0x157dc
cmpq $0x0, 0x8(%r13)
jne 0x158c2
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%r13)
movzwl 0x3e(%rax), %ecx
movw %cx, 0x3e(%r13)
andw $0x0, 0x3e(%rax)
andq $0x0, 0x8(%rax)
movl $0x1, 0x18(%r12)
xorl %r15d, %r15d
jmp 0x1580d