// File: /workspace/github_c_makefile_star2_O0/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: rule_for_def
void rule_for_def() {
    switch (token.type) {
        case t_IDENTIFIER:
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);
            //kontrola, ci pride inicializacia alebo definicia -- Neviem ci je IBA priradenie hodnoty možné, ak áno, iteračná premenná musí byť definovaná dopredu
            if (token.type != t_DEFINITION_2) {error_call(ERR_SYN, &tokens);}
            else {token = get_next_token(stdin);  TDLLInsertLast(&tokens, token);}

            TDLLInitList(&psa_list);

            while (token.type != T_SEMICOLON) {
                if ((token.type == t_PLUS)
                    || (token.type == t_MINUS)
                    || (token.type == t_DIVIDE)
                    || (token.type == t_MULTIPLY)
                    || (token.type == t_RIGHT_BRACKET)
                    || (token.type == t_LEFT_BRACKET)
                    || (token.type == t_LESS)
                    || (token.type == t_LESSOREQUAL)
                    || (token.type == t_GREATER)
                    || (token.type == t_GREATEROREQUAL)
                    || (token.type == t_EQUAL)
                    || (token.type == t_NOT_EQUAL)
                    || (token.type == t_IDENTIFIER)
                    || (token.type == t_FLOAT)
                    || (token.type == t_INT_NON_ZERO)
                    || (token.type == t_INT_ZERO)
                    || (token.type == t_STRING)) {

                    TDLLInsertLast(&psa_list, token);
                    token = get_next_token(stdin); TDLLInsertLast(&tokens, token);
                    

                } else { error_call(ERR_SYN, &tokens); }
            }

            evaluation(&psa_list, &tokens);
            TDLLDisposeList(&psa_list);
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);
            break;
            // Definicia je vynechaná
        case T_SEMICOLON:
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);
            break;
        default:
            //hocico ine -- ERROR
            error_call(ERR_SYN, &tokens);
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0xcb82(%rip), %eax      # 0x103d0
movl %eax, -0x54(%rbp)
subl $0x13, %eax
je 0x3869
jmp 0x3858
movl -0x54(%rbp), %eax
subl $0x38, %eax
je 0x3aa5
jmp 0x3aec
movq 0xc768(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x4840
movq %rax, -0x10(%rbp)
movl %edx, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, 0xcb3e(%rip)      # 0x103c8
movq -0x8(%rbp), %rax
movq %rax, 0xcb3b(%rip)      # 0x103d0
movq 0xcb2c(%rip), %rsi      # 0x103c8
movl 0xcb2e(%rip), %edx      # 0x103d0
leaq 0xcb07(%rip), %rdi      # 0x103b0
callq 0x1450
cmpl $0x32, 0xcb1b(%rip)     # 0x103d0
je 0x38ca
movl $0x2, %edi
leaq 0xcaed(%rip), %rsi      # 0x103b0
callq 0x64e0
jmp 0x390f
movq 0xc707(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x4840
movq %rax, -0x20(%rbp)
movl %edx, -0x18(%rbp)
movq -0x20(%rbp), %rax
movq %rax, 0xcadd(%rip)      # 0x103c8
movq -0x18(%rbp), %rax
movq %rax, 0xcada(%rip)      # 0x103d0
movq 0xcacb(%rip), %rsi      # 0x103c8
movl 0xcacd(%rip), %edx      # 0x103d0
leaq 0xcaa6(%rip), %rdi      # 0x103b0
callq 0x1450
leaq 0xcac2(%rip), %rdi      # 0x103d8
callq 0x1310
cmpl $0x38, 0xcaae(%rip)     # 0x103d0
je 0x3a3f
cmpl $0xa, 0xcaa1(%rip)      # 0x103d0
je 0x39c9
cmpl $0xb, 0xca94(%rip)      # 0x103d0
je 0x39c9
cmpl $0x8, 0xca87(%rip)      # 0x103d0
je 0x39c9
cmpl $0x9, 0xca7e(%rip)      # 0x103d0
je 0x39c9
cmpl $0x7, 0xca75(%rip)      # 0x103d0
je 0x39c9
cmpl $0x6, 0xca6c(%rip)      # 0x103d0
je 0x39c9
cmpl $0x1, 0xca63(%rip)      # 0x103d0
je 0x39c9
cmpl $0x1e, 0xca5a(%rip)     # 0x103d0
je 0x39c9
cmpl $0x2, 0xca51(%rip)      # 0x103d0
je 0x39c9
cmpl $0x1f, 0xca48(%rip)     # 0x103d0
je 0x39c9
cmpl $0x20, 0xca3f(%rip)     # 0x103d0
je 0x39c9
cmpl $0x21, 0xca36(%rip)     # 0x103d0
je 0x39c9
cmpl $0x13, 0xca2d(%rip)     # 0x103d0
je 0x39c9
cmpl $0x29, 0xca24(%rip)     # 0x103d0
je 0x39c9
cmpl $0x11, 0xca1b(%rip)     # 0x103d0
je 0x39c9
cmpl $0x10, 0xca12(%rip)     # 0x103d0
je 0x39c9
cmpl $0x2b, 0xca09(%rip)     # 0x103d0
jne 0x3a29
movq 0xc9f8(%rip), %rsi      # 0x103c8
movl 0xc9fa(%rip), %edx      # 0x103d0
leaq 0xc9fb(%rip), %rdi      # 0x103d8
callq 0x1450
movq 0xc5ef(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x4840
movq %rax, -0x30(%rbp)
movl %edx, -0x28(%rbp)
movq -0x30(%rbp), %rax
movq %rax, 0xc9c5(%rip)      # 0x103c8
movq -0x28(%rbp), %rax
movq %rax, 0xc9c2(%rip)      # 0x103d0
movq 0xc9b3(%rip), %rsi      # 0x103c8
movl 0xc9b5(%rip), %edx      # 0x103d0
leaq 0xc98e(%rip), %rdi      # 0x103b0
callq 0x1450
jmp 0x3a3a
movl $0x2, %edi
leaq 0xc97b(%rip), %rsi      # 0x103b0
callq 0x64e0
jmp 0x391b
leaq 0xc992(%rip), %rdi      # 0x103d8
leaq 0xc963(%rip), %rsi      # 0x103b0
callq 0xc860
leaq 0xc97f(%rip), %rdi      # 0x103d8
callq 0x1340
movq 0xc573(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x4840
movq %rax, -0x40(%rbp)
movl %edx, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq %rax, 0xc949(%rip)      # 0x103c8
movq -0x38(%rbp), %rax
movq %rax, 0xc946(%rip)      # 0x103d0
movq 0xc937(%rip), %rsi      # 0x103c8
movl 0xc939(%rip), %edx      # 0x103d0
leaq 0xc912(%rip), %rdi      # 0x103b0
callq 0x1450
jmp 0x3afd
movq 0xc52c(%rip), %rax      # 0xffd8
movq (%rax), %rdi
callq 0x4840
movq %rax, -0x50(%rbp)
movl %edx, -0x48(%rbp)
movq -0x50(%rbp), %rax
movq %rax, 0xc902(%rip)      # 0x103c8
movq -0x48(%rbp), %rax
movq %rax, 0xc8ff(%rip)      # 0x103d0
movq 0xc8f0(%rip), %rsi      # 0x103c8
movl 0xc8f2(%rip), %edx      # 0x103d0
leaq 0xc8cb(%rip), %rdi      # 0x103b0
callq 0x1450
jmp 0x3afd
movl $0x2, %edi
leaq 0xc8b8(%rip), %rsi      # 0x103b0
callq 0x64e0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)