// File: /workspace/github_cpp_makefile_star2_O1/cimtools[P]yaaclc/src/Analizer_ACL.cpp
// Function: Analizer_ACL::get_tokens()
int Analizer_ACL::get_tokens(){
    
    Token * readed_token;
    string token;
    char c = myfile->peek();

    while( c == 42 ){ 

        do{
           myfile->get();
        }while( myfile->peek() != '\n' );
        c = myfile->peek();
    }

    if( myfile->is_open() ){
        do{
            readed_token = new Token();
            token="";

            c = myfile->peek();

            while( c == 42 ){ 
                do{
                myfile->get();
                }while( myfile->peek() != '\n' );
                c = myfile->peek();
            }

            if( is_letter(c) ){ 
                do{
                    token += myfile->get();
                    c = myfile->peek();
                }while( is_letter(c) || is_number(c) );

                readed_token->content = token;

                if( commands.find(token) != commands.end() ){
                    readed_token->type ="COMMAND";
                }else{
                    readed_token->type ="WORD";
                }

            }else if( is_number(c) ){ 
                do{
                    token += myfile->get();
                }while( is_number(myfile->peek()) );

                readed_token->content = token;
                readed_token->type = "NUMBER";

            }else if( is_operator(c) ){ 
                do{
                    token += myfile->get();
                }while( is_operator(myfile->peek()) );

                readed_token->content = token;
                readed_token->type = "OPERATOR";

            }else if( c == '"' ){
                do{
                    token += myfile->get();
                }while( is_allowed_in_string(myfile->peek() ) && token.size()<= 40 );
                if( myfile->peek()!= '"' ){
                    //THROW ERROR
                    cout << "sintax error!!!!!!!!!!!!!!!!!!!!!!!!!!\n";
                    token = myfile->peek();
                    readed_token->content = token;
                    readed_token->type = "ERROR";     
                    return -1;       
                }else{
                    token+=myfile->get();
                }

                readed_token->content = token;
                readed_token->type = "STRING";

            }else if( c == '[' ){
                do{
                    token += myfile->get();
                }while( is_number(myfile->peek()));
                if( myfile->peek() != ']'){
                    //THROW ERROR
                    cout << "sintax error!!!!!!!!!!!!!!!!!!!!!!!!!!\n";
                    token = myfile->peek();
                    readed_token->content = token;
                    readed_token->type = "ERROR";
                    return -2;
                }else{
                    token += myfile->get();
                }

                readed_token->content = token;
                readed_token->type = "INDEX";

            }else if( c == '\n'  ){
                do{
                    token += myfile->get();
                }while( myfile->peek() == '\n' );

                readed_token->content = token;
                readed_token->type ="NEW LINE";

            }else if( c == EOF){
                readed_token->content = "";        
                readed_token->type ="END";

            }else if( c == ' ' || c == '\t' ){
                do{
                    token += myfile->get();
                    c = myfile->peek();
                }while( c==' ' || c == '\t' );

                readed_token->content = token;
                readed_token->type ="WHITE SPACE";

            }else{
                cout<< "None of the above!!     :  " << (int)c ;

                token = c;
                readed_token->content = token;
                readed_token->type ="ERROR";

            }   
            token_vector.push_back(readed_token);
        }while( token!="" );
    }else{
        cout << "The file is not open." << endl;
    }    
    #ifdef DEBUGGING
    cout << "The number of tokens readed were " << token_vector.size() << endl;
    #endif
    return 1; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0x48(%rdi), %rdi
callq 0x20e0
cmpb $0x2a, %al
jne 0x3114
movq 0x48(%rbx), %rdi
callq 0x2230
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpl $0xa, %eax
jne 0x30f2
movq 0x48(%rbx), %rdi
callq 0x20e0
jmp 0x30ee
movq 0x48(%rbx), %rdi
addq $0x78, %rdi
callq 0x2090
testb %al, %al
je 0x35fa
leaq 0x20(%rbx), %rax
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %r12
movabsq $0x7000e84000000000, %r15 # imm = 0x7000E84000000000
movl $0x40, %edi
callq 0x21c0
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
leaq 0x30(%rax), %rcx
movq %rax, %rdx
addq $0x10, %rdx
movq %rdx, (%rax)
xorl %edx, %edx
movq %rdx, 0x8(%rax)
movb %dl, 0x10(%rax)
movq %rcx, 0x20(%rax)
movq %rdx, 0x28(%rax)
movb %dl, 0x30(%rax)
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rdx
movq %r12, %rdi
xorl %esi, %esi
leaq 0x5fb7(%rip), %rcx      # 0x9148
xorl %r8d, %r8d
callq 0x22b0
movq 0x48(%rbx), %rdi
callq 0x20e0
movl %eax, %r13d
movl %r13d, %r14d
shll $0x18, %r14d
cmpl $0x2a000000, %r14d      # imm = 0x2A000000
jne 0x31da
movq 0x48(%rbx), %rdi
callq 0x2230
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpl $0xa, %eax
jne 0x31b5
movq 0x48(%rbx), %rdi
callq 0x20e0
movl %eax, %r13d
jmp 0x31a5
movl %r13d, %eax
andb $-0x21, %al
addb $-0x41, %al
cmpb $0x19, %al
ja 0x326c
movq 0x48(%rbx), %rdi
callq 0x2230
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
movq 0x48(%rbx), %rdi
callq 0x20e0
leal -0x30(%rax), %ecx
cmpb $0xa, %cl
jb 0x31e9
andb $-0x21, %al
addb $-0x41, %al
cmpb $0x1a, %al
jb 0x31e9
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
leaq 0x8fff(%rip), %rdi      # 0xc228
movq %r12, %rsi
callq 0x814a
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
xorl %esi, %esi
leaq 0x8fea(%rip), %rcx      # 0xc230
cmpq %rcx, %rax
setne %sil
leaq 0x5eb0(%rip), %rcx      # 0x9104
leaq 0x5eb1(%rip), %rax      # 0x910c
cmoveq %rax, %rcx
leaq (%rsi,%rsi,2), %r8
addq $0x4, %r8
jmp 0x3325
leal -0x30(%r13), %eax
cmpb $0x9, %al
ja 0x32be
movq 0x48(%rbx), %rdi
callq 0x2230
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
movq 0x48(%rbx), %rdi
callq 0x20e0
addb $-0x30, %al
cmpb $0xa, %al
jb 0x3274
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
movl $0x6, %r8d
leaq 0x5e55(%rip), %rcx      # 0x9111
jmp 0x3325
cmpb $0x3e, %r13b
ja 0x3370
movzbl %r13b, %eax
btq %rax, %r15
jae 0x3370
movq 0x48(%rbx), %rdi
callq 0x2230
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpb $0x3e, %al
ja 0x3300
movzbl %al, %eax
btq %rax, %r15
jb 0x32d6
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
movl $0x8, %r8d
leaq 0x5df3(%rip), %rcx      # 0x9118
movq (%rdx), %rdx
xorl %esi, %esi
callq 0x22b0
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x3347
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rbx)
jmp 0x3354
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x81e8
movq %r12, %rdi
leaq 0x5dea(%rip), %rsi      # 0x9148
callq 0x20b0
testl %eax, %eax
jne 0x313f
jmp 0x3647
cmpl $0x1fffffff, %r14d      # imm = 0x1FFFFFFF
jg 0x33ec
cmpl $0xff000000, %r14d      # imm = 0xFF000000
je 0x3557
cmpl $0x9000000, %r14d       # imm = 0x9000000
je 0x3486
cmpl $0xa000000, %r14d       # imm = 0xA000000
jne 0x358e
movq 0x48(%rbx), %rdi
callq 0x2230
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpl $0xa, %eax
je 0x33a0
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
movl $0x8, %r8d
leaq 0x5d75(%rip), %rcx      # 0x915c
jmp 0x3325
cmpl $0x20000000, %r14d      # imm = 0x20000000
je 0x3486
cmpl $0x22000000, %r14d      # imm = 0x22000000
je 0x34d9
cmpl $0x5b000000, %r14d      # imm = 0x5B000000
jne 0x358e
movq 0x48(%rbx), %rdi
callq 0x2230
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
movq 0x48(%rbx), %rdi
callq 0x20e0
addb $-0x30, %al
cmpb $0xa, %al
jb 0x3413
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpl $0x5d, %eax
jne 0x36da
movq 0x48(%rbx), %rdi
callq 0x2230
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
movl $0x5, %r8d
leaq 0x5cd5(%rip), %rcx      # 0x9156
jmp 0x3325
movq 0x48(%rbx), %rdi
callq 0x2230
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpb $0x9, %al
je 0x3486
movzbl %al, %eax
cmpl $0x20, %eax
je 0x3486
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
movl $0xb, %r8d
leaq 0x5c91(%rip), %rcx      # 0x9165
jmp 0x3325
movq 0x48(%rbx), %rdi
callq 0x2230
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpb $0x22, %al
je 0x3507
addb $-0x20, %al
cmpb $0x5e, %al
ja 0x3507
cmpq $0x29, -0x48(%rbp)
jb 0x34d9
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpl $0x22, %eax
jne 0x3676
movq 0x48(%rbx), %rdi
callq 0x2230
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
movl $0x6, %r8d
leaq 0x5bfd(%rip), %rcx      # 0x914f
jmp 0x3325
movq -0x30(%rbp), %rdi
movq 0x8(%rdi), %rdx
xorl %esi, %esi
leaq 0x5be0(%rip), %rcx      # 0x9148
xorl %r8d, %r8d
callq 0x22b0
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
movl $0x3, %r8d
leaq 0x5b3d(%rip), %rcx      # 0x90c6
jmp 0x3325
movl $0x1b, %edx
movq 0x8a3e(%rip), %rdi      # 0xbfd8
leaq 0x5bd0(%rip), %rsi      # 0x9171
callq 0x2210
sarl $0x18, %r14d
movq 0x8a27(%rip), %rdi      # 0xbfd8
movl %r14d, %esi
callq 0x2330
movq -0x48(%rbp), %rdx
movsbl %r13b, %r8d
movl $0x1, %ecx
movq %r12, %rdi
xorl %esi, %esi
callq 0x2370
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
movl $0x5, %r8d
leaq 0x5b54(%rip), %rcx      # 0x9149
jmp 0x3325
movq 0x89d7(%rip), %rbx      # 0xbfd8
leaq 0x5b85(%rip), %rsi      # 0x918d
movl $0x15, %edx
movq %rbx, %rdi
callq 0x2210
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq 0x89a5(%rip), %rdi      # 0xbfd8
callq 0x2030
movl $0x1, %ebx
movq %rax, %rdi
callq 0x2140
jmp 0x364c
movl $0x1, %ebx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3665
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21d0
movl %ebx, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x895b(%rip), %rdi      # 0xbfd8
leaq 0x5a9d(%rip), %rsi      # 0x9121
movl $0x27, %edx
callq 0x2210
movq 0x48(%rbx), %rdi
callq 0x20e0
leaq -0x50(%rbp), %rdi
movq 0x8(%rdi), %rdx
movsbl %al, %r8d
movl $0x1, %ecx
xorl %esi, %esi
callq 0x2370
movq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2120
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq 0x5a79(%rip), %rsi      # 0x9149
callq 0x2260
jmp 0x364c
movq 0x88f7(%rip), %rdi      # 0xbfd8
leaq 0x5a39(%rip), %rsi      # 0x9121
movl $0x27, %edx
callq 0x2210
movq 0x48(%rbx), %rdi
callq 0x20e0
leaq -0x50(%rbp), %rdi
movq 0x8(%rdi), %rdx
movsbl %al, %r8d
movl $0x1, %ecx
xorl %esi, %esi
callq 0x2370
movq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2120
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
movl $0xfffffffe, %ebx       # imm = 0xFFFFFFFE
leaq 0x5a15(%rip), %rsi      # 0x9149
callq 0x2260
jmp 0x364c
jmp 0x3758
jmp 0x3758
jmp 0x3758
jmp 0x3758
jmp 0x3758
jmp 0x3758
jmp 0x3758
jmp 0x3758
jmp 0x3758
jmp 0x3758
jmp 0x3758
jmp 0x3758
jmp 0x3758
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3774
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2340