// File: /workspace/github_c_makefile_star2_O0/MartinNovotny25[P]VUT-FIT-IFJ2020/semantics.c
// Function: dec_var_control
void dec_var_control(TDLList *L, tBSTNodePtrLocal *node, functionData params){

     if(L->Act->rptr->tdata.type == t_EOL){
        error_call(ERR_SEM_OTHER, L);
    }
    // Nazov premennej na deklarovanie
    char *id = L->Act->tdata.lex;
    // Na ulozenie datoveho typu
    int type;
    // Zbytocna premenna
    char *data = "null";

    // pocet stringov
    int string_count = 0;
    // pocet cisel vo vyraze
    int int_count = 0;
    // pocet floatov vo vyraze
    int float_count = 0;
    // pocet identifikatorov
    //int identifier = 0;
    if(L->Act->lptr->tdata.type != t_FOR){
        if(L->Act->lptr->tdata.type != t_EOL) error_call(ERR_SEM_OTHER, L);
    }
    // ak je premenna ktoru chceme definovat uz definovana
    if(BSTSearchLocal(*node, id, &type, data)){
        error_call(ERR_SEM_UNDEF,L);
        BSTDisposeLocal(node);
    }
    // Chod na dalsi prvok teda  ->  :=
    //TDLLSucc(L);
    // Chod na koniec riadku
    while(L->Act->tdata.type != t_EOL){
        if(L->Act->tdata.type == t_GREATER){
            BSTDisposeLocal(node);
            error_call(ERR_SEM_EXCOMPAT, L);
        }else if(L->Act->tdata.type == t_GREATEROREQUAL){
            BSTDisposeLocal(node);
            error_call(ERR_SEM_EXCOMPAT, L);
        }else if(L->Act->tdata.type == t_LESS){
            BSTDisposeLocal(node);
            error_call(ERR_SEM_EXCOMPAT, L);
        }else if(L->Act->tdata.type == t_LESSOREQUAL){
            BSTDisposeLocal(node);
            error_call(ERR_SEM_EXCOMPAT, L);
        }else if(L->Act->tdata.type == t_EQUAL){
            BSTDisposeLocal(node);
            error_call(ERR_SEM_EXCOMPAT, L);
        }else if(L->Act->tdata.type == t_NOT_EQUAL){
            BSTDisposeLocal(node);
            error_call(ERR_SEM_EXCOMPAT, L);
        }

        if(!(strcmp(L->Act->tdata.lex, "/"))){
            if(L->Act->rptr->tdata.type == t_INT_ZERO){
                BSTDisposeLocal(node);
                error_call(ERR_SEM_ZERODIV, L);
            }
        }

        if(!(strcmp(L->Act->tdata.lex, "_"))){
            BSTDisposeLocal(node);
            error_call(ERR_SEM_UNDEF, L);
        }
        
        // Ak ide o integer
        if(L->Act->tdata.type == t_INT_ZERO){
            // Uloz jeho typ
            type = t_INT_ID;
            // Zapocitaj najdenie integeru
            int_count++;

        // Ak ide o float
        }else if(L->Act->tdata.type == t_INT_NON_ZERO){
            type = t_INT_ID;
            // Zapocitaj najdenie integeru
            data = "0";
            int_count++;

        }else if(L->Act->tdata.type == t_FLOAT64 || L->Act->tdata.type == t_FLOAT){

            if(!(strcmp(L->Act->tdata.lex, "0.0"))){
                if(!(strcmp(L->Act->lptr->tdata.lex, "/"))){
                    BSTDisposeLocal(node);
                    error_call(ERR_SEM_ZERODIV, L);
                }
            }
            // Uloz jeho typ
            type = t_FLOAT64;
            // zapocitaj najdenie floatu
            float_count++;

        // Ak ide o string
        }else if(L->Act->tdata.type == t_STRING){
            if(L->Act->rptr->tdata.type == t_MINUS || L->Act->rptr->tdata.type == t_DIVIDE || L->Act->rptr->tdata.type == t_MULTIPLY){
                BSTDisposeLocal(node);
                error_call(ERR_SEM_EXCOMPAT, L);
            }
            // uloz jeho typ
            type = t_STRING_ID;
            // zapocitaj najdenie stringu
            string_count++;

        // Ak ide o identifikator
        }else if(L->Act->tdata.type == t_IDENTIFIER){
            // Premenna na ulozenie typu identifikatoru v strome
            int datovytyp;
            // Nazov najdeneho identifikatoru
            char *name = L->Act->tdata.lex;
            functionData returned_data;

            if(!(strcmp(L->Act->tdata.lex, "_"))){
                BSTDisposeLocal(node);
                error_call(ERR_SEM_UNDEF, L);
            }

            if(!(strcmp(L->Act->tdata.lex, "inputs"))){
                error_call(ERR_SEM_OTHER, L);
                   
            }else if(!(strcmp(L->Act->tdata.lex, "inputi"))){
                error_call(ERR_SEM_OTHER, L);
               
            }else if(!(strcmp(L->Act->tdata.lex, "inputf"))){
                error_call(ERR_SEM_OTHER, L);
                
            }else if(!(strcmp(L->Act->tdata.lex, "int2float"))){
                assign_func_params_control(L,node, "int2float");
                type = t_FLOAT64;
                BSTInsertLocal(node, id,&type, data);
             
            }else if(!(strcmp(L->Act->tdata.lex, "float2int"))){
                assign_func_params_control(L,node, "float2int");
                type = t_INT_ID;
                BSTInsertLocal(node, id,&type, data);
               
            }else if(!(strcmp(L->Act->tdata.lex, "len"))){
                assign_func_params_control(L,node, "len");
                type = t_INT_ID;
                BSTInsertLocal(node, id,&type, data);
             
            }else if(!(strcmp(L->Act->tdata.lex, "substr"))){
                error_call(ERR_SEM_OTHER, L);
             
            }else if(!(strcmp(L->Act->tdata.lex, "ord"))){
                error_call(ERR_SEM_OTHER, L);
 
            }else if(!(strcmp(L->Act->tdata.lex, "chr"))){
                error_call(ERR_SEM_OTHER, L);

            }else if(!(strcmp(L->Act->tdata.lex, "print"))){
                error_call(ERR_SEM_EXCOMPAT, L);

            }else if(BSTSearchGlobal(functions, L->Act->tdata.lex, &returned_data)){
                if(L->Act->rptr->tdata.type == t_LEFT_BRACKET){
                    checkCallFunction(L, L->Act->tdata.lex, node);
                
                    if(returned_data.numOfReturns != 1) error_call(ERR_SEM_RETURN, L);
                    else{
                        type = returned_data.returns[0];
                        BSTInsertLocal(node, id,&type, data);
                    }
                }
            }else if (MainStackSearch(mainstack, name, &datovytyp)) {
                    type = datovytyp;
                if(datovytyp == t_INT_ID){
                    int_count++;
                }else if(datovytyp == t_STRING_ID){
                    if(L->Act->rptr->tdata.type == t_MINUS || L->Act->rptr->tdata.type == t_DIVIDE || L->Act->rptr->tdata.type == t_MULTIPLY){
                    BSTDisposeLocal(node);
                    error_call(ERR_SEM_EXCOMPAT, L);
                    }
                    string_count++;
                }else if(datovytyp == t_FLOAT64){
                    float_count++;
                }
            }
        }
        // Ak prideme vo vyraze na bodkociarku zastav, kvoli kontrole deklaracie vo for-e
        if(L->Act->tdata.type == T_SEMICOLON) break;
        // Ak najdes ciarku tzv, chce sa deklarovat viac premennych naraz chyba
        if(L->Act->tdata.type == t_COMMA){
            error_call(ERR_SEM_OTHER, L);
        }
        TDLLSucc(L);
    }

    // Ak boli na priradenie iba string
    if(string_count != 0 && int_count == 0 && float_count == 0){
        // Uloz uzol so stringom do stromu
        BSTInsertLocal(node, id,&type, data);

    // ak boli na priradenie vo vyraze iba integre
    }else if(string_count == 0 && int_count != 0 && float_count == 0){
        // uloz uzol s integerom do stromu
        BSTInsertLocal(node, id, &type, data);

    // ak boli na priradenie vo vyraze iba floaty
    }else if(string_count == 0 && int_count == 0 && float_count != 0){
        // tak uloz uzol s typom float do stromu
        BSTInsertLocal(node, id, &type, data);
    }else{
        error_call(ERR_SEM_DATATYPE, L);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2fa0, %rsp           # imm = 0x2FA0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
cmpl $0x2f, 0x8(%rax)
jne 0x9973
movq -0x8(%rbp), %rsi
movl $0x7, %edi
callq 0x64e0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
leaq 0x3c52(%rip), %rax      # 0xd5db
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
cmpl $0x1a, 0x8(%rax)
je 0x99d6
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
cmpl $0x2f, 0x8(%rax)
je 0x99d4
movq -0x8(%rbp), %rsi
movl $0x7, %edi
callq 0x64e0
jmp 0x99d6
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x1c(%rbp), %rdx
callq 0x69a0
testb $0x1, %al
jne 0x99f4
jmp 0x9a0b
movq -0x8(%rbp), %rsi
movl $0x3, %edi
callq 0x64e0
movq -0x10(%rbp), %rdi
callq 0x6d90
jmp 0x9a0d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x2f, 0x8(%rax)
je 0xa10e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x2, 0x8(%rax)
jne 0x9a49
movq -0x10(%rbp), %rdi
callq 0x6d90
movq -0x8(%rbp), %rsi
movl $0x5, %edi
callq 0x64e0
jmp 0x9b17
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x1f, 0x8(%rax)
jne 0x9a73
movq -0x10(%rbp), %rdi
callq 0x6d90
movq -0x8(%rbp), %rsi
movl $0x5, %edi
callq 0x64e0
jmp 0x9b15
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x1, 0x8(%rax)
jne 0x9a9a
movq -0x10(%rbp), %rdi
callq 0x6d90
movq -0x8(%rbp), %rsi
movl $0x5, %edi
callq 0x64e0
jmp 0x9b13
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x1e, 0x8(%rax)
jne 0x9ac1
movq -0x10(%rbp), %rdi
callq 0x6d90
movq -0x8(%rbp), %rsi
movl $0x5, %edi
callq 0x64e0
jmp 0x9b11
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x20, 0x8(%rax)
jne 0x9ae8
movq -0x10(%rbp), %rdi
callq 0x6d90
movq -0x8(%rbp), %rsi
movl $0x5, %edi
callq 0x64e0
jmp 0x9b0f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x21, 0x8(%rax)
jne 0x9b0d
movq -0x10(%rbp), %rdi
callq 0x6d90
movq -0x8(%rbp), %rsi
movl $0x5, %edi
callq 0x64e0
jmp 0x9b0f
jmp 0x9b11
jmp 0x9b13
jmp 0x9b15
jmp 0x9b17
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x3ab7(%rip), %rsi      # 0xd5e0
callq 0x1070
cmpl $0x0, %eax
jne 0x9b5e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
cmpl $0x10, 0x8(%rax)
jne 0x9b5c
movq -0x10(%rbp), %rdi
callq 0x6d90
movq -0x8(%rbp), %rsi
movl $0x9, %edi
callq 0x64e0
jmp 0x9b5e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x3a53(%rip), %rsi      # 0xd5c3
callq 0x1070
cmpl $0x0, %eax
jne 0x9b91
movq -0x10(%rbp), %rdi
callq 0x6d90
movq -0x8(%rbp), %rsi
movl $0x3, %edi
callq 0x64e0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x10, 0x8(%rax)
jne 0x9bb4
movl $0x18, -0x1c(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xa0d4
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x11, 0x8(%rax)
jne 0x9be2
movl $0x18, -0x1c(%rbp)
leaq 0x3a14(%rip), %rax      # 0xd5e4
movq %rax, -0x28(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xa0d2
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x17, 0x8(%rax)
je 0x9bfe
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x29, 0x8(%rax)
jne 0x9c68
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x39d2(%rip), %rsi      # 0xd5e2
callq 0x1070
cmpl $0x0, %eax
jne 0x9c53
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
leaq 0x39b0(%rip), %rsi      # 0xd5e0
callq 0x1070
cmpl $0x0, %eax
jne 0x9c51
movq -0x10(%rbp), %rdi
callq 0x6d90
movq -0x8(%rbp), %rsi
movl $0x9, %edi
callq 0x64e0
jmp 0x9c53
movl $0x17, -0x1c(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xa0d0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x2b, 0x8(%rax)
jne 0x9cd8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
cmpl $0xb, 0x8(%rax)
je 0x9cac
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
cmpl $0x8, 0x8(%rax)
je 0x9cac
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
cmpl $0x9, 0x8(%rax)
jne 0x9cc3
movq -0x10(%rbp), %rdi
callq 0x6d90
movq -0x8(%rbp), %rsi
movl $0x5, %edi
callq 0x64e0
movl $0x14, -0x1c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa0ce
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x13, 0x8(%rax)
jne 0xa0cc
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x38b8(%rip), %rsi      # 0xd5c3
callq 0x1070
cmpl $0x0, %eax
jne 0x9d2c
movq -0x10(%rbp), %rdi
callq 0x6d90
movq -0x8(%rbp), %rsi
movl $0x3, %edi
callq 0x64e0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x38a8(%rip), %rsi      # 0xd5e6
callq 0x1070
cmpl $0x0, %eax
jne 0x9d5b
movq -0x8(%rbp), %rsi
movl $0x7, %edi
callq 0x64e0
jmp 0xa0ca
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x3880(%rip), %rsi      # 0xd5ed
callq 0x1070
cmpl $0x0, %eax
jne 0x9d8a
movq -0x8(%rbp), %rsi
movl $0x7, %edi
callq 0x64e0
jmp 0xa0c8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x3858(%rip), %rsi      # 0xd5f4
callq 0x1070
cmpl $0x0, %eax
jne 0x9db9
movq -0x8(%rbp), %rsi
movl $0x7, %edi
callq 0x64e0
jmp 0xa0c6
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x3830(%rip), %rsi      # 0xd5fb
callq 0x1070
cmpl $0x0, %eax
jne 0x9e0a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x3817(%rip), %rdx      # 0xd5fb
callq 0xa930
movl $0x17, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x1c(%rbp), %rdx
callq 0x6a60
jmp 0xa0c4
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x37e9(%rip), %rsi      # 0xd605
callq 0x1070
cmpl $0x0, %eax
jne 0x9e5b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x37d0(%rip), %rdx      # 0xd605
callq 0xa930
movl $0x18, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x1c(%rbp), %rdx
callq 0x6a60
jmp 0xa0c2
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x37a2(%rip), %rsi      # 0xd60f
callq 0x1070
cmpl $0x0, %eax
jne 0x9eac
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x3789(%rip), %rdx      # 0xd60f
callq 0xa930
movl $0x18, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x1c(%rbp), %rdx
callq 0x6a60
jmp 0xa0c0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x3755(%rip), %rsi      # 0xd613
callq 0x1070
cmpl $0x0, %eax
jne 0x9edb
movq -0x8(%rbp), %rsi
movl $0x7, %edi
callq 0x64e0
jmp 0xa0be
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x372d(%rip), %rsi      # 0xd61a
callq 0x1070
cmpl $0x0, %eax
jne 0x9f0a
movq -0x8(%rbp), %rsi
movl $0x7, %edi
callq 0x64e0
jmp 0xa0bc
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x3702(%rip), %rsi      # 0xd61e
callq 0x1070
cmpl $0x0, %eax
jne 0x9f39
movq -0x8(%rbp), %rsi
movl $0x7, %edi
callq 0x64e0
jmp 0xa0ba
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
leaq 0x3681(%rip), %rsi      # 0xd5cc
callq 0x1070
cmpl $0x0, %eax
jne 0x9f68
movq -0x8(%rbp), %rsi
movl $0x5, %edi
callq 0x64e0
jmp 0xa0b8
movq 0x8461(%rip), %rdi      # 0x123d0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rsi
leaq -0x1048(%rbp), %rdx
callq 0x66f0
testb $0x1, %al
jne 0x9f8c
jmp 0x9ff4
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
cmpl $0x6, 0x8(%rax)
jne 0x9fef
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rdx
callq 0x79d0
cmpl $0x1, -0x1044(%rbp)
je 0x9fcf
movq -0x8(%rbp), %rsi
movl $0x6, %edi
callq 0x64e0
jmp 0x9fed
movl -0x440(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x1c(%rbp), %rdx
callq 0x6a60
jmp 0x9fef
jmp 0xa0b6
movq -0x40(%rbp), %rax
movq %rax, -0x1050(%rbp)
leaq 0x6482(%rip), %rsi      # 0x10488
movq %rsp, %rdi
movl $0x3e9, %ecx            # imm = 0x3E9
rep  movsq (%rsi), %es:(%rdi)
movq -0x1050(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x6ec0
testb $0x1, %al
jne 0xa02a
jmp 0xa0b4
movl -0x38(%rbp), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x18, -0x38(%rbp)
jne 0xa041
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xa0b2
cmpl $0x14, -0x38(%rbp)
jne 0xa09f
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
cmpl $0xb, 0x8(%rax)
je 0xa07d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
cmpl $0x8, 0x8(%rax)
je 0xa07d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rax
cmpl $0x9, 0x8(%rax)
jne 0xa094
movq -0x10(%rbp), %rdi
callq 0x6d90
movq -0x8(%rbp), %rsi
movl $0x5, %edi
callq 0x64e0
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xa0b0
cmpl $0x17, -0x38(%rbp)
jne 0xa0ae
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xa0b0
jmp 0xa0b2
jmp 0xa0b4
jmp 0xa0b6
jmp 0xa0b8
jmp 0xa0ba
jmp 0xa0bc
jmp 0xa0be
jmp 0xa0c0
jmp 0xa0c2
jmp 0xa0c4
jmp 0xa0c6
jmp 0xa0c8
jmp 0xa0ca
jmp 0xa0cc
jmp 0xa0ce
jmp 0xa0d0
jmp 0xa0d2
jmp 0xa0d4
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x38, 0x8(%rax)
jne 0xa0e4
jmp 0xa10e
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x5, 0x8(%rax)
jne 0xa100
movq -0x8(%rbp), %rsi
movl $0x7, %edi
callq 0x64e0
movq -0x8(%rbp), %rdi
callq 0x12e0
jmp 0x9a0d
cmpl $0x0, -0x2c(%rbp)
je 0xa137
cmpl $0x0, -0x30(%rbp)
jne 0xa137
cmpl $0x0, -0x34(%rbp)
jne 0xa137
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x1c(%rbp), %rdx
callq 0x6a60
jmp 0xa19b
cmpl $0x0, -0x2c(%rbp)
jne 0xa160
cmpl $0x0, -0x30(%rbp)
je 0xa160
cmpl $0x0, -0x34(%rbp)
jne 0xa160
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x1c(%rbp), %rdx
callq 0x6a60
jmp 0xa199
cmpl $0x0, -0x2c(%rbp)
jne 0xa189
cmpl $0x0, -0x30(%rbp)
jne 0xa189
cmpl $0x0, -0x34(%rbp)
je 0xa189
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x1c(%rbp), %rdx
callq 0x6a60
jmp 0xa197
movq -0x8(%rbp), %rsi
movl $0x4, %edi
callq 0x64e0
jmp 0xa199
jmp 0xa19b
addq $0x2fa0, %rsp           # imm = 0x2FA0
popq %rbp
retq
nopw %cs:(%rax,%rax)