// File: kelwinfc[P]ci4721-Fernandez-Gyomrey/src/AST/check.cpp
// Function: AST_discrete_arg_list::fill_and_check(symbol_table*)
void AST_discrete_arg_list::fill_and_check(symbol_table* st){
    
    vector< pair<int, int> >::iterator it_boundaries = boundaries.begin();
    
    for ( vector<symbol*>::iterator it =args.begin(); it != args.end(); ++it){
        
        bool verify_types = true;
        
        int level = 0;
        symbol* prev = st->lookup( (*it)->getName(), &level );
        if ( prev ){
            if ( level != 0 ){
                st->insert( (*it) );
                prev = *it;
            } else {
                logger->buf << "Argumento '" << (*it)->getName() << "' con identificador repetido.";
                logger->error(line, column);

                verify_types = false;
                break;
            }
        } else {
            st->insert( (*it) );
            prev = *it;
        }
        
        if ( verify_types ){
            pair<int,int> b = *it_boundaries;
            if ( b.first > b.second ){
                logger->buf << "Argumento '" << (*it)->getName() << "' con rango vacio.";
                logger->error(line, column);
            }
        }
        
        ++it_boundaries;
    }
    
}

// Assembly:
subq $0x118, %rsp            # imm = 0x118
movq %rdi, 0x110(%rsp)
movq %rsi, 0x108(%rsp)
movq 0x110(%rsp), %rdi
movq %rdi, 0x60(%rsp)
addq $0x28, %rdi
callq 0x1fe20
movq 0x60(%rsp), %rdi
movq %rax, 0x100(%rsp)
addq $0x10, %rdi
callq 0x1fd30
movq %rax, 0xf8(%rsp)
movq 0x60(%rsp), %rdi
addq $0x10, %rdi
callq 0x1fda0
movq %rax, 0xf0(%rsp)
leaq 0xf8(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x1fd60
testb $0x1, %al
jne 0xe72f
jmp 0xea39
movb $0x1, 0xef(%rsp)
movl $0x0, 0xe8(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x1fdd0
movq (%rax), %rsi
leaq 0xc0(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x295b0
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
callq 0x2a040
movq %rax, 0x58(%rsp)
jmp 0xe78f
leaq 0xc0(%rsp), %rdi
callq 0x6778
movq 0x58(%rsp), %rax
movq %rax, 0xe0(%rsp)
cmpq $0x0, 0xe0(%rsp)
je 0xe8f2
cmpl $0x0, 0xe8(%rsp)
je 0xe82c
movq 0x108(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x1fdd0
movq 0x40(%rsp), %rdi
movq (%rax), %rsi
callq 0x2a1f0
leaq 0xf8(%rsp), %rdi
callq 0x1fdd0
movq (%rax), %rax
movq %rax, 0xe0(%rsp)
jmp 0xe8f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x6778
jmp 0xea41
leaq 0x5fca5(%rip), %rax     # 0x6e4d8
movq (%rax), %rdi
addq $0x48, %rdi
leaq 0x442b7(%rip), %rsi     # 0x52af8
callq 0x6370
movq %rax, 0x28(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x1fdd0
movq (%rax), %rsi
leaq 0x90(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x295b0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x6340
movq %rax, 0x38(%rsp)
jmp 0xe883
movq 0x38(%rsp), %rdi
leaq 0x44275(%rip), %rsi     # 0x52b04
callq 0x6370
jmp 0xe896
leaq 0x90(%rsp), %rdi
callq 0x6778
movq 0x60(%rsp), %rax
leaq 0x5fc29(%rip), %rcx     # 0x6e4d8
movq (%rcx), %rdi
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
callq 0x2f440
movb $0x0, 0xef(%rsp)
jmp 0xea39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x6778
jmp 0xea41
jmp 0xe931
movq 0x108(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x1fdd0
movq 0x20(%rsp), %rdi
movq (%rax), %rsi
callq 0x2a1f0
leaq 0xf8(%rsp), %rdi
callq 0x1fdd0
movq (%rax), %rax
movq %rax, 0xe0(%rsp)
testb $0x1, 0xef(%rsp)
je 0xea1a
leaq 0x100(%rsp), %rdi
callq 0x1fe50
movq (%rax), %rax
movq %rax, 0x88(%rsp)
movl 0x88(%rsp), %eax
cmpl 0x8c(%rsp), %eax
jle 0xea18
leaq 0x5fb66(%rip), %rax     # 0x6e4d8
movq (%rax), %rdi
addq $0x48, %rdi
leaq 0x44178(%rip), %rsi     # 0x52af8
callq 0x6370
movq %rax, 0x8(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x1fdd0
movq (%rax), %rsi
leaq 0x68(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x295b0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x6340
movq %rax, 0x18(%rsp)
jmp 0xe9bf
movq 0x18(%rsp), %rdi
leaq 0x44157(%rip), %rsi     # 0x52b22
callq 0x6370
jmp 0xe9d2
leaq 0x68(%rsp), %rdi
callq 0x6778
movq 0x60(%rsp), %rax
leaq 0x5faf0(%rip), %rcx     # 0x6e4d8
movq (%rcx), %rdi
movl 0x8(%rax), %esi
movl 0xc(%rax), %edx
callq 0x2f440
jmp 0xea18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x6778
jmp 0xea41
jmp 0xea1a
leaq 0x100(%rsp), %rdi
callq 0x1fe60
leaq 0xf8(%rsp), %rdi
callq 0x1fde0
jmp 0xe6fb
addq $0x118, %rsp            # imm = 0x118
retq
movq 0xb8(%rsp), %rdi
callq 0x66b0
nop