// File: /workspace/github_cpp_makefile_star2_O3/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 0x35f3
leaq 0x20(%rbx), %rax
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %r12
movabsq $0x7000e84000000000, %r15 # imm = 0x7000E84000000000
movl $0x40, %edi
callq 0x21c0
leaq 0x10(%rax), %rcx
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps %xmm0, 0x10(%rax)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %rax, %rcx
addq $0x30, %rcx
movq %rcx, 0x20(%rax)
movb $0x0, 0x30(%rax)
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rdx
movq %r12, %rdi
xorl %esi, %esi
leaq 0x5fbe(%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 0x31d3
movq 0x48(%rbx), %rdi
callq 0x2230
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpl $0xa, %eax
jne 0x31ae
movq 0x48(%rbx), %rdi
callq 0x20e0
movl %eax, %r13d
jmp 0x319e
movl %r13d, %eax
andb $-0x21, %al
addb $-0x41, %al
cmpb $0x19, %al
ja 0x3265
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 0x31e2
andb $-0x21, %al
addb $-0x41, %al
cmpb $0x1a, %al
jb 0x31e2
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
leaq 0x9006(%rip), %rdi      # 0xc228
movq %r12, %rsi
callq 0x7d00
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
xorl %esi, %esi
leaq 0x8ff1(%rip), %rcx      # 0xc230
cmpq %rcx, %rax
setne %sil
leaq 0x5eb7(%rip), %rcx      # 0x9104
leaq 0x5eb8(%rip), %rax      # 0x910c
cmoveq %rax, %rcx
leaq (%rsi,%rsi,2), %r8
addq $0x4, %r8
jmp 0x331e
leal -0x30(%r13), %eax
cmpb $0x9, %al
ja 0x32b7
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 0x326d
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
movl $0x6, %r8d
leaq 0x5e5c(%rip), %rcx      # 0x9111
jmp 0x331e
cmpb $0x3e, %r13b
ja 0x3369
movzbl %r13b, %eax
btq %rax, %r15
jae 0x3369
movq 0x48(%rbx), %rdi
callq 0x2230
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpb $0x3e, %al
ja 0x32f9
movzbl %al, %eax
btq %rax, %r15
jb 0x32cf
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
movl $0x8, %r8d
leaq 0x5dfa(%rip), %rcx      # 0x9118
movq (%rdx), %rdx
xorl %esi, %esi
callq 0x22b0
movq 0x28(%rbx), %rsi
cmpq 0x30(%rbx), %rsi
je 0x3340
movq -0x30(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, 0x28(%rbx)
jmp 0x334d
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x7d9e
movq %r12, %rdi
leaq 0x5df1(%rip), %rsi      # 0x9148
callq 0x20b0
testl %eax, %eax
jne 0x313f
jmp 0x3640
cmpl $0x1fffffff, %r14d      # imm = 0x1FFFFFFF
jg 0x33e5
cmpl $0xff000000, %r14d      # imm = 0xFF000000
je 0x3550
cmpl $0x9000000, %r14d       # imm = 0x9000000
je 0x347f
cmpl $0xa000000, %r14d       # imm = 0xA000000
jne 0x3587
movq 0x48(%rbx), %rdi
callq 0x2230
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpl $0xa, %eax
je 0x3399
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
movl $0x8, %r8d
leaq 0x5d7c(%rip), %rcx      # 0x915c
jmp 0x331e
cmpl $0x20000000, %r14d      # imm = 0x20000000
je 0x347f
cmpl $0x22000000, %r14d      # imm = 0x22000000
je 0x34d2
cmpl $0x5b000000, %r14d      # imm = 0x5B000000
jne 0x3587
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 0x340c
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpl $0x5d, %eax
jne 0x36d3
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 0x5cdc(%rip), %rcx      # 0x9156
jmp 0x331e
movq 0x48(%rbx), %rdi
callq 0x2230
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpb $0x9, %al
je 0x347f
movzbl %al, %eax
cmpl $0x20, %eax
je 0x347f
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x2120
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
movl $0xb, %r8d
leaq 0x5c98(%rip), %rcx      # 0x9165
jmp 0x331e
movq 0x48(%rbx), %rdi
callq 0x2230
movsbl %al, %esi
movq %r12, %rdi
callq 0x2190
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpb $0x22, %al
je 0x3500
addb $-0x20, %al
cmpb $0x5e, %al
ja 0x3500
cmpq $0x29, -0x48(%rbp)
jb 0x34d2
movq 0x48(%rbx), %rdi
callq 0x20e0
cmpl $0x22, %eax
jne 0x366f
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 0x5c04(%rip), %rcx      # 0x914f
jmp 0x331e
movq -0x30(%rbp), %rdi
movq 0x8(%rdi), %rdx
xorl %esi, %esi
leaq 0x5be7(%rip), %rcx      # 0x9148
xorl %r8d, %r8d
callq 0x22b0
movq -0x30(%rbp), %rdx
leaq 0x20(%rdx), %rdi
addq $0x28, %rdx
movl $0x3, %r8d
leaq 0x5b44(%rip), %rcx      # 0x90c6
jmp 0x331e
movl $0x1b, %edx
movq 0x8a45(%rip), %rdi      # 0xbfd8
leaq 0x5bd7(%rip), %rsi      # 0x9171
callq 0x2210
sarl $0x18, %r14d
movq 0x8a2e(%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 0x5b5b(%rip), %rcx      # 0x9149
jmp 0x331e
movq 0x89de(%rip), %rbx      # 0xbfd8
leaq 0x5b8c(%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 0x89ac(%rip), %rdi      # 0xbfd8
callq 0x2030
movl $0x1, %ebx
movq %rax, %rdi
callq 0x2140
jmp 0x3645
movl $0x1, %ebx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x365e
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 0x8962(%rip), %rdi      # 0xbfd8
leaq 0x5aa4(%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 0x5a80(%rip), %rsi      # 0x9149
callq 0x2260
jmp 0x3645
movq 0x88fe(%rip), %rdi      # 0xbfd8
leaq 0x5a40(%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 0x5a1c(%rip), %rsi      # 0x9149
callq 0x2260
jmp 0x3645
jmp 0x3751
jmp 0x3751
jmp 0x3751
jmp 0x3751
jmp 0x3751
jmp 0x3751
jmp 0x3751
jmp 0x3751
jmp 0x3751
jmp 0x3751
jmp 0x3751
jmp 0x3751
jmp 0x3751
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x376d
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21d0
movq %rbx, %rdi
callq 0x2340
nop