// File: /workspace/github_c_makefile_star2_O0/MartinNovotny25[P]VUT-FIT-IFJ2020/error.c
// Function: error_call
void error_call(int err, TDLList *L)
{
    
    TDLLDisposeList(L);        //v pripade chyby je potrebne uvolnit DLlist
    
    int exit_err;
    switch (err)
    {
        case ERR_LEX:
            fprintf(stderr, "ERR 1 - Lexikalna chyba\n");
            exit_err = 1;
            break;

        case ERR_SYN:
            fprintf(stderr, "ERR 2 - Syntakticka chyba\n");
            exit_err = 2;
            break;

        case ERR_SEM_UNDEF:
            fprintf(stderr, "ERR 3 - Semanticka chyba - nedefinovana funkcia\n");
            exit_err = 3;
            break;

        case ERR_SEM_DATATYPE:
            fprintf(stderr, "ERR 4 - Semanticka chyba - Odvodenie datoveho typu\n");
            exit_err = 4;
            break;

        case ERR_SEM_EXCOMPAT:
            fprintf(stderr, "ERR 5 - Semanticka chyba - Typova kompatibilita\n");
            exit_err = 5;
            break;

        case ERR_SEM_RETURN:
            fprintf(stderr, "ERR 6 - Semanticka chyba - Nespravny pocet parametrov/navratovych hodnot\n");
            exit_err = 6;
            break;

        case ERR_SEM_OTHER:
            fprintf(stderr, "ERR 7 - Semanticka chyba - Ostatne chyby\n");
            exit_err = 7;
            break;

        case ERR_SEM_ZERODIV:
            fprintf(stderr, "ERR 9 - Semanticka chyba - Delenie nulou\n" );
            exit_err = 9;
            break;

        case ERR_INTERN:
            fprintf(stderr, "ERR 99 - Vnutorna chyba prekladaca\n" );
            exit_err = 99;
            break;
    }
    fprintf(stderr, "UKONCUJEM\n");
    exit(exit_err);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1340
movl -0x4(%rbp), %eax
movl %eax, -0x18(%rbp)
subl $0x1, %eax
je 0x6578
jmp 0x6505
movl -0x18(%rbp), %eax
subl $0x2, %eax
je 0x659c
jmp 0x6513
movl -0x18(%rbp), %eax
subl $0x3, %eax
je 0x65c0
jmp 0x6521
movl -0x18(%rbp), %eax
subl $0x4, %eax
je 0x65e4
jmp 0x652f
movl -0x18(%rbp), %eax
subl $0x5, %eax
je 0x6608
jmp 0x653d
movl -0x18(%rbp), %eax
subl $0x6, %eax
je 0x662c
jmp 0x654b
movl -0x18(%rbp), %eax
subl $0x7, %eax
je 0x664d
jmp 0x6559
movl -0x18(%rbp), %eax
subl $0x9, %eax
je 0x666e
jmp 0x6567
movl -0x18(%rbp), %eax
subl $0x63, %eax
je 0x668f
jmp 0x66ae
movq 0x9a79(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6d5b(%rip), %rsi      # 0xd2e4
movb $0x0, %al
callq 0x1080
movl $0x1, -0x14(%rbp)
jmp 0x66ae
movq 0x9a55(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6d50(%rip), %rsi      # 0xd2fd
movb $0x0, %al
callq 0x1080
movl $0x2, -0x14(%rbp)
jmp 0x66ae
movq 0x9a31(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6d47(%rip), %rsi      # 0xd318
movb $0x0, %al
callq 0x1080
movl $0x3, -0x14(%rbp)
jmp 0x66ae
movq 0x9a0d(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6d54(%rip), %rsi      # 0xd349
movb $0x0, %al
callq 0x1080
movl $0x4, -0x14(%rbp)
jmp 0x66ae
movq 0x99e9(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6d64(%rip), %rsi      # 0xd37d
movb $0x0, %al
callq 0x1080
movl $0x5, -0x14(%rbp)
jmp 0x66ae
movq 0x99c5(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6d71(%rip), %rsi      # 0xd3ae
movb $0x0, %al
callq 0x1080
movl $0x6, -0x14(%rbp)
jmp 0x66ae
movq 0x99a4(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6d9a(%rip), %rsi      # 0xd3f8
movb $0x0, %al
callq 0x1080
movl $0x7, -0x14(%rbp)
jmp 0x66ae
movq 0x9983(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6da3(%rip), %rsi      # 0xd422
movb $0x0, %al
callq 0x1080
movl $0x9, -0x14(%rbp)
jmp 0x66ae
movq 0x9962(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6dac(%rip), %rsi      # 0xd44c
movb $0x0, %al
callq 0x1080
movl $0x63, -0x14(%rbp)
movq 0x9943(%rip), %rax      # 0xfff8
movq (%rax), %rdi
leaq 0x6db1(%rip), %rsi      # 0xd470
movb $0x0, %al
callq 0x1080
movl -0x14(%rbp), %edi
callq 0x10c0
nop