// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3GetToken
SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *z, int *tokenType){
  int i, c;
  switch( *z ){
    case ' ': case '\t': case '\n': case '\f': case '\r': {
      testcase( z[0]==' ' );
      testcase( z[0]=='\t' );
      testcase( z[0]=='\n' );
      testcase( z[0]=='\f' );
      testcase( z[0]=='\r' );
      for(i=1; sqlite3Isspace(z[i]); i++){}
      *tokenType = TK_SPACE;
      return i;
    }
    case '-': {
      if( z[1]=='-' ){
        for(i=2; (c=z[i])!=0 && c!='\n'; i++){}
        *tokenType = TK_SPACE;   /* IMP: R-22934-25134 */
        return i;
      }
      *tokenType = TK_MINUS;
      return 1;
    }
    case '(': {
      *tokenType = TK_LP;
      return 1;
    }
    case ')': {
      *tokenType = TK_RP;
      return 1;
    }
    case ';': {
      *tokenType = TK_SEMI;
      return 1;
    }
    case '+': {
      *tokenType = TK_PLUS;
      return 1;
    }
    case '*': {
      *tokenType = TK_STAR;
      return 1;
    }
    case '/': {
      if( z[1]!='*' || z[2]==0 ){
        *tokenType = TK_SLASH;
        return 1;
      }
      for(i=3, c=z[2]; (c!='*' || z[i]!='/') && (c=z[i])!=0; i++){}
      if( c ) i++;
      *tokenType = TK_SPACE;   /* IMP: R-22934-25134 */
      return i;
    }
    case '%': {
      *tokenType = TK_REM;
      return 1;
    }
    case '=': {
      *tokenType = TK_EQ;
      return 1 + (z[1]=='=');
    }
    case '<': {
      if( (c=z[1])=='=' ){
        *tokenType = TK_LE;
        return 2;
      }else if( c=='>' ){
        *tokenType = TK_NE;
        return 2;
      }else if( c=='<' ){
        *tokenType = TK_LSHIFT;
        return 2;
      }else{
        *tokenType = TK_LT;
        return 1;
      }
    }
    case '>': {
      if( (c=z[1])=='=' ){
        *tokenType = TK_GE;
        return 2;
      }else if( c=='>' ){
        *tokenType = TK_RSHIFT;
        return 2;
      }else{
        *tokenType = TK_GT;
        return 1;
      }
    }
    case '!': {
      if( z[1]!='=' ){
        *tokenType = TK_ILLEGAL;
        return 2;
      }else{
        *tokenType = TK_NE;
        return 2;
      }
    }
    case '|': {
      if( z[1]!='|' ){
        *tokenType = TK_BITOR;
        return 1;
      }else{
        *tokenType = TK_CONCAT;
        return 2;
      }
    }
    case ',': {
      *tokenType = TK_COMMA;
      return 1;
    }
    case '&': {
      *tokenType = TK_BITAND;
      return 1;
    }
    case '~': {
      *tokenType = TK_BITNOT;
      return 1;
    }
    case '`':
    case '\'':
    case '"': {
      int delim = z[0];
      testcase( delim=='`' );
      testcase( delim=='\'' );
      testcase( delim=='"' );
      for(i=1; (c=z[i])!=0; i++){
        if( c==delim ){
          if( z[i+1]==delim ){
            i++;
          }else{
            break;
          }
        }
      }
      if( c=='\'' ){
        *tokenType = TK_STRING;
        return i+1;
      }else if( c!=0 ){
        *tokenType = TK_ID;
        return i+1;
      }else{
        *tokenType = TK_ILLEGAL;
        return i;
      }
    }
    case '.': {
#ifndef SQLITE_OMIT_FLOATING_POINT
      if( !sqlite3Isdigit(z[1]) )
#endif
      {
        *tokenType = TK_DOT;
        return 1;
      }
      /* If the next character is a digit, this is a floating point
      ** number that begins with ".".  Fall thru into the next case */
    }
    case '0': case '1': case '2': case '3': case '4':
    case '5': case '6': case '7': case '8': case '9': {
      testcase( z[0]=='0' );  testcase( z[0]=='1' );  testcase( z[0]=='2' );
      testcase( z[0]=='3' );  testcase( z[0]=='4' );  testcase( z[0]=='5' );
      testcase( z[0]=='6' );  testcase( z[0]=='7' );  testcase( z[0]=='8' );
      testcase( z[0]=='9' );
      *tokenType = TK_INTEGER;
#ifndef SQLITE_OMIT_HEX_INTEGER
      if( z[0]=='0' && (z[1]=='x' || z[1]=='X') && sqlite3Isxdigit(z[2]) ){
        for(i=3; sqlite3Isxdigit(z[i]); i++){}
        return i;
      }
#endif
      for(i=0; sqlite3Isdigit(z[i]); i++){}
#ifndef SQLITE_OMIT_FLOATING_POINT
      if( z[i]=='.' ){
        i++;
        while( sqlite3Isdigit(z[i]) ){ i++; }
        *tokenType = TK_FLOAT;
      }
      if( (z[i]=='e' || z[i]=='E') &&
           ( sqlite3Isdigit(z[i+1]) 
            || ((z[i+1]=='+' || z[i+1]=='-') && sqlite3Isdigit(z[i+2]))
           )
      ){
        i += 2;
        while( sqlite3Isdigit(z[i]) ){ i++; }
        *tokenType = TK_FLOAT;
      }
#endif
      while( IdChar(z[i]) ){
        *tokenType = TK_ILLEGAL;
        i++;
      }
      return i;
    }
    case '[': {
      for(i=1, c=z[0]; c!=']' && (c=z[i])!=0; i++){}
      *tokenType = c==']' ? TK_ID : TK_ILLEGAL;
      return i;
    }
    case '?': {
      *tokenType = TK_VARIABLE;
      for(i=1; sqlite3Isdigit(z[i]); i++){}
      return i;
    }
#ifndef SQLITE_OMIT_TCL_VARIABLE
    case '$':
#endif
    case '@':  /* For compatibility with MS SQL Server */
    case '#':
    case ':': {
      int n = 0;
      testcase( z[0]=='$' );  testcase( z[0]=='@' );
      testcase( z[0]==':' );  testcase( z[0]=='#' );
      *tokenType = TK_VARIABLE;
      for(i=1; (c=z[i])!=0; i++){
        if( IdChar(c) ){
          n++;
#ifndef SQLITE_OMIT_TCL_VARIABLE
        }else if( c=='(' && n>0 ){
          do{
            i++;
          }while( (c=z[i])!=0 && !sqlite3Isspace(c) && c!=')' );
          if( c==')' ){
            i++;
          }else{
            *tokenType = TK_ILLEGAL;
          }
          break;
        }else if( c==':' && z[i+1]==':' ){
          i++;
#endif
        }else{
          break;
        }
      }
      if( n==0 ) *tokenType = TK_ILLEGAL;
      return i;
    }
#ifndef SQLITE_OMIT_BLOB_LITERAL
    case 'x': case 'X': {
      testcase( z[0]=='x' ); testcase( z[0]=='X' );
      if( z[1]=='\'' ){
        *tokenType = TK_BLOB;
        for(i=2; sqlite3Isxdigit(z[i]); i++){}
        if( z[i]!='\'' || i%2 ){
          *tokenType = TK_ILLEGAL;
          while( z[i] && z[i]!='\'' ){ i++; }
        }
        if( z[i] ) i++;
        return i;
      }
      /* Otherwise fall through to the next case */
    }
#endif
    default: {
      if( !IdChar(*z) ){
        break;
      }
      for(i=1; IdChar(z[i]); i++){}
      *tokenType = TK_ID;
      return keywordCode((char*)z, i, tokenType);
    }
  }
  *tokenType = TK_ILLEGAL;
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rdx
movzbl (%rdi), %eax
leal -0x20(%rax), %ecx
cmpl $0x5e, %ecx
ja 0x3e559
leaq 0x39379(%rip), %rsi     # 0x777ac
movslq (%rsi,%rcx,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movl $0x84, (%rdx)
cmpb $0x30, (%rdi)
jne 0x3e468
movzbl 0x1(%rdi), %eax
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x3e468
movzbl 0x2(%rdi), %ecx
leaq 0x3a032(%rip), %rax     # 0x78490
testb $0x8, (%rcx,%rax)
jne 0x3e6bc
movq $-0x1, %rbx
movzbl 0x1(%rdi,%rbx), %eax
leaq -0x3a(%rax), %rcx
incq %rbx
cmpq $-0xb, %rcx
ja 0x3e46f
cmpb $0x2e, %al
jne 0x3e49d
movzbl 0x1(%rdi,%rbx), %eax
incq %rbx
addq $-0x3a, %rax
cmpq $-0xb, %rax
ja 0x3e485
movl $0x85, (%rdx)
movslq %ebx, %rax
movzbl (%rdi,%rax), %ecx
movl %ecx, %esi
orl $0x20, %esi
cmpl $0x65, %esi
jne 0x3e523
movzbl 0x1(%rdi,%rax), %esi
leaq -0x3a(%rsi), %r8
cmpq $-0xb, %r8
ja 0x3e4d6
cmpl $0x2d, %esi
je 0x3e4c7
cmpl $0x2b, %esi
jne 0x3e523
movzbl 0x2(%rdi,%rax), %esi
addq $-0x3a, %rsi
cmpq $-0xa, %rsi
jb 0x3e523
shlq $0x20, %rbx
movabsq $0x200000000, %rsi      # imm = 0x200000000
addq %rbx, %rsi
sarq $0x20, %rsi
decq %rsi
movabsq $0x100000000, %rcx      # imm = 0x100000000
addq %rcx, %rbx
movq %rbx, %rax
movq %rsi, %rbx
movzbl 0x1(%rdi,%rbx), %esi
addq $-0x3a, %rsi
incq %rbx
addq %rcx, %rax
cmpq $-0xb, %rsi
ja 0x3e501
movl $0x85, (%rdx)
sarq $0x20, %rax
movb (%rdi,%rax), %cl
movzbl %cl, %esi
leaq 0x39f63(%rip), %rcx     # 0x78490
testb $0x46, (%rsi,%rcx)
je 0x3e974
leaq (%rax,%rdi), %rsi
incq %rsi
movl %eax, %ebx
movl $0xa0, (%rdx)
movzbl (%rsi), %eax
incl %ebx
incq %rsi
testb $0x46, (%rax,%rcx)
jne 0x3e540
jmp 0x3e974
cmpl $0xd, %eax
ja 0x3e689
movl $0x3600, %ecx           # imm = 0x3600
btl %eax, %ecx
jae 0x3e689
xorl %ebx, %ebx
leaq 0x39f17(%rip), %rax     # 0x78490
movzbl 0x1(%rdi,%rbx), %ecx
incq %rbx
testb $0x1, (%rcx,%rax)
jne 0x3e579
movl $0x9f, (%rdx)
jmp 0x3e974
movl $0x87, (%rdx)
movb 0x1(%rdi), %sil
movl $0x1, %ebx
testb %sil, %sil
je 0x3e606
xorl %ecx, %ecx
leaq 0x39ee1(%rip), %rax     # 0x78490
movzbl %sil, %r8d
testb $0x46, (%r8,%rax)
je 0x3e5be
incl %ecx
jmp 0x3e5ee
cmpb $0x28, %sil
sete %r8b
testl %ecx, %ecx
setg %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
je 0x3e906
cmpb $0x3a, %sil
jne 0x3e5fe
movslq %ebx, %rsi
cmpb $0x3a, 0x1(%rdi,%rsi)
jne 0x3e5fe
incq %rsi
movl %esi, %ebx
movslq %ebx, %rbx
movb 0x1(%rdi,%rbx), %sil
incq %rbx
testb %sil, %sil
jne 0x3e5af
testl %ecx, %ecx
jne 0x3e974
movl $0xa0, (%rdx)
jmp 0x3e974
movb 0x1(%rdi), %cl
movl $0x1, %ebx
testb %cl, %cl
je 0x3e606
cmpb %al, %cl
jne 0x3e632
movslq %ebx, %rcx
leaq 0x1(%rcx), %rbx
cmpb %al, 0x1(%rdi,%rcx)
jne 0x3e8b6
movslq %ebx, %rbx
movb 0x1(%rdi,%rbx), %cl
incq %rbx
jmp 0x3e619
cmpb $0x27, 0x1(%rdi)
jne 0x3e689
movl $0x86, (%rdx)
movl $0x1, %eax
leaq 0x39e3a(%rip), %rcx     # 0x78490
movzbl 0x1(%rdi,%rax), %esi
incq %rax
testb $0x8, (%rsi,%rcx)
jne 0x3e656
cmpb $0x27, %sil
setne %cl
movl %eax, %esi
orb %cl, %sil
testb $0x1, %sil
jne 0x3e8d6
movslq %eax, %rbx
cmpb $0x1, (%rdi,%rbx)
sbbl $-0x1, %ebx
jmp 0x3e974
leaq 0x39e00(%rip), %rcx     # 0x78490
testb $0x46, (%rax,%rcx)
je 0x3e895
xorl %ebx, %ebx
movzbl 0x1(%rdi,%rbx), %eax
incq %rbx
testb $0x46, (%rax,%rcx)
jne 0x3e69c
movl $0x1b, (%rdx)
movl %ebx, %esi
callq 0x3e985
jmp 0x3e974
movl $0x3, %ebx
movzbl (%rdi,%rbx), %ecx
incq %rbx
testb $0x8, (%rcx,%rax)
jne 0x3e6c1
decl %ebx
jmp 0x3e974
movl $0x4f, (%rdx)
xorl %ebx, %ebx
cmpb $0x3d, 0x1(%rdi)
sete %bl
incl %ebx
jmp 0x3e974
movl $0x1a, (%rdx)
jmp 0x3e96f
movl $0x55, (%rdx)
jmp 0x3e96f
movl $0x17, (%rdx)
jmp 0x3e96f
movl $0x5b, (%rdx)
jmp 0x3e96f
movl $0x5d, (%rdx)
jmp 0x3e96f
movl $0x60, (%rdx)
jmp 0x3e96f
movl $0x16, (%rdx)
jmp 0x3e96f
movl $0x59, (%rdx)
jmp 0x3e96f
cmpb $0x2d, 0x1(%rdi)
jne 0x3e8f6
movl $0x2, %ebx
movzbl (%rdi,%rbx), %eax
testl %eax, %eax
je 0x3e587
cmpl $0xa, %eax
je 0x3e587
incq %rbx
jmp 0x3e752
movzbl 0x1(%rdi), %eax
addq $-0x3a, %rax
cmpq $-0xb, %rax
ja 0x3e43c
movl $0x7a, (%rdx)
jmp 0x3e96f
cmpb $0x3d, 0x1(%rdi)
je 0x3e8a0
movl $0xa0, (%rdx)
jmp 0x3e962
movzbl 0x1(%rdi), %eax
cmpl $0x3e, %eax
je 0x3e944
cmpl $0x3d, %eax
jne 0x3e94c
movl $0x53, (%rdx)
jmp 0x3e962
cmpb $0x2a, 0x1(%rdi)
jne 0x3e8ab
movb 0x2(%rdi), %cl
testb %cl, %cl
je 0x3e8ab
xorb $0x2a, %cl
movb 0x3(%rdi), %al
movl %eax, %esi
xorb $0x2f, %sil
movl $0x4, %ebx
orb %cl, %sil
je 0x3e587
xorl %ebx, %ebx
testb %al, %al
je 0x3e97d
xorb $0x2a, %al
movb 0x4(%rdi,%rbx), %cl
movl %ecx, %esi
xorb $0x2f, %sil
incq %rbx
orb %al, %sil
movl %ecx, %eax
jne 0x3e7f0
addl $0x4, %ebx
jmp 0x3e587
movl $0x1, (%rdx)
jmp 0x3e96f
movl $0x87, (%rdx)
xorl %ebx, %ebx
movzbl 0x1(%rdi,%rbx), %eax
addq $-0x3a, %rax
incq %rbx
cmpq $-0xa, %rax
jae 0x3e829
jmp 0x3e974
movzbl 0x1(%rdi), %eax
cmpl $0x3c, %eax
je 0x3e95c
cmpl $0x3e, %eax
je 0x3e8a0
cmpl $0x3d, %eax
jne 0x3e969
movl $0x51, (%rdx)
jmp 0x3e962
cmpb $0x7c, 0x1(%rdi)
jne 0x3e8fe
movl $0x5e, (%rdx)
jmp 0x3e962
movl $0x1, %ebx
movb (%rdi,%rbx), %al
testb %al, %al
je 0x3e8ca
incq %rbx
cmpb $0x5d, %al
jne 0x3e880
movl $0x1b, %eax
jmp 0x3e8cf
movl $0xa0, (%rdx)
jmp 0x3e96f
movl $0x4e, (%rdx)
jmp 0x3e962
movl $0x5c, (%rdx)
jmp 0x3e96f
cmpl $0x27, %eax
jne 0x3e954
movl $0x61, (%rdx)
jmp 0x3e974
movl $0xa0, %eax
movl %eax, (%rdx)
jmp 0x3e974
movl $0xa0, (%rdx)
movzbl (%rdi,%rax), %ecx
testl %ecx, %ecx
je 0x3e67a
cmpl $0x27, %ecx
je 0x3e67a
incq %rax
jmp 0x3e8dc
movl $0x5a, (%rdx)
jmp 0x3e96f
movl $0x56, (%rdx)
jmp 0x3e96f
movslq %ebx, %rcx
incl %ebx
leaq (%rdi,%rcx), %rsi
incq %rsi
movl %ebx, %ecx
movzbl (%rsi), %edi
testq %rdi, %rdi
je 0x3e93a
leal 0x1(%rcx), %ebx
cmpq $0x29, %rdi
je 0x3e935
movb (%rdi,%rax), %r8b
andb $0x1, %r8b
incq %rsi
testb %r8b, %r8b
je 0x3e912
cmpl $0x29, %edi
je 0x3e974
movl $0xa0, (%rdx)
movl %ecx, %ebx
jmp 0x3e974
movl $0x58, (%rdx)
jmp 0x3e962
movl $0x50, (%rdx)
jmp 0x3e96f
movl $0x1b, (%rdx)
jmp 0x3e974
movl $0x57, (%rdx)
movl $0x2, %ebx
jmp 0x3e974
movl $0x52, (%rdx)
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
addl $0x3, %ebx
jmp 0x3e587