LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/basic.c
// Function: rproc_dnew
static runt_int rproc_dnew(runt_vm *vm, runt_ptr p)
{
    runt_uint ptr;
    runt_int rc;
    runt_stacklet *s;
    runt_dict *dict;

    ptr = runt_dictionary_new(vm, &dict);
    if(ptr == 0) return RUNT_NOT_OK;


    /* load minimal set */
    runt_dictionary_set(vm, dict);
    runt_load_minimal(vm);
    /* load dictionary routines to swap out */
    runt_keyword_define(vm, "basic", 5, rproc_basic, NULL);
    runt_keyword_define(vm, "dnew", 4, rproc_dnew, NULL);
    runt_keyword_define(vm, "dset", 4, rproc_dset, NULL);
    runt_keyword_define(vm, "dswap", 5, rproc_dswap, NULL);
    load_control(vm);
    runt_dictionary_swap(vm);

    /* preserve memory */
    runt_mark_set(vm);

    rc = runt_ppush(vm, &s);
    RUNT_ERROR_CHECK(rc);

    s->f = ptr;

    return RUNT_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
movq %rsp, %rsi
callq 0x395e
testl %eax, %eax
je 0x5cf6
movl %eax, %ebx
movq (%rsp), %rsi
movq %r14, %rdi
callq 0x274d
movq %r14, %rdi
callq 0x16dc
leaq 0x18ff(%rip), %rsi      # 0x753f
leaq 0x5d8(%rip), %rcx       # 0x621f
xorl %r15d, %r15d
movq %r14, %rdi
movl $0x5, %edx
xorl %r8d, %r8d
callq 0x1b5e
leaq 0x179d(%rip), %rsi      # 0x73fe
leaq -0x61(%rip), %rcx       # 0x5c07
movq %r14, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
callq 0x1b5e
leaq 0x1784(%rip), %rsi      # 0x7403
leaq 0x80(%rip), %rcx        # 0x5d06
movq %r14, %rdi
movl $0x4, %edx
xorl %r8d, %r8d
callq 0x1b5e
leaq 0x176b(%rip), %rsi      # 0x7408
leaq 0xba(%rip), %rcx        # 0x5d5e
movq %r14, %rdi
movl $0x5, %edx
xorl %r8d, %r8d
callq 0x1b5e
movq %r14, %rdi
callq 0x5181
movq %r14, %rdi
callq 0x3941
movq %r14, %rdi
callq 0x3689
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x2138
testl %eax, %eax
je 0x5cf9
movl %ebx, %eax
cvtsi2ss %rax, %xmm0
movq 0x8(%rsp), %rax
movss %xmm0, 0x20(%rax)
movl $0x1, %r15d
jmp 0x5cf9
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/basic.c
// Function: rproc_dset
static runt_int rproc_dset(runt_vm *vm, runt_ptr p)
{
    runt_uint ptr;
    runt_int rc;
    runt_stacklet *s;
    runt_dict *dict;

    rc = runt_ppop(vm, &s);
    RUNT_ERROR_CHECK(rc);
    ptr = s->f;

    if(ptr == 0) {
        dict = &vm->idict;
    } else {
        runt_memory_pool_get(vm, ptr, (void **)&dict);
    }

    runt_dictionary_set(vm, dict);

    return RUNT_OK;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
callq 0x225f
testl %eax, %eax
je 0x5d38
movq 0x8(%rsp), %rax
cvttss2si 0x20(%rax), %rsi
testl %esi, %esi
je 0x5d3c
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x206f
jmp 0x5d47
xorl %eax, %eax
jmp 0x5d58
leaq 0x548(%rbx), %rax
movq %rax, (%rsp)
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0x274d
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/basic.c
// Function: rproc_dtor
static int rproc_dtor(runt_vm *vm, runt_ptr p)
{
    runt_stacklet *s;
    runt_int rc;
    runt_uint pos;
    runt_cell *cell;


    rc = runt_ppop(vm, &s);
    RUNT_ERROR_CHECK(rc);
    pos = s->f;

    if(pos > 0) {
        runt_cell_pool_get_cell(vm, pos, &cell);
    } else {
        cell = runt_to_cptr(s->p);
    }

    runt_cell_destructor(vm, cell);
    runt_mark_set(vm);
    return RUNT_OK;
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x28(%rsp), %rsi
callq 0x225f
testl %eax, %eax
je 0x5d9f
movq 0x28(%rsp), %rax
cvttss2si 0x20(%rax), %rsi
testl %esi, %esi
je 0x5da3
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x2855
jmp 0x5dbe
xorl %eax, %eax
jmp 0x5dd8
movq 0x18(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups 0x8(%rax), %xmm0
movups %xmm0, (%rsp)
callq 0x3737
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x3b6a
movq %rbx, %rdi
callq 0x3689
movl $0x1, %eax
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/basic.c
// Function: rproc_regset
static int rproc_regset(runt_vm *vm, runt_ptr p)
{
    runt_int rc;
    runt_stacklet *s;
    runt_int r;

    rc = runt_ppop(vm, &s);
    RUNT_ERROR_CHECK(rc);
    r = s->f;

    rc = runt_ppop(vm, &s);
    RUNT_ERROR_CHECK(rc);

    rc = runt_register_set(vm, r, s);
    RUNT_ERROR_CHECK(rc);

    return RUNT_OK;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rsi
callq 0x225f
xorl %ebp, %ebp
testl %eax, %eax
je 0x5e4d
leaq 0x10(%rsp), %rsi
movq (%rsi), %rax
movss 0x20(%rax), %xmm0
movss %xmm0, 0xc(%rsp)
movq %rbx, %rdi
callq 0x225f
testl %eax, %eax
je 0x5e4d
cvttss2si 0xc(%rsp), %esi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x4037
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/basic.c
// Function: rproc_regget
static int rproc_regget(runt_vm *vm, runt_ptr p)
{
    runt_int rc;
    runt_stacklet *s;
    runt_stacklet *out;
    runt_int r;

    rc = runt_ppop(vm, &s);
    RUNT_ERROR_CHECK(rc);
    r = s->f;

    rc = runt_register_get(vm, r, &s);
    RUNT_ERROR_CHECK(rc);

    rc = runt_ppush(vm, &out);
    RUNT_ERROR_CHECK(rc);

    *out = *s;

    return RUNT_OK;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x8(%rsp), %rsi
callq 0x225f
xorl %ebx, %ebx
testl %eax, %eax
je 0x5ebf
leaq 0x8(%rsp), %rdx
movq (%rdx), %rax
cvttss2si 0x20(%rax), %esi
movq %r14, %rdi
callq 0x4017
testl %eax, %eax
je 0x5ebf
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x2138
testl %eax, %eax
je 0x5ebf
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movq 0x20(%rcx), %rdx
movq %rdx, 0x20(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x1, %ebx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/basic.c
// Function: rproc_anon
static int rproc_anon(runt_vm *vm, runt_ptr p)
{
    runt_int rc;
    runt_stacklet *s;

    rc = RUNT_OK;
    if(vm->anon == NULL) rc = RUNT_NOT_OK;
    else if(vm->anon->cell->id > runt_cell_pool_used(vm)) rc = RUNT_NOT_OK;

    if(rc != RUNT_OK) {
        runt_print(vm, "The anonymous function position is undefined\n");
        return RUNT_NOT_OK;
    }

    rc = runt_ppush(vm, &s);
    RUNT_ERROR_CHECK(rc);

    s->f = vm->anon->cell->id;
    return RUNT_OK;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x14a8(%rdi), %rax
testq %rax, %rax
je 0x5eed
movq (%rax), %rax
movl 0x24(%rax), %ebp
movq %rbx, %rdi
callq 0x2843
cmpl %eax, %ebp
jbe 0x5f02
leaq 0x1651(%rip), %rsi      # 0x7545
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1cfe
jmp 0x5f35
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x2138
testl %eax, %eax
je 0x5f33
movq 0x14a8(%rbx), %rax
movq (%rax), %rax
movl 0x24(%rax), %eax
cvtsi2ss %rax, %xmm0
movq (%rsp), %rax
movss %xmm0, 0x20(%rax)
movl $0x1, %ebp
jmp 0x5f35
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/basic.c
// Function: loader
static int loader(
    runt_vm *vm,
    runt_int pstate,
    const char *fname,
    runt_stacklet *s,
    int (*fn)(runt_vm *, const char*))
{
    runt_int rc;
    vm->memory_pool.used = s->p.pos;
    runt_set_state(vm, RUNT_MODE_INTERACTIVE, RUNT_OFF);
    rc = fn(vm, fname);
    runt_set_state(vm, RUNT_MODE_INTERACTIVE, pstate);
    RUNT_ERROR_CHECK(rc);
    runt_mark_set(vm);
    return RUNT_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
movl 0x18(%rcx), %eax
movl %eax, 0x534(%rdi)
movl $0x2, %esi
movl $0x4, %edx
callq 0x1507
movq %rbx, %rdi
movq %r15, %rsi
callq *%r14
movl %eax, %r14d
movq %rbx, %rdi
movl $0x2, %esi
movl %ebp, %edx
callq 0x1507
testl %r14d, %r14d
je 0x5f97
movq %rbx, %rdi
callq 0x3689
movl $0x1, %eax
jmp 0x5f99
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/basic.c
// Function: load_dictionary
static runt_int load_dictionary(runt_vm *vm, const char *filename)
{
    FILE *fp;
    char *line = NULL;
    size_t len = 0;
    ssize_t read;

    fp = fopen(filename, "r");

    if(fp == NULL) {
        runt_print(vm, "Could not open file %s\n", filename);
        return RUNT_NOT_OK;
    }

    while((read = runt_getline(&line, &len, fp)) != -1) {
        parse(vm, line, read);
    }

    fclose(fp);
    free(line);
    return RUNT_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq %rdi, %rbx
xorl %r15d, %r15d
movq %r15, 0x8(%rsp)
movq %r15, 0x10(%rsp)
leaq 0x1407(%rip), %rsi      # 0x73d0
movq %r12, %rdi
callq 0x1120
testq %rax, %rax
je 0x6036
movq %rax, %r14
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movq %rax, %rdx
callq 0x39be
cmpq $-0x1, %rax
je 0x601c
leaq 0x8(%rsp), %r15
leaq 0x10(%rsp), %r12
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x2ba6
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x39be
cmpq $-0x1, %rax
jne 0x5ffb
movq %r14, %rdi
callq 0x1060
movq 0x8(%rsp), %rdi
callq 0x1040
movl $0x1, %r15d
jmp 0x604a
leaq 0x145b(%rip), %rsi      # 0x7498
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1cfe
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/basic.c
// Function: rproc_call
static int rproc_call(runt_vm *vm, runt_ptr p)
{
    runt_stacklet *s;
    runt_int rc;
    runt_uint level;
    runt_uint ppos;
    runt_int pstate;
    rc = runt_ppop(vm, &s);
    RUNT_ERROR_CHECK(rc);

    pstate = runt_get_state(vm, RUNT_MODE_END);
    runt_set_state(vm, RUNT_MODE_END, RUNT_OFF);
    ppos = vm->pos;
    vm->pos = s->f;

    vm->level++;
    level = vm->level;
    while(runt_get_state(vm, RUNT_MODE_END) == RUNT_OFF &&
            vm->level == level) {
        rc = runt_cell_call(vm, &vm->cell_pool.cells[vm->pos - 1]);
        RUNT_ERROR_CHECK(rc);
        vm->pos++;
    }
    vm->level--;
    vm->pos = ppos;
    runt_set_state(vm, RUNT_MODE_END, pstate);

    return RUNT_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rsi
callq 0x225f
xorl %ebp, %ebp
testl %eax, %eax
je 0x6146
movq %rbx, %rdi
movl $0x40, %esi
callq 0x1cef
movl %eax, %r14d
movq %rbx, %rdi
movl $0x40, %esi
movl $0x4, %edx
callq 0x1507
movl 0x11b8(%rbx), %r15d
movq 0x8(%rsp), %rax
cvttss2si 0x20(%rax), %rax
movl 0x11bc(%rbx), %r12d
movl %eax, 0x11bc(%rbx)
incl %r15d
movl %r15d, 0x11b8(%rbx)
movq %rbx, %rdi
movl $0x40, %esi
callq 0x1cef
cmpl $0x4, %eax
jne 0x6124
cmpl %r15d, 0x11b8(%rbx)
jne 0x6124
movl 0x11bc(%rbx), %eax
decl %eax
leaq (%rax,%rax,4), %rsi
shlq $0x3, %rsi
addq 0x510(%rbx), %rsi
movq %rbx, %rdi
callq 0x1e04
testl %eax, %eax
je 0x6146
incl 0x11bc(%rbx)
jmp 0x60de
decl 0x11b8(%rbx)
movl %r12d, 0x11bc(%rbx)
movq %rbx, %rdi
movl $0x40, %esi
movl %r14d, %edx
callq 0x1507
movl $0x1, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/basic.c
// Function: rproc_goto
static int rproc_goto(runt_vm *vm, runt_ptr p)
{
    runt_stacklet *s;
    runt_uint pos;
    runt_uint jump;
    runt_int rc;

    rc = runt_ppop(vm, &s);
    RUNT_ERROR_CHECK(rc);
    pos = s->f;

    rc = runt_ppop(vm, &s);
    RUNT_ERROR_CHECK(rc);
    jump = s->f;

    if(jump && pos < vm->cell_pool.size + 1) {
        vm->pos = pos;
    }

    return RUNT_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x8(%rsp), %rsi
callq 0x225f
xorl %ebx, %ebx
testl %eax, %eax
je 0x61b4
leaq 0x8(%rsp), %rsi
movq (%rsi), %rax
cvttss2si 0x20(%rax), %r15
movq %r14, %rdi
callq 0x225f
testl %eax, %eax
je 0x61b4
movq 0x8(%rsp), %rax
cvttss2si 0x20(%rax), %rax
movl $0x1, %ebx
testl %eax, %eax
je 0x61b4
movl 0x518(%r14), %eax
incl %eax
cmpl %r15d, %eax
jbe 0x61b4
movl %r15d, 0x11bc(%r14)
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/basic.c
// Function: rproc_ex
static int rproc_ex(runt_vm *vm, runt_ptr p)
{
    runt_stacklet *s;
    runt_int rc;
    runt_uint pos;
    runt_cell *cell;
    rc = runt_ppop(vm, &s);
    RUNT_ERROR_CHECK(rc);
    pos = s->f;

    if(pos > 0) {
        runt_cell_id_exec(vm, pos);
    } else {
        cell = runt_to_cptr(s->p);
        runt_cell_exec(vm, cell);
    }

    return RUNT_OK;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %rsi
callq 0x225f
testl %eax, %eax
je 0x61ef
movq 0x18(%rsp), %rax
cvttss2si 0x20(%rax), %rsi
testl %esi, %esi
je 0x61f3
movq %rbx, %rdi
callq 0x1fd5
jmp 0x6214
xorl %eax, %eax
jmp 0x6219
movq 0x18(%rax), %rcx
movq %rcx, 0x10(%rsp)
movups 0x8(%rax), %xmm0
movups %xmm0, (%rsp)
callq 0x3737
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1f14
movl $0x1, %eax
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/irunt.c
// Function: runt_parse_file
runt_int runt_parse_file(runt_vm *vm, const char *filename)
{
    FILE *fp;
    runt_int rc;

    fp = fopen(filename, "r");

    if(fp == NULL) {
        runt_print(vm, "Could not open file %s\n", filename);
        return RUNT_NOT_OK;
    }

    rc = runt_parse_filehandle(vm, fp);
    fclose(fp);
    return rc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1186(%rip), %rsi      # 0x73d0
movq %r14, %rdi
callq 0x1120
testq %rax, %rax
je 0x6273
movq %rax, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x628f
movl %eax, %ebx
movq %r15, %rdi
callq 0x1060
movl %ebx, %eax
jmp 0x6289
leaq 0x121e(%rip), %rsi      # 0x7498
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1cfe
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/irunt.c
// Function: runt_parse_filehandle
runt_int runt_parse_filehandle(runt_vm *vm, FILE *fp)
{
    char *line = NULL;
    size_t len = 0;
    ssize_t read;
    runt_int rc = RUNT_OK;

    if(fp == NULL) return RUNT_NOT_OK;

    while((read = runt_getline(&line, &len, fp)) != -1) {
        rc = parse(vm, line, read);
        if(rc == RUNT_NOT_OK) break;
    }

    free(line);
    return rc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
xorl %r15d, %r15d
movq %r15, (%rsp)
movq %r15, 0x8(%rsp)
testq %rsi, %rsi
je 0x6322
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %rdi
leaq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x39be
cmpq $-0x1, %rax
je 0x630e
movq %rsp, %r12
leaq 0x8(%rsp), %r13
movq (%rsp), %r15
movq %r14, %rdi
callq 0x36c0
movq %r14, %rdi
movq %r15, %rsi
callq 0x2ba6
movl %eax, %r15d
movq %r14, %rdi
callq 0x36f6
testl %r15d, %r15d
je 0x6316
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x39be
cmpq $-0x1, %rax
jne 0x62d1
jmp 0x6319
movl $0x1, %r15d
jmp 0x6319
xorl %r15d, %r15d
movq (%rsp), %rdi
callq 0x1040
movl %r15d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/irunt.c
// Function: load_dictionary_handle
static runt_int load_dictionary_handle(runt_vm *vm, FILE *fp)
{
    char *line = NULL;
    size_t len = 0;
    ssize_t read;
    runt_int rc = RUNT_OK;

    while((read = runt_getline(&line, &len, fp)) != -1) {
        rc = parse(vm, line, read);
        if(rc == RUNT_NOT_OK) {
            runt_print(vm, "Bad return value. Dipping out.\n");
            break;
        }
    }

    free(line);
    return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movq %r14, %rdx
callq 0x39be
cmpq $-0x1, %rax
je 0x66ee
leaq 0x8(%rsp), %r15
leaq 0x10(%rsp), %r12
movq 0x8(%rsp), %r13
movq %rbx, %rdi
callq 0x36c0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2ba6
movl %eax, %ebp
movq %rbx, %rdi
callq 0x36f6
testl %ebp, %ebp
je 0x66dd
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x39be
cmpq $-0x1, %rax
jne 0x66a1
jmp 0x66ee
leaq 0xeb0(%rip), %rsi       # 0x7594
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1cfe
movq 0x8(%rsp), %rdi
callq 0x1040
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/irunt.c
// Function: runt_vm_alloc
int runt_vm_alloc(runt_vm *vm, runt_uint ncells, runt_uint memsize)
{
    unsigned char *mem;
    runt_cell *cells;

    mem = malloc(memsize);
    cells = malloc(sizeof(runt_cell) * ncells);
    runt_init(vm);
    runt_cell_pool_set(vm, cells, ncells);
    runt_cell_pool_init(vm);
    runt_memory_pool_set(vm, mem, memsize);
    return RUNT_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl %edx, %edi
callq 0x10d0
movq %rax, %r15
movl %ebp, %eax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rdi
callq 0x10d0
movq %rax, %r12
movq %r14, %rdi
callq 0x1348
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x1637
movq %r14, %rdi
callq 0x1654
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x16b0
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MuvikLabs[P]runt/irunt.c
// Function: runt_vm_free
int runt_vm_free(runt_vm *vm)
{
    runt_close_plugins(vm);
    free(vm->cell_pool.cells);
    free(vm->memory_pool.data);
    return RUNT_OK;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x3874
movq 0x510(%rbx), %rdi
callq 0x1040
movq 0x528(%rbx), %rdi
callq 0x1040
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/melynx[P]peekaboo/read_trace.c
// Function: print_usage
void print_usage(const char* program_name)
{
    fprintf(stderr, "Usage: %s [Options] path_to_trace_dir\n", program_name);
    fprintf(stderr, "Options:\n");
    fprintf(stderr, "  -r               \tPrint register values.\n");
    fprintf(stderr, "  -m               \tPrint memory values.\n");
    fprintf(stderr, "  -y               \tPrint syscalls. Not compatible with -p.\n");
    fprintf(stderr, "  -s <instr id>    \tPrint trace starting from the given id. Below zero for reversed order.\n");
    fprintf(stderr, "  -e <instr id>    \tPrint trace till the given id.\n");
    fprintf(stderr, "  -a <addr>[,size] \tSearch for all accesses to given memory address, for accesses to buffer when size is given.\n");
    fprintf(stderr, "  -p <pattern file>\tSearch for instruction patterns in trace. See pattern.txt for samples. Not compatible with -c.\n");
    fprintf(stderr, "  -h               \tPrint this help.\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rdx
movq 0x8daa(%rip), %r14      # 0xbff8
movq (%r14), %rdi
leaq 0x30a1(%rip), %rsi      # 0x62f9
xorl %eax, %eax
callq 0x3150
movq (%r14), %rcx
leaq 0x30b7(%rip), %rdi      # 0x6320
pushq $0x9
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x3220
movq (%r14), %rcx
leaq 0x30a9(%rip), %rdi      # 0x632a
pushq $0x2b
popq %rsi
movq %rbx, %rdx
callq 0x3220
movq (%r14), %rcx
leaq 0x30c0(%rip), %rdi      # 0x6356
pushq $0x29
popq %rsi
movq %rbx, %rdx
callq 0x3220
movq (%r14), %rcx
leaq 0x30d5(%rip), %rdi      # 0x6380
pushq $0x3c
popq %rsi
movq %rbx, %rdx
callq 0x3220
movq (%r14), %rcx
leaq 0x30fd(%rip), %rdi      # 0x63bd
pushq $0x5b
popq %rsi
movq %rbx, %rdx
callq 0x3220
movq (%r14), %rcx
leaq 0x3144(%rip), %rdi      # 0x6419
pushq $0x33
popq %rsi
movq %rbx, %rdx
callq 0x3220
movq (%r14), %rcx
leaq 0x3163(%rip), %rdi      # 0x644d
pushq $0x70
popq %rsi
movq %rbx, %rdx
callq 0x3220
movq (%r14), %rcx
leaq 0x31bf(%rip), %rdi      # 0x64be
pushq $0x73
popq %rsi
movq %rbx, %rdx
callq 0x3220
movq (%r14), %rcx
leaq 0x321e(%rip), %rdi      # 0x6532
pushq $0x25
popq %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3220
// File: /workspace/github_c_makefile_star2_O1/melynx[P]peekaboo/read_trace.c
// Function: hexchar_to_uint16
int hexchar_to_uint16(uint16_t *output_uint16_ptr, const char input_char)
{
    if (input_char >= '0' && input_char <= '9')
    {
        *output_uint16_ptr = input_char - '0';
        return 0;
    }
    if (input_char >= 'A' && input_char <= 'F')
    {
        *output_uint16_ptr = input_char - 'A' + 10;
        return 0;
    }
    if (input_char >= 'a' && input_char <= 'f')
    {
        *output_uint16_ptr = input_char - 'a' + 10;
        return 0;
    }
    if (input_char == '*')
    {
        *output_uint16_ptr = 0x100;
        return 0;
    }
    if (input_char == '?')
    {
        *output_uint16_ptr = 0x101;
        return 0;
    }

    return -1;
}

// Assembly:
leal -0x30(%rsi), %eax
cmpb $0x9, %al
ja 0x39a2
movzbl %sil, %eax
addl $-0x30, %eax
jmp 0x39df
leal -0x41(%rsi), %eax
cmpb $0x5, %al
ja 0x39b2
movzbl %sil, %eax
addl $-0x37, %eax
jmp 0x39df
leal -0x61(%rsi), %eax
cmpb $0x5, %al
ja 0x39c2
movzbl %sil, %eax
addl $-0x57, %eax
jmp 0x39df
movsbl %sil, %ecx
cmpl $0x2a, %ecx
je 0x39db
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x3f, %ecx
jne 0x39e4
movw $0x101, %ax             # imm = 0x101
jmp 0x39df
movw $0x100, %ax             # imm = 0x100
movw %ax, (%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/melynx[P]peekaboo/read_trace.c
// Function: hex_string_to_uint16_arrary
int hex_string_to_uint16_arrary(uint16_t *uint16_array, const char *hex_string)
{
    int size = 0;
    while(hex_string[0] && hex_string[1])
    {
        // Arbitrary symbols must be in pairs
        if (hex_string[0] == '?' || hex_string[1] == '?' || hex_string[0] == '*' || hex_string[1] == '*')
            if (hex_string[0] != hex_string[1]) return -1;

        uint16_t output[2];
        if (hexchar_to_uint16(&output[0], hex_string[0])==0 && hexchar_to_uint16(&output[1], hex_string[1])==0)
        {
            uint16_array[size++] = output[0] * 16 + output[1];
        }
        else return -1;
        hex_string += 2;
    }
    return size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r13d, %r13d
leaq 0x6(%rsp), %r15
leaq 0x4(%rsp), %r12
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movb (%rbx), %al
testb %al, %al
je 0x3a84
movb 0x1(%rbx), %dl
testb %dl, %dl
je 0x3a84
cmpb $0x3f, %al
setne %cl
cmpb $0x3f, %dl
setne %dil
cmpb $0x2a, %al
setne %r8b
cmpb $0x2a, %dl
setne %sil
cmpb %dl, %al
je 0x3a3d
andb %dil, %cl
andb %r8b, %sil
andb %cl, %sil
je 0x3a87
movsbl (%rbx), %esi
movq %r12, %rdi
callq 0x3992
testl %eax, %eax
jne 0x3a5c
movsbl 0x1(%rbx), %esi
movq %r15, %rdi
callq 0x3992
testl %eax, %eax
je 0x3a64
xorl %eax, %eax
testb %al, %al
jne 0x3a08
jmp 0x3a87
movzwl 0x4(%rsp), %eax
shll $0x4, %eax
addw 0x6(%rsp), %ax
movslq %r13d, %rcx
incl %r13d
movw %ax, (%r14,%rcx,2)
addq $0x2, %rbx
movb $0x1, %al
jmp 0x3a5e
movl %r13d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/melynx[P]peekaboo/read_trace.c
// Function: update_raw_byte_buffer
void update_raw_byte_buffer(cache_linked_list_t *instr_buffer, 
                            char const *cur_insn_rawbytes, 
                            const uint32_t instr_size,
                            const size_t target_length)
{
    // Remove instr from head if buffer is full
    if (instr_buffer->length > target_length)
    {
        assert(instr_buffer->head != NULL);
        assert(instr_buffer->head != instr_buffer->tail);
        insn_rawbyte_node_t *new_head = instr_buffer->head->succ;
        assert(new_head != NULL);
        free_insn_rawbyte_node(instr_buffer->head);
        instr_buffer->head = new_head;
        instr_buffer->length -= 1;
    }

    // New instr
    insn_rawbyte_node_t *new_node = malloc(sizeof(insn_rawbyte_node_t));
    if (!new_node) PEEKABOO_DIE("Failed to malloc!");
    new_node->is_arbitrary = false;
    new_node->prec = instr_buffer->tail;
    new_node->succ = NULL;
    new_node->size = instr_size;
    new_node->bytes = malloc(sizeof(uint16_t) * instr_size);
    uint32_t idx;
    for (idx=0; idx<instr_size; idx++)
    {
        new_node->bytes[idx] = cur_insn_rawbytes[idx] & 0xFF;
    }

    // Update buffer
    if (instr_buffer->head == NULL) 
    {
        instr_buffer->head = new_node;
    }
    if (instr_buffer->tail != NULL) 
    {
        instr_buffer->tail->succ = new_node;
    }
    instr_buffer->tail = new_node;
    instr_buffer->length += 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
cmpq %rcx, 0x10(%rdi)
jbe 0x3b01
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3b83
cmpq 0x8(%rbx), %rdi
je 0x3ba2
movq 0x20(%rdi), %r15
testq %r15, %r15
je 0x3bc1
callq 0x3a98
movq %r15, (%rbx)
decq 0x10(%rbx)
movl $0x28, %edi
callq 0x31a0
testq %rax, %rax
je 0x3b7e
movq %rax, %r15
movb $0x0, (%rax)
movq 0x8(%rbx), %r12
movq %r12, 0x18(%rax)
movq $0x0, 0x20(%rax)
movl %ebp, 0x10(%rax)
movl %ebp, %r13d
leaq (,%r13,2), %rdi
callq 0x31a0
movq %rax, 0x8(%r15)
testl %ebp, %ebp
je 0x3b54
xorl %ecx, %ecx
movzbl (%r14,%rcx), %edx
movw %dx, (%rax,%rcx,2)
incq %rcx
cmpq %rcx, %r13
jne 0x3b43
cmpq $0x0, (%rbx)
jne 0x3b5d
movq %r15, (%rbx)
testq %r12, %r12
je 0x3b67
movq %r15, 0x20(%r12)
movq %r15, 0x8(%rbx)
incq 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3326
leaq 0x24e2(%rip), %rdi      # 0x606c
leaq 0x24f6(%rip), %rsi      # 0x6087
leaq 0x24fc(%rip), %rcx      # 0x6094
movl $0xfd, %edx
callq 0x3110
leaq 0x254a(%rip), %rdi      # 0x60f3
leaq 0x24d7(%rip), %rsi      # 0x6087
leaq 0x24dd(%rip), %rcx      # 0x6094
movl $0xfe, %edx
callq 0x3110
leaq 0x2554(%rip), %rdi      # 0x611c
leaq 0x24b8(%rip), %rsi      # 0x6087
leaq 0x24be(%rip), %rcx      # 0x6094
movl $0x100, %edx            # imm = 0x100
callq 0x3110
// File: /workspace/github_c_makefile_star2_O1/melynx[P]peekaboo/read_trace.c
// Function: is_buffer_matched
uint32_t is_buffer_matched(cache_linked_list_t const *raw_bytes_buffer, 
                       cache_linked_list_t const *pattern)
{
    insn_rawbyte_node_t *target_node = raw_bytes_buffer->tail;
    insn_rawbyte_node_t *pattern_node = pattern->tail;
    uint32_t matched_bytes_num = 0;

    if (raw_bytes_buffer->length < pattern->length) return 0;

    uint32_t idx = pattern->length;
    for (; idx>0; idx--, pattern_node = pattern_node->prec, target_node = target_node->prec)
    {
        matched_bytes_num += target_node->size;
        if (pattern_node->is_arbitrary) continue;
        if (pattern_node->size != target_node->size) return 0;
        uint32_t byte_offset = 0;
        for (; byte_offset < pattern_node->size; byte_offset++)
        {
            if (pattern_node->bytes[byte_offset] == 0x101*16+0x101) continue; // Matched "??"
            if (pattern_node->bytes[byte_offset] != target_node->bytes[byte_offset]) return 0;
        }
    }
    return matched_bytes_num;
}

// Assembly:
movq 0x10(%rsi), %rcx
xorl %eax, %eax
cmpq %rcx, 0x10(%rdi)
jb 0x3c52
testl %ecx, %ecx
je 0x3c52
pushq %rbx
addq $0x8, %rdi
addq $0x8, %rsi
xorl %eax, %eax
movq (%rsi), %rsi
movq (%rdi), %rdi
movl 0x10(%rdi), %edx
cmpb $0x0, (%rsi)
jne 0x3c3f
movl 0x10(%rsi), %r8d
cmpl %edx, %r8d
jne 0x3c4f
testq %r8, %r8
je 0x3c3f
movq 0x8(%rsi), %r9
xorl %r10d, %r10d
movzwl (%r9,%r10,2), %r11d
cmpl $0x1111, %r11d          # imm = 0x1111
je 0x3c37
movq 0x8(%rdi), %rbx
cmpw (%rbx,%r10,2), %r11w
jne 0x3c4f
incq %r10
cmpq %r10, %r8
jne 0x3c1e
addl %edx, %eax
addq $0x18, %rsi
addq $0x18, %rdi
decl %ecx
jne 0x3bfb
jmp 0x3c51
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/melynx[P]peekaboo/read_trace.c
// Function: print_back
uint64_t print_back(const int64_t unprinted_size,
                peekaboo_trace_t *peekaboo_trace_ptr, 
                const size_t insn_idx)
{
    if (unprinted_size <= 0 || insn_idx < 1)
    {
        for (size_t prev_idx = ((int64_t)insn_idx - 5 > 0) ? (insn_idx - 5) : 1; prev_idx <= insn_idx; prev_idx++)
        {
            peekaboo_insn_t *prev_insn = get_peekaboo_insn(prev_idx, peekaboo_trace_ptr);
            print_peekaboo_insn(prev_insn, peekaboo_trace_ptr, prev_idx, false, false);
            free_peekaboo_insn(prev_insn);
        }
        return (insn_idx+1);
    }
    peekaboo_insn_t *insn = get_peekaboo_insn(insn_idx, peekaboo_trace_ptr);
    uint64_t rvalue = print_back(unprinted_size - insn->size, peekaboo_trace_ptr, insn_idx - 1);
    print_peekaboo_insn(insn, peekaboo_trace_ptr, insn_idx, true, false);
    free_peekaboo_insn(insn);
    return rvalue;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
testq %rdi, %rdi
setg %al
testq %rdx, %rdx
setne %cl
testb %cl, %al
jne 0x3fb2
leaq -0x5(%rbx), %rax
cmpq $0x2, %rax
movl $0x1, %r15d
cmovgeq %rax, %r15
cmpq %rbx, %r15
ja 0x3ffc
movq %r15, %rdi
movq %r14, %rsi
callq 0x54e5
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3c53
movq %r12, %rdi
callq 0x56dc
incq %r15
jmp 0x3f7f
movq %rdi, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x54e5
movq %rax, %r12
subq 0x8(%rax), %r15
leaq -0x1(%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3f4f
movq %rax, %r15
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x3c53
movq %r12, %rdi
callq 0x56dc
movq %r15, %rax
jmp 0x4002
incq %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/melynx[P]peekaboo/read_trace.c
// Function: append2pattern_list
int append2pattern_list(cache_linked_list_t *pattern_ptr, const uint8_t *buffer, const unsigned int buffer_size)
{
    // Empty buffer, directly return
    if (buffer_size == 0) return 0;

    insn_rawbyte_node_t *new_node = malloc(sizeof(insn_rawbyte_node_t));
    if (!new_node) PEEKABOO_DIE("Failed to malloc.");
    new_node->succ = NULL;
    
    if (pattern_ptr->head == NULL)
    {
        pattern_ptr->head = new_node;
    }

    // Update tail and length
    insn_rawbyte_node_t *curr_tail_node = pattern_ptr->tail;
    if (curr_tail_node != NULL)
    {
        curr_tail_node->succ = new_node;
    }
    new_node->prec = curr_tail_node;
    pattern_ptr->tail = new_node;
    pattern_ptr->length += 1;

    new_node->bytes = malloc((buffer_size/2+1)*sizeof(uint16_t));
    if(!new_node->bytes) PEEKABOO_DIE("Failed to malloc.");
    new_node->size = hex_string_to_uint16_arrary(new_node->bytes, buffer);
    if (new_node->size <= 0) return -1; 

    // Find if abitrary
    size_t idx;
    new_node->is_arbitrary = false;
    for (idx=0; idx<new_node->size; idx++)
    {
        if (new_node->bytes[idx] == 0x100*16+0x100) // Matched "**"
        {
            new_node->is_arbitrary = true;
            new_node->size = 0;
            free(new_node->bytes);
            new_node->bytes = NULL;
            break;
        }
    }
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
testl %edx, %edx
je 0x40b4
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %r12
movl $0x28, %edi
callq 0x31a0
testq %rax, %rax
je 0x40ea
movq %rax, %rbx
movq $0x0, 0x20(%rax)
cmpq $0x0, (%r12)
jne 0x4050
movq %rbx, (%r12)
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x405e
movq %rbx, 0x20(%rax)
movq %rax, 0x18(%rbx)
movq %rbx, 0x8(%r12)
incq 0x10(%r12)
andl $-0x2, %r15d
addq $0x2, %r15
movq %r15, %rdi
callq 0x31a0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x40ef
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x39e5
movl %eax, 0x10(%rbx)
testl %eax, %eax
jle 0x40b8
movb $0x0, (%rbx)
movl %eax, %eax
xorl %ecx, %ecx
cmpw $0x1100, (%r15,%rcx,2)  # imm = 0x1100
je 0x40bf
incq %rcx
cmpq %rcx, %rax
jne 0x40a1
jmp 0x40d9
xorl %eax, %eax
jmp 0x40de
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x40de
movb $0x1, (%rbx)
movl $0x0, 0x10(%rbx)
movq %r15, %rdi
callq 0x3030
movq $0x0, 0x8(%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x3395
callq 0x3370
// File: /workspace/github_c_makefile_star2_O1/melynx[P]peekaboo/read_trace.c
// Function: free_dulinked_list
void free_dulinked_list(cache_linked_list_t* pattern)
{
    if (pattern == NULL) return;
    uint32_t idx;
    insn_rawbyte_node_t *this_node = pattern->head;
    for (idx=0; idx<pattern->length; idx++)
    {
        insn_rawbyte_node_t *next_node = this_node->succ;
        free_insn_rawbyte_node(this_node);
        this_node = next_node;
    }
}

// Assembly:
testq %rdi, %rdi
je 0x4240
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x423c
movq (%rbx), %rdi
movl $0x1, %ebp
movq 0x20(%rdi), %r14
callq 0x3a98
movl %ebp, %eax
incl %ebp
movq %r14, %rdi
cmpq %rax, 0x10(%rbx)
ja 0x4226
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/melynx[P]peekaboo/read_trace.c
// Function: print_pattern
void print_pattern(const cache_linked_list_t* pattern)
{
    printf("Search for the following snippet (%lu instructions):\n", pattern->length);
    uint32_t instr_id;
    insn_rawbyte_node_t *this_node = pattern->head;
    for (instr_id = 0; instr_id < pattern->length; instr_id++, this_node=this_node->succ)
    {
        uint32_t byte_offset;
        bool has_arbitrary_byte = false;
        assert(this_node!=NULL);
        printf("\t");
        if (this_node->is_arbitrary)
        {
            printf("**                   \t[Any Instr.]\n");
            continue;
        }
        for(byte_offset = 0; byte_offset < this_node->size; byte_offset++)
        {
            uint16_t byte_to_print = this_node->bytes[byte_offset];
            if (byte_to_print == 0x101*16+0x101)
            {
                printf("?? ");
                has_arbitrary_byte = true;
                continue;
            }
            printf("%02hhx ", byte_to_print);
        }
        if (!has_arbitrary_byte)
        {
        #ifdef ASM_CAPSTONE
            cs_insn *capstone_insn;
            uint8_t *tmp_rawbytes = malloc(this_node->size);
            if (!tmp_rawbytes) PEEKABOO_DIE("Failed to malloc");
            uint32_t tmp_idx;
            for (tmp_idx = 0; tmp_idx < this_node->size; tmp_idx++)
            {
                tmp_rawbytes[tmp_idx] = this_node->bytes[tmp_idx] & 0xFF;
            }
            size_t count = cs_disasm(capstone_handler, tmp_rawbytes, this_node->size, 0x0, 0, &capstone_insn);
            free(tmp_rawbytes);
            if (count > 0) 
            {
                size_t k;
                for (k = this_node->size; k < 8; k++) printf("   ");
                printf("%s\t\t%s", capstone_insn[0].mnemonic, capstone_insn[00].op_str);
                cs_free(capstone_insn, count);
            }
        #endif
        }
        printf("\n");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rsi
leaq 0x201d(%rip), %rdi      # 0x6277
xorl %eax, %eax
callq 0x30d0
cmpq $0x0, 0x10(%rbx)
je 0x42fe
leaq 0x207a(%rip), %r15      # 0x62ed
leaq 0x2077(%rip), %r12      # 0x62f1
movq %rbx, %r13
xorl %ebp, %ebp
movq (%r13), %r13
testq %r13, %r13
je 0x430d
movl $0x9, %edi
callq 0x3040
cmpb $0x0, (%r13)
je 0x42ab
leaq 0x24d3(%rip), %rdi      # 0x6777
callq 0x3080
jmp 0x42f2
cmpl $0x0, 0x10(%r13)
je 0x42e8
xorl %r14d, %r14d
movq 0x8(%r13), %rax
movzwl (%rax,%r14,2), %esi
cmpl $0x1111, %esi           # imm = 0x1111
jne 0x42d2
movq %r15, %rdi
xorl %eax, %eax
callq 0x30d0
jmp 0x42dc
movq %r12, %rdi
xorl %eax, %eax
callq 0x30d0
incq %r14
movl 0x10(%r13), %eax
cmpq %rax, %r14
jb 0x42b5
movl $0xa, %edi
callq 0x3040
incl %ebp
addq $0x20, %r13
cmpq %rbp, 0x10(%rbx)
ja 0x427f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f99(%rip), %rdi      # 0x62ad
leaq 0x1d6c(%rip), %rsi      # 0x6087
leaq 0x1f9b(%rip), %rcx      # 0x62bd
movl $0x243, %edx            # imm = 0x243
callq 0x3110
// File: /workspace/github_c_makefile_star2_O1/melynx[P]peekaboo/read_trace.c
// Function: append2macthed_list
void append2macthed_list(matched_list_node_t **list_header, const uint64_t addr)
{

    if (*list_header == NULL)
    {
        *list_header = malloc(sizeof(matched_list_node_t));
        if (!*list_header) PEEKABOO_DIE("Malloc failed.");
        (*list_header)->addr = addr;
        (*list_header)->cnt = 1;
        (*list_header)->succ = NULL;
    }
    else
    {
        matched_list_node_t *prev_node, *node = *list_header;
        while (node)
        {
            if (node->addr == addr)
            {
                node->cnt++;
                break;
            }
            prev_node = node;
            node = prev_node->succ;
        }
        if (node == NULL)
        {
            node = malloc(sizeof(matched_list_node_t));
            if (!node) PEEKABOO_DIE("Malloc failed.");
            node->addr = addr;
            node->cnt = 1;
            node->succ = NULL;
            prev_node->succ = node;
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rdi), %rax
testq %rax, %rax
je 0x4373
movq %rax, %r14
cmpq %rbx, 0x8(%rax)
je 0x439d
movq (%r14), %rax
testq %rax, %rax
jne 0x433b
movl $0x18, %edi
callq 0x31a0
testq %rax, %rax
je 0x43ae
movq %rbx, 0x8(%rax)
movq $0x1, 0x10(%rax)
movq $0x0, (%rax)
movq %rax, (%r14)
jmp 0x43a1
movq %rdi, %r14
movl $0x18, %edi
callq 0x31a0
movq %rax, (%r14)
testq %rax, %rax
je 0x43a9
movq %rbx, 0x8(%rax)
movq $0x1, 0x10(%rax)
movq $0x0, (%rax)
jmp 0x43a1
incq 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x344b
callq 0x3426
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/core/common.c
// Function: x264_param_default(x264_param_t*)
void    x264_param_default( x264_param_t *param )
{
    /* */
    memset( param, 0, sizeof( x264_param_t ) );

    /* CPU autodetect */
    param->cpu = x264_cpu_detect();
    fprintf( stderr, "x264: cpu capabilities: %s%s%s%s%s%s\n",
             param->cpu&X264_CPU_MMX ? "MMX " : "",
             param->cpu&X264_CPU_MMXEXT ? "MMXEXT " : "",
             param->cpu&X264_CPU_SSE ? "SSE " : "",
             param->cpu&X264_CPU_SSE2 ? "SSE2 " : "",
             param->cpu&X264_CPU_3DNOW ? "3DNow! " : "",
             param->cpu&X264_CPU_ALTIVEC ? "Altivec " : "" );


    /* Video properties */
    param->i_width         = 0;
    param->i_height        = 0;
    param->vui.i_sar_width = 0;
    param->vui.i_sar_height= 0;
    param->f_fps           = 25.0;

    /* Encoder parameters */
    param->i_frame_reference = 1;
    param->i_idrframe = 2;
    param->i_iframe = 60;
    param->i_bframe = 0;

    param->b_deblocking_filter = 1;

    param->b_cabac = 0;
    param->i_cabac_init_idc = -1;

    param->i_bitrate = 3000;
    param->i_qp_constant = 26;

    param->i_me = X264_ME_DIAMOND;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
callq 0x4864
movl %eax, (%rbx)
movq 0x2fb47(%rip), %rcx     # 0x31fd0
movq (%rcx), %rdi
testb $0x1, %al
leaq 0x1f098(%rip), %rsi     # 0x2152d
leaq 0x22d8a(%rip), %rdx     # 0x25226
cmoveq %rsi, %rdx
testb $0x2, %al
leaq 0x22d82(%rip), %rcx     # 0x2522b
cmoveq %rsi, %rcx
testb $0x4, %al
leaq 0x22d7d(%rip), %r8      # 0x25233
cmoveq %rsi, %r8
testb $0x8, %al
leaq 0x22d75(%rip), %r9      # 0x25238
cmoveq %rsi, %r9
testb $0x10, %al
leaq 0x22d6e(%rip), %r10     # 0x2523e
cmoveq %rsi, %r10
testb $0x40, %al
leaq 0x22d69(%rip), %r11     # 0x25246
cmoveq %rsi, %r11
leaq 0x22d18(%rip), %rsi     # 0x25200
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x2180
popq %rcx
popq %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rbx)
movaps 0x22ccd(%rip), %xmm0    # 0x251d0
movups %xmm0, 0x14(%rbx)
movaps 0x22cd2(%rip), %xmm0    # 0x251e0
movups %xmm0, 0x24(%rbx)
movabsq $0xbb80000001a, %rax    # imm = 0xBB80000001A
movq %rax, 0x34(%rbx)
movl $0x1, 0x3c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/x264.c
// Function: fillByte(unsigned char*, int, int)
void fillByte(BYTE *src, int dx, int dy)
{
    int j;
    int i;
    for (j = 0; j < dy; j++)
    {
        for ( i = 0; i < dx; i++)
        {
            src[j * dx + i]= 0;
        }

    }

}

// Assembly:
testl %edx, %edx
jle 0x31a6
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %r15d
movl %edx, %r12d
xorl %r13d, %r13d
testl %ebx, %ebx
jle 0x3190
movl %r13d, %edi
addq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2070
addl %ebx, %r13d
decq %r12
jne 0x317c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_context_init(x264_cabac_t*, int, int, int)
void x264_cabac_context_init( x264_cabac_t *cb, int i_slice_type, int i_qp, int i_model )
{
    const int (*cabac_context_init)[399][2];
    int i;

    if( i_slice_type == SLICE_TYPE_I )
    {
        cabac_context_init = &x264_cabac_context_init_I;
    }
    else
    {
        cabac_context_init = &x264_cabac_context_init_PB[i_model];
    }

    for( i = 0; i < 399; i++ )
    {
        int i_pre_state;

        i_pre_state = x264_clip3( (((*cabac_context_init)[i][0] * i_qp) >> 4) + (*cabac_context_init)[i][1], 1, 126 );
        if( i_pre_state <= 63 )
        {
            cb->ctxstate[i].i_state = 63 - i_pre_state;
            cb->ctxstate[i].i_mps = 0;
        }
        else
        {
            cb->ctxstate[i].i_state = i_pre_state - 64;
            cb->ctxstate[i].i_mps = 1;
        }
        cb->ctxstate[i].i_count = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %ecx, %rax
imulq $0xc78, %rax, %rax      # imm = 0xC78
leaq 0x1e673(%rip), %rcx     # 0x221c0
addq %rax, %rcx
cmpl $0x2, %esi
leaq 0x1d9e6(%rip), %rax     # 0x21540
cmovneq %rcx, %rax
addq $0x20, %rdi
xorl %ecx, %ecx
movl (%rax,%rcx,8), %esi
imull %edx, %esi
sarl $0x4, %esi
addl 0x4(%rax,%rcx,8), %esi
movl %esi, %r8d
cmpl $0x7e, %esi
jl 0x3b7f
movl $0x7e, %r8d
cmpl $0x2, %r8d
jge 0x3b8b
movl $0x1, %r8d
movl $0x3f, %r9d
subl %r8d, %r9d
addl $-0x40, %r8d
xorl %r10d, %r10d
cmpl $0x40, %esi
setge %r10b
cmovll %r9d, %r8d
movl %r8d, -0x8(%rdi)
movl %r10d, -0x4(%rdi)
movl $0x0, (%rdi)
incq %rcx
addq $0xc, %rdi
cmpq $0x18f, %rcx            # imm = 0x18F
jne 0x3b64
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_decode_decision(x264_cabac_t*, int)
int  x264_cabac_decode_decision( x264_cabac_t *cb, int i_ctx )
{
    int i_state = cb->ctxstate[i_ctx].i_state;
    int i_mps   = cb->ctxstate[i_ctx].i_mps;

    int i_range_lps = x264_cabac_range_lps[i_state][(cb->i_range>>6)&0x03];

    int val;

    cb->i_range -= i_range_lps;

    if( cb->i_low >= cb->i_range )
    {
        val = 1 - i_mps;

        cb->i_low -= cb->i_range;
        cb->i_range= i_range_lps;

        if( i_state == 0 )
        {
            cb->ctxstate[i_ctx].i_mps = 1 - i_mps;
        }
        cb->ctxstate[i_ctx].i_state = x264_transition_lps[i_state];
    }
    else
    {
        val = i_mps;

        cb->ctxstate[i_ctx].i_state = x264_transition_mps[i_state];
    }

    x264_cabac_decode_renorm( cb );

    return val;
}

// Assembly:
movslq %esi, %rax
leaq (%rax,%rax,2), %rax
leaq (%rdi,%rax,4), %rcx
addq $0x18, %rcx
movslq (%rcx), %rdx
movl 0x4(%rcx), %eax
movl 0x12cc(%rdi), %esi
movl 0x12d0(%rdi), %r8d
movq %rdx, %r9
shlq $0x4, %r9
leaq 0x20ab0(%rip), %r10     # 0x24730
addq %r9, %r10
movl %r8d, %r9d
shrl $0x4, %r9d
andl $0xc, %r9d
movl (%r9,%r10), %r9d
subl %r9d, %r8d
movl %r8d, 0x12d0(%rdi)
subl %r8d, %esi
jge 0x3caa
leaq 0x20f88(%rip), %rsi     # 0x24c30
jmp 0x3cd2
movl $0x1, %r8d
subl %eax, %r8d
movl %esi, 0x12cc(%rdi)
movl %r9d, 0x12d0(%rdi)
leaq 0x20e69(%rip), %rsi     # 0x24b30
testl %edx, %edx
jne 0x3ccf
movl %r8d, 0x4(%rcx)
movl %r8d, %eax
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl (%rsi,%rdx,4), %edx
movl %edx, (%rcx)
movl 0x12d0(%rdi), %edx
cmpl $0xff, %edx
jg 0x3d99
movq 0x12e0(%rdi), %rsi
movq 0x8(%rsi), %r8
movq 0x10(%rsi), %r9
movl 0x12cc(%rdi), %r11d
leaq 0x2141d(%rip), %r10     # 0x25130
addl %edx, %edx
movl %edx, 0x12d0(%rdi)
movl %r11d, %ebx
addl %r11d, %ebx
movl $0x1, %r14d
xorl %r11d, %r11d
cmpq %r9, %r8
jae 0x3d83
movslq 0x18(%rsi), %r15
movl %r15d, %ecx
subl %r14d, %ecx
movzbl (%r8), %r12d
jns 0x3d60
andl (%r10,%r15,4), %r12d
negb %cl
shll %cl, %r12d
orl %r12d, %r11d
incq %r8
movq %r8, 0x8(%rsi)
movl $0x8, 0x18(%rsi)
subl %r15d, %r14d
jg 0x3d2a
jmp 0x3d83
shrl %cl, %r12d
movl %r14d, %r13d
andl (%r10,%r13,4), %r12d
orl %r12d, %r11d
movl %ecx, 0x18(%rsi)
cmpl %r14d, %r15d
jne 0x3d83
incq %r8
movq %r8, 0x8(%rsi)
movl $0x8, 0x18(%rsi)
orl %ebx, %r11d
movl %r11d, 0x12cc(%rdi)
cmpl $0x100, %edx            # imm = 0x100
jl 0x3d13
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_decode_bypass(x264_cabac_t*)
int  x264_cabac_decode_bypass( x264_cabac_t *cb )
{
    cb->i_low = (cb->i_low << 1)|_bs_read( cb->s, 1 );

    if( cb->i_low >= cb->i_range )
    {
        cb->i_low -= cb->i_range;
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl 0x12cc(%rdi), %eax
addl %eax, %eax
movq 0x12e0(%rdi), %rsi
movq 0x8(%rsi), %r8
movq 0x10(%rsi), %r11
movl $0x1, %r9d
xorl %edx, %edx
leaq 0x2135f(%rip), %r10     # 0x25130
cmpq %r11, %r8
jae 0x3e29
movslq 0x18(%rsi), %rbx
movl %ebx, %ecx
subl %r9d, %ecx
movzbl (%r8), %r14d
jns 0x3e06
andl (%r10,%rbx,4), %r14d
negb %cl
shll %cl, %r14d
orl %r14d, %edx
incq %r8
movq %r8, 0x8(%rsi)
movl $0x8, 0x18(%rsi)
subl %ebx, %r9d
jg 0x3dd1
jmp 0x3e29
shrl %cl, %r14d
movl %r9d, %r11d
andl (%r10,%r11,4), %r14d
orl %r14d, %edx
movl %ecx, 0x18(%rsi)
cmpl %r9d, %ebx
jne 0x3e29
incq %r8
movq %r8, 0x8(%rsi)
movl $0x8, 0x18(%rsi)
orl %eax, %edx
movl %edx, 0x12cc(%rdi)
xorl %eax, %eax
subl 0x12d0(%rdi), %edx
jl 0x3e46
movl %edx, 0x12cc(%rdi)
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_decode_terminal(x264_cabac_t*)
int  x264_cabac_decode_terminal( x264_cabac_t *cb )
{
    if( cb->i_low >= cb->i_range - 2 )
    {
        return 1;
    }

    cb->i_range -= 2;
    x264_cabac_decode_renorm( cb );
    return 0;
}

// Assembly:
movl 0x12cc(%rdi), %esi
movl 0x12d0(%rdi), %ecx
leal -0x2(%rcx), %edx
movl $0x1, %eax
cmpl %edx, %esi
jge 0x3f22
movl %edx, 0x12d0(%rdi)
cmpl $0x101, %ecx            # imm = 0x101
jg 0x3f23
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x12e0(%rdi), %rax
movq 0x8(%rax), %r8
movq 0x10(%rax), %r9
leaq 0x21296(%rip), %r10     # 0x25130
addl %edx, %edx
movl %edx, 0x12d0(%rdi)
movl %esi, %r11d
addl %esi, %r11d
movl $0x1, %ebx
xorl %esi, %esi
cmpq %r9, %r8
jae 0x3f07
movslq 0x18(%rax), %r14
movl %r14d, %ecx
subl %ebx, %ecx
movzbl (%r8), %r15d
jns 0x3ee4
andl (%r10,%r14,4), %r15d
negb %cl
shll %cl, %r15d
orl %r15d, %esi
incq %r8
movq %r8, 0x8(%rax)
movl $0x8, 0x18(%rax)
subl %r14d, %ebx
jg 0x3eaf
jmp 0x3f07
shrl %cl, %r15d
movl %ebx, %r12d
andl (%r10,%r12,4), %r15d
orl %r15d, %esi
movl %ecx, 0x18(%rax)
cmpl %ebx, %r14d
jne 0x3f07
incq %r8
movq %r8, 0x8(%rax)
movl $0x8, 0x18(%rax)
orl %r11d, %esi
movl %esi, 0x12cc(%rdi)
cmpl $0x100, %edx            # imm = 0x100
jl 0x3e9a
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq