LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/./cmdtlv.h
// Function: dump_tlv_serialized_buffer
static inline void
dump_tlv_serialized_buffer(ser_buff_t *tlv_ser_buff){

    tlv_struct_t *tlv = NULL;

    printf("cmd code = %d\n", EXTRACT_CMD_CODE(tlv_ser_buff));
    TLV_LOOP_BEGIN(tlv_ser_buff, tlv){
        print_tlv_content(tlv);
        printf("\n");
    } TLV_LOOP_END;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5520
movq -0x20(%rbp), %rdi
cltq
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
subq $0x1, %rax
imulq $0x64, %rax, %rax
addq %rax, %rdi
addq $0x24, %rdi
callq 0x11d0
movl %eax, %esi
leaq 0x8e3c(%rip), %rdi      # 0xa221
movb $0x0, %al
callq 0x10b0
cmpq $0x0, -0x8(%rbp)
je 0x13f5
jmp 0x1414
leaq 0x8e34(%rip), %rdi      # 0xa230
leaq 0x8e3a(%rip), %rsi      # 0xa23d
movl $0x5d, %edx
leaq 0x8e39(%rip), %rcx      # 0xa248
callq 0x10c0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5520
cltq
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl -0x18(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x1479
movq -0x10(%rbp), %rdi
callq 0x1ce0
leaq 0xa3c2(%rip), %rdi      # 0xb81d
movb $0x0, %al
callq 0x10b0
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
addq $0x64, %rax
movq %rax, -0x10(%rbp)
jmp 0x143e
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/testapp.c
// Function: user_vlan_validation_callback
int
user_vlan_validation_callback(char *vlan_id){

    int vlan_no = atoi(vlan_id);

    if(vlan_no > 0 && vlan_no < 4096)
        return 0;

    printf("Invalid vlan. Pls follow Help\n");
    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x11d0
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0x1510
cmpl $0x1000, -0x14(%rbp)    # imm = 0x1000
jge 0x1510
movl $0x0, -0x4(%rbp)
jmp 0x1525
leaq 0x8af5(%rip), %rdi      # 0xa00c
movb $0x0, %al
callq 0x10b0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/./cmdtlv.h
// Function: print_tlv_content
static inline void 
print_tlv_content(tlv_struct_t *tlv){

    if(!tlv)
        return;

    printf("tlv->leaf_type = %s\n", get_str_leaf_type(tlv->leaf_type));
    printf("tlv->leaf_id   = %s\n", tlv->leaf_id);
    printf("tlv->value     = %s\n", tlv->value);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x1cf5
jmp 0x1d3d
movq -0x8(%rbp), %rax
movl (%rax), %edi
callq 0x20a0
movq %rax, %rsi
leaq 0x856c(%rip), %rdi      # 0xa276
movb $0x0, %al
callq 0x10b0
movq -0x8(%rbp), %rsi
addq $0x4, %rsi
leaq 0x856b(%rip), %rdi      # 0xa28b
movb $0x0, %al
callq 0x10b0
movq -0x8(%rbp), %rsi
addq $0x24, %rsi
leaq 0x856a(%rip), %rdi      # 0xa2a0
movb $0x0, %al
callq 0x10b0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/cmd_hier.c
// Function: libcli_register_param
void
libcli_register_param(param_t *parent, param_t *child){
    
    int i = 0;
    if(!parent)
        parent = &root;
        
    if(!IS_PARAM_MODE_ENABLE(parent)){
        parent->options[MODE_PARAM_INDEX] = libcli_get_mode_param();
    }

    if(!IS_PARAM_SUBOPTIONS_ENABLE(parent)){
        parent->options[SUBOPTIONS_INDEX] = libcli_get_suboptions_param();
    }

    if(parent->options[CMD_EXPANSION_INDEX] == NULL)
        parent->options[CMD_EXPANSION_INDEX] = libcli_get_cmd_expansion_param();

    for(i = CHILDREN_START_INDEX; i <= CHILDREN_END_INDEX; i++){
        if(parent->options[i])
            continue;
        
        parent->options[i] = child;
        if(child != libcli_get_show_brief_extension_param())
            child->parent = parent;
        child->parent = parent;
        return;
    }

    printf("%s() : Error : No space for new command\n", __FUNCTION__);
    assert(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x1ea9
leaq 0xebe3(%rip), %rax      # 0x10a88
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x60(%rax)
jne 0x1ec4
callq 0x1d50
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x68(%rax)
jne 0x1edf
callq 0x1d60
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x68(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x1efa
callq 0x1d70
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x70(%rax)
movl $0x3, -0x14(%rbp)
cmpl $0xf, -0x14(%rbp)
jg 0x1f72
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, 0x60(%rax,%rcx,8)
je 0x1f19
jmp 0x1f67
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, 0x60(%rax,%rcx,8)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
callq 0x1e10
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
je 0x1f52
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xe0(%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xe0(%rax)
addq $0x20, %rsp
popq %rbp
retq
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x1f01
leaq 0x8892(%rip), %rdi      # 0xa80b
leaq 0x88b4(%rip), %rsi      # 0xa834
movb $0x0, %al
callq 0x10b0
leaq 0x83dd(%rip), %rdi      # 0xa36b
leaq 0x8375(%rip), %rsi      # 0xa30a
movl $0x253, %edx            # imm = 0x253
leaq 0x88a9(%rip), %rcx      # 0xa84a
callq 0x10c0
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/cmd_hier.c
// Function: get_str_leaf_type
char*
get_str_leaf_type(leaf_type_t leaf_type){

    switch(leaf_type){
        case INT:
            return "INT";
        case STRING:
            return "STRING";
        case IPV4:
            return "IPV4";
        case FLOAT:
            return "FLOAT";
        case IPV6:
            return "IPV6";
        case BOOLEAN:
            return "BOOLEAN";
        case LEAF_MAX:
            return "LEAF_MAX";
        default:
            return "Unknown";
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x7, %rax
ja 0x2123
movq -0x18(%rbp), %rax
leaq 0x81f9(%rip), %rcx      # 0xa2b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x82f1(%rip), %rax      # 0xa3c0
movq %rax, -0x8(%rbp)
jmp 0x212e
leaq 0x82e8(%rip), %rax      # 0xa3c4
movq %rax, -0x8(%rbp)
jmp 0x212e
leaq 0x82e2(%rip), %rax      # 0xa3cb
movq %rax, -0x8(%rbp)
jmp 0x212e
leaq 0x82da(%rip), %rax      # 0xa3d0
movq %rax, -0x8(%rbp)
jmp 0x212e
leaq 0x82d3(%rip), %rax      # 0xa3d6
movq %rax, -0x8(%rbp)
jmp 0x212e
leaq 0x82cb(%rip), %rax      # 0xa3db
movq %rax, -0x8(%rbp)
jmp 0x212e
leaq 0x82c6(%rip), %rax      # 0xa3e3
movq %rax, -0x8(%rbp)
jmp 0x212e
leaq 0x82c2(%rip), %rax      # 0xa3ec
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/cmd_hier.c
// Function: get_show_extension_type
show_ext_t
get_show_extension_type(ser_buff_t *b){
    
    assert(b);
    unsigned int tlv_units = get_serialize_buffer_size(b)/sizeof(tlv_struct_t);
    tlv_struct_t *show_ext_tlv = NULL;

    if(tlv_units == 0)
        return none;

    if(tlv_units == 1){
        show_ext_tlv = (tlv_struct_t *)(b->b);
    }
    else{
        show_ext_tlv = (tlv_struct_t *)(b->b) + (tlv_units -2);
    }
    assert(show_ext_tlv);

    if(strncmp(show_ext_tlv->leaf_id, SHOW_EXTENSION_PARAM, strlen(SHOW_EXTENSION_PARAM)))
        return none;
    if(strncmp(show_ext_tlv->value, SHOW_EXTENSION_PARAM_BRIEF, strlen(SHOW_EXTENSION_PARAM_BRIEF)) == 0)
        return brief;
    if(strncmp(show_ext_tlv->value, SHOW_EXTENSION_PARAM_DETAIL, strlen(SHOW_EXTENSION_PARAM_DETAIL)) == 0)
        return detail;
    if(strncmp(show_ext_tlv->value, SHOW_EXTENSION_PARAM_EXTENSIVE, strlen(SHOW_EXTENSION_PARAM_EXTENSIVE)) == 0)
        return extensive;
    assert(0);
    return none;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x2175
jmp 0x2194
leaq 0x8278(%rip), %rdi      # 0xa3f4
leaq 0x8187(%rip), %rsi      # 0xa30a
movl $0xe5, %edx
leaq 0x8267(%rip), %rcx      # 0xa3f6
callq 0x10c0
movq -0x10(%rbp), %rdi
callq 0x5520
cltq
movl $0x64, %ecx
xorl %edx, %edx
divq %rcx
movl %eax, -0x14(%rbp)
movq $0x0, -0x20(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x21c6
movl $0x3, -0x4(%rbp)
jmp 0x22d9
cmpl $0x1, -0x14(%rbp)
jne 0x21d9
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x21f3
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
subl $0x2, %ecx
movl %ecx, %ecx
imulq $0x64, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x21fc
jmp 0x221b
leaq 0x8224(%rip), %rdi      # 0xa427
leaq 0x8100(%rip), %rsi      # 0xa30a
movl $0xf2, %edx
leaq 0x81e0(%rip), %rcx      # 0xa3f6
callq 0x10c0
movq -0x20(%rbp), %rdi
addq $0x4, %rdi
leaq 0x820a(%rip), %rsi      # 0xa434
movl $0xf, %edx
callq 0x1060
cmpl $0x0, %eax
je 0x2245
movl $0x3, -0x4(%rbp)
jmp 0x22d9
movq -0x20(%rbp), %rdi
addq $0x24, %rdi
leaq 0x81f0(%rip), %rsi      # 0xa444
movl $0xa, %edx
callq 0x1060
cmpl $0x0, %eax
jne 0x226c
movl $0x0, -0x4(%rbp)
jmp 0x22d9
movq -0x20(%rbp), %rdi
addq $0x24, %rdi
leaq 0x81d4(%rip), %rsi      # 0xa44f
movl $0xb, %edx
callq 0x1060
cmpl $0x0, %eax
jne 0x2293
movl $0x1, -0x4(%rbp)
jmp 0x22d9
movq -0x20(%rbp), %rdi
addq $0x24, %rdi
leaq 0x81b9(%rip), %rsi      # 0xa45b
movl $0xe, %edx
callq 0x1060
cmpl $0x0, %eax
jne 0x22ba
movl $0x2, -0x4(%rbp)
jmp 0x22d9
leaq 0x80aa(%rip), %rdi      # 0xa36b
leaq 0x8042(%rip), %rsi      # 0xa30a
movl $0xfc, %edx
leaq 0x8122(%rip), %rcx      # 0xa3f6
callq 0x10c0
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/cmd_hier.c
// Function: set_device_name
void
set_device_name(const char *cons_name){
    
    char** tokens = NULL;
    size_t token_cnt = 0;    

    assert(cons_name);

    if(strlen(console_name))
        tokens = tokenizer(console_name, '>', &token_cnt);
    
    sprintf(console_name, "%s>", cons_name);
    
    if(token_cnt > 1){
        strcat(console_name, " ");
        string_space_trim(tokens[1]);
        strcat(console_name, tokens[1]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3135
jmp 0x3154
leaq 0x76a2(%rip), %rdi      # 0xa7de
leaq 0x71c7(%rip), %rsi      # 0xa30a
movl $0x226, %edx            # imm = 0x226
leaq 0x7699(%rip), %rcx      # 0xa7e8
callq 0x10c0
leaq 0xfc85(%rip), %rdi      # 0x12de0
callq 0x1090
cmpq $0x0, %rax
je 0x317f
leaq 0xfc73(%rip), %rdi      # 0x12de0
movl $0x3e, %esi
leaq -0x18(%rbp), %rdx
callq 0x6270
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdx
leaq 0xfc56(%rip), %rdi      # 0x12de0
leaq 0x8561(%rip), %rsi      # 0xb6f2
movb $0x0, %al
callq 0x1200
cmpq $0x1, -0x18(%rbp)
jbe 0x31d3
leaq 0xfc3a(%rip), %rdi      # 0x12de0
leaq 0x786c(%rip), %rsi      # 0xaa19
callq 0x11f0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x6460
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0xfc12(%rip), %rdi      # 0x12de0
callq 0x11f0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/cmd_hier.c
// Function: ctrlC_signal_handler
static void
ctrlC_signal_handler(int sig){
    printf("Ctrl-C pressed\n");

    if (app_ctrlC_signal_handler) {
        app_ctrlC_signal_handler();
    }
    else {
        printf("Bye Bye\n");
        exit(0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0x77bd(%rip), %rdi      # 0xa9ff
movb $0x0, %al
callq 0x10b0
cmpq $0x0, 0xe1f7(%rip)      # 0x11448
je 0x325b
callq *0xe1ef(%rip)           # 0x11448
jmp 0x3270
leaq 0x77ad(%rip), %rdi      # 0xaa0f
movb $0x0, %al
callq 0x10b0
xorl %edi, %edi
callq 0x1210
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/cmd_hier.c
// Function: get_current_branch_hook
param_t*
get_current_branch_hook(param_t *current_param){
    assert(current_param);
    assert(current_param != &root);
    while(current_param->parent != &root){
        current_param = current_param->parent;
    }
    return current_param;;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3465
jmp 0x3484
leaq 0x740f(%rip), %rdi      # 0xa87b
leaq 0x6e97(%rip), %rsi      # 0xa30a
movl $0x281, %edx            # imm = 0x281
leaq 0x740a(%rip), %rcx      # 0xa889
callq 0x10c0
leaq 0xd5fd(%rip), %rax      # 0x10a88
cmpq %rax, -0x8(%rbp)
je 0x3493
jmp 0x34b2
leaq 0x741b(%rip), %rdi      # 0xa8b5
leaq 0x6e69(%rip), %rsi      # 0xa30a
movl $0x282, %edx            # imm = 0x282
leaq 0x73dc(%rip), %rcx      # 0xa889
callq 0x10c0
jmp 0x34b4
movq -0x8(%rbp), %rax
leaq 0xd5c9(%rip), %rcx      # 0x10a88
cmpq %rcx, 0xe0(%rax)
je 0x34d9
movq -0x8(%rbp), %rax
movq 0xe0(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x34b4
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/cmd_hier.c
// Function: dump_one_cmd
static void
_dump_one_cmd(param_t *param, unsigned short tabs){

    int i = 0;

    PRINT_TABS(tabs);

    if(IS_PARAM_CMD(param) || IS_PARAM_NO_CMD(param))
        printf("-->%s(%d)", GET_CMD_NAME(param), tabs);
    else
        printf("-->%s(%d)", GET_LEAF_TYPE_STR(param), tabs);

    for(; i < MAX_OPTION_SIZE; i++){
        if(param->options[i]){
            printf("\n");
            _dump_one_cmd(param->options[i], ++tabs);
            --tabs;
        }
        else
            break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movl $0x0, -0x10(%rbp)
movw $0x0, -0x12(%rbp)
movzwl -0x12(%rbp), %eax
movzwl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jge 0x3558
leaq 0x74d5(%rip), %rdi      # 0xaa18
movb $0x0, %al
callq 0x10b0
movw -0x12(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x12(%rbp)
jmp 0x3530
jmp 0x355a
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
je 0x356c
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x3588
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movzwl -0xa(%rbp), %edx
leaq 0x749c(%rip), %rdi      # 0xaa1b
movb $0x0, %al
callq 0x10b0
jmp 0x35ac
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl (%rax), %edi
callq 0x20a0
movq %rax, %rsi
movzwl -0xa(%rbp), %edx
leaq 0x7476(%rip), %rdi      # 0xaa1b
movb $0x0, %al
callq 0x10b0
jmp 0x35ae
cmpl $0x10, -0x10(%rbp)
jge 0x3610
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
cmpq $0x0, 0x60(%rax,%rcx,8)
je 0x3601
leaq 0x8252(%rip), %rdi      # 0xb81d
movb $0x0, %al
callq 0x10b0
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movq 0x60(%rax,%rcx,8), %rdi
movw -0xa(%rbp), %ax
addw $0x1, %ax
movw %ax, -0xa(%rbp)
movzwl %ax, %esi
callq 0x3510
movw -0xa(%rbp), %ax
addw $-0x1, %ax
movw %ax, -0xa(%rbp)
jmp 0x3603
jmp 0x3610
jmp 0x3605
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x35ae
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/cmd_hier.c
// Function: goto_top_of_cmd_tree
void
goto_top_of_cmd_tree(param_t *curr_cmd_tree_cursor){

    char** tokens = NULL;
    size_t token_cnt = 0;

    assert(curr_cmd_tree_cursor);
    
    if(curr_cmd_tree_cursor == &root){
        printf(ANSI_COLOR_BLUE "Info : At Roof top Already\n" ANSI_COLOR_RESET);
        return;
    }

    do{
        if(IS_PARAM_CMD(curr_cmd_tree_cursor)){
            curr_cmd_tree_cursor = curr_cmd_tree_cursor->parent;
            continue;
        }
        memset(GET_LEAF_VALUE_PTR(curr_cmd_tree_cursor), 0, LEAF_VALUE_HOLDER_SIZE);
        curr_cmd_tree_cursor = curr_cmd_tree_cursor->parent;
    } while(curr_cmd_tree_cursor != &root);
    
    reset_cmd_tree_cursor();
    tokens = tokenizer(console_name, '>', &token_cnt);
    sprintf(console_name, "%s>", tokens[0]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3655
jmp 0x3674
leaq 0x7270(%rip), %rdi      # 0xa8cc
leaq 0x6ca7(%rip), %rsi      # 0xa30a
movl $0x294, %edx            # imm = 0x294
leaq 0x7272(%rip), %rcx      # 0xa8e1
callq 0x10c0
leaq 0xd40d(%rip), %rax      # 0x10a88
cmpq %rax, -0x8(%rbp)
jne 0x3694
leaq 0x727e(%rip), %rdi      # 0xa906
movb $0x0, %al
callq 0x10b0
jmp 0x371e
jmp 0x3696
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x36b0
movq -0x8(%rbp), %rax
movq 0xe0(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x36d7
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x4, %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x10d0
movq -0x8(%rbp), %rax
movq 0xe0(%rax), %rax
movq %rax, -0x8(%rbp)
leaq 0xd3aa(%rip), %rax      # 0x10a88
cmpq %rax, -0x8(%rbp)
jne 0x3696
callq 0x1fb0
leaq 0xf6f0(%rip), %rdi      # 0x12de0
movl $0x3e, %esi
leaq -0x18(%rbp), %rdx
callq 0x6270
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0xf6d0(%rip), %rdi      # 0x12de0
leaq 0x7fdb(%rip), %rsi      # 0xb6f2
movb $0x0, %al
callq 0x1200
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/cmd_hier.c
// Function: go_one_level_up_cmd_tree
void
go_one_level_up_cmd_tree(param_t *curr_cmd_tree_cursor){

    char** tokens = NULL;
    size_t token_cnt = 0;

    assert(curr_cmd_tree_cursor);

    if(curr_cmd_tree_cursor == &root){
        printf(ANSI_COLOR_BLUE "Info : At Roof top Already\n" ANSI_COLOR_RESET);
        return;
    }

    if(IS_PARAM_LEAF(curr_cmd_tree_cursor)){
        memset(GET_LEAF_VALUE_PTR(curr_cmd_tree_cursor), 0, LEAF_VALUE_HOLDER_SIZE);
        serialize_buffer_skip(tlv_buff, -1 * (int)sizeof(tlv_struct_t));/*Rewind*/
        mark_checkpoint_serialize_buffer(tlv_buff);
    }

     set_cmd_tree_cursor(curr_cmd_tree_cursor->parent);

     if(get_cmd_tree_cursor() == &root){
        tokens = tokenizer(console_name, '>', &token_cnt);
        sprintf(console_name, "%s>", tokens[0]);
        reset_serialize_buffer(tlv_buff);
        return;
     }
    
     build_mode_console_name(get_cmd_tree_cursor());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3755
jmp 0x3774
leaq 0x7170(%rip), %rdi      # 0xa8cc
leaq 0x6ba7(%rip), %rsi      # 0xa30a
movl $0x2af, %edx            # imm = 0x2AF
leaq 0x71bc(%rip), %rcx      # 0xa92b
callq 0x10c0
leaq 0xd30d(%rip), %rax      # 0x10a88
cmpq %rax, -0x8(%rbp)
jne 0x3794
leaq 0x717e(%rip), %rdi      # 0xa906
movb $0x0, %al
callq 0x10b0
jmp 0x3843
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x37d2
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
addq $0x4, %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x10d0
movq 0xdc84(%rip), %rdi      # 0x11440
movl $0xffffff9c, %esi       # imm = 0xFFFFFF9C
callq 0x5540
movq 0xdc73(%rip), %rdi      # 0x11440
callq 0x5630
movq -0x8(%rbp), %rax
movq 0xe0(%rax), %rdi
callq 0x1fd0
callq 0x2020
leaq 0xd29a(%rip), %rcx      # 0x10a88
cmpq %rcx, %rax
jne 0x3836
leaq 0xf5e6(%rip), %rdi      # 0x12de0
movl $0x3e, %esi
leaq -0x18(%rbp), %rdx
callq 0x6270
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0xf5c6(%rip), %rdi      # 0x12de0
leaq 0x7ed1(%rip), %rsi      # 0xb6f2
movb $0x0, %al
callq 0x1200
movq 0xdc11(%rip), %rdi      # 0x11440
callq 0x6100
jmp 0x3843
callq 0x2020
movq %rax, %rdi
callq 0x3850
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/./cmdtlv.h
// Function: swap_tlv_units
static inline void
swap_tlv_units(tlv_struct_t *tlv1, tlv_struct_t *tlv2){
    
    tlv_struct_t tlv;
    tlv = *tlv1;
    *tlv1 = *tlv2;
    *tlv2 = tlv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x74(%rbp), %rdi
movl $0x64, %edx
callq 0x1150
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x64, %edx
callq 0x1150
movq -0x10(%rbp), %rdi
leaq -0x74(%rbp), %rsi
movl $0x64, %edx
callq 0x1150
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/./cmd_hier.h
// Function: is_cmd_string_match
static inline int 
is_cmd_string_match(param_t *param,
                    const char *str,
                    bool *ex_match) {

    *ex_match = false;
    int str_len = strlen(str);
    int str_len_param = strlen(param->cmd_type.cmd->cmd_name);

    int rc =  (strncmp(param->cmd_type.cmd->cmd_name, 
                str, str_len));

    if ( !rc && (str_len == str_len_param )) {
        *ex_match = true;
    }   
    return rc; 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rdi
callq 0x1090
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x1090
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movslq -0x1c(%rbp), %rdx
callq 0x1060
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x41e4
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jne 0x41e4
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/parser.c
// Function: parse_file
void
parse_file(char *file_name) {

	char line[256];
	char** tokens = NULL;
	size_t token_cnt = 0;

	FILE *fptr = fopen(file_name, "r");
	
	if (!fptr) {
	
		printf("Error : Could not open log file %s, errno = %d\n",
				file_name, errno);
		return;
	}

	memset(line, 0, sizeof(line));

	cmd_recording_enabled = false;
	reset_serialize_buffer(tlv_buff);

	while (fgets(line, sizeof(line) - 1, fptr)) {

		printf("Executing : %s", line);
	
		tokens = tokenizer(line, ' ', &token_cnt);		

		reset_serialize_buffer(tlv_buff);
		build_tlv_buffer(tokens, token_cnt);
		re_init_tokens(MAX_CMD_TREE_DEPTH);

		if (is_user_in_cmd_mode())
			restore_checkpoint_serialize_buffer(tlv_buff);
		else
			reset_serialize_buffer(tlv_buff);

		memset(line, 0, sizeof(line));
	}
	
	fclose(fptr);
	place_console(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq $0x0, -0x118(%rbp)
movq $0x0, -0x120(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x56b6(%rip), %rsi      # 0xa606
callq 0x11b0
movq %rax, -0x128(%rbp)
cmpq $0x0, -0x128(%rbp)
jne 0x4f92
movq -0x8(%rbp), %rax
movq %rax, -0x130(%rbp)
callq 0x1040
movq -0x130(%rbp), %rsi
movl (%rax), %edx
leaq 0x5c34(%rip), %rdi      # 0xabba
movb $0x0, %al
callq 0x10b0
jmp 0x5097
leaq -0x110(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x10d0
movb $0x0, 0xa194(%rip)      # 0xf140
leaq 0xc48d(%rip), %rax      # 0x11440
movq (%rax), %rdi
callq 0x6100
leaq -0x110(%rbp), %rdi
movq -0x128(%rbp), %rdx
movl $0xff, %esi
callq 0x10f0
cmpq $0x0, %rax
je 0x5081
leaq -0x110(%rbp), %rsi
leaq 0x5bff(%rip), %rdi      # 0xabea
movb $0x0, %al
callq 0x10b0
leaq -0x110(%rbp), %rdi
movl $0x20, %esi
leaq -0x120(%rbp), %rdx
callq 0x6270
movq %rax, -0x118(%rbp)
leaq 0xc428(%rip), %rax      # 0x11440
movq (%rax), %rdi
callq 0x6100
movq -0x118(%rbp), %rdi
movq -0x120(%rbp), %rsi
callq 0x4710
movl $0x10, %edi
callq 0x6170
movb $0x0, %al
callq 0x2030
cmpl $0x0, %eax
je 0x505a
leaq 0xc3f0(%rip), %rax      # 0x11440
movq (%rax), %rdi
callq 0x55e0
jmp 0x5069
leaq 0xc3df(%rip), %rax      # 0x11440
movq (%rax), %rdi
callq 0x6100
leaq -0x110(%rbp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x10d0
jmp 0x4fbb
movq -0x128(%rbp), %rdi
callq 0x1070
movl $0x1, %edi
callq 0x3ed0
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/./cmd_hier.h
// Function: INVOKE_LEAF_USER_VALIDATION_CALLBACK
static inline int
INVOKE_LEAF_USER_VALIDATION_CALLBACK(param_t *param, char *leaf_value) {

    assert(param);
    assert(leaf_value);

    /*If validation fn is not registered, then validation is assumed to be passed*/
    if(!IS_LEAF_USER_VALIDATION_CALLBACK_REGISTERED(param))
        return 0;

    return _INVOKE_LEAF_USER_VALIDATION_CALLBACK(param, leaf_value);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x52c9
jmp 0x52e8
leaq 0x5729(%rip), %rdi      # 0xa9f9
leaq 0x5a5c(%rip), %rsi      # 0xad33
movl $0x91, %edx
leaq 0x5a5d(%rip), %rcx      # 0xad40
callq 0x10c0
cmpq $0x0, -0x18(%rbp)
je 0x52f1
jmp 0x5310
leaq 0x5a84(%rip), %rdi      # 0xad7c
leaq 0x5a34(%rip), %rsi      # 0xad33
movl $0x92, %edx
leaq 0x5a35(%rip), %rcx      # 0xad40
callq 0x10c0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x48(%rax)
jne 0x5328
movl $0x0, -0x4(%rbp)
jmp 0x533d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/serialize.c
// Function: init_serialized_buffer
void 
init_serialized_buffer(ser_buff_t **b){
    (*b) = (ser_buff_t *)calloc(1, sizeof(ser_buff_t));
    (*b)->b = calloc(1, SERIALIZE_BUFFER_DEFAULT_SIZE);
    (*b)->size = SERIALIZE_BUFFER_DEFAULT_SIZE;
    (*b)->next = 0;
    (*b)->checkpoint = 0;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, %edi
movl $0x18, %esi
callq 0x1100
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, %edi
movl $0x200, %esi            # imm = 0x200
callq 0x1100
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl $0x200, 0x8(%rax)       # imm = 0x200
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/serialize.c
// Function: init_serialized_buffer_of_defined_size
void
init_serialized_buffer_of_defined_size(ser_buff_t **b, int size){
    (*b) = (ser_buff_t *)calloc(1, sizeof(ser_buff_t));
    (*b)->b = calloc(1, size);
    (*b)->size = size;
    (*b)->next = 0;
    (*b)->checkpoint = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x1, %edi
movl $0x18, %esi
callq 0x1100
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movslq -0xc(%rbp), %rsi
movl $0x1, %edi
callq 0x1100
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0xc(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/serialize.c
// Function: serialize_buffer_skip
void
serialize_buffer_skip(ser_buff_t *b, int size){
	int available_size = b->size - b->next;

	if(available_size >= size){
		b->next += size;
		return;
	}

	while(available_size < size){
		b->size = b->size * 2;
		available_size = b->size - b->next;
	}	

	b->b = realloc(b->b, b->size);	
	b->next += size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jl 0x5577
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
jmp 0x55cf
jmp 0x5579
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x55a4
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x10(%rbp)
jmp 0x5579
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rsi
callq 0x1190
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/serialize.c
// Function: serialize_int
void serialize_int(ser_buff_t *b, int data){
    if (b == NULL) assert(0);
    ser_buff_t *buff = (ser_buff_t *)(b);
    int available_size = buff->size - buff->next;
    char isResize = 0;

    while(available_size < sizeof(int)){
        buff->size = buff->size * 2;
        available_size = buff->size - buff->next;
        isResize = 1;
    }

    if(isResize == 0){
        memcpy((char *)buff->b + buff->next, &data, sizeof(int));
        buff->next += sizeof(int);
        return;
    }

    // resize of the buffer
    buff->b = realloc(buff->b, buff->size); 
    memcpy((char *)buff->b + buff->next, &data, sizeof(int));
    buff->next += sizeof(int);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x56d5
leaq 0x4cae(%rip), %rdi      # 0xa36b
leaq 0x56c3(%rip), %rsi      # 0xad87
movl $0x5b, %edx
leaq 0x572e(%rip), %rcx      # 0xadfe
callq 0x10c0
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
movslq -0x1c(%rbp), %rax
cmpq $0x4, %rax
jae 0x5723
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x1c(%rbp)
movb $0x1, -0x1d(%rbp)
jmp 0x56f2
movsbl -0x1d(%rbp), %eax
cmpl $0x0, %eax
jne 0x5752
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movl -0xc(%rbp), %edx
movl %edx, (%rax,%rcx)
movq -0x18(%rbp), %rax
movslq 0xc(%rax), %rcx
addq $0x4, %rcx
movl %ecx, 0xc(%rax)
jmp 0x5794
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq 0x8(%rax), %rsi
callq 0x1190
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movl -0xc(%rbp), %edx
movl %edx, (%rax,%rcx)
movq -0x18(%rbp), %rax
movslq 0xc(%rax), %rcx
addq $0x4, %rcx
movl %ecx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/serialize.c
// Function: serialize_int8
void serialize_int8(ser_buff_t *b, char data){
    if (b == NULL) assert(0);
    ser_buff_t *buff = (ser_buff_t *)(b);
    int available_size = buff->size - buff->next;
    char isResize = 0;

    while(available_size < sizeof(char)){
        buff->size = buff->size * 2;
        available_size = buff->size - buff->next;
        isResize = 1;
    }

    if(isResize == 0){
        memcpy((char *)buff->b + buff->next, &data, sizeof(char));
        buff->next += sizeof(char);
        return;
    }

    // resize of the buffer
    buff->b = realloc(buff->b, buff->size); 
    memcpy((char *)buff->b + buff->next, &data, sizeof(char));
    buff->next += sizeof(char);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x57d8
leaq 0x4bab(%rip), %rdi      # 0xa36b
leaq 0x55c0(%rip), %rsi      # 0xad87
movl $0x75, %edx
leaq 0x5651(%rip), %rcx      # 0xae24
callq 0x10c0
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
movslq -0x1c(%rbp), %rax
cmpq $0x1, %rax
jae 0x5826
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x1c(%rbp)
movb $0x1, -0x1d(%rbp)
jmp 0x57f5
movsbl -0x1d(%rbp), %eax
cmpl $0x0, %eax
jne 0x5855
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movb -0x9(%rbp), %dl
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movslq 0xc(%rax), %rcx
addq $0x1, %rcx
movl %ecx, 0xc(%rax)
jmp 0x5897
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq 0x8(%rax), %rsi
callq 0x1190
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movb -0x9(%rbp), %dl
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movslq 0xc(%rax), %rcx
addq $0x1, %rcx
movl %ecx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/serialize.c
// Function: serialize_uint32
void serialize_uint32(ser_buff_t *b, unsigned int data){
    if (b == NULL) assert(0);
    ser_buff_t *buff = (ser_buff_t *)(b);
    int available_size = buff->size - buff->next;
    char isResize = 0;

    while(available_size < sizeof(unsigned int)){
        buff->size = buff->size * 2;
        available_size = buff->size - buff->next;
        isResize = 1;
    }

    if(isResize == 0){
        memcpy((char *)buff->b + buff->next, &data, sizeof(unsigned int));
        buff->next += sizeof(unsigned int);
        return;
    }

    // resize of the buffer
    buff->b = realloc(buff->b, buff->size); 
    memcpy((char *)buff->b + buff->next, &data, sizeof(unsigned int));
    buff->next += sizeof(unsigned int);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x5ad5
leaq 0x48ae(%rip), %rdi      # 0xa36b
leaq 0x52c3(%rip), %rsi      # 0xad87
movl $0xc1, %edx
leaq 0x53cd(%rip), %rcx      # 0xae9d
callq 0x10c0
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
movslq -0x1c(%rbp), %rax
cmpq $0x4, %rax
jae 0x5b23
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x1c(%rbp)
movb $0x1, -0x1d(%rbp)
jmp 0x5af2
movsbl -0x1d(%rbp), %eax
cmpl $0x0, %eax
jne 0x5b52
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movl -0xc(%rbp), %edx
movl %edx, (%rax,%rcx)
movq -0x18(%rbp), %rax
movslq 0xc(%rax), %rcx
addq $0x4, %rcx
movl %ecx, 0xc(%rax)
jmp 0x5b94
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq 0x8(%rax), %rsi
callq 0x1190
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movl -0xc(%rbp), %edx
movl %edx, (%rax,%rcx)
movq -0x18(%rbp), %rax
movslq 0xc(%rax), %rcx
addq $0x4, %rcx
movl %ecx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/serialize.c
// Function: serialize_float
void serialize_float(ser_buff_t *b, float data){
    if (b == NULL) assert(0);
    ser_buff_t *buff = (ser_buff_t *)(b);
    int available_size = buff->size - buff->next;
    char isResize = 0;

    while(available_size < sizeof(float)){
        buff->size = buff->size * 2;
        available_size = buff->size - buff->next;
        isResize = 1;
    }

    if(isResize == 0){
        memcpy((char *)buff->b + buff->next, &data, sizeof(float));
        buff->next += sizeof(float);
        return;
    }

    // resize of the buffer
    buff->b = realloc(buff->b, buff->size); 
    memcpy((char *)buff->b + buff->next, &data, sizeof(float));
    buff->next += sizeof(float);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x5bd7
leaq 0x47ac(%rip), %rdi      # 0xa36b
leaq 0x51c1(%rip), %rsi      # 0xad87
movl $0xdc, %edx
leaq 0x52fd(%rip), %rcx      # 0xaecf
callq 0x10c0
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
movslq -0x1c(%rbp), %rax
cmpq $0x4, %rax
jae 0x5c25
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x1c(%rbp)
movb $0x1, -0x1d(%rbp)
jmp 0x5bf4
movsbl -0x1d(%rbp), %eax
cmpl $0x0, %eax
jne 0x5c54
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movl -0xc(%rbp), %edx
movl %edx, (%rax,%rcx)
movq -0x18(%rbp), %rax
movslq 0xc(%rax), %rcx
addq $0x4, %rcx
movl %ecx, 0xc(%rax)
jmp 0x5c96
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq 0x8(%rax), %rsi
callq 0x1190
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movl -0xc(%rbp), %edx
movl %edx, (%rax,%rcx)
movq -0x18(%rbp), %rax
movslq 0xc(%rax), %rcx
addq $0x4, %rcx
movl %ecx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/serialize.c
// Function: serialize_double
void serialize_double(ser_buff_t *b, double data){
    if (b == NULL) assert(0);
    ser_buff_t *buff = (ser_buff_t *)(b);
    int available_size = buff->size - buff->next;
    char isResize = 0;

    while(available_size < sizeof(double)){
        buff->size = buff->size * 2;
        available_size = buff->size - buff->next;
        isResize = 1;
    }

    if(isResize == 0){
        memcpy((char *)buff->b + buff->next, &data, sizeof(double));
        buff->next += sizeof(double);
        return;
    }

    // resize of the buffer
    buff->b = realloc(buff->b, buff->size); 
    memcpy((char *)buff->b + buff->next, &data, sizeof(double));
    buff->next += sizeof(double);
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x5cd7
leaq 0x46ac(%rip), %rdi      # 0xa36b
leaq 0x50c1(%rip), %rsi      # 0xad87
movl $0xf7, %edx
leaq 0x5227(%rip), %rcx      # 0xaef9
callq 0x10c0
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
movslq -0x1c(%rbp), %rax
cmpq $0x8, %rax
jae 0x5d25
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x1c(%rbp)
movb $0x1, -0x1d(%rbp)
jmp 0x5cf4
movsbl -0x1d(%rbp), %eax
cmpl $0x0, %eax
jne 0x5d56
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq %rdx, (%rax,%rcx)
movq -0x18(%rbp), %rax
movslq 0xc(%rax), %rcx
addq $0x8, %rcx
movl %ecx, 0xc(%rax)
jmp 0x5d9a
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq 0x8(%rax), %rsi
callq 0x1190
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movslq 0xc(%rcx), %rcx
movq -0x10(%rbp), %rdx
movq %rdx, (%rax,%rcx)
movq -0x18(%rbp), %rax
movslq 0xc(%rax), %rcx
addq $0x8, %rcx
movl %ecx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/serialize.c
// Function: serialize_string
void serialize_string(ser_buff_t *b, char *data, int nbytes){
    if (b == NULL) assert(0);
    ser_buff_t *buff = (ser_buff_t *)(b);
    int available_size = buff->size - buff->next;
    char isResize = 0;

    while(available_size < nbytes){
        buff->size = buff->size * 2;
        available_size = buff->size - buff->next;
        isResize = 1;
    }

    if(isResize == 0){
        memcpy((char *)buff->b + buff->next, data, nbytes);
        buff->next += nbytes;
        return;
    }

    // resize of the buffer
    buff->b = realloc(buff->b, buff->size); 
    memcpy((char *)buff->b + buff->next, data, nbytes);
    buff->next += nbytes;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x5dd9
leaq 0x45aa(%rip), %rdi      # 0xa36b
leaq 0x4fbf(%rip), %rsi      # 0xad87
movl $0x110, %edx            # imm = 0x110
leaq 0x5151(%rip), %rcx      # 0xaf25
callq 0x10c0
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x24(%rbp)
movb $0x0, -0x25(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x5e25
movq -0x20(%rbp), %rax
movl 0x8(%rax), %ecx
shll %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
subl 0xc(%rcx), %eax
movl %eax, -0x24(%rbp)
movb $0x1, -0x25(%rbp)
jmp 0x5df6
movsbl -0x25(%rbp), %eax
cmpl $0x0, %eax
jne 0x5e5c
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x1150
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
jmp 0x5ea6
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movslq 0x8(%rax), %rsi
callq 0x1190
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x1150
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/serialize.c
// Function: truncate_serialize_buffer
void truncate_serialize_buffer(ser_buff_t **b){
	ser_buff_t *clone = NULL;

	if((*b)->next == (*b)->size){
		return;
	}
	init_serialized_buffer_of_defined_size(&clone, (*b)->next);
	memcpy(clone->b, (*b)->b, (*b)->next);
	clone->next = clone->size;
	free_serialize_buffer(*b);
	*b = clone;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
cmpl 0x8(%rcx), %eax
jne 0x5edc
jmp 0x5f35
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0xc(%rax), %esi
leaq -0x10(%rbp), %rdi
callq 0x53d0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq 0xc(%rax), %rdx
callq 0x1150
movq -0x10(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5480
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/serialize.c
// Function: print_buffer_details
void print_buffer_details(ser_buff_t *b, const char *fn, int lineno){
#if 1
    printf("%s():%d : starting address = %p\n", fn, lineno, b);
    printf("size = %d\n", b->size);
    printf("next = %d\n", b->next);
#endif
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rcx
leaq 0x4ff1(%rip), %rdi      # 0xaf56
movb $0x0, %al
callq 0x10b0
movq -0x8(%rbp), %rax
movl 0x8(%rax), %esi
leaq 0x4ffd(%rip), %rdi      # 0xaf77
movb $0x0, %al
callq 0x10b0
movq -0x8(%rbp), %rax
movl 0xc(%rax), %esi
leaq 0x4ff3(%rip), %rdi      # 0xaf82
movb $0x0, %al
callq 0x10b0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/serialize.c
// Function: de_serialize_string
void 
de_serialize_string(char *dest, ser_buff_t *b, int size){
	if(!b || !b->b) assert(0);
	if(!size) assert(0);;
	if((b->size - b->next)< size) assert(0);	 
	memcpy(dest, b->b + b->next, size);
	b->next += size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x5fc4
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x5fe3
leaq 0x43a0(%rip), %rdi      # 0xa36b
leaq 0x4db5(%rip), %rsi      # 0xad87
movl $0x143, %edx            # imm = 0x143
leaq 0x4faf(%rip), %rcx      # 0xaf8d
callq 0x10c0
cmpl $0x0, -0x14(%rbp)
jne 0x6008
leaq 0x437b(%rip), %rdi      # 0xa36b
leaq 0x4d90(%rip), %rsi      # 0xad87
movl $0x144, %edx            # imm = 0x144
leaq 0x4f8a(%rip), %rcx      # 0xaf8d
callq 0x10c0
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rbp), %rcx
subl 0xc(%rcx), %eax
cmpl -0x14(%rbp), %eax
jge 0x603a
leaq 0x4349(%rip), %rdi      # 0xa36b
leaq 0x4d5e(%rip), %rsi      # 0xad87
movl $0x145, %edx            # imm = 0x145
leaq 0x4f58(%rip), %rcx      # 0xaf8d
callq 0x10c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
addq %rax, %rsi
movslq -0x14(%rbp), %rdx
callq 0x1150
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0xc(%rax), %ecx
movl %ecx, 0xc(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/serialize.c
// Function: copy_in_serialized_buffer_by_offset
void copy_in_serialized_buffer_by_offset(ser_buff_t *b, int size, char *value, int offset){
	if((b->size - b->next) < size){
		printf("%s(): Error : Insufficient buffer space\n", __FUNCTION__);
		return;
	}
	
	if(offset > b->size){
		printf("%s(): Error : Attemt to write outside buffer boundaries\n", __FUNCTION__);
		return;
	}
	
	memcpy(b->b + offset, value, size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0xc(%rcx), %eax
cmpl -0xc(%rbp), %eax
jge 0x60b0
leaq 0x4f21(%rip), %rdi      # 0xafc1
leaq 0x4f43(%rip), %rsi      # 0xafea
movb $0x0, %al
callq 0x10b0
jmp 0x60ee
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x60d3
leaq 0x4f4b(%rip), %rdi      # 0xb00e
leaq 0x4f20(%rip), %rsi      # 0xafea
movb $0x0, %al
callq 0x10b0
jmp 0x60ee
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rsi
movslq -0xc(%rbp), %rdx
callq 0x1150
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)