// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3VtabBeginParse
SQLITE_PRIVATE void sqlite3VtabBeginParse(
  Parse *pParse,        /* Parsing context */
  Token *pName1,        /* Name of new table, or database name */
  Token *pName2,        /* Name of new table or NULL */
  Token *pModuleName,   /* Name of the module for the virtual table */
  int ifNotExists       /* No error if the table already exists */
){
  int iDb;              /* The database the table is being created in */
  Table *pTable;        /* The new virtual table */
  sqlite3 *db;          /* Database connection */

  sqlite3StartTable(pParse, pName1, pName2, 0, 0, 1, ifNotExists);
  pTable = pParse->pNewTable;
  if( pTable==0 ) return;
  assert( 0==pTable->pIndex );

  db = pParse->db;
  iDb = sqlite3SchemaToIndex(db, pTable->pSchema);
  assert( iDb>=0 );

  pTable->tabFlags |= TF_Virtual;
  pTable->nModuleArg = 0;
  addModuleArgument(db, pTable, sqlite3NameFromToken(db, pModuleName));
  addModuleArgument(db, pTable, 0);
  addModuleArgument(db, pTable, sqlite3DbStrDup(db, pTable->zName));
  pParse->sNameToken.n = (int)(&pModuleName->z[pModuleName->n] - pName1->z);

#ifndef SQLITE_OMIT_AUTHORIZATION
  /* Creating a virtual table invokes the authorization callback twice.
  ** The first invocation, to obtain permission to INSERT a row into the
  ** sqlite_master table, has already been made by sqlite3StartTable().
  ** The second call, to obtain permission to create the table, is made now.
  */
  if( pTable->azModuleArg ){
    sqlite3AuthCheck(pParse, SQLITE_CREATE_VTABLE, pTable->zName, 
            pTable->azModuleArg[0], pParse->db->aDb[iDb].zName);
  }
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x24(%rbp), %eax
xorl %r8d, %r8d
movl $0x1, %r9d
movl %r8d, %ecx
movl %eax, (%rsp)
callq 0x4fb10
movq -0x8(%rbp), %rax
movq 0x238(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x5ddaa
jmp 0x5debb
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x13940
movl %eax, -0x28(%rbp)
movq -0x30(%rbp), %rax
movzbl 0x46(%rax), %ecx
orl $0x10, %ecx
movb %cl, 0x46(%rax)
movq -0x30(%rbp), %rax
movl $0x0, 0x4c(%rax)
movq -0x38(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x5e840
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %rax, %rdx
callq 0x84e50
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x84e50
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
callq 0x11720
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %rax, %rdx
callq 0x84e50
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movl 0x8(%rcx), %ecx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x258(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x5debb
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
movq -0x30(%rbp), %rax
movq 0x50(%rax), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movslq -0x28(%rbp), %rsi
shlq $0x5, %rsi
addq %rsi, %rax
movq (%rax), %r8
movl $0x1d, %esi
callq 0x5e720
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)