// File: /workspace/github_c_makefile_star2_O1/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 %r15d, %r15d
leaq 0x3738(%rip), %rbx      # 0x5a70
xorl %r12d, %r12d
movq 0x371e(%rip), %rdi      # 0x5a60
callq 0x10b0
movl %eax, %r14d
movl %r12d, %eax
leaq 0x10c4(%rip), %rcx      # 0x3418
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x1130
movq (%rax), %rax
movslq %r14d, %rcx
movzwl (%rax,%rcx,2), %eax
movb $0x1, %r13b
btl $0xb, %eax
jb 0x253b
btl $0xa, %eax
jb 0x25a7
cmpl $0x1f, %r14d
jle 0x25af
leal -0x20(%r14), %eax
cmpl $0x1e, %eax
ja 0x2643
leaq 0x10a3(%rip), %rcx      # 0x3444
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1f, %ebp
jmp 0x26d0
callq 0x1130
movq (%rax), %rax
movslq %r14d, %rcx
movb $0x1, %r13b
testb $0xc, 0x1(%rax,%rcx,2)
jne 0x25d8
movq 0x368c(%rip), %rsi      # 0x5a60
movl %r14d, %edi
callq 0x10f0
xorl %r13d, %r13d
movl $0xb, %r12d
xorl %ebp, %ebp
jmp 0x25d8
movl $0x1b, %ebp
movb $0x1, %r13b
movl $0xb, %r12d
cmpl $0x7c, %r14d
jne 0x2522
jmp 0x25d8
cmpl $-0x1, %r14d
je 0x25ca
cmpl $0x2a, %r14d
je 0x258f
cmpl $0xa, %r14d
jne 0x25d5
leaq 0x2c82(%rip), %rax      # 0x50b0
incl (%rax)
jmp 0x25d5
callq 0x1130
movq (%rax), %rax
movslq %r14d, %rcx
movb $0x1, %r13b
testb $0x8, 0x1(%rax,%rcx,2)
jne 0x25d8
movq 0x360b(%rip), %rsi      # 0x5a60
movl %r14d, %edi
callq 0x10f0
movl $0x1, %ebp
jmp 0x25cf
movl $0x13, %ebp
movb $0x1, %r13b
movl $0xb, %r12d
cmpl $0x3d, %r14d
jne 0x2522
jmp 0x25d8
movl $0xb, %r12d
cmpl $0x3d, %r14d
jne 0x2546
movl $0x23, %ebp
movb $0x1, %r13b
jmp 0x25d8
movl $0x18, %ebp
movb $0x1, %r13b
movl $0xb, %r12d
cmpl $0x3d, %r14d
je 0x25d8
movq 0x35a0(%rip), %rsi      # 0x5a60
movl %r14d, %edi
callq 0x10f0
movl $0x16, %ebp
jmp 0x25d8
movb $0x1, %r13b
movl $0xb, %r12d
cmpl $0x3d, %r14d
je 0x2572
cmpl $0x3e, %r14d
jne 0x2579
movl $0x14, %ebp
jmp 0x25d8
cmpl $0x2a, %r14d
jne 0x255c
movl $0x2, %r12d
jmp 0x25d5
movl $0x1c, %ebp
movb $0x1, %r13b
movl $0xb, %r12d
cmpl $0x26, %r14d
je 0x25d8
movq 0x3537(%rip), %rsi      # 0x5a60
movl %r14d, %edi
callq 0x10f0
movl $0x22, %ebp
jmp 0x25d8
movl $0x3, %r12d
jmp 0x25d8
movq 0x3513(%rip), %rsi      # 0x5a60
movl %r14d, %edi
callq 0x10f0
movl $0x24, %ebp
jmp 0x25d5
movq 0x34fd(%rip), %rsi      # 0x5a60
movl %r14d, %edi
callq 0x10f0
movl $0x11, %ebp
jmp 0x25cf
movl $0x17, %ebp
jmp 0x25d8
movq 0x34e0(%rip), %rsi      # 0x5a60
movl %r14d, %edi
callq 0x10f0
movl $0x15, %ebp
jmp 0x25d8
movq 0x34ca(%rip), %rdi      # 0x5a60
callq 0x10b0
xorl %r13d, %r13d
cmpl $0x29, %eax
cmovel %r13d, %r12d
jmp 0x25d8
movl $0x4, %r12d
jmp 0x25d8
cmpl $-0x1, %r14d
je 0x25ca
cmpl $0x9, %r14d
je 0x25d5
cmpl $0xa, %r14d
je 0x2427
jmp 0x2651
movl $0x20, %ebp
movl $0xb, %r12d
xorl %r13d, %r13d
cmpl $0x3d, %r15d
setl %al
andb %r13b, %al
cmpb $0x1, %al
jne 0x25f0
movslq %r15d, %rax
incl %r15d
movb %r14b, (%rax,%rbx)
cmpl $0xb, %r12d
jne 0x2634
movslq %r15d, %rax
movb $0x0, (%rax,%rbx)
testl %ebp, %ebp
jne 0x2634
movl $0x8, %r14d
leaq 0x26f2(%rip), %r13      # 0x4d00
movq -0x8(%r14,%r13), %rsi
movq %rbx, %rdi
callq 0x10c0
testl %eax, %eax
je 0x2630
addq $0x10, %r14
cmpq $0xf8, %r14
jne 0x260e
xorl %ebp, %ebp
jmp 0x2634
movl (%r14,%r13), %ebp
cmpl $0xb, %r12d
jne 0x233b
jmp 0x26db
cmpl $0x7c, %r14d
jne 0x2651
movl $0x9, %r12d
jmp 0x25d5
movl $0x22, %ebp
jmp 0x26d0
movl $0x21, %ebp
jmp 0x26d0
movl $0x6, %r12d
jmp 0x25d5
movl $0x7, %r12d
jmp 0x25d5
movl $0x1d, %ebp
jmp 0x26d0
movl $0x1, %r12d
jmp 0x25d8
movl $0x1a, %ebp
jmp 0x26d0
movl $0x26, %ebp
jmp 0x26d0
movl $0x8, %r12d
jmp 0x25d5
movl $0x19, %ebp
jmp 0x26d0
movl $0x25, %ebp
jmp 0x26d0
movl $0x12, %ebp
jmp 0x26d0
movl $0x5, %r12d
jmp 0x25d5
movl $0xa, %r12d
jmp 0x25d5
movl $0x1e, %ebp
movl $0xb, %r12d
jmp 0x25d8
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq