// File: /workspace/github_c_makefile_star2_O1/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 %rsi, %r13
movq %rdi, %r14
movq (%rdi), %rbx
movl 0x6c(%rbx), %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, 0xa4(%rbx)
jne 0x17108
movl $0x0, 0x148(%rbx)
movl $0x0, 0x18(%r14)
movq %r13, 0x218(%r14)
movl $0xc90, %edi            # imm = 0xC90
callq 0xbf9b
testq %rax, %rax
je 0x17228
movq %rax, %r12
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movb 0x152(%rbx), %al
movb %al, -0x29(%rbp)
cmpq $0x0, 0x170(%rbx)
je 0x1714d
movb $0x1, 0x152(%rbx)
movq %r15, -0x58(%rbp)
movq %rbx, -0x38(%rbp)
cmpb $0x0, (%r13)
movq %r13, -0x40(%rbp)
je 0x17237
movq %r13, %rdi
leaq 0x248(%r14), %rax
movq %rax, -0x50(%rbp)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
xorl %r13d, %r13d
movq %rdi, 0x248(%r14)
leaq -0x48(%rbp), %rsi
callq 0x3f446
movl %eax, 0x250(%r14)
addl %eax, %r13d
cmpl -0x44(%rbp), %r13d
jg 0x17242
movl %ebx, -0x30(%rbp)
movl -0x48(%rbp), %r15d
movslq %r13d, %rbx
cmpl $0x9f, %r15d
jl 0x171d5
movq -0x38(%rbp), %rax
cmpl $0x0, 0x148(%rax)
jne 0x1724f
cmpl $0xa0, %r15d
je 0x1726a
movl -0x30(%rbp), %r15d
jmp 0x17211
cmpl $0x1, %r15d
jne 0x171e9
movq -0x40(%rbp), %rcx
addq %rbx, %rcx
movq %rcx, 0x218(%r14)
movq 0x248(%r14), %rdx
movq %r12, %rdi
movl %r15d, %esi
movl %eax, %ecx
movq %r14, %r8
callq 0x40857
cmpl $0x0, 0x18(%r14)
jne 0x17283
movq -0x38(%rbp), %rax
cmpb $0x0, 0x51(%rax)
jne 0x17283
movq -0x40(%rbp), %rax
leaq (%rax,%rbx), %rdi
cmpb $0x0, (%rax,%rbx)
movl %r15d, %ebx
jne 0x1717a
jmp 0x17283
movb $0x1, 0x51(%rbx)
movl $0x7, %r15d
jmp 0x174f0
xorl %r13d, %r13d
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x17283
movl $0x12, 0x18(%r14)
movl %ebx, %r15d
jmp 0x17283
leaq 0x67638(%rip), %rsi     # 0x7e88e
movq %r14, %rdi
xorl %eax, %eax
callq 0x14804
movl $0x9, 0x18(%r14)
jmp 0x1727f
leaq 0x67627(%rip), %rsi     # 0x7e898
movq %r14, %rdi
movq -0x50(%rbp), %rdx
xorl %eax, %eax
callq 0x14804
movl -0x30(%rbp), %r15d
cmpl $0x0, 0x18(%r14)
jne 0x172f5
movq -0x38(%rbp), %rax
cmpb $0x0, 0x51(%rax)
jne 0x172f5
cmpl $0x1, %r15d
je 0x172c9
movq 0x248(%r14), %rdx
movl 0x250(%r14), %ecx
movq %r12, %rdi
movl $0x1, %esi
movq %r14, %r8
callq 0x40857
movslq %r13d, %rax
movq -0x40(%rbp), %rcx
addq %rax, %rcx
movq %rcx, 0x218(%r14)
cmpl $0x0, 0x18(%r14)
jne 0x172f5
movq -0x38(%rbp), %rax
cmpb $0x0, 0x51(%rax)
jne 0x172f5
movq 0x248(%r14), %rdx
movl 0x250(%r14), %ecx
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %r8
callq 0x40857
movl (%r12), %eax
testl %eax, %eax
js 0x1732d
movq %r12, %rbx
addq $0x10, %rbx
leal -0x1(%rax), %ecx
movl %ecx, (%r12)
movl %eax, %eax
shlq $0x5, %rax
leaq (%rbx,%rax), %rdx
addq $0x8, %rdx
movzbl -0x6(%rdx), %esi
movq %r12, %rdi
callq 0x4279b
movl (%r12), %eax
testl %eax, %eax
jns 0x17304
movq %r12, %rdi
callq 0xa620
movq -0x38(%rbp), %r12
movb -0x29(%rbp), %al
movb %al, 0x152(%r12)
cmpb $0x0, 0x51(%r12)
movq -0x58(%rbp), %rbx
je 0x17358
movl $0x7, 0x18(%r14)
movl 0x18(%r14), %eax
testq %rax, %rax
je 0x173ba
cmpl $0x65, %eax
je 0x173ba
cmpq $0x0, 0x8(%r14)
jne 0x173ba
cmpl $0x204, %eax            # imm = 0x204
jne 0x1737d
leaq 0x6a00b(%rip), %rdx     # 0x81386
jmp 0x173a5
movzbl %al, %eax
cmpl $0x1b, %eax
setae %cl
cmpq $0x2, %rax
sete %dl
orb %cl, %dl
je 0x1739a
leaq 0x69fe0(%rip), %rdx     # 0x81378
jmp 0x173a5
leaq 0x7b94f(%rip), %rcx     # 0x92cf0
movq (%rcx,%rax,8), %rdx
leaq 0x65fd7(%rip), %rsi     # 0x7d383
movq %r12, %rdi
xorl %eax, %eax
callq 0x148c2
movq %rax, 0x8(%r14)
movq 0x8(%r14), %rdx
testq %rdx, %rdx
je 0x173e8
movq %rdx, (%rbx)
movl 0x18(%r14), %edi
leaq 0x65fb2(%rip), %rsi     # 0x7d383
xorl %eax, %eax
callq 0xa4b0
movq $0x0, 0x8(%r14)
movl $0x1, %r15d
jmp 0x173eb
xorl %r15d, %r15d
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x1740f
cmpl $0x0, 0x4c(%r14)
jle 0x1740f
cmpb $0x0, 0x1e(%r14)
jne 0x1740f
callq 0x28a46
movq $0x0, 0x10(%r14)
cmpb $0x0, 0x1e(%r14)
jne 0x1743b
movq 0x1b0(%r14), %rsi
movq %r12, %rdi
callq 0xb6df
movq $0x0, 0x1b0(%r14)
movl $0x0, 0x1ac(%r14)
movq 0x268(%r14), %rdi
callq 0xa620
cmpb $0x0, 0x1ee(%r14)
jne 0x17460
movq 0x220(%r14), %rsi
movq %r12, %rdi
callq 0xb4be
movq 0x288(%r14), %rsi
movq %r12, %rdi
callq 0x3db65
movq 0x228(%r14), %rsi
movq %r12, %rdi
callq 0xb464
movslq 0x1e8(%r14), %rbx
testq %rbx, %rbx
jle 0x174aa
incq %rbx
movq 0x208(%r14), %rax
movq -0x10(%rax,%rbx,8), %rsi
movq %r12, %rdi
callq 0xb6df
decq %rbx
cmpq $0x1, %rbx
jg 0x1748d
movq 0x208(%r14), %rsi
movq %r12, %rdi
callq 0xb6df
movq 0x1b8(%r14), %rsi
testq %rsi, %rsi
je 0x174e4
movq (%rsi), %rax
movq %rax, 0x1b8(%r14)
jmp 0x174b1
movq 0x70(%rsi), %rax
movq %rax, 0x270(%r14)
movq %r12, %rdi
callq 0xb4be
movq 0x270(%r14), %rsi
testq %rsi, %rsi
jne 0x174d1
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq