// File: /workspace/github_c_makefile_star2_O2/g3ida[P]g3idaCompiler/lexical.c
// Function: analLex
Symbole analLex(void)
{
 /* index for storing into lexeme */
   int lexemeIndex = 0;
   /* holds current token to be returned */
   Symbole current;
   /* current state - always begins at START */
   StateType state = START;
   /* flag to indicate save to lexeme */
   int save;
   while (state != DONE)
   { int c = fgetc(input);
     save = TRUE;
     switch (state)
     { case START:
         if (isdigit(c))
           state = INNUM;
         else if (isalpha(c))
           state = INID;
         else if (c == ':')
           state = INASSIGN;
         else if ((c == ' ') || (c == '\t') || (c == '\n')) {
            if(c == '\n') lineno++;
            save = FALSE;
         }
         else if (c == '(')
         { save = FALSE;
           state = INPARENT;
         }
         else if (c == '=')
         { save = FALSE;
           state = INEQ;
         }
        else if (c == '<')
         { save = FALSE;
           state = INNEQ;
         }
        else if (c == '>')
         { save = FALSE;
           state = INGEQ;
         }
        else if (c == '&')
         { save = FALSE;
           state = INAND;
         }
        else if (c == '|')
         { save = FALSE;
           state = INOR;
         }
         else
         { state = DONE;
           switch (c)
           { case EOF:
               save = FALSE; current = ENDFILE; break;
             case '%':
               current = MOD; break;
             case '+':
               current = PLUS; break;
             case '-':
               current = MINUS; break;
             case '*':
               current = MULT; break;
             case '/':
               current = DIV; break;
            case ',':
               current = COMMA; break;
            case '.':
               current = POINT; break;
             case ')':
               current = RPAREN; break;
             case ';':
               current = SEMI; break;
             default:
               current = ERROR; break;
           }
         }
         break;
        case INPARENT:
          save = FALSE;
          if (c == '*'){
            state = INCOMMENT;
            break;
          } else {
            state = DONE;
            ungetc(c, input);
            current = LPAREN;
          }
          break;

       case INCOMMENT:
         save = FALSE;
         if (c == EOF)
         { state = DONE;
           current = ENDFILE;
         } else if(c == '\n') {
            lineno++;
         }
         else if (c == '*') {
            int v = fgetc(input);
            if(v == ')') {
                state = START;
                break;
            }
         }
         break;
       case INASSIGN:
         state = DONE;
         if (c == '=')
           current = ASSIGN;
         else
         { /* backup in the input */
           ungetc(c, input);
           save = FALSE;
           current = TWOPTS;
           state = DONE;
         }
         break;
       case INNUM:
         if (!isdigit(c))
         { /* backup in the input */
           ungetc(c, input);
           save = FALSE;
           state = DONE;
           current = NUM;
         }
         break;

         case INNEQ:
          if (c == '=') {
            state = DONE;
            current = LTE;
          } else if(c == '>') {
            state = DONE;
            current = NEQ;
          }
          else
          {
            ungetc(c, input);
            state = DONE;
            current = LT;
          }
          break;

          case INGEQ:
          if (c == '=') {
            state = DONE;
            current = GTE;
          }
          else
          { ungetc(c, input);
            state = DONE;
            current = GT;
          }
          break;

         case INAND:
          if (c == '&') {
            state = DONE;
            current = AND;
          } else {
            ungetc(c, input);
            state = DONE;
           current = ERROR;
          }
          break;

        case INOR:
          if (c == '|') {
            state = DONE;
            current = OR;
          } else {
            ungetc(c, input);
            state = DONE;
           current = ERROR;
          }
         break;

        case INEQ:
          if (c == '=') {
            state = DONE;
            current = EQ;
          } else {
            ungetc(c, input);
            state = DONE;
           current = ERROR;
          }
         break;

       case INID:
         if (!isalpha(c) && !isdigit(c))
         { /* backup in the input */
           ungetc(c, input);
           save = FALSE;
           state = DONE;
           current = ID;
         }
         break;
       case DONE:
       default: /* should never happen */
         printf("Scanner Bug\n");
         state = DONE;
         current = ERROR;
         break;
     }
     if ((save) && (lexemeIndex <= MAX_LEN)) {
       lexeme[lexemeIndex++] = (char) c;
     }
     if (state == DONE)
     { lexeme[lexemeIndex] = '\0';
       if (current == ID)
         current = unilexId(lexeme);
     }
   }
   return current;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpl $0xb, %r12d
je 0x25f9
movq 0x4836(%rip), %rdi      # 0x6a60
callq 0x10b0
movl %eax, %r14d
movl %r12d, %eax
leaq 0x11dc(%rip), %rcx      # 0x3418
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movslq %r14d, %rbx
movslq %r13d, %r15
jmpq *%rax
callq 0x1130
movq (%rax), %rax
movzwl (%rax,%rbx,2), %eax
btl $0xb, %eax
jb 0x231c
btl $0xa, %eax
jb 0x22ac
leal -0x20(%r14), %eax
cmpl $0x1e, %eax
ja 0x2506
leaq 0x11c9(%rip), %rcx      # 0x3444
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
pushq $0xa
popq %rcx
movl %ecx, %r12d
jmpq *%rax
movb $0x1, %bl
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x1f
jmp 0x245a
callq 0x1130
movq (%rax), %rax
testb $0xc, 0x1(%rax,%rbx,2)
je 0x241c
xorl %ebx, %ebx
pushq $0x4
jmp 0x2320
movb $0x1, %bl
cmpl $0x7c, %r14d
jne 0x23ea
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x1b
jmp 0x245a
pushq $0x20
popq %rbp
cmpl $-0x1, %r14d
je 0x23bd
cmpl $0x2a, %r14d
je 0x24e8
pushq $0x2
popq %rax
movl %eax, %r12d
cmpl $0xa, %r14d
jne 0x2219
leaq 0x3db7(%rip), %rax      # 0x60b0
incl (%rax)
pushq $0x2
popq %rax
movl %eax, %r12d
jmp 0x2219
callq 0x1130
movq (%rax), %rax
testb $0x8, 0x1(%rax,%rbx,2)
pushq $0x1
popq %rbp
je 0x23ae
xorl %ebx, %ebx
pushq $0x3
popq %rax
movl %eax, %r12d
jmp 0x245f
movb $0x1, %bl
cmpl $0x3d, %r14d
jne 0x23ea
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x13
jmp 0x245a
movb $0x1, %bl
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x23
popq %rax
movl %eax, 0x4(%rsp)
pushq $0x24
popq %rbp
cmpl $0x3d, %r14d
jne 0x23ae
jmp 0x245f
movb $0x1, %bl
cmpl $0x3d, %r14d
jne 0x2403
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x18
jmp 0x245a
movb $0x1, %bl
cmpl $0x3d, %r14d
je 0x2439
cmpl $0x3e, %r14d
jne 0x2443
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x14
jmp 0x245a
pushq $0x2
popq %rax
movl %eax, %r12d
pushq $0x11
popq %rbp
cmpl $0x2a, %r14d
je 0x2219
movq 0x46ab(%rip), %rsi      # 0x6a60
movl %r14d, %edi
callq 0x10f0
leaq 0x46ac(%rip), %rax      # 0x6a70
movb $0x0, (%r15,%rax)
pushq $0xb
popq %rax
movl %eax, %r12d
movl %ebp, 0x4(%rsp)
jmp 0x2219
movb $0x1, %bl
cmpl $0x26, %r14d
jne 0x23ea
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x1c
jmp 0x245a
movq 0x466f(%rip), %rsi      # 0x6a60
movl %r14d, %edi
callq 0x10f0
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x22
jmp 0x245a
movq 0x4656(%rip), %rsi      # 0x6a60
movl %r14d, %edi
callq 0x10f0
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x16
jmp 0x245a
movq 0x463d(%rip), %rsi      # 0x6a60
movl %r14d, %edi
callq 0x10f0
leaq 0x463e(%rip), %rax      # 0x6a70
movb $0x0, (%r15,%rax)
jmp 0x249a
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x17
jmp 0x245a
movq 0x4616(%rip), %rsi      # 0x6a60
movl %r14d, %edi
callq 0x10f0
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x15
popq %rax
movl %eax, 0x4(%rsp)
cmpl $0x3c, %r13d
jg 0x2473
incl %r13d
leaq 0x4601(%rip), %rax      # 0x6a70
movb %r14b, (%r15,%rax)
testb %bl, %bl
je 0x2219
movslq %r13d, %rax
leaq 0x45eb(%rip), %rcx      # 0x6a70
movb $0x0, (%rax,%rcx)
pushq $0xb
popq %rax
movl %eax, %r12d
cmpl $0x0, 0x4(%rsp)
jne 0x2219
xorl %ecx, %ecx
leaq 0x45cd(%rip), %r14      # 0x6a70
leaq 0x3856(%rip), %r15      # 0x5d00
leaq 0x10(%rcx), %rbx
cmpq $0x100, %rbx            # imm = 0x100
je 0x24d5
movq (%rcx,%r15), %rsi
movq %r14, %rdi
callq 0x10c0
movq %rbx, %rcx
testl %eax, %eax
jne 0x24aa
movl -0x8(%rbx,%r15), %eax
movl %eax, 0x4(%rsp)
jmp 0x24dd
movl $0x0, 0x4(%rsp)
pushq $0xb
popq %rax
movl %eax, %r12d
jmp 0x2219
movq 0x4571(%rip), %rdi      # 0x6a60
callq 0x10b0
xorl %r12d, %r12d
cmpl $0x29, %eax
setne %r12b
addl %r12d, %r12d
jmp 0x2219
pushq $0x20
popq %rbp
cmpl $-0x1, %r14d
je 0x23bd
cmpl $0x9, %r14d
je 0x2532
cmpl $0x7c, %r14d
je 0x25ee
cmpl $0xa, %r14d
jne 0x253a
leaq 0x3b80(%rip), %rax      # 0x60b0
incl (%rax)
xorl %r12d, %r12d
jmp 0x2219
movb $0x1, %bl
jmp 0x23f9
movb $0x1, %bl
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x26
jmp 0x245a
movb $0x1, %bl
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x1a
jmp 0x245a
movb $0x1, %bl
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x21
jmp 0x245a
movb $0x1, %bl
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x1d
jmp 0x245a
xorl %ebx, %ebx
pushq $0x1
jmp 0x2320
movb $0x1, %bl
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x12
jmp 0x245a
movb $0x1, %bl
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x19
jmp 0x245a
pushq $0x6
popq %rax
movl %eax, %r12d
jmp 0x2219
movb $0x1, %bl
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x25
jmp 0x245a
pushq $0x8
popq %rax
movl %eax, %r12d
jmp 0x2219
movb $0x1, %bl
pushq $0xb
popq %rax
movl %eax, %r12d
pushq $0x1e
jmp 0x245a
pushq $0x7
popq %rax
movl %eax, %r12d
jmp 0x2219
pushq $0x5
popq %rax
movl %eax, %r12d
jmp 0x2219
pushq $0x9
popq %rax
movl %eax, %r12d
jmp 0x2219
movl 0x4(%rsp), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq