// File: /workspace/github_c_makefile_star2_O3/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, -0x44(%rbp)
cmpl $0x0, 0xa4(%rbx)
jne 0x17151
movl $0x0, 0x148(%rbx)
movl $0x0, 0x18(%r14)
movq %rsi, -0x38(%rbp)
movq %rsi, 0x218(%r14)
movl $0xc90, %edi            # imm = 0xC90
callq 0xc0e2
testq %rax, %rax
je 0x1727b
movq %rax, %r12
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movb 0x152(%rbx), %al
movb %al, -0x29(%rbp)
cmpq $0x0, 0x170(%rbx)
je 0x1719a
movb $0x1, 0x152(%rbx)
movq %r15, -0x58(%rbp)
movq %rbx, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1728a
leaq 0x248(%r14), %rcx
movq %rcx, -0x50(%rbp)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %ebx, %ebx
movq %rax, %r13
movl %ecx, %r15d
movq %r13, 0x248(%r14)
movq %r13, %rdi
leaq -0x48(%rbp), %rsi
callq 0x3e414
movl %eax, 0x250(%r14)
addl %eax, %ebx
cmpl -0x44(%rbp), %ebx
jg 0x172d2
movl -0x48(%rbp), %edx
movslq %ebx, %rsi
cmpl $0x9f, %edx
jl 0x1721e
movq -0x40(%rbp), %r13
cmpl $0x0, 0x148(%r13)
jne 0x172e0
cmpl $0xa0, %edx
je 0x172fb
movq -0x38(%rbp), %rax
jmp 0x17268
cmpl $0x1, %edx
jne 0x17231
movq -0x38(%rbp), %rcx
addq %rsi, %rcx
movq %rcx, 0x218(%r14)
movq %rsi, -0x60(%rbp)
movq %r12, %rdi
movl %edx, %r15d
movl %edx, %esi
movq %r13, %rdx
movl %eax, %ecx
movq %r14, %r8
callq 0x3f823
cmpl $0x0, 0x18(%r14)
movq -0x40(%rbp), %r13
movq -0x38(%rbp), %rax
jne 0x17359
cmpb $0x0, 0x51(%r13)
movq -0x60(%rbp), %rsi
jne 0x172a1
leaq (%rax,%rsi), %r13
cmpb $0x0, (%rax,%rsi)
movl %r15d, %ecx
jne 0x171c4
jmp 0x17292
movb $0x1, 0x51(%rbx)
movl $0x7, %r15d
jmp 0x17563
xorl %ebx, %ebx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $0x0, 0x18(%r14)
movq -0x40(%rbp), %r13
jne 0x17359
cmpb $0x0, 0x51(%r13)
jne 0x17359
cmpl $0x1, %r15d
jne 0x17319
movq 0x248(%r14), %rdx
movl 0x250(%r14), %ecx
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %r8
callq 0x3f823
jmp 0x17359
movl $0x12, 0x18(%r14)
movq -0x40(%rbp), %r13
jmp 0x17359
leaq 0x655b7(%rip), %rsi     # 0x7c89e
movq %r14, %rdi
xorl %eax, %eax
callq 0x14890
movl $0x9, 0x18(%r14)
jmp 0x17359
leaq 0x655a6(%rip), %rsi     # 0x7c8a8
movq %r14, %rdi
movq -0x50(%rbp), %rdx
xorl %eax, %eax
callq 0x14890
movq -0x38(%rbp), %rax
jmp 0x17292
movq 0x248(%r14), %rdx
movl 0x250(%r14), %ecx
movq %r12, %rdi
movl $0x1, %esi
movq %r14, %r8
movq %rax, %r15
callq 0x3f823
movslq %ebx, %rax
addq %rax, %r15
movq %r15, 0x218(%r14)
cmpl $0x0, 0x18(%r14)
jne 0x17359
cmpb $0x0, 0x51(%r13)
je 0x172b2
movl (%r12), %eax
testl %eax, %eax
js 0x17393
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 0x8(%r12), %rdi
callq 0x41799
movl (%r12), %eax
testl %eax, %eax
jns 0x17368
movq %r12, %rdi
callq 0xa630
movb -0x29(%rbp), %al
movb %al, 0x152(%r13)
cmpb $0x0, 0x51(%r13)
je 0x173e0
movl $0x7, 0x18(%r14)
cmpq $0x0, 0x8(%r14)
jne 0x17429
leaq 0x8(%r14), %rbx
movl $0x7, %eax
movzbl %al, %eax
cmpl $0x1b, %eax
setae %cl
cmpl $0x2, %eax
sete %dl
orb %cl, %dl
je 0x17408
leaq 0x67faa(%rip), %rdx     # 0x7f388
jmp 0x17415
movl 0x18(%r14), %eax
testl %eax, %eax
je 0x17429
cmpl $0x65, %eax
je 0x17429
cmpq $0x0, 0x8(%r14)
jne 0x17429
leaq 0x8(%r14), %rbx
cmpl $0x204, %eax            # imm = 0x204
jne 0x173c4
leaq 0x67f90(%rip), %rdx     # 0x7f396
jmp 0x17415
movl %eax, %eax
leaq 0x798df(%rip), %rcx     # 0x90cf0
movq (%rcx,%rax,8), %rdx
leaq 0x63f77(%rip), %rsi     # 0x7b393
movq %r13, %rdi
xorl %eax, %eax
callq 0x1494e
movq %rax, (%rbx)
movq 0x8(%r14), %rdx
testq %rdx, %rdx
je 0x1745b
movq -0x58(%rbp), %rax
movq %rdx, (%rax)
movl 0x18(%r14), %edi
leaq 0x63f4f(%rip), %rsi     # 0x7b393
xorl %eax, %eax
callq 0xa4c0
movq $0x0, 0x8(%r14)
movl $0x1, %r15d
jmp 0x1745e
xorl %r15d, %r15d
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x17482
cmpl $0x0, 0x4c(%r14)
jle 0x17482
cmpb $0x0, 0x1e(%r14)
jne 0x17482
callq 0x28609
movq $0x0, 0x10(%r14)
cmpb $0x0, 0x1e(%r14)
jne 0x174ae
movq 0x1b0(%r14), %rsi
movq %r13, %rdi
callq 0xb752
movq $0x0, 0x1b0(%r14)
movl $0x0, 0x1ac(%r14)
movq 0x268(%r14), %rdi
callq 0xa630
cmpb $0x0, 0x1ee(%r14)
jne 0x174d3
movq 0x220(%r14), %rsi
movq %r13, %rdi
callq 0xb52a
movq 0x288(%r14), %rsi
movq %r13, %rdi
callq 0x3cb77
movq 0x228(%r14), %rsi
movq %r13, %rdi
callq 0xb4d0
movslq 0x1e8(%r14), %rbx
testq %rbx, %rbx
jle 0x1751d
incq %rbx
movq 0x208(%r14), %rax
movq -0x10(%rax,%rbx,8), %rsi
movq %r13, %rdi
callq 0xb752
decq %rbx
cmpq $0x1, %rbx
ja 0x17500
movq 0x208(%r14), %rsi
movq %r13, %rdi
callq 0xb752
movq 0x1b8(%r14), %rsi
testq %rsi, %rsi
je 0x17557
movq (%rsi), %rax
movq %rax, 0x1b8(%r14)
jmp 0x17524
movq 0x70(%rsi), %rax
movq %rax, 0x270(%r14)
movq %r13, %rdi
callq 0xb52a
movq 0x270(%r14), %rsi
testq %rsi, %rsi
jne 0x17544
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq