LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/tokenList.c
// Function: TDLLInsertLast
void TDLLInsertLast(TDLList *L, TOKEN token) {

    TDLLElemPtr tmp = (TDLLElemPtr) malloc(sizeof(struct TDLLElem));       //alokacia pamate
    if (tmp == NULL) {
        return;
    }
    tmp->tdata = token;                                    //nakopirovanie dat
    tmp->rptr = NULL;                                   //pravy ukazatel noveho prvku musi byt NULL
    tmp->lptr = L->Last;                                //lavy ukazatl noveho ukazuje na Last
    if (L->Last == NULL) {                              //zoznam je prazdny
        L->First = tmp;
    }
    else {                                              //zoznam nieje prazdny
        L->Last->rptr = tmp;
    }
    L->Last = tmp;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x20, %edi
callq 0x10a0
testq %rax, %rax
je 0x1769
movq %r14, (%rax)
movl %ebp, 0x8(%rax)
movq $0x0, 0x18(%rax)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
leaq 0x18(%rcx), %rdx
testq %rcx, %rcx
cmoveq %rbx, %rdx
movq %rax, (%rdx)
movq %rax, 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/tokenList.c
// Function: TDLLDeleteFirst
void TDLLDeleteFirst (TDLList *L) {

    if (L->First != NULL) {                         //zoznam nie je prazdny
        TDLLElemPtr tmp = L->First;
        if (L->First == L->Act) {
            L->Act = NULL;
        }
        if (L->First == L->Last) {                  //zoznam ma jediny prvok
            tmp = L->First;
            L->First = NULL;
            L->Last = NULL;
        }
        else {                                      //zoznam ma viac prvkov
            tmp = L->First;
            L->First = L->First->rptr;
            L->First->lptr = NULL;
        }
        free(tmp);
    }
}

// Assembly:
movq %rdi, %rax
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x17c6
cmpq 0x8(%rax), %rdi
jne 0x17b0
movq $0x0, 0x8(%rax)
cmpq 0x10(%rax), %rdi
je 0x17c7
movq 0x18(%rdi), %rcx
movq %rcx, (%rax)
addq $0x10, %rcx
movq %rcx, %rax
jmp 0x17d2
retq
movq $0x0, (%rax)
addq $0x10, %rax
movq $0x0, (%rax)
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/tokenList.c
// Function: TDLLDeleteLast
void TDLLDeleteLast (TDLList *L) {

    if (L->First != NULL) {                      //zoznam nie je prazdny
        TDLLElemPtr tmp = L->First;
        if (L->First == L->Act) {
            L->Act = NULL;
        }
        if (L->First == L->Last) {               //zoznam ma jediny prvok
            tmp = L->Last;
            L->First = NULL;
            L->Last = NULL;
        }
        else {                                   //zoznam ma viac prvkov
            tmp = L->Last;
            L->Last = L->Last->lptr;
            L->Last->rptr = NULL;
        }
        free(tmp);
    }
}

// Assembly:
movq (%rdi), %rdx
testq %rdx, %rdx
je 0x1811
cmpq 0x8(%rdi), %rdx
jne 0x17f4
movq $0x0, 0x8(%rdi)
leaq 0x10(%rdi), %rcx
movq 0x10(%rdi), %rax
cmpq %rax, %rdx
je 0x1812
movq 0x10(%rax), %rdx
movq %rdx, (%rcx)
addq $0x18, %rdx
movq %rdx, %rcx
jmp 0x1819
retq
movq $0x0, (%rdi)
movq $0x0, (%rcx)
movq %rax, %rdi
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/tokenList.c
// Function: TDLLPostDelete
void TDLLPostDelete (TDLList *L) {

    if (L->Act && L->Act != L->Last) {              //zoznam musi byt aktivny inde ako na posledom prvku
        TDLLElemPtr tmp = L->Act->rptr;              //tmp bude ukazovat na odstranovany prvok
        if (tmp == L->Last) {                       //mazany prvok je posledny
            L->Act->rptr = NULL;                    //pravy ukazatel aktivneho prvku bude NULL
            L->Last = L->Act;                       //aktivny prvok sa stava poslednym
        }
        else {                                      //mazany prvok nieje posledny
            L->Act->rptr = tmp->rptr;               //pravy ukazatel aktivneho ukazuje vpravo od mazaneho
            tmp->rptr->lptr = L->Act;               //lavy ukazetel vpravo od mazaneho bude ukazovat na aktivny
        }
        free(tmp);                                  //uvolnenie pamati mazaneho prvku
    }
}

// Assembly:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x1855
movq 0x10(%rdi), %rdx
cmpq %rdx, %rcx
je 0x1855
movq 0x18(%rcx), %rax
cmpq %rdx, %rax
je 0x1856
movq 0x18(%rax), %rdx
movq %rdx, 0x18(%rcx)
movq 0x18(%rax), %rdi
addq $0x10, %rdi
jmp 0x1862
retq
addq $0x10, %rdi
movq $0x0, 0x18(%rcx)
movq %rcx, (%rdi)
movq %rax, %rdi
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/tokenList.c
// Function: TDLLPreDelete
void TDLLPreDelete (TDLList *L) {

    if (L->Act && L->Act != L->First) {             //zoznam musi byt aktivny inde ako na prvom prvku
        TDLLElemPtr tmp = L->Act->lptr;              //tmp bude ukazovat na odstranovany prvok
        if (tmp == L->First) {                      //odstranovan prvok je prvy
            L->Act->lptr = NULL;                    //lavy ukazatel aktivneho prvku bude NULL
            L->First = L->Act;                      //aktivny prvok sa stava prvym
        }
        else {                                      //odstranovany prvok nie je prvy
            L->Act->lptr = tmp->lptr;               //lavy ukazatel aktivneho musi ukazovat vlavo od mazaneho
            tmp->lptr->rptr = L->Act;               //pravy ukazatel vpravo od mazaneho musi ukazovat na aktivny
        }
        free(tmp);                                  //uvolnenie pamati mazaneho prvku
    }
}

// Assembly:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
je 0x1899
movq (%rdi), %rdx
cmpq %rdx, %rcx
je 0x1899
movq 0x10(%rcx), %rax
cmpq %rdx, %rax
je 0x189a
movq 0x10(%rax), %rdx
movq %rdx, 0x10(%rcx)
movq 0x10(%rax), %rdi
addq $0x18, %rdi
jmp 0x18a2
retq
movq $0x0, 0x10(%rcx)
movq %rcx, (%rdi)
movq %rax, %rdi
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/tokenList.c
// Function: TDLLPostInsert
void TDLLPostInsert (TDLList *L, TOKEN token) {

    if (L->Act) {                                   //zoznam je aktivny
        TDLLElemPtr tmp = (TDLLElemPtr) malloc(sizeof(struct TDLLElem));   //alokacia pamati
        tmp->tdata = token;                            //kopirovanie dat
        if (L->Act == L->Last) {                    //aktivny prvok je posledny
            L->Act->rptr = tmp;
            tmp->lptr = L->Act;
            tmp->rptr = NULL;
            L->Last = tmp;
        }
        else {                                      //aktivny prvok nie je posledny
            tmp->rptr = L->Act->rptr;               //pravy ukazatel tmp ukazuje vpravo od Act
            tmp->rptr->lptr = tmp;                  //lavy ukazatel prvku vpravo od tmp ukazuje na tmp
            tmp->lptr = L->Act;                     //lavy ukazatel tmp ukazuje na Act
            L->Act->rptr = tmp;                     //pravy ukazatel act ukazuje na tmp
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0x1913
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x20, %edi
callq 0x10a0
movq %r14, (%rax)
movl %ebp, 0x8(%rax)
leaq 0x18(%r15), %rcx
cmpq 0x10(%rbx), %r15
je 0x18f0
movq (%rcx), %rsi
movq %rsi, 0x18(%rax)
movl $0x10, %edx
movq %rax, %rdi
jmp 0x1908
addq $0x10, %rbx
movq %rax, (%rcx)
movl $0x18, %edx
movq %rax, %rsi
movq %r15, %rdi
xorl %r15d, %r15d
movq %rbx, %rcx
movq %rdi, 0x10(%rsi)
movq %r15, (%rax,%rdx)
movq %rax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/tokenList.c
// Function: TDLLPreInsert
void TDLLPreInsert (TDLList *L, TOKEN token) {

    if (L->Act) {                                   //zoznam je aktivny
        TDLLElemPtr tmp = (TDLLElemPtr) malloc(sizeof(struct TDLLElem));   //alokacia pamati
        tmp->tdata = token;                            //kopirovanie dat
        if (L->Act == L->First) {                    //aktivny prvok je prvy
            tmp->rptr = L->Act;                      //pravy ukazatel tmp ukazuje na act
            tmp->lptr = NULL;                        //lavy ukazatel tmp je NULL
            L->Act->lptr = tmp;                      //lavy ukazatel act ukazuje na tmp
            L->First = tmp;                          //tmp je prvy prvok v zozname
        }
        else {                                      //aktivny prvok nie je prvy
            tmp->rptr = L->Act;                      //pravy ukazatel tmp ukazuje na act
            tmp->lptr = L->Act->lptr;                //lavy ukazatel tmp ukazuje na prvok pred act
            tmp->lptr->rptr = tmp;                   //pravy ukazatel prvku pred act ukazuje na tmp
            L->Act->lptr = tmp;                      //lavy ukazatel act ukazuje na tmp
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0x1976
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl $0x20, %edi
callq 0x10a0
movq %r14, (%rax)
movl %ebp, 0x8(%rax)
cmpq (%rbx), %r15
movq %r15, 0x18(%rax)
je 0x1964
movq %r15, %rbx
movq 0x10(%r15), %r15
addq $0x10, %rbx
movq %r15, 0x10(%rax)
addq $0x18, %r15
jmp 0x1970
movq $0x0, 0x10(%rax)
addq $0x10, %r15
movq %rax, (%r15)
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: main
int main() {

    //inicilizacia zoznamu tokenov
    TDLLInitList(&tokens);

    //načitanie prvého tokenu
    token = get_next_token(stdin);
    //nacitanie tokenu do zoznamu tokenov, bude sa volast s kazdym get_next_token
    TDLLInsertLast(&tokens, token);
    // eol(y) na zaciatku -- nepovinne
    if (token.type == t_EOL) {
        rule_eol();
    }

    // Test package main
    if (token.type != t_PACKAGE_MAIN) { error_call(ERR_SYN, &tokens); }
    else { token = get_next_token(stdin); TDLLInsertLast(&tokens, token); }

    // Neterminal <eol> -- nepovinny eol
    if (token.type == t_EOL) {
        rule_eol();
    }

    // Neterminal <def_func> -- Zacne definicia funkcie
    if (token.type != t_FUNC) { error_call(ERR_SYN, &tokens); }
    else {
        token = get_next_token(stdin);
        TDLLInsertLast(&tokens, token);
        def_func();
    }
    goThroughList(&tokens);

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xa9e5(%rip), %rbx      # 0xc3b0
movq %rbx, %rdi
callq 0x16a7
movq 0xa5fe(%rip), %r14      # 0xbfd8
movq (%r14), %rdi
callq 0x31f0
movq %rax, 0xa9df(%rip)      # 0xc3c8
movl %edx, 0xa9e1(%rip)      # 0xc3d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1726
cmpl $0x2f, 0xa9cf(%rip)     # 0xc3d0
jne 0x1a08
callq 0x2f42
cmpl $0x1b, 0xa9c1(%rip)     # 0xc3d0
jne 0x1a37
movq (%r14), %rdi
callq 0x31f0
movq %rax, 0xa9a8(%rip)      # 0xc3c8
movl %edx, 0xa9aa(%rip)      # 0xc3d0
leaq 0xa983(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
callq 0x1726
jmp 0x1a48
leaq 0xa972(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
callq 0x42c8
cmpl $0x2f, 0xa981(%rip)     # 0xc3d0
jne 0x1a56
callq 0x2f42
cmpl $0x1c, 0xa973(%rip)     # 0xc3d0
jne 0x1a8a
movq (%r14), %rdi
callq 0x31f0
movq %rax, 0xa95a(%rip)      # 0xc3c8
movl %edx, 0xa95c(%rip)      # 0xc3d0
leaq 0xa935(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
callq 0x1726
callq 0x1ab1
jmp 0x1a9b
leaq 0xa91f(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
callq 0x42c8
leaq 0xa90e(%rip), %rdi      # 0xc3b0
callq 0x7a14
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: rule_func_retlist_body
void rule_func_retlist_body() {
    switch (token.type) {
        //REQUIRED_RETURN
        case t_LEFT_BRACKET:
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);

            rule_func_body();

            break;

            //OPTIONAL_RETURN
        case t_BRACES_L:
            global_brace_count++;
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);
            if (token.type != t_EOL) { error_call(ERR_SYN, &tokens); }
            else { token = get_next_token(stdin); TDLLInsertLast(&tokens, token); }

            // Neterminál stat (STATEMENT) -- Vyjadruje možné príkazy v tele funkcie
            rule_stat();

    }
}

// Assembly:
pushq %rbx
movl 0xa784(%rip), %eax      # 0xc3d0
cmpl $0x34, %eax
je 0x1c8b
cmpl $0x6, %eax
jne 0x1ceb
movq 0xa377(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
callq 0x31f0
movq %rax, 0xa758(%rip)      # 0xc3c8
movl %edx, 0xa75a(%rip)      # 0xc3d0
leaq 0xa733(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
callq 0x1726
popq %rbx
jmp 0x1d53
incl 0xa71b(%rip)            # 0xc3ac
movq 0xa340(%rip), %rbx      # 0xbfd8
movq (%rbx), %rdi
callq 0x31f0
movq %rax, 0xa721(%rip)      # 0xc3c8
movl %edx, 0xa723(%rip)      # 0xc3d0
leaq 0xa6fc(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
callq 0x1726
cmpl $0x2f, 0xa70d(%rip)     # 0xc3d0
jne 0x1ced
movq (%rbx), %rdi
callq 0x31f0
movq %rax, 0xa6f4(%rip)      # 0xc3c8
movl %edx, 0xa6f6(%rip)      # 0xc3d0
leaq 0xa6cf(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
callq 0x1726
jmp 0x1cfe
popq %rbx
retq
leaq 0xa6bc(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
callq 0x42c8
popq %rbx
jmp 0x1e3a
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: rule_func_body
void rule_func_body() {
    //pravidlo return_type
    rule_return_type();

    //V prípade, že nám nepríde ukončovacia zátvorka zoznamu návratových typov, ERROR.

    if (token.type != t_RIGHT_BRACKET) { error_call(ERR_SYN, &tokens); }
    else { token = get_next_token(stdin); TDLLInsertLast(&tokens, token); }

    // Token otváracej množinovej zátvorky pre začiatok tela funckie

    if (token.type != t_BRACES_L) { error_call(ERR_SYN, &tokens); }
    else {
        global_brace_count++;
        token = get_next_token(stdin);
        TDLLInsertLast(&tokens, token);
    }

    // Nutný EOL po otváracej množinovej zátvorke
    if (token.type != t_EOL) { error_call(ERR_SYN, &tokens); }
    else { token = get_next_token(stdin); TDLLInsertLast(&tokens, token); }


    // Neterminál EOL pre možné príkazy v tele funckie
    rule_stat();

}

// Assembly:
pushq %rax
callq 0x1d04
cmpl $0x7, 0xa670(%rip)      # 0xc3d0
jne 0x1d8f
movq 0xa26f(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
callq 0x31f0
movq %rax, 0xa650(%rip)      # 0xc3c8
movl %edx, 0xa652(%rip)      # 0xc3d0
leaq 0xa62b(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
callq 0x1726
jmp 0x1da0
leaq 0xa61a(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
callq 0x42c8
cmpl $0x34, 0xa629(%rip)     # 0xc3d0
jne 0x1ddc
incl 0xa5fd(%rip)            # 0xc3ac
movq 0xa222(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
callq 0x31f0
movq %rax, 0xa603(%rip)      # 0xc3c8
movl %edx, 0xa605(%rip)      # 0xc3d0
leaq 0xa5de(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
callq 0x1726
jmp 0x1ded
leaq 0xa5cd(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
callq 0x42c8
cmpl $0x2f, 0xa5dc(%rip)     # 0xc3d0
jne 0x1e23
movq 0xa1db(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
callq 0x31f0
movq %rax, 0xa5bc(%rip)      # 0xc3c8
movl %edx, 0xa5be(%rip)      # 0xc3d0
leaq 0xa597(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
callq 0x1726
jmp 0x1e34
leaq 0xa586(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
callq 0x42c8
popq %rax
jmp 0x1e3a
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: rule_params
void rule_params() {
    // nastavenie flagu na true
    no_id_in_params_flag = true;
    switch (token.type) {
        case t_IDENTIFIER:
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);
            //kontrola, ci je správny typ
            rule_type();
            //Ak nasleduju dalsie parametre
            rule_params_n();
            break;

        // koniec zoznamu ukoncovacou zatvorkou
        case t_RIGHT_BRACKET:
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);
            break;
    }
    no_id_in_params_flag = false;
}

// Assembly:
pushq %rax
movb $0x1, 0x9d1e(%rip)      # 0xc3a8
movl 0x9d40(%rip), %eax      # 0xc3d0
cmpl $0x7, %eax
je 0x26d1
cmpl $0x13, %eax
jne 0x26fc
movq 0x9937(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
callq 0x31f0
movq %rax, 0x9d18(%rip)      # 0xc3c8
movl %edx, 0x9d1a(%rip)      # 0xc3d0
leaq 0x9cf3(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
callq 0x1726
callq 0x2ce5
callq 0x2705
jmp 0x26fc
movq 0x9900(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
callq 0x31f0
movq %rax, 0x9ce1(%rip)      # 0xc3c8
movl %edx, 0x9ce3(%rip)      # 0xc3d0
leaq 0x9cbc(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
callq 0x1726
movb $0x0, 0x9ca5(%rip)      # 0xc3a8
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: rule_params_n
void rule_params_n() {
    //ak pride zatvorka -- koniec
    if (token.type == t_RIGHT_BRACKET) {
        token = get_next_token(stdin);
        TDLLInsertLast(&tokens, token);
        return;
    }

    // prva musi prist ciarka ako oddelovac dalsieho parametra
    if (token.type != t_COMMA) { error_call(ERR_SYN, &tokens); }
    else { token = get_next_token(stdin); TDLLInsertLast(&tokens, token); }

    // kontrola, ci po ciarke pride id
    if (token.type != t_IDENTIFIER) { error_call(ERR_SYN, &tokens); }
        // ak pride id, pokracujeme typom a nasledne volame params_n znova
    else {
        token = get_next_token(stdin);
        TDLLInsertLast(&tokens, token);
        //kontrola, ci je typ premennej správny
        rule_type();
        // rekurzivne volanie params_n
        rule_params_n();
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x98c8(%rip), %r14      # 0xbfd8
leaq 0x9c99(%rip), %rbx      # 0xc3b0
movl 0x9cb3(%rip), %eax      # 0xc3d0
cmpl $0x5, %eax
je 0x2736
cmpl $0x7, %eax
je 0x279e
movl $0x2, %edi
movq %rbx, %rsi
callq 0x42c8
jmp 0x2756
movq (%r14), %rdi
callq 0x31f0
movq %rax, 0x9c83(%rip)      # 0xc3c8
movl %edx, 0x9c85(%rip)      # 0xc3d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1726
cmpl $0x13, 0x9c73(%rip)     # 0xc3d0
jne 0x2786
movq (%r14), %rdi
callq 0x31f0
movq %rax, 0x9c5a(%rip)      # 0xc3c8
movl %edx, 0x9c5c(%rip)      # 0xc3d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1726
callq 0x2ce5
jmp 0x2717
leaq 0x9c23(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x42c8
movq (%r14), %rdi
callq 0x31f0
movq %rax, 0x9c1b(%rip)      # 0xc3c8
movl %edx, 0x9c1d(%rip)      # 0xc3d0
leaq 0x9bf6(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1726
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: rule_func_params
void rule_func_params() {
   //Token pravá zátvorka, koniec
    if (token.type == t_RIGHT_BRACKET) {
        token = get_next_token(stdin);
        TDLLInsertLast(&tokens, token);
        return;
    }
    else {
        // Možné typy vo vstupnych parametroch funckie
        if (token.type != t_IDENTIFIER && token.type != t_FLOAT && token.type != t_STRING &&
            token.type != t_INT_NON_ZERO && token.type != t_INT_ZERO) { error_call(ERR_SYN, &tokens); }
        token = get_next_token(stdin);
        TDLLInsertLast(&tokens, token);
        //rekurzivne func_params_NEXT, bud budu dalsie typy alebo koniec
        rule_func_params_n();
    }
}

// Assembly:
pushq %rax
movl 0x9c00(%rip), %eax      # 0xc3d0
cmpq $0x2b, %rax
ja 0x2849
movabsq $0xa00000b0000, %rcx    # imm = 0xA00000B0000
btq %rax, %rcx
jae 0x2817
movq 0x97eb(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
callq 0x31f0
movq %rax, 0x9bcc(%rip)      # 0xc3c8
movl %edx, 0x9bce(%rip)      # 0xc3d0
leaq 0x9ba7(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
callq 0x1726
popq %rax
jmp 0x285c
cmpq $0x7, %rax
jne 0x2849
movq 0x97b4(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
callq 0x31f0
movq %rax, 0x9b95(%rip)      # 0xc3c8
movl %edx, 0x9b97(%rip)      # 0xc3d0
leaq 0x9b70(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
popq %rax
jmp 0x1726
leaq 0x9b60(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
callq 0x42c8
jmp 0x27e6
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: rule_func_params_n
void rule_func_params_n() {
    if (token.type == t_RIGHT_BRACKET) { return; }

    else {
        // Za prechádzajúcim typom musí prísť čiarka napr. (10 , ...)
        if (token.type != t_COMMA) { error_call(ERR_SYN, &tokens); }
        token = get_next_token(stdin);
        TDLLInsertLast(&tokens, token);

        if (token.type != t_IDENTIFIER && token.type != t_FLOAT && token.type != t_STRING &&
            token.type != t_INT_NON_ZERO && token.type != t_INT_ZERO) { error_call(ERR_SYN, &tokens); }
        token = get_next_token(stdin);
        TDLLInsertLast(&tokens, token);
        //rekurzivne volanie, bud dalsie typy alebo koniec
        rule_func_params_n();

    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x9770(%rip), %r14      # 0xbfd8
leaq 0x9b41(%rip), %rbx      # 0xc3b0
movabsq $0xa00000b0000, %r15    # imm = 0xA00000B0000
movl 0x9b51(%rip), %eax      # 0xc3d0
cmpl $0x5, %eax
je 0x2896
cmpl $0x7, %eax
je 0x28f9
movl $0x2, %edi
movq %rbx, %rsi
callq 0x42c8
movq (%r14), %rdi
callq 0x31f0
movq %rax, 0x9b23(%rip)      # 0xc3c8
movl %edx, 0x9b25(%rip)      # 0xc3d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1726
movl 0x9b14(%rip), %eax      # 0xc3d0
cmpq $0x2b, %rax
ja 0x28ea
btq %rax, %r15
jae 0x28ea
movq (%r14), %rdi
callq 0x31f0
movq %rax, 0x9af1(%rip)      # 0xc3c8
movl %edx, 0x9af3(%rip)      # 0xc3d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1726
jmp 0x2879
movl $0x2, %edi
movq %rbx, %rsi
callq 0x42c8
jmp 0x28c8
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: rule_id_n
void rule_id_n() {
    switch (token.type) {
        // za predchádzajúcim identifikátorom musí prísť čiarka
        case t_COMMA:
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);
            //token ID
            if (token.type != t_IDENTIFIER) { error_call(ERR_SYN, &tokens); }
            else { token = get_next_token(stdin); TDLLInsertLast(&tokens, token); }


            //rekurzivne volanie pre dalsie mozne IDs, ak nepridu, koniec
            rule_id_n();
            break;
            //ak pride =, koniec
        case t_ASSIGN:
            break;
            //ak pride :=, koniec, NEPODPORUJEME, ROZSIRENIE MULTI_VAL
        case t_DEFINITION_2:
            break;
            // hocico ine, ERROR
        default:
            error_call(ERR_SYN, &tokens);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x96ce(%rip), %r14      # 0xbfd8
leaq 0x9a9f(%rip), %rbx      # 0xc3b0
movl 0x9ab9(%rip), %eax      # 0xc3d0
cmpl $0x5, %eax
jne 0x2976
movq (%r14), %rdi
callq 0x31f0
movq %rax, 0x9a9d(%rip)      # 0xc3c8
movl %edx, 0x9a9f(%rip)      # 0xc3d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1726
cmpl $0x13, 0x9a8d(%rip)     # 0xc3d0
jne 0x2967
movq (%r14), %rdi
callq 0x31f0
movq %rax, 0x9a74(%rip)      # 0xc3c8
movl %edx, 0x9a76(%rip)      # 0xc3d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1726
jmp 0x2911
movl $0x2, %edi
movq %rbx, %rsi
callq 0x42c8
jmp 0x2911
cmpl $0x3, %eax
je 0x2980
cmpl $0x32, %eax
jne 0x2988
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x9a21(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x42c8
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: rule_type
void rule_type() {
    // Priradenie datoveho typu -
    switch (token.type) {
        case t_FLOAT64:
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);
            break;
        case t_INT_ID:
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);
            break;
        case t_INT_ZERO:
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);
            break;
        case t_STRING_ID:
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);
            break;
        case t_IDENTIFIER:
            if (no_id_in_params_flag == true) { error_call(ERR_SYN, &tokens); }
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);
            break;
        default:
            error_call(ERR_SYN, &tokens);
    }
}

// Assembly:
pushq %rax
movl 0x96e4(%rip), %eax      # 0xc3d0
addl $-0x10, %eax
cmpl $0x8, %eax
ja 0x2d30
leaq 0x53ad(%rip), %rcx      # 0x80a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x92cd(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
callq 0x31f0
movq %rax, 0x96ae(%rip)      # 0xc3c8
movl %edx, 0x96b0(%rip)      # 0xc3d0
leaq 0x9689(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
popq %rax
jmp 0x1726
leaq 0x9679(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
popq %rax
jmp 0x42c8
cmpb $0x1, 0x965f(%rip)      # 0xc3a8
jne 0x2d04
leaq 0x965e(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
callq 0x42c8
jmp 0x2d04
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: rule_return_type_n
void rule_return_type_n() {
    no_id_in_params_flag = true;
    switch (token.type) {
        case t_COMMA:
            // Musí prís čiarka za predchadzajúcim návratovým typom
            token = get_next_token(stdin);
            TDLLInsertLast(&tokens, token);
            rule_type();
            rule_return_type_n();
            break;

            //prava zatvorka, koniec
        case t_RIGHT_BRACKET:
            break;

        default:
            error_call(ERR_SYN, &tokens);
    }
    no_id_in_params_flag = false;
}

// Assembly:
movb $0x1, 0x95df(%rip)      # 0xc3a8
movl 0x9601(%rip), %eax      # 0xc3d0
cmpl $0x7, %eax
je 0x2e26
pushq %rax
cmpl $0x5, %eax
jne 0x2e11
movq 0x91f7(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
callq 0x31f0
movq %rax, 0x95d8(%rip)      # 0xc3c8
movl %edx, 0x95da(%rip)      # 0xc3d0
leaq 0x95b3(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
callq 0x1726
callq 0x2ce5
callq 0x2dc2
jmp 0x2e22
leaq 0x9598(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
callq 0x42c8
addq $0x8, %rsp
movb $0x0, 0x957b(%rip)      # 0xc3a8
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: rule_exp_n
void rule_exp_n() {

    if (token.type == t_EOL)
    {
        return;

    } else if (token.type == t_BRACES_L) {
        return;
    } else if (token.type != t_COMMA) {error_call(ERR_SYN, &tokens);}
    else {
        token = get_next_token(stdin);
        TDLLInsertLast(&tokens, token);

        TDLLInitList(&psa_list);

        if (token.type == t_EOL) {error_call(ERR_SYN, &tokens);}
        else {

            while (token.type != t_COMMA && token.type != t_EOL && token.type != t_BRACES_L) {
                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);


            rule_exp_n();
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x919a(%rip), %r15      # 0xbfd8
leaq 0x956b(%rip), %rbx      # 0xc3b0
leaq 0x958c(%rip), %r14      # 0xc3d8
movabsq $0xa03c00b0fc6, %r12    # imm = 0xA03C00B0FC6
movabsq $0x10800000000020, %r13 # imm = 0x10800000000020
movl 0x956a(%rip), %eax      # 0xc3d0
cmpl $0x5, %eax
jne 0x2f14
movq (%r15), %rdi
callq 0x31f0
movq %rax, 0x954a(%rip)      # 0xc3c8
movl %edx, 0x954c(%rip)      # 0xc3d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1726
movq %r14, %rdi
callq 0x16a7
cmpl $0x2f, 0x9532(%rip)     # 0xc3d0
je 0x2f28
movl 0x9526(%rip), %edx      # 0xc3d0
cmpq $0x34, %rdx
ja 0x2eed
btq %rdx, %r12
jae 0x2ee7
movq 0x950b(%rip), %rsi      # 0xc3c8
movq %r14, %rdi
callq 0x1726
movq (%r15), %rdi
callq 0x31f0
movq %rax, 0x94f4(%rip)      # 0xc3c8
movl %edx, 0x94f6(%rip)      # 0xc3d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1726
jmp 0x2ea4
btq %rdx, %r13
jb 0x2efc
movl $0x2, %edi
movq %rbx, %rsi
callq 0x42c8
jmp 0x2ea4
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7d13
movq %r14, %rdi
callq 0x16b6
jmp 0x2e60
cmpl $0x2f, %eax
je 0x2f1e
cmpl $0x34, %eax
jne 0x2f28
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x9481(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x42c8
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: rule_eol
void rule_eol() {

    //Zaplata pre PRAVE ZATVORKY
    if (token.type == t_BRACES_R) { return; }

    token = get_next_token(stdin);
    TDLLInsertLast(&tokens, token);

    switch (token.type) {
        case t_EOL:
            rule_eol();
            break;

        default:
            if (between_def == true) {
                if (token.type != t_FUNC && token.type != t_EOF) {
                    error_call(ERR_SYN, &tokens);
                }
            }
            break;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x908b(%rip), %r14      # 0xbfd8
leaq 0x945c(%rip), %rbx      # 0xc3b0
cmpl $0x33, 0x9475(%rip)     # 0xc3d0
je 0x2fb1
movq (%r14), %rdi
callq 0x31f0
movq %rax, 0x945c(%rip)      # 0xc3c8
movl %edx, 0x945e(%rip)      # 0xc3d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1726
movl 0x944d(%rip), %eax      # 0xc3d0
cmpl $0x2f, %eax
je 0x2f54
addl $-0x1e, %eax
cmpl $-0x3, %eax
ja 0x2fb1
cmpb $0x0, 0x9414(%rip)      # 0xc3ab
je 0x2fb1
leaq 0x9410(%rip), %rsi      # 0xc3b0
movl $0x2, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x42c8
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: optional_return
void optional_return(){

    // Nic nevraciame, cize za RETURNOM musí ísť eol
    if (token.type != t_EOL) { error_call(ERR_SEM_RETURN, &tokens); }
    else { token = get_next_token(stdin); TDLLInsertLast(&tokens, token); }

    // Možné eoly na konci
    if (token.type == t_EOL) {
        rule_eol();
    }
}

// Assembly:
pushq %rax
cmpl $0x2f, 0x940f(%rip)     # 0xc3d0
jne 0x2ff0
movq 0x900e(%rip), %rax      # 0xbfd8
movq (%rax), %rdi
callq 0x31f0
movq %rax, 0x93ef(%rip)      # 0xc3c8
movl %edx, 0x93f1(%rip)      # 0xc3d0
leaq 0x93ca(%rip), %rdi      # 0xc3b0
movq %rax, %rsi
callq 0x1726
jmp 0x3001
leaq 0x93b9(%rip), %rsi      # 0xc3b0
movl $0x6, %edi
callq 0x42c8
cmpl $0x2f, 0x93c8(%rip)     # 0xc3d0
jne 0x3010
popq %rax
jmp 0x2f42
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/parser.c
// Function: required_return
void required_return() {
    TDLLInitList(&psa_list);

    if (token.type == t_EOL) {error_call(ERR_SEM_RETURN, &tokens);}
    else {

        while (token.type != t_COMMA && token.type != t_EOL) {
            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);

    }


    // Ak za returnom nasledujú dalsie return výrazy
    rule_exp_n();



    //mozné EOLy sa returnom
    if (token.type == t_EOL) {
        rule_eol();
    }

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x93b6(%rip), %rdi      # 0xc3d8
callq 0x16a7
cmpl $0x2f, 0x93a2(%rip)     # 0xc3d0
jne 0x3046
leaq 0x9379(%rip), %rsi      # 0xc3b0
movl $0x6, %edi
callq 0x42c8
jmp 0x30e6
leaq 0x9363(%rip), %rbx      # 0xc3b0
movabsq $0xa03c00b0fc6, %r15    # imm = 0xA03C00B0FC6
leaq 0x937a(%rip), %r14      # 0xc3d8
movq 0x8f73(%rip), %r12      # 0xbfd8
movabsq $0x800000000020, %r13   # imm = 0x800000000020
movl 0x935b(%rip), %edx      # 0xc3d0
cmpq $0x2f, %rdx
ja 0x30b9
btq %rdx, %r15
jae 0x30b3
movq 0x9340(%rip), %rsi      # 0xc3c8
movq %r14, %rdi
callq 0x1726
movq (%r12), %rdi
callq 0x31f0
movq %rax, 0x9328(%rip)      # 0xc3c8
movl %edx, 0x932a(%rip)      # 0xc3d0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1726
jmp 0x306f
btq %rdx, %r13
jb 0x30c8
movl $0x2, %edi
movq %rbx, %rsi
callq 0x42c8
jmp 0x306f
leaq 0x9309(%rip), %rbx      # 0xc3d8
leaq 0x92da(%rip), %rsi      # 0xc3b0
movq %rbx, %rdi
callq 0x7d13
movq %rbx, %rdi
callq 0x16b6
callq 0x2e2e
cmpl $0x2f, 0x92de(%rip)     # 0xc3d0
jne 0x3102
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2f42
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/scanner.c
// Function: load_c
void load_c(FILE* text)
{
    current_char = getc(text);
    current_token[current_token_position] = current_char;
    current_token_position++;
    current_token[current_token_position] = 0x00;
}

// Assembly:
pushq %rax
callq 0x10e0
movb %al, 0x932a(%rip)       # 0xc474
movslq 0x92b3(%rip), %rcx      # 0xc404
leaq 0x92b8(%rip), %rdx      # 0xc410
movb %al, (%rcx,%rdx)
leaq 0x1(%rcx), %rax
movl %eax, 0x929f(%rip)      # 0xc404
movb $0x0, 0x1(%rcx,%rdx)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/scanner.c
// Function: end_token
void end_token(int type, TOKEN* token)
{
    alloc(current_token_position+1, token);
    strcpy(token->lex, current_token);
    token->type = type;
    delete_string();
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
movslq 0x9249(%rip), %rdi      # 0xc404
incq %rdi
callq 0x10a0
movq %rax, (%rbx)
leaq 0x9243(%rip), %rsi      # 0xc410
movq %rax, %rdi
callq 0x1040
movl %ebp, 0x8(%rbx)
movb $0x0, 0x9231(%rip)      # 0xc410
movl $0x0, 0x921b(%rip)      # 0xc404
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/symtable.c
// Function: BSTSearchGlobal
bool BSTSearchGlobal (tBSTNodePtrGlobal RootPtr, char* name,functionData *Content)	{

	if (RootPtr != NULL)
	{
		if ((strcmp(name, RootPtr->Name) < 0))
		{
			return BSTSearchGlobal(RootPtr->LPtr,name,Content);
				
		}
		else if (strcmp(name, RootPtr->Name) > 0)
		{
			return BSTSearchGlobal(RootPtr->RPtr,name,Content);
		}
		else
		{
			*(Content) = RootPtr->content;
			return true;								
		}
	}
	else 
	{

		return false;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %r14, %r14
je 0x43de
movq (%r14), %rsi
movq %r15, %rdi
callq 0x1080
testl %eax, %eax
jns 0x43d3
movq 0x1010(%r14), %r14
jmp 0x43b6
je 0x43e2
movq 0x1018(%r14), %r14
jmp 0x43b6
xorl %eax, %eax
jmp 0x43f8
addq $0x8, %r14
movl $0x1008, %edx           # imm = 0x1008
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1090
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/symtable.c
// Function: BSTInsertGlobal
void BSTInsertGlobal (tBSTNodePtrGlobal* RootPtr, char* name, functionData Content)	{

    
	if (*RootPtr == NULL)
	{
		*RootPtr = malloc(sizeof (struct tBSTNodeGlobal));	
		(*RootPtr)->Name = name;
		(*RootPtr)->content = Content;
		(*RootPtr)->LPtr = NULL;
		(*RootPtr)->RPtr = NULL;	
	}

	else if (strcmp(name, (*RootPtr)->Name) == 0)
	{														
		(*RootPtr)->content = Content;

	}
	else if (strcmp(name, (*RootPtr)->Name) < 0)     	
	{
		BSTInsertGlobal(&(*RootPtr)->LPtr,name,Content);
	}
	else if (strcmp(name, (*RootPtr)->Name) > 0)
	{
		BSTInsertGlobal(&(*RootPtr)->RPtr,name,Content);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2018, %rsp           # imm = 0x2018
movq %rsi, %r14
movq %rdi, %rbp
leaq 0x2050(%rsp), %rbx
leaq 0x8(%rsp), %r15
leaq 0x1010(%rsp), %r12
movq (%rbp), %r13
testq %r13, %r13
je 0x4499
movq (%r13), %rsi
movq %r14, %rdi
callq 0x1080
testl %eax, %eax
je 0x44cb
jns 0x446d
addq $0x1010, %r13           # imm = 0x1010
movl $0x1008, %edx           # imm = 0x1008
movq %r15, %rdi
movq %rbx, %rsi
callq 0x1090
movl $0x1008, %edx           # imm = 0x1008
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x448f
addq $0x1018, %r13           # imm = 0x1018
movl $0x1008, %edx           # imm = 0x1008
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1090
movl $0x1008, %edx           # imm = 0x1008
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1090
movq %r13, %rbp
jmp 0x442a
movl $0x1020, %edi           # imm = 0x1020
callq 0x10a0
movq %rax, %r15
movq %rax, (%rbp)
movq %r14, (%rax)
leaq 0x8(%rax), %rdi
movl $0x1008, %edx           # imm = 0x1008
movq %rbx, %rsi
callq 0x1090
xorps %xmm0, %xmm0
movups %xmm0, 0x1010(%r15)
jmp 0x44df
addq $0x8, %r13
movl $0x1008, %edx           # imm = 0x1008
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1090
addq $0x2018, %rsp           # imm = 0x2018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/symtable.c
// Function: BSTDisposeGlobal
void BSTDisposeGlobal (tBSTNodePtrGlobal *RootPtr) {

	if (*RootPtr != NULL)					
	{
		BSTDisposeGlobal(&(*RootPtr)->LPtr);
		BSTDisposeGlobal(&(*RootPtr)->RPtr);
		free(*RootPtr);
		*RootPtr = NULL;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x4525
addq $0x1010, %rdi           # imm = 0x1010
callq 0x44f1
movl $0x1018, %edi           # imm = 0x1018
addq (%rbx), %rdi
callq 0x44f1
movq (%rbx), %rdi
callq 0x1030
movq $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/symtable.c
// Function: BSTSearchLocal
bool BSTSearchLocal (tBSTNodePtrLocal RootPtr, char* name, int *Type, char *Data)    {


    if (RootPtr != NULL && RootPtr->Name != NULL)
    {
        if ((strcmp(name, RootPtr->Name) < 0))
        {
            return BSTSearchLocal(RootPtr->LPtr,name, Type, Data);
                
        }
        else if (strcmp(name, RootPtr->Name) > 0)
        {
            return BSTSearchLocal(RootPtr->RPtr,name, Type, Data);
        }
        else
        {
            *Type = RootPtr->Type;
            //*Data = *RootPtr->Data;
            return true;
        }
    }
    else
    {
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %r14, %r14
je 0x4564
movq (%r14), %rsi
testq %rsi, %rsi
je 0x4564
movq %r15, %rdi
callq 0x1080
testl %eax, %eax
jns 0x455c
movq 0x18(%r14), %r14
jmp 0x453d
je 0x456c
movq 0x20(%r14), %r14
jmp 0x453d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movl 0x8(%r14), %eax
movl %eax, (%rbx)
movb $0x1, %al
jmp 0x4566
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/symtable.c
// Function: BSTInsertLocal
void BSTInsertLocal (tBSTNodePtrLocal* RootPtr, char * Name, int *Type, char *Data)	{


	if (*RootPtr == NULL){
		*RootPtr = malloc(sizeof (struct tBSTNodeLocal));	
		(*RootPtr)->Name = Name;
		(*RootPtr)->LPtr = NULL;
		(*RootPtr)->RPtr = NULL;	
		(*RootPtr)->Type = *Type;
		(*RootPtr)->Data = Data;
	
	}else if (strcmp(Name, (*RootPtr)->Name) == 0)
	{
	}else if (strcmp(Name, (*RootPtr)->Name) < 0)     	
	{
	//	printf("Vlkadam dolava\n");
		BSTInsertLocal(&(*RootPtr)->LPtr,Name, Type, Data);
	}else if (strcmp(Name, (*RootPtr)->Name) > 0)
	{
	//	printf("Vkladam doprava\n");
		BSTInsertLocal(&(*RootPtr)->RPtr,Name, Type, Data);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%r12), %r13
testq %r13, %r13
je 0x45b8
movq (%r13), %rsi
movq %r15, %rdi
callq 0x1080
testl %eax, %eax
je 0x45da
jns 0x45af
addq $0x18, %r13
movq %r13, %r12
jmp 0x458b
addq $0x20, %r13
movq %r13, %r12
jmp 0x458b
movl $0x28, %edi
callq 0x10a0
movq %rax, (%r12)
movq %r15, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movl (%r14), %ecx
movl %ecx, 0x8(%rax)
movq %rbx, 0x10(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/symtable.c
// Function: ReplaceByRightmost
void ReplaceByRightmost (tBSTNodePtrLocal PtrReplaced, tBSTNodePtrLocal *RootPtr) {

	if(*RootPtr != NULL && PtrReplaced != NULL){
		if((*RootPtr)->RPtr != NULL){ 
			// najde najpravejsi uzol
			ReplaceByRightmost(PtrReplaced, &(*RootPtr)->RPtr);
		}else{
			PtrReplaced->Name = (*RootPtr)->Name;
			PtrReplaced->Type = (*RootPtr)->Type;
			PtrReplaced->Data = (*RootPtr)->Data;
			BSTDelete(RootPtr, (*RootPtr)->Name);
		}
	}else return;
}

// Assembly:
movq %rdi, %rax
testq %rax, %rax
je 0x4624
movq %rsi, %rdi
movq (%rsi), %rcx
testq %rcx, %rcx
je 0x4624
leaq 0x20(%rcx), %rsi
cmpq $0x0, 0x20(%rcx)
jne 0x45e7
movq (%rcx), %rcx
movq %rcx, (%rax)
movq (%rdi), %rcx
movl 0x8(%rcx), %edx
movl %edx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
movq (%rdi), %rax
movq (%rax), %rsi
jmp 0x4625
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/symtable.c
// Function: BSTDelete
void BSTDelete (tBSTNodePtrLocal *RootPtr, char *K) {

	if(*RootPtr != NULL){ // nemame prazdny uzol
		if((*RootPtr)->Name > K){ // kluc je vlavo 
			BSTDelete(&(*RootPtr)->LPtr, K);
		}else if((*RootPtr)->Name < K){ // kluc je vpravo
			BSTDelete(&(*RootPtr)->RPtr, K); 
		}else if((*RootPtr)->Name == K){ // ak sme nasli uzol

			if((*RootPtr)->LPtr != NULL && (*RootPtr)->RPtr != NULL){ // 2 podstromy
					ReplaceByRightmost(*RootPtr, &(*RootPtr)->LPtr);
			}else if((*RootPtr)->LPtr != NULL && (*RootPtr)->RPtr == NULL){ // lavy 
				tBSTNodePtrLocal temp_node;//funguje
				temp_node = (*RootPtr)->LPtr; // ulozime odstranovany uzol
				free(*RootPtr);
				*RootPtr = temp_node;

			}else if((*RootPtr)->RPtr != NULL && (*RootPtr)->LPtr == NULL){ // pravy
				tBSTNodePtrLocal temp_node; // funguje
				temp_node = (*RootPtr)->RPtr;
				free(*RootPtr);
				*RootPtr = temp_node;

			}else{ // ziadny podstrom funguje
				free(*RootPtr);
				*RootPtr = NULL;
			}
		}
	}else{
		return;
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x464c
movq (%rdi), %rax
cmpq %rsi, %rax
jbe 0x4642
addq $0x18, %rdi
jmp 0x4629
jae 0x464a
addq $0x20, %rdi
jmp 0x4629
je 0x4651
popq %rbx
popq %r14
popq %rbp
retq
movq 0x18(%rdi), %r14
testq %r14, %r14
je 0x467a
cmpq $0x0, 0x20(%rdi)
je 0x466e
leaq 0x18(%rdi), %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x45e4
testq %r14, %r14
je 0x467a
cmpq $0x0, 0x20(%rdi)
je 0x46a1
testq %r14, %r14
setne %al
movq 0x20(%rdi), %r14
testq %r14, %r14
sete %bpl
orb %al, %bpl
callq 0x1030
testb %bpl, %bpl
je 0x46a6
movq $0x0, (%rbx)
jmp 0x464c
callq 0x1030
movq %r14, (%rbx)
jmp 0x464c
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/symtable.c
// Function: BSTDisposeLocal
void BSTDisposeLocal (tBSTNodePtrLocal *RootPtr) {	


	if (*RootPtr != NULL)					
	{
		BSTDisposeLocal(&(*RootPtr)->LPtr);
		BSTDisposeLocal(&(*RootPtr)->RPtr);
		free(*RootPtr);
		*RootPtr = NULL;
	}
	


}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x46db
addq $0x18, %rdi
callq 0x46ab
movq (%rbx), %rdi
addq $0x20, %rdi
callq 0x46ab
movq (%rbx), %rdi
callq 0x1030
movq $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/MartinNovotny25[P]VUT-FIT-IFJ2020/symtable.c
// Function: MainStackSearch
bool MainStackSearch(MainStack stack, char* id, int *type) {
    
    //pocet stromov v zasobniku
    int i = stack.top;
    //na ulozenie typu
    int typ = 0;
    char* unneeded = NULL;
    
    while (i != 0) {
        if (BSTSearchLocal((*stack.a[i]), id, &typ, unneeded)) {
            *type = typ;
            return true;
        }
        i--;
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq 0x40(%rsp), %r12
movl $0x0, 0x4(%rsp)
testq %r12, %r12
setne %bpl
je 0x4796
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x40(%rsp), %r13
movq 0x8(%r13,%r12,8), %rax
movq (%rax), %rdi
leaq 0x4(%rsp), %rdx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x452f
testb %al, %al
jne 0x4790
leaq 0x4(%rsp), %r15
cmpq $0x1, %r12
setne %bpl
je 0x4796
movq (%r13,%r12,8), %rax
movq (%rax), %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x452f
decq %r12
testb %al, %al
je 0x476a
movl 0x4(%rsp), %eax
movl %eax, (%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop