// File: /workspace/github_c_makefile_star2_O1/ukontainer[P]sqlite-bench/sqlite3.c
// Function: sqlite3GetToken
SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *z, int *tokenType){
  int i, c;
  switch( aiClass[*z] ){  /* Switch on the character-class of the first byte
                          ** of the token. See the comment on the CC_ defines
                          ** above. */
    case CC_SPACE: {
      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 CC_MINUS: {
      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 CC_LP: {
      *tokenType = TK_LP;
      return 1;
    }
    case CC_RP: {
      *tokenType = TK_RP;
      return 1;
    }
    case CC_SEMI: {
      *tokenType = TK_SEMI;
      return 1;
    }
    case CC_PLUS: {
      *tokenType = TK_PLUS;
      return 1;
    }
    case CC_STAR: {
      *tokenType = TK_STAR;
      return 1;
    }
    case CC_SLASH: {
      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 CC_PERCENT: {
      *tokenType = TK_REM;
      return 1;
    }
    case CC_EQ: {
      *tokenType = TK_EQ;
      return 1 + (z[1]=='=');
    }
    case CC_LT: {
      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 CC_GT: {
      if( (c=z[1])=='=' ){
        *tokenType = TK_GE;
        return 2;
      }else if( c=='>' ){
        *tokenType = TK_RSHIFT;
        return 2;
      }else{
        *tokenType = TK_GT;
        return 1;
      }
    }
    case CC_BANG: {
      if( z[1]!='=' ){
        *tokenType = TK_ILLEGAL;
        return 1;
      }else{
        *tokenType = TK_NE;
        return 2;
      }
    }
    case CC_PIPE: {
      if( z[1]!='|' ){
        *tokenType = TK_BITOR;
        return 1;
      }else{
        *tokenType = TK_CONCAT;
        return 2;
      }
    }
    case CC_COMMA: {
      *tokenType = TK_COMMA;
      return 1;
    }
    case CC_AND: {
      *tokenType = TK_BITAND;
      return 1;
    }
    case CC_TILDA: {
      *tokenType = TK_BITNOT;
      return 1;
    }
    case CC_QUOTE: {
      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 CC_DOT: {
#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 CC_DIGIT: {
      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 CC_QUOTE2: {
      for(i=1, c=z[0]; c!=']' && (c=z[i])!=0; i++){}
      *tokenType = c==']' ? TK_ID : TK_ILLEGAL;
      return i;
    }
    case CC_VARNUM: {
      *tokenType = TK_VARIABLE;
      for(i=1; sqlite3Isdigit(z[i]); i++){}
      return i;
    }
    case CC_DOLLAR:
    case CC_VARALPHA: {
      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;
    }
    case CC_KYWD: {
      for(i=1; aiClass[z[i]]<=CC_KYWD; i++){}
      if( IdChar(z[i]) ){
        /* This token started out using characters that can appear in keywords,
        ** but z[i] is a character not allowed within keywords, so this must
        ** be an identifier instead */
        i++;
        break;
      }
      *tokenType = TK_ID;
      return keywordCode((char*)z, i, tokenType);
    }
    case CC_X: {
#ifndef SQLITE_OMIT_BLOB_LITERAL
      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;
      }
#endif
      /* If it is not a BLOB literal, then it must be an ID, since no
      ** SQL keywords start with the letter 'x'.  Fall through */
    }
    case CC_ID: {
      i = 1;
      break;
    }
    case CC_NUL: {
      *tokenType = TK_ILLEGAL;
      return 0;
    }
    default: {
      *tokenType = TK_ILLEGAL;
      return 1;
    }
  }
  while( IdChar(z[i]) ){ i++; }
  *tokenType = TK_ID;
  return i;
}

// Assembly:
pushq %rbx
movq %rsi, %rdx
movzbl (%rdi), %eax
leaq 0x111894(%rip), %rsi    # 0x54ccf0
movzbl (%rax,%rsi), %r8d
cmpq $0x1c, %r8
ja 0x43b5bb
movl $0x1, %ecx
leaq 0x110345(%rip), %r9     # 0x54b7bc
movslq (%r9,%r8,4), %r8
addq %r9, %r8
jmpq *%r8
movl $0x90, (%rdx)
movb 0x1(%rdi), %sil
movl $0x1, %ebx
testb %sil, %sil
je 0x43b8ae
xorl %ecx, %ecx
leaq 0x11105e(%rip), %rax    # 0x54c500
movzbl %sil, %r8d
testb $0x46, (%r8,%rax)
je 0x43b4b1
incl %ecx
jmp 0x43b4e1
cmpb $0x28, %sil
sete %r8b
testl %ecx, %ecx
setg %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
je 0x43b9a5
cmpb $0x3a, %sil
jne 0x43b4f1
movslq %ebx, %rsi
cmpb $0x3a, 0x1(%rdi,%rsi)
jne 0x43b4f1
incq %rsi
movl %esi, %ebx
movslq %ebx, %rbx
movb 0x1(%rdi,%rbx), %sil
incq %rbx
testb %sil, %sil
jne 0x43b4a2
testl %ecx, %ecx
sete %al
jmp 0x43b8b0
movl $0x62, (%rdx)
jmp 0x43b99c
movl $0x67, (%rdx)
jmp 0x43b99c
movl $0x1a, (%rdx)
jmp 0x43b99c
movl $0x64, (%rdx)
jmp 0x43b99c
cmpb $0x5d, %al
jne 0x43b8d9
movl $0x3b, %eax
movl $0x1, %ebx
jmp 0x43b94f
movl $0x1, (%rdx)
jmp 0x43b99c
movb 0x1(%rdi), %sil
testb %sil, %sil
sete %cl
je 0x43b909
movl $0x1, %ebx
cmpb %al, %sil
jne 0x43b573
movslq %ebx, %r8
cmpb %al, 0x1(%rdi,%r8)
jne 0x43b586
incq %r8
movl %r8d, %ebx
movslq %ebx, %rbx
movb 0x1(%rdi,%rbx), %sil
incq %rbx
testb %sil, %sil
sete %cl
jne 0x43b55e
cmpb $0x27, %sil
sete %al
jmp 0x43b910
movl $0x5c, (%rdx)
jmp 0x43b99c
movl $0x35, (%rdx)
xorl %ebx, %ebx
cmpb $0x3d, 0x1(%rdi)
sete %bl
jmp 0x43b927
cmpb $0x3d, 0x1(%rdi)
je 0x43b8c3
movl $0xad, (%rdx)
jmp 0x43b99c
movl $0x90, (%rdx)
xorl %ebx, %ebx
movzbl 0x1(%rdi,%rbx), %eax
addq $-0x3a, %rax
incq %rbx
cmpq $-0xa, %rax
jae 0x43b5ce
jmp 0x43b9a1
cmpb $0x7c, 0x1(%rdi)
jne 0x43b8f3
movl $0x65, (%rdx)
jmp 0x43b98f
movl $0x16, (%rdx)
jmp 0x43b99c
cmpb $0x27, 0x1(%rdi)
jne 0x43b6e5
movl $0x8e, (%rdx)
movl $0x1, %eax
leaq 0x110edf(%rip), %rcx    # 0x54c500
movzbl 0x1(%rdi,%rax), %esi
incq %rax
testb $0x8, (%rsi,%rcx)
jne 0x43b621
cmpb $0x27, %sil
setne %cl
movl %eax, %esi
orb %cl, %sil
testb $0x1, %sil
jne 0x43b953
movslq %eax, %rbx
cmpb $0x1, (%rdi,%rbx)
sbbl $-0x1, %ebx
jmp 0x43b9a1
xorl %ebx, %ebx
leaq 0x110ea3(%rip), %rax    # 0x54c500
movzbl 0x1(%rdi,%rbx), %ecx
incq %rbx
testb $0x1, (%rcx,%rax)
jne 0x43b65d
jmp 0x43b9f7
cmpb $0x2a, 0x1(%rdi)
jne 0x43b8ce
movb 0x2(%rdi), %al
testb %al, %al
je 0x43b8ce
movl $0x3, %ecx
movq %rcx, %rbx
cmpb $0x2a, %al
jne 0x43b69b
cmpb $0x2f, (%rdi,%rbx)
je 0x43b9f0
movb (%rdi,%rbx), %al
leaq 0x1(%rbx), %rcx
testb %al, %al
jne 0x43b68a
xorl %eax, %eax
jmp 0x43b9f5
movabsq $0x100000000, %rax      # imm = 0x100000000
xorl %ebx, %ebx
movq %rax, %rcx
movzbl 0x1(%rdi,%rbx), %r8d
addq %rax, %rcx
incq %rbx
cmpb $0x2, (%r8,%rsi)
jb 0x43b6bc
leaq 0x110e2a(%rip), %rax    # 0x54c500
testb $0x46, (%r8,%rax)
je 0x43b92b
sarq $0x20, %rcx
leal -0x1(%rcx), %ebx
addq %rcx, %rdi
leaq 0x110e0e(%rip), %rax    # 0x54c500
movzbl (%rdi), %ecx
incl %ebx
incq %rdi
testb $0x46, (%rcx,%rax)
jne 0x43b6f2
movl $0x3b, (%rdx)
jmp 0x43b9a1
movzbl 0x1(%rdi), %eax
cmpl $0x3e, %eax
je 0x43b93a
cmpl $0x3d, %eax
jne 0x43b942
movl $0x39, (%rdx)
jmp 0x43b98f
cmpb $0x2d, 0x1(%rdi)
jne 0x43b8fe
movl $0x2, %ebx
movzbl (%rdi,%rbx), %eax
testl %eax, %eax
je 0x43b9f7
cmpl $0xa, %eax
je 0x43b9f7
incq %rbx
jmp 0x43b73b
movl $0x60, (%rdx)
jmp 0x43b99c
movzbl 0x1(%rdi), %eax
cmpl $0x3c, %eax
je 0x43b989
cmpl $0x3e, %eax
je 0x43b8c3
cmpl $0x3d, %eax
jne 0x43b996
movl $0x37, (%rdx)
jmp 0x43b98f
movl $0x17, (%rdx)
jmp 0x43b99c
movl $0xad, (%rdx)
xorl %ebx, %ebx
jmp 0x43b9a1
movzbl 0x1(%rdi), %eax
addq $-0x3a, %rax
cmpq $-0xb, %rax
ja 0x43b7bb
movl $0x82, (%rdx)
jmp 0x43b99c
movl $0x8f, (%rdx)
cmpb $0x30, (%rdi)
jne 0x43b7e7
movzbl 0x1(%rdi), %eax
orl $0x20, %eax
cmpl $0x78, %eax
jne 0x43b7e7
movzbl 0x2(%rdi), %ecx
leaq 0x110d23(%rip), %rax    # 0x54c500
testb $0x8, (%rcx,%rax)
jne 0x43b973
movq $-0x1, %rbx
movzbl 0x1(%rdi,%rbx), %eax
leaq -0x3a(%rax), %rcx
incq %rbx
cmpq $-0xb, %rcx
ja 0x43b7ee
cmpb $0x2e, %al
jne 0x43b81c
movzbl 0x1(%rdi,%rbx), %eax
incq %rbx
addq $-0x3a, %rax
cmpq $-0xb, %rax
ja 0x43b804
movl $0x8d, (%rdx)
movslq %ebx, %rax
movzbl (%rdi,%rax), %ecx
orl $0x20, %ecx
cmpl $0x65, %ecx
jne 0x43b874
movzbl 0x1(%rdi,%rax), %ecx
leaq -0x3a(%rcx), %rsi
cmpq $-0xb, %rsi
ja 0x43b853
cmpl $0x2d, %ecx
je 0x43b844
cmpl $0x2b, %ecx
jne 0x43b874
movzbl 0x2(%rdi,%rax), %eax
addq $-0x3a, %rax
cmpq $-0xa, %rax
jb 0x43b874
addl $0x2, %ebx
movslq %ebx, %rbx
decq %rbx
movzbl 0x1(%rdi,%rbx), %eax
addq $-0x3a, %rax
incq %rbx
cmpq $-0xb, %rax
ja 0x43b85c
movl $0x8d, (%rdx)
movslq %ebx, %rax
movzbl (%rdi,%rax), %ecx
leaq 0x110c7e(%rip), %rax    # 0x54c500
testb $0x46, (%rcx,%rax)
je 0x43b9a1
movslq %ebx, %rcx
addq %rdi, %rcx
incq %rcx
movl $0xad, (%rdx)
movzbl (%rcx), %esi
incl %ebx
incq %rcx
testb $0x46, (%rsi,%rax)
jne 0x43b895
jmp 0x43b9a1
movb $0x1, %al
testb %al, %al
je 0x43b9a1
movl $0xad, (%rdx)
jmp 0x43b9a1
movl $0x34, (%rdx)
jmp 0x43b98f
movl $0x63, (%rdx)
jmp 0x43b99c
movl $0x1, %ebx
movb (%rdi,%rbx), %al
testb %al, %al
je 0x43b94a
incq %rbx
cmpb $0x5d, %al
jne 0x43b8de
movl $0x3b, %eax
jmp 0x43b94f
movl $0x5d, (%rdx)
jmp 0x43b99c
movl $0x61, (%rdx)
jmp 0x43b99c
xorl %eax, %eax
movl $0x1, %ebx
testb %al, %al
je 0x43b91c
movl $0x6a, (%rdx)
jmp 0x43b927
testb $0x1, %cl
jne 0x43b8b8
movl $0x3b, (%rdx)
incl %ebx
jmp 0x43b9a1
movl $0x3b, (%rdx)
movl %ebx, %esi
callq 0x43b9ff
jmp 0x43b9a1
movl $0x5f, (%rdx)
jmp 0x43b98f
movl $0x36, (%rdx)
jmp 0x43b99c
movl $0xad, %eax
movl %eax, (%rdx)
jmp 0x43b9a1
movl $0xad, (%rdx)
movzbl (%rdi,%rax), %ecx
testl %ecx, %ecx
je 0x43b645
cmpl $0x27, %ecx
je 0x43b645
incq %rax
jmp 0x43b959
movl $0x3, %ebx
movzbl (%rdi,%rbx), %ecx
incq %rbx
testb $0x8, (%rcx,%rax)
jne 0x43b978
decl %ebx
jmp 0x43b9a1
movl $0x5e, (%rdx)
movl $0x2, %ebx
jmp 0x43b9a1
movl $0x38, (%rdx)
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
retq
movslq %ebx, %rcx
incl %ebx
addq %rdi, %rcx
incq %rcx
movl %ebx, %esi
movl %esi, %ebx
movzbl (%rcx), %edi
testq %rdi, %rdi
je 0x43b9e3
leal 0x1(%rbx), %esi
cmpq $0x29, %rdi
je 0x43b9d5
movb (%rdi,%rax), %r8b
andb $0x1, %r8b
incq %rcx
testb %r8b, %r8b
je 0x43b9b2
cmpl $0x29, %edi
jne 0x43b9e3
xorl %eax, %eax
movl %esi, %ebx
jmp 0x43b8b0
movl $0xad, (%rdx)
xorl %eax, %eax
jmp 0x43b8b0
movl $0x1, %eax
addl %eax, %ebx
movl $0xac, (%rdx)
jmp 0x43b9a1