// File: /workspace/github_c_makefile_star2_O3/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
movq %rsi, %r15
movq %rdi, %rbx
movq $0x0, -0x30(%rbp)
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x16f11
callq *0x7a4a7(%rip)          # 0x913b8
movq 0x1c0(%rbx), %r12
testq %r12, %r12
je 0x16f25
cmpl $0x0, 0x18(%r12)
je 0x16f55
movl $0x15, 0x44(%rbx)
movq 0x140(%rbx), %rdi
testq %rdi, %rdi
je 0x17041
movzwl 0x8(%rdi), %eax
testl $0x2460, %eax           # imm = 0x2460
je 0x1703b
callq 0x2a210
jmp 0x17041
movq 0x8(%r12), %r13
movl $0x290, %esi            # imm = 0x290
movq %rbx, %rdi
callq 0x145aa
testq %rax, %rax
je 0x17087
movq %rax, %r14
movq %rax, %rdi
addq $0x8, %rdi
movl $0x288, %edx            # imm = 0x288
xorl %esi, %esi
callq 0xa220
movb $0x1, 0x1ee(%r14)
movq %rbx, (%r14)
movl $0x1, 0x1d4(%r14)
leaq -0x30(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x1711e
testl %eax, %eax
je 0x170b8
movq -0x30(%rbp), %r12
testq %r12, %r12
leaq 0x643d2(%rip), %rdx     # 0x7b393
cmoveq %r12, %rdx
movl $0x1, %r15d
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rcx
xorl %eax, %eax
callq 0xf060
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb752
movb $0x0, 0x1ee(%r14)
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x16ffe
callq 0x11437
movq 0x220(%r14), %rsi
movq %rbx, %rdi
callq 0xb52a
movq (%r14), %r12
movq 0x80(%r14), %rsi
movq %r12, %rdi
callq 0xb752
movq 0x150(%r14), %rsi
movq %r12, %rdi
callq 0x3c97e
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb752
jmp 0x1708d
movw $0x1, 0x8(%rdi)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x17050
callq *0x7a378(%rip)          # 0x913c8
leaq 0x6844b(%rip), %rsi     # 0x7f4a2
leaq 0x6412f(%rip), %rcx     # 0x7b18d
movl $0x15, %r15d
movl $0x15, %edi
movl $0x1cf0d, %edx          # imm = 0x1CF0D
xorl %eax, %eax
callq 0xa4c0
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x7, %r15d
cmpb $0x0, 0x51(%rbx)
je 0x170a3
movq %rbx, %rdi
callq 0x28667
movl $0x7, %r15d
jmp 0x170a7
andl 0x48(%rbx), %r15d
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x17075
callq *0x7a312(%rip)          # 0x913c8
jmp 0x17075
movq 0x220(%r14), %rax
testq %rax, %rax
je 0x16fb3
cmpb $0x0, 0x51(%rbx)
jne 0x16fb3
cmpq $0x0, 0x18(%rax)
jne 0x16fb3
testb $0x10, 0x46(%rax)
jne 0x16fb3
cmpq $0x0, 0x8(%r13)
jne 0x1710d
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%r13)
movzwl 0x3e(%rax), %ecx
movw %cx, 0x3e(%r13)
movw $0x0, 0x3e(%rax)
movq $0x0, 0x8(%rax)
movl $0x1, 0x18(%r12)
xorl %r15d, %r15d
jmp 0x16fe8