// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3RunParser
SQLITE_PRIVATE int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){
  int nErr = 0;                   /* Number of errors encountered */
  int i;                          /* Loop counter */
  void *pEngine;                  /* The LEMON-generated LALR(1) parser */
  int tokenType;                  /* type of the next token */
  int lastTokenParsed = -1;       /* type of the previous token */
  u8 enableLookaside;             /* Saved value of db->lookaside.bEnabled */
  sqlite3 *db = pParse->db;       /* The database connection */
  int mxSqlLen;                   /* Max length of an SQL string */

  assert( zSql!=0 );
  mxSqlLen = db->aLimit[SQLITE_LIMIT_SQL_LENGTH];
  if( db->nVdbeActive==0 ){
    db->u1.isInterrupted = 0;
  }
  pParse->rc = SQLITE_OK;
  pParse->zTail = zSql;
  i = 0;
  assert( pzErrMsg!=0 );
  /* sqlite3ParserTrace(stdout, "parser: "); */
  pEngine = sqlite3ParserAlloc(sqlite3Malloc);
  if( pEngine==0 ){
    db->mallocFailed = 1;
    return SQLITE_NOMEM;
  }
  assert( pParse->pNewTable==0 );
  assert( pParse->pNewTrigger==0 );
  assert( pParse->nVar==0 );
  assert( pParse->nzVar==0 );
  assert( pParse->azVar==0 );
  enableLookaside = db->lookaside.bEnabled;
  if( db->lookaside.pStart ) db->lookaside.bEnabled = 1;
  while( zSql[i]!=0 ){
    assert( i>=0 );
    pParse->sLastToken.z = &zSql[i];
    pParse->sLastToken.n = sqlite3GetToken((unsigned char*)&zSql[i],&tokenType);
    i += pParse->sLastToken.n;
    if( i>mxSqlLen ){
      pParse->rc = SQLITE_TOOBIG;
      break;
    }
    if( tokenType>=TK_SPACE ){
      assert( tokenType==TK_SPACE || tokenType==TK_ILLEGAL );
      if( db->u1.isInterrupted ){
        sqlite3ErrorMsg(pParse, "interrupt");
        pParse->rc = SQLITE_INTERRUPT;
        break;
      }
      if( tokenType==TK_ILLEGAL ){
        sqlite3ErrorMsg(pParse, "unrecognized token: \"%T\"",
                        &pParse->sLastToken);
        break;
      }
    }else{
      if( tokenType==TK_SEMI ) pParse->zTail = &zSql[i];
      sqlite3Parser(pEngine, tokenType, pParse->sLastToken, pParse);
      lastTokenParsed = tokenType;
      if( pParse->rc!=SQLITE_OK || db->mallocFailed ) break;
    }
  }
  assert( nErr==0 );
  if( pParse->rc==SQLITE_OK && db->mallocFailed==0 ){
    assert( zSql[i]==0 );
    if( lastTokenParsed!=TK_SEMI ){
      sqlite3Parser(pEngine, TK_SEMI, pParse->sLastToken, pParse);
      pParse->zTail = &zSql[i];
    }
    if( pParse->rc==SQLITE_OK && db->mallocFailed==0 ){
      sqlite3Parser(pEngine, 0, pParse->sLastToken, pParse);
    }
  }
#ifdef YYTRACKMAXSTACKDEPTH
  sqlite3_mutex_enter(sqlite3MallocMutex());
  sqlite3StatusHighwater(SQLITE_STATUS_PARSER_STACK,
      sqlite3ParserStackPeak(pEngine)
  );
  sqlite3_mutex_leave(sqlite3MallocMutex());
#endif /* YYDEBUG */
  sqlite3ParserFree(pEngine, sqlite3_free);
  db->lookaside.bEnabled = enableLookaside;
  if( db->mallocFailed ){
    pParse->rc = SQLITE_NOMEM;
  }
  if( pParse->rc!=SQLITE_OK && pParse->rc!=SQLITE_DONE && pParse->zErrMsg==0 ){
    pParse->zErrMsg = sqlite3MPrintf(db, "%s", sqlite3ErrStr(pParse->rc));
  }
  assert( pzErrMsg!=0 );
  if( pParse->zErrMsg ){
    *pzErrMsg = pParse->zErrMsg;
    sqlite3_log(pParse->rc, "%s", *pzErrMsg);
    pParse->zErrMsg = 0;
    nErr++;
  }
  if( pParse->pVdbe && pParse->nErr>0 && pParse->nested==0 ){
    sqlite3VdbeDelete(pParse->pVdbe);
    pParse->pVdbe = 0;
  }
#ifndef SQLITE_OMIT_SHARED_CACHE
  if( pParse->nested==0 ){
    sqlite3DbFree(db, pParse->aTableLock);
    pParse->aTableLock = 0;
    pParse->nTableLock = 0;
  }
#endif
#ifndef SQLITE_OMIT_VIRTUALTABLE
  sqlite3_free(pParse->apVtabLock);
#endif

  if( !IN_DECLARE_VTAB ){
    /* If the pParse->declareVtab flag is set, do not delete any table 
    ** structure built up in pParse->pNewTable. The calling code (see vtab.c)
    ** will take responsibility for freeing the Table structure.
    */
    sqlite3DeleteTable(db, pParse->pNewTable);
  }

  sqlite3WithDelete(db, pParse->pWithToFree);
  sqlite3DeleteTrigger(db, pParse->pNewTrigger);
  for(i=pParse->nzVar-1; i>=0; i--) sqlite3DbFree(db, pParse->azVar[i]);
  sqlite3DbFree(db, pParse->azVar);
  while( pParse->pAinc ){
    AutoincInfo *p = pParse->pAinc;
    pParse->pAinc = p->pNext;
    sqlite3DbFree(db, p);
  }
  while( pParse->pZombieTab ){
    Table *p = pParse->pZombieTab;
    pParse->pZombieTab = p->pNextZombie;
    sqlite3DeleteTable(db, p);
  }
  assert( nErr==0 || pParse->rc!=SQLITE_OK );
  return nErr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r15
movq %rdi, %r14
movq (%rdi), %rbx
movl 0x6c(%rbx), %eax
movl %eax, -0x40(%rbp)
cmpl $0x0, 0xa4(%rbx)
jne 0x15906
movl $0x0, 0x148(%rbx)
andl $0x0, 0x18(%r14)
movq %rsi, -0x38(%rbp)
movq %rsi, 0x218(%r14)
movl $0xc90, %edi            # imm = 0xC90
callq 0xc13f
testq %rax, %rax
je 0x15a13
movq %rax, %r12
movq %r15, -0x58(%rbp)
orl $-0x1, (%rax)
movb 0x152(%rbx), %al
movb %al, -0x29(%rbp)
cmpq $0x0, 0x170(%rbx)
je 0x1594d
movb $0x1, 0x152(%rbx)
leaq 0x248(%r14), %rax
movq %rax, -0x50(%rbp)
xorl %r13d, %r13d
pushq $-0x1
popq %rax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movslq %r13d, %r15
cmpb $0x0, (%rax,%r15)
je 0x15a64
leaq (%rax,%r15), %rdi
movq %rdi, 0x248(%r14)
leaq -0x44(%rbp), %rsi
callq 0x37fd1
movl %eax, 0x250(%r14)
movl %r15d, %r13d
addl %eax, %r13d
cmpl -0x40(%rbp), %r13d
jg 0x15a20
movl -0x44(%rbp), %r15d
cmpl $0x9f, %r15d
jl 0x159c6
cmpl $0x0, 0x148(%rbx)
jne 0x15a2d
cmpl $0xa0, %r15d
movq -0x38(%rbp), %rax
jne 0x15965
jmp 0x15a4b
cmpl $0x1, %r15d
jne 0x159da
movslq %r13d, %rcx
addq -0x38(%rbp), %rcx
movq %rcx, 0x218(%r14)
movq 0x248(%r14), %rdx
movq %r12, %rdi
movl %r15d, %esi
movl %eax, %ecx
movq %r14, %r8
callq 0x391f4
cmpl $0x0, 0x18(%r14)
movq -0x38(%rbp), %rax
jne 0x15acd
cmpb $0x0, 0x51(%rbx)
movl %r15d, -0x3c(%rbp)
je 0x15965
jmp 0x15acd
movb $0x1, 0x51(%rbx)
pushq $0x7
popq %r15
jmp 0x15c58
movl $0x12, 0x18(%r14)
jmp 0x15acd
leaq 0x57e5a(%rip), %rsi     # 0x6d88e
movq %r14, %rdi
xorl %eax, %eax
callq 0x1357a
movl $0x9, 0x18(%r14)
jmp 0x15acd
leaq 0x57e46(%rip), %rsi     # 0x6d898
movq %r14, %rdi
movq -0x50(%rbp), %rdx
xorl %eax, %eax
callq 0x1357a
movq -0x38(%rbp), %rax
cmpl $0x0, 0x18(%r14)
jne 0x15acd
cmpb $0x0, 0x51(%rbx)
jne 0x15acd
cmpl $0x1, -0x3c(%rbp)
jne 0x15a94
movq 0x248(%r14), %rdx
movl 0x250(%r14), %ecx
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %r8
callq 0x391f4
jmp 0x15acd
movq 0x248(%r14), %rdx
movl 0x250(%r14), %ecx
pushq $0x1
popq %rsi
movq %r12, %rdi
movq %r14, %r8
movq %rax, %r15
callq 0x391f4
movslq %r13d, %rax
addq %rax, %r15
movq %r15, 0x218(%r14)
cmpl $0x0, 0x18(%r14)
jne 0x15acd
cmpb $0x0, 0x51(%rbx)
je 0x15a77
movq -0x58(%rbp), %r15
cmpl $0x0, (%r12)
js 0x15ae2
movq %r12, %rdi
callq 0x3d37c
jmp 0x15ad1
movq %r12, %rdi
callq 0xa828
movb -0x29(%rbp), %al
movb %al, 0x152(%rbx)
cmpb $0x0, 0x51(%rbx)
je 0x15b2a
movl $0x7, 0x18(%r14)
pushq $0x7
popq %rdi
cmpq $0x0, 0x8(%r14)
jne 0x15b37
callq 0x113bc
leaq 0x5686c(%rip), %rsi     # 0x6c383
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x13638
movq %rax, 0x8(%r14)
jmp 0x15b37
movl 0x18(%r14), %edi
testl %edi, %edi
je 0x15b37
cmpl $0x65, %edi
jne 0x15b04
movq 0x8(%r14), %rdx
testq %rdx, %rdx
je 0x15b60
movq %rdx, (%r15)
movl 0x18(%r14), %edi
leaq 0x56835(%rip), %rsi     # 0x6c383
xorl %eax, %eax
callq 0xa630
andq $0x0, 0x8(%r14)
pushq $0x1
popq %r15
jmp 0x15b63
xorl %r15d, %r15d
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x15b84
cmpl $0x0, 0x4c(%r14)
jle 0x15b84
cmpb $0x0, 0x1e(%r14)
jne 0x15b84
callq 0x24dc6
andq $0x0, 0x10(%r14)
cmpb $0x0, 0x1e(%r14)
jne 0x15baa
movq 0x1b0(%r14), %rsi
movq %rbx, %rdi
callq 0xb856
andq $0x0, 0x1b0(%r14)
andl $0x0, 0x1ac(%r14)
movq 0x268(%r14), %rdi
callq 0xa828
cmpb $0x0, 0x1ee(%r14)
jne 0x15bcf
movq 0x220(%r14), %rsi
movq %rbx, %rdi
callq 0xb647
movq 0x288(%r14), %rsi
movq %rbx, %rdi
callq 0x36a5e
movq 0x228(%r14), %rsi
movq %rbx, %rdi
callq 0xb5ed
movl 0x1e8(%r14), %r12d
testl %r12d, %r12d
jle 0x15c12
movq 0x208(%r14), %rax
movq -0x8(%rax,%r12,8), %rsi
decq %r12
movq %rbx, %rdi
callq 0xb856
jmp 0x15bf4
movq 0x208(%r14), %rsi
movq %rbx, %rdi
callq 0xb856
movq 0x1b8(%r14), %rsi
testq %rsi, %rsi
je 0x15c4c
movq (%rsi), %rax
movq %rax, 0x1b8(%r14)
jmp 0x15c19
movq 0x70(%rsi), %rax
movq %rax, 0x270(%r14)
movq %rbx, %rdi
callq 0xb647
movq 0x270(%r14), %rsi
testq %rsi, %rsi
jne 0x15c39
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq