// File: /workspace/github_c_makefile_star2_O1/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 0x16ec9
callq *0x7c4df(%rip)          # 0x933a8
movq 0x1c0(%rbx), %r12
testq %r12, %r12
je 0x16edd
cmpl $0x0, 0x18(%r12)
je 0x16f0d
movl $0x15, 0x44(%rbx)
movq 0x140(%rbx), %rdi
testq %rdi, %rdi
je 0x16ff5
movzwl 0x8(%rdi), %eax
testl $0x2460, %eax           # imm = 0x2460
je 0x16fef
callq 0x2a646
jmp 0x16ff5
movq 0x8(%r12), %r13
movl $0x290, %esi            # imm = 0x290
movq %rbx, %rdi
callq 0x144ee
testq %rax, %rax
je 0x1703b
movq %rax, %r14
movl $0x290, %edx            # imm = 0x290
movq %rax, %rdi
xorl %esi, %esi
callq 0xa210
movb $0x1, 0x1ee(%r14)
movq %rbx, (%r14)
movl $0x1, 0x1d4(%r14)
leaq -0x30(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x170d2
testl %eax, %eax
je 0x1706c
movq -0x30(%rbp), %r12
testq %r12, %r12
leaq 0x6640e(%rip), %rdx     # 0x7d383
cmoveq %r12, %rdx
movl $0x1, %r15d
movq %rbx, %rdi
movl $0x1, %esi
movq %r12, %rcx
xorl %eax, %eax
callq 0xef6c
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb6df
movb $0x0, 0x1ee(%r14)
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x16fb2
callq 0x113bc
movq 0x220(%r14), %rsi
movq %rbx, %rdi
callq 0xb4be
movq (%r14), %r12
movq 0x80(%r14), %rsi
movq %r12, %rdi
callq 0xb6df
movq 0x150(%r14), %rsi
movq %r12, %rdi
callq 0x3d971
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb6df
jmp 0x17041
movw $0x1, 0x8(%rdi)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x17004
callq *0x7c3b4(%rip)          # 0x933b8
leaq 0x6a487(%rip), %rsi     # 0x81492
leaq 0x6616b(%rip), %rcx     # 0x7d17d
movl $0x15, %r15d
movl $0x15, %edi
movl $0x1cf0d, %edx          # imm = 0x1CF0D
xorl %eax, %eax
callq 0xa4b0
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 0x17057
movq %rbx, %rdi
callq 0x28aa8
movl $0x7, %r15d
jmp 0x1705b
andl 0x48(%rbx), %r15d
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x17029
callq *0x7c34e(%rip)          # 0x933b8
jmp 0x17029
movq 0x220(%r14), %rax
testq %rax, %rax
je 0x16f67
cmpb $0x0, 0x51(%rbx)
jne 0x16f67
cmpq $0x0, 0x18(%rax)
jne 0x16f67
testb $0x10, 0x46(%rax)
jne 0x16f67
cmpq $0x0, 0x8(%r13)
jne 0x170c1
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 0x16f9c