LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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, %r13d
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rdi), %r12
cmpq %rcx, %r12
jbe 0x3b1b
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3ba9
cmpq 0x8(%rbx), %rdi
je 0x3bc8
movq 0x20(%rdi), %r15
testq %r15, %r15
je 0x3be7
callq 0x3aa7
movq %r15, (%rbx)
movq 0x10(%rbx), %r12
decq %r12
movq %r12, 0x10(%rbx)
movl $0x28, %edi
callq 0x31b0
testq %rax, %rax
je 0x3ba4
movq %rax, %r15
movb $0x0, (%rax)
movq 0x8(%rbx), %rax
movq %rax, (%rsp)
movq %rax, 0x18(%r15)
movq $0x0, 0x20(%r15)
movl %r13d, 0x10(%r15)
movl %r13d, %ebp
leaq (,%rbp,2), %rdi
callq 0x31b0
movq %rax, 0x8(%r15)
testl %r13d, %r13d
je 0x3b74
xorl %ecx, %ecx
movzbl (%r14,%rcx), %edx
movw %dx, (%rax,%rcx,2)
incq %rcx
cmpq %rcx, %rbp
jne 0x3b63
cmpq $0x0, (%rbx)
jne 0x3b7d
movq %r15, (%rbx)
movq (%rsp), %rax
testq %rax, %rax
je 0x3b8a
movq %r15, 0x20(%rax)
movq %r15, 0x8(%rbx)
incq %r12
movq %r12, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x3336
leaq 0x24bc(%rip), %rdi      # 0x606c
leaq 0x24d0(%rip), %rsi      # 0x6087
leaq 0x24d6(%rip), %rcx      # 0x6094
movl $0xfd, %edx
callq 0x3110
leaq 0x2524(%rip), %rdi      # 0x60f3
leaq 0x24b1(%rip), %rsi      # 0x6087
leaq 0x24b7(%rip), %rcx      # 0x6094
movl $0xfe, %edx
callq 0x3110
leaq 0x252e(%rip), %rdi      # 0x611c
leaq 0x2492(%rip), %rsi      # 0x6087
leaq 0x2498(%rip), %rcx      # 0x6094
movl $0x100, %edx            # imm = 0x100
callq 0x3110
// File: /workspace/github_c_makefile_star2_O3/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 0x3c6e
testl %ecx, %ecx
je 0x3c6e
addq $0x8, %rdi
addq $0x8, %rsi
xorl %eax, %eax
movq (%rsi), %rsi
movq (%rdi), %rdi
movl 0x10(%rdi), %edx
cmpb $0x0, (%rsi)
jne 0x3c60
cmpl %edx, 0x10(%rsi)
jne 0x3c6f
testq %rdx, %rdx
je 0x3c60
movq 0x8(%rsi), %r8
xorl %r9d, %r9d
movzwl (%r8,%r9,2), %r10d
cmpl $0x1111, %r10d          # imm = 0x1111
je 0x3c58
movq 0x8(%rdi), %r11
cmpw (%r11,%r9,2), %r10w
jne 0x3c6f
incq %r9
cmpq %r9, %rdx
jne 0x3c3f
addl %edx, %eax
addq $0x18, %rsi
addq $0x18, %rdi
decl %ecx
jne 0x3c20
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3fc5
leaq -0x5(%rbx), %rax
cmpq $0x2, %rax
movl $0x1, %r15d
cmovgeq %rax, %r15
cmpq %rbx, %r15
ja 0x400f
movq %r15, %rdi
movq %r14, %rsi
callq 0x551a
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3c72
movq %r12, %rdi
callq 0x570e
incq %r15
jmp 0x3f92
movq %rdi, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x551a
movq %rax, %r12
subq 0x8(%rax), %r15
leaq -0x1(%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x3f62
movq %rax, %r15
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x3c72
movq %r12, %rdi
callq 0x570e
movq %r15, %rax
jmp 0x4015
incq %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x40c7
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %r12
movl $0x28, %edi
callq 0x31b0
testq %rax, %rax
je 0x40fd
movq %rax, %rbx
movq $0x0, 0x20(%rax)
cmpq $0x0, (%r12)
jne 0x4063
movq %rbx, (%r12)
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x4071
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 0x31b0
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x4102
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x39ed
movl %eax, 0x10(%rbx)
testl %eax, %eax
jle 0x40cb
movb $0x0, (%rbx)
movl %eax, %eax
xorl %ecx, %ecx
cmpw $0x1100, (%r15,%rcx,2)  # imm = 0x1100
je 0x40d2
incq %rcx
cmpq %rcx, %rax
jne 0x40b4
jmp 0x40ec
xorl %eax, %eax
jmp 0x40f1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x40f1
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 0x33a5
callq 0x3380
// File: /workspace/github_c_makefile_star2_O3/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 0x4273
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x426f
movq (%rbx), %rdi
movl $0x1, %ebp
movq 0x20(%rdi), %r14
callq 0x3aa7
movl %ebp, %eax
incl %ebp
movq %r14, %rdi
cmpq %rax, 0x10(%rbx)
ja 0x4259
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1fea(%rip), %rdi      # 0x6277
xorl %eax, %eax
callq 0x30d0
cmpq $0x0, 0x10(%rbx)
je 0x4331
leaq 0x2047(%rip), %r15      # 0x62ed
leaq 0x2044(%rip), %r12      # 0x62f1
movq %rbx, %r13
xorl %ebp, %ebp
movq (%r13), %r13
testq %r13, %r13
je 0x4340
movl $0x9, %edi
callq 0x3040
cmpb $0x0, (%r13)
je 0x42de
leaq 0x24a0(%rip), %rdi      # 0x6777
callq 0x3080
jmp 0x4325
cmpl $0x0, 0x10(%r13)
je 0x431b
xorl %r14d, %r14d
movq 0x8(%r13), %rax
movzwl (%rax,%r14,2), %esi
cmpl $0x1111, %esi           # imm = 0x1111
jne 0x4305
movq %r15, %rdi
xorl %eax, %eax
callq 0x30d0
jmp 0x430f
movq %r12, %rdi
xorl %eax, %eax
callq 0x30d0
incq %r14
movl 0x10(%r13), %eax
cmpq %rax, %r14
jb 0x42e8
movl $0xa, %edi
callq 0x3040
incl %ebp
addq $0x20, %r13
cmpq %rbp, 0x10(%rbx)
ja 0x42b2
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1f66(%rip), %rdi      # 0x62ad
leaq 0x1d39(%rip), %rsi      # 0x6087
leaq 0x1f68(%rip), %rcx      # 0x62bd
movl $0x243, %edx            # imm = 0x243
callq 0x3110
// File: /workspace/github_c_makefile_star2_O3/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 0x43a6
movq %rax, %r14
cmpq %rbx, 0x8(%rax)
je 0x43d0
movq (%r14), %rax
testq %rax, %rax
jne 0x436e
movl $0x18, %edi
callq 0x31b0
testq %rax, %rax
je 0x43e1
movq %rbx, 0x8(%rax)
movq $0x1, 0x10(%rax)
movq $0x0, (%rax)
movq %rax, (%r14)
jmp 0x43d4
movq %rdi, %r14
movl $0x18, %edi
callq 0x31b0
movq %rax, (%r14)
testq %rax, %rax
je 0x43dc
movq %rbx, 0x8(%rax)
movq $0x1, 0x10(%rax)
movq $0x0, (%rax)
jmp 0x43d4
incq 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x345b
callq 0x3436
// File: /workspace/github_c_makefile_star2_O3/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 0x4698
movl %eax, (%rbx)
movq 0x30b80(%rip), %rcx     # 0x32fd0
movq (%rcx), %rdi
testb $0x1, %al
leaq 0x210cf(%rip), %rsi     # 0x2352b
leaq 0x24dc3(%rip), %rdx     # 0x27226
cmoveq %rsi, %rdx
testb $0x2, %al
leaq 0x24dbb(%rip), %rcx     # 0x2722b
cmoveq %rsi, %rcx
testb $0x4, %al
leaq 0x24db6(%rip), %r8      # 0x27233
cmoveq %rsi, %r8
testb $0x8, %al
leaq 0x24dae(%rip), %r9      # 0x27238
cmoveq %rsi, %r9
testb $0x10, %al
leaq 0x24da7(%rip), %r10     # 0x2723e
cmoveq %rsi, %r10
testb $0x40, %al
leaq 0x24da2(%rip), %r11     # 0x27246
cmoveq %rsi, %r11
leaq 0x24d51(%rip), %rsi     # 0x27200
xorl %eax, %eax
pushq %r11
pushq %r10
callq 0x2170
popq %rcx
popq %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rbx)
movaps 0x24d06(%rip), %xmm0    # 0x271d0
movups %xmm0, 0x14(%rbx)
movaps 0x24d0b(%rip), %xmm0    # 0x271e0
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_O3/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 0x3086
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 0x3070
movl %r13d, %edi
addq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2070
addl %ebx, %r13d
decq %r12
jne 0x305c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x20833(%rip), %rcx     # 0x241c0
addq %rax, %rcx
cmpl $0x2, %esi
leaq 0x1fba6(%rip), %rax     # 0x23540
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 0x39bf
movl $0x7e, %r8d
cmpl $0x2, %r8d
jge 0x39cb
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 0x39a4
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq %esi, %rax
leaq (%rax,%rax,2), %rax
leaq 0x18(%rdi,%rax,4), %rcx
movslq (%rcx), %r8
movl 0x4(%rcx), %eax
movl 0x12cc(%rdi), %esi
movl 0x12d0(%rdi), %edx
movq %r8, %r9
shlq $0x4, %r9
leaq 0x22c67(%rip), %r10     # 0x26730
addq %r9, %r10
movl %edx, %r9d
shrl $0x4, %r9d
andl $0xc, %r9d
movl (%r9,%r10), %r10d
subl %r10d, %edx
movl %edx, 0x12d0(%rdi)
movl %esi, %ebx
subl %edx, %ebx
jge 0x3af3
leaq 0x2313f(%rip), %r9      # 0x26c30
jmp 0x3b21
movl $0x1, %r11d
subl %eax, %r11d
movl %ebx, 0x12cc(%rdi)
movl %r10d, 0x12d0(%rdi)
leaq 0x23020(%rip), %r9      # 0x26b30
testl %r8d, %r8d
jne 0x3b19
movl %r11d, 0x4(%rcx)
movl %ebx, %esi
movl %r10d, %edx
movl %r11d, %eax
movl (%r9,%r8,4), %r8d
movl %r8d, (%rcx)
cmpl $0xff, %edx
jg 0x3bca
movq 0x12e0(%rdi), %r8
movq 0x8(%r8), %r9
movq 0x10(%r8), %r10
leaq 0x235e6(%rip), %r11     # 0x27130
addl %edx, %edx
movl %edx, 0x12d0(%rdi)
movl %esi, %ebx
addl %esi, %ebx
movl $0x1, %r14d
xorl %esi, %esi
cmpq %r10, %r9
jae 0x3bba
movslq 0x18(%r8), %r15
movl %r15d, %ecx
subl %r14d, %ecx
movzbl (%r9), %r12d
jns 0x3b95
andl (%r11,%r15,4), %r12d
negb %cl
shll %cl, %r12d
orl %r12d, %esi
incq %r9
movq %r9, 0x8(%r8)
movl $0x8, 0x18(%r8)
subl %r15d, %r14d
jg 0x3b5e
jmp 0x3bba
shrl %cl, %r12d
movl %r14d, %r13d
andl (%r11,%r13,4), %r12d
orl %r12d, %esi
movl %ecx, 0x18(%r8)
cmpl %r14d, %r15d
jne 0x3bba
incq %r9
movq %r9, 0x8(%r8)
movl $0x8, 0x18(%r8)
orl %ebx, %esi
movl %esi, 0x12cc(%rdi)
cmpl $0x100, %edx            # imm = 0x100
jl 0x3b4a
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2352e(%rip), %r10     # 0x27130
cmpq %r11, %r8
jae 0x3c5a
movslq 0x18(%rsi), %rbx
movl %ebx, %ecx
subl %r9d, %ecx
movzbl (%r8), %r14d
jns 0x3c37
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 0x3c02
jmp 0x3c5a
shrl %cl, %r14d
movl %r9d, %r11d
andl (%r10,%r11,4), %r14d
orl %r14d, %edx
movl %ecx, 0x18(%rsi)
cmpl %r9d, %ebx
jne 0x3c5a
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 0x3c77
movl %edx, 0x12cc(%rdi)
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3d53
movl %edx, 0x12d0(%rdi)
cmpl $0x101, %ecx            # imm = 0x101
jg 0x3d54
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 0x23465(%rip), %r10     # 0x27130
addl %edx, %edx
movl %edx, 0x12d0(%rdi)
movl %esi, %r11d
addl %esi, %r11d
movl $0x1, %ebx
xorl %esi, %esi
cmpq %r9, %r8
jae 0x3d38
movslq 0x18(%rax), %r14
movl %r14d, %ecx
subl %ebx, %ecx
movzbl (%r8), %r15d
jns 0x3d15
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 0x3ce0
jmp 0x3d38
shrl %cl, %r15d
movl %ebx, %r12d
andl (%r10,%r12,4), %r15d
orl %r15d, %esi
movl %ecx, 0x18(%rax)
cmpl %ebx, %r14d
jne 0x3d38
incq %r8
movq %r8, 0x8(%rax)
movl $0x8, 0x18(%rax)
orl %r11d, %esi
movl %esi, 0x12cc(%rdi)
cmpl $0x100, %edx            # imm = 0x100
jl 0x3ccb
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_encode_decision(x264_cabac_t*, int, int)
void x264_cabac_encode_decision( x264_cabac_t *cb, int i_ctx, int b )
{
    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];

#ifdef TRACE
    if( binCount >= 0 )
    {
        fprintf( stderr, "%d  ctx=%d b=%d\n", binCount, i_ctx, b );
    }
    fprintf( stderr, "%d  0x%04x  %d  %d\n", binCount++, cb->i_range, i_state, i_mps );
#endif

    cb->i_range -= i_range_lps;

    if( b != 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
    {
        cb->ctxstate[i_ctx].i_state = x264_transition_mps[i_state];
    }
    cb->ctxstate[i_ctx].i_count++;

    x264_cabac_encode_renorm( cb );

    cb->i_sym_cnt++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq %esi, %rax
leaq (%rax,%rax,2), %rax
leaq 0x18(%rdi,%rax,4), %rax
movslq (%rax), %rcx
movl 0x4(%rax), %esi
movl 0x12d0(%rdi), %edi
movq %rcx, %r8
shlq $0x4, %r8
leaq 0x22806(%rip), %r9      # 0x26730
addq %r8, %r9
movl %edi, %r8d
shrl $0x4, %r8d
andl $0xc, %r8d
movl (%r8,%r9), %r8d
subl %r8d, %edi
movl %edi, 0x12d0(%rbx)
cmpl %edx, %esi
jne 0x3f52
leaq 0x22ce0(%rip), %rdx     # 0x26c30
jmp 0x3f74
addl %edi, 0x12cc(%rbx)
movl %r8d, 0x12d0(%rbx)
leaq 0x22bca(%rip), %rdx     # 0x26b30
testl %ecx, %ecx
jne 0x3f74
movl $0x1, %edi
subl %esi, %edi
movl %edi, 0x4(%rax)
movl (%rdx,%rcx,4), %ecx
movl %ecx, (%rax)
incl 0x8(%rax)
movq %rbx, %rdi
callq 0x3f91
incl 0x12d4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_encode_renorm(x264_cabac_t*)
static inline void x264_cabac_encode_renorm( x264_cabac_t *cb )
{
    /* RenormE */
    while( cb->i_range < 0x0100 )
    {
        if( cb->i_low < 0x100 )
        {
            x264_cabac_putbit( cb, 0 );
        }
        else
        {
            if( cb->i_low >= 0x200 )
            {
                cb->i_low -= 0x200;
                x264_cabac_putbit( cb, 1 );
            }
            else
            {
                cb->i_low -= 0x100;
                cb->i_bits_outstanding++;
            }
        }

        cb->i_range <<= 1;
        cb->i_low   <<= 1;
    }
}

// Assembly:
cmpl $0xff, 0x12d0(%rdi)
jg 0x414d
pushq %rbp
movq %rsp, %rbp
movl 0x12cc(%rdi), %eax
cmpl $0xff, %eax
jg 0x3fc7
cmpl $0x0, 0x12d8(%rdi)
je 0x400b
movl $0x0, 0x12d8(%rdi)
jmp 0x4042
cmpl $0x200, %eax            # imm = 0x200
jb 0x3ff5
addl $0xfffffe00, %eax       # imm = 0xFFFFFE00
movl %eax, 0x12cc(%rdi)
cmpl $0x0, 0x12d8(%rdi)
je 0x409c
movl $0x0, 0x12d8(%rdi)
jmp 0x40d0
addl $0xffffff00, %eax       # imm = 0xFFFFFF00
movl %eax, 0x12cc(%rdi)
incl 0x12dc(%rdi)
jmp 0x4124
movq 0x12e0(%rdi), %rax
movq 0x8(%rax), %rdx
cmpq 0x10(%rax), %rdx
jae 0x4042
movl 0x18(%rax), %ecx
decl %ecx
movl %ecx, 0x18(%rax)
movl $0x1, %esi
shll %cl, %esi
notb %sil
andb %sil, (%rdx)
cmpl $0x0, 0x18(%rax)
jne 0x4042
incq 0x8(%rax)
movl $0x8, 0x18(%rax)
cmpl $0x0, 0x12dc(%rdi)
jle 0x4124
movq 0x12e0(%rdi), %rax
movq 0x8(%rax), %rdx
cmpq 0x10(%rax), %rdx
jae 0x4083
movl 0x18(%rax), %ecx
decl %ecx
movl $0x1, %esi
shll %cl, %esi
movl %ecx, 0x18(%rax)
orb %sil, (%rdx)
cmpl $0x0, 0x18(%rax)
jne 0x4083
incq 0x8(%rax)
movl $0x8, 0x18(%rax)
movl 0x12dc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x12dc(%rdi)
cmpl $0x1, %eax
jg 0x404f
jmp 0x4124
movq 0x12e0(%rdi), %rax
movq 0x8(%rax), %rdx
cmpq 0x10(%rax), %rdx
jae 0x40d0
movl 0x18(%rax), %ecx
decl %ecx
movl $0x1, %esi
shll %cl, %esi
movl %ecx, 0x18(%rax)
orb %sil, (%rdx)
cmpl $0x0, 0x18(%rax)
jne 0x40d0
incq 0x8(%rax)
movl $0x8, 0x18(%rax)
cmpl $0x0, 0x12dc(%rdi)
jle 0x4124
movq 0x12e0(%rdi), %rax
movq 0x8(%rax), %rdx
cmpq 0x10(%rax), %rdx
jae 0x4110
movl 0x18(%rax), %ecx
decl %ecx
movl %ecx, 0x18(%rax)
movl $0x1, %esi
shll %cl, %esi
notb %sil
andb %sil, (%rdx)
cmpl $0x0, 0x18(%rax)
jne 0x4110
incq 0x8(%rax)
movl $0x8, 0x18(%rax)
movl 0x12dc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x12dc(%rdi)
cmpl $0x1, %eax
jg 0x40d9
movl 0x12cc(%rdi), %eax
movl 0x12d0(%rdi), %ecx
addl %ecx, %ecx
movl %ecx, 0x12d0(%rdi)
addl %eax, %eax
movl %eax, 0x12cc(%rdi)
cmpl $0x100, %ecx            # imm = 0x100
jl 0x3fab
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_encode_bypass(x264_cabac_t*, int)
void x264_cabac_encode_bypass( x264_cabac_t *cb, int b )
{
#ifdef TRACE
    fprintf( stderr, "%d  0x%04x\n", binCount++, cb->i_range );
#endif

    cb->i_low <<= 1;
    if( b )
    {
        cb->i_low += cb->i_range;
    }

    if( cb->i_low >= 0x400 )
    {
        x264_cabac_putbit( cb, 1 );
        cb->i_low -= 0x400;
    }
    else
    {
        if( cb->i_low < 0x200 )
        {
            x264_cabac_putbit( cb, 0 );
        }
        else
        {
            cb->i_low -= 0x200;
            cb->i_bits_outstanding++;
        }
    }
    cb->i_sym_cnt++;
}

// Assembly:
movl 0x12cc(%rdi), %eax
addl %eax, %eax
movl %eax, 0x12cc(%rdi)
testl %esi, %esi
je 0x416c
addl 0x12d0(%rdi), %eax
movl %eax, 0x12cc(%rdi)
pushq %rbp
movq %rsp, %rbp
cmpl $0x400, %eax            # imm = 0x400
jl 0x418c
cmpl $0x0, 0x12d8(%rdi)
je 0x41cb
movl $0x0, 0x12d8(%rdi)
jmp 0x41ff
cmpl $0x1ff, %eax            # imm = 0x1FF
jg 0x41af
cmpl $0x0, 0x12d8(%rdi)
je 0x426b
movl $0x0, 0x12d8(%rdi)
jmp 0x42a2
addl $0xfffffe00, %eax       # imm = 0xFFFFFE00
movl %eax, 0x12cc(%rdi)
leaq 0x12dc(%rdi), %rax
movl $0x1, %edx
jmp 0x4261
movq 0x12e0(%rdi), %rax
movq 0x8(%rax), %rdx
cmpq 0x10(%rax), %rdx
jae 0x41ff
movl 0x18(%rax), %ecx
decl %ecx
movl $0x1, %esi
shll %cl, %esi
movl %ecx, 0x18(%rax)
orb %sil, (%rdx)
cmpl $0x0, 0x18(%rax)
jne 0x41ff
incq 0x8(%rax)
movl $0x8, 0x18(%rax)
leaq 0x12cc(%rdi), %rax
movl $0xfffffc00, %edx       # imm = 0xFFFFFC00
cmpl $0x0, 0x12dc(%rdi)
jle 0x4261
movq 0x12e0(%rdi), %rsi
movq 0x8(%rsi), %r8
cmpq 0x10(%rsi), %r8
jae 0x424d
movl 0x18(%rsi), %ecx
decl %ecx
movl %ecx, 0x18(%rsi)
movl $0x1, %r9d
shll %cl, %r9d
notb %r9b
andb %r9b, (%r8)
cmpl $0x0, 0x18(%rsi)
jne 0x424d
incq 0x8(%rsi)
movl $0x8, 0x18(%rsi)
movl 0x12dc(%rdi), %ecx
leal -0x1(%rcx), %esi
movl %esi, 0x12dc(%rdi)
cmpl $0x1, %ecx
jg 0x4214
addl %edx, (%rax)
incl 0x12d4(%rdi)
popq %rbp
retq
movq 0x12e0(%rdi), %rax
movq 0x8(%rax), %rdx
cmpq 0x10(%rax), %rdx
jae 0x42a2
movl 0x18(%rax), %ecx
decl %ecx
movl %ecx, 0x18(%rax)
movl $0x1, %esi
shll %cl, %esi
notb %sil
andb %sil, (%rdx)
cmpl $0x0, 0x18(%rax)
jne 0x42a2
incq 0x8(%rax)
movl $0x8, 0x18(%rax)
cmpl $0x0, 0x12dc(%rdi)
jle 0x4263
movq 0x12e0(%rdi), %rax
movq 0x8(%rax), %rdx
cmpq 0x10(%rax), %rdx
jae 0x42df
movl 0x18(%rax), %ecx
decl %ecx
movl $0x1, %esi
shll %cl, %esi
movl %ecx, 0x18(%rax)
orb %sil, (%rdx)
cmpl $0x0, 0x18(%rax)
jne 0x42df
incq 0x8(%rax)
movl $0x8, 0x18(%rax)
movl 0x12dc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x12dc(%rdi)
cmpl $0x1, %eax
jg 0x42ab
jmp 0x4263
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_encode_terminal(x264_cabac_t*, int)
void x264_cabac_encode_terminal( x264_cabac_t *cb, int b )
{
#ifdef TRACE
    fprintf( stderr, "%d  0x%04x\n", binCount++, cb->i_range );
#endif

    cb->i_range -= 2;
    if( b )
    {
        cb->i_low += cb->i_range;
        cb->i_range = 2;
    }
    x264_cabac_encode_renorm( cb );

    cb->i_sym_cnt++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x12d0(%rdi), %eax
addl $-0x2, %eax
movl %eax, 0x12d0(%rdi)
testl %esi, %esi
je 0x4324
addl %eax, 0x12cc(%rbx)
movl $0x2, 0x12d0(%rbx)
movq %rbx, %rdi
callq 0x3f91
incl 0x12d4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_encode_flush(x264_cabac_t*)
void x264_cabac_encode_flush( x264_cabac_t *cb )
{
    x264_cabac_putbit( cb, (cb->i_low >> 9)&0x01 );
    _bs_write1( cb->s, (cb->i_low >> 8)&0x01 );

    /* check that */
    _bs_write1( cb->s, 0x01 );
    bs_align_0( cb->s );
}

// Assembly:
movl 0x12cc(%rdi), %eax
shrl $0x9, %eax
cmpl $0x0, 0x12d8(%rdi)
je 0x4357
movl $0x0, 0x12d8(%rdi)
jmp 0x43a9
movq 0x12e0(%rdi), %rdx
movq 0x8(%rdx), %rsi
cmpq 0x10(%rdx), %rsi
jae 0x43a9
movl 0x18(%rdx), %ecx
decl %ecx
movl $0x1, %r8d
shll %cl, %r8d
movl %ecx, 0x18(%rdx)
movb (%rsi), %cl
movl %ecx, %r9d
orb %r8b, %r9b
notb %r8b
andb %cl, %r8b
testb $0x1, %al
movzbl %r9b, %ecx
movzbl %r8b, %r8d
cmovnel %ecx, %r8d
movb %r8b, (%rsi)
cmpl $0x0, 0x18(%rdx)
jne 0x43a9
incq 0x8(%rdx)
movl $0x8, 0x18(%rdx)
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x0, 0x12dc(%rdi)
jle 0x441e
movq 0x12e0(%rdi), %rdx
movq 0x8(%rdx), %rsi
cmpq 0x10(%rdx), %rsi
jae 0x440a
movl 0x18(%rdx), %ecx
decl %ecx
movl $0x1, %r8d
shll %cl, %r8d
movl %ecx, 0x18(%rdx)
movb (%rsi), %cl
movl %ecx, %r9d
orb %r8b, %r9b
notb %r8b
andb %cl, %r8b
testb $0x1, %al
movzbl %r9b, %ecx
movzbl %r8b, %r8d
cmovel %ecx, %r8d
movb %r8b, (%rsi)
cmpl $0x0, 0x18(%rdx)
jne 0x440a
incq 0x8(%rdx)
movl $0x8, 0x18(%rdx)
movl 0x12dc(%rdi), %ecx
leal -0x1(%rcx), %edx
movl %edx, 0x12dc(%rdi)
cmpl $0x1, %ecx
jg 0x43b8
movq 0x12e0(%rdi), %rax
movq 0x8(%rax), %rdx
cmpq 0x10(%rax), %rdx
jae 0x4477
movl 0x18(%rax), %ecx
decl %ecx
movl $0x1, %esi
shll %cl, %esi
movl 0x12cc(%rdi), %r8d
movl %ecx, 0x18(%rax)
movb (%rdx), %cl
movl %ecx, %r9d
orb %sil, %r9b
notb %sil
andb %cl, %sil
btl $0x8, %r8d
movzbl %r9b, %ecx
movzbl %sil, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
cmpl $0x0, 0x18(%rax)
jne 0x4477
incq 0x8(%rax)
movl $0x8, 0x18(%rax)
movq 0x12e0(%rdi), %rax
movq 0x8(%rax), %rdx
cmpq 0x10(%rax), %rdx
jae 0x44ab
movl 0x18(%rax), %ecx
decl %ecx
movl $0x1, %esi
shll %cl, %esi
movl %ecx, 0x18(%rax)
orb %sil, (%rdx)
cmpl $0x0, 0x18(%rax)
jne 0x44ab
incq 0x8(%rax)
movl $0x8, 0x18(%rax)
movq 0x12e0(%rdi), %rbx
leaq 0x22cfb(%rip), %rdi     # 0x271b4
leaq 0x252f3(%rip), %rsi     # 0x297b3
leaq 0x22cf4(%rip), %rdx     # 0x271bb
xorl %eax, %eax
callq 0x4a56
movl 0x18(%rbx), %ecx
cmpl $0x8, %ecx
je 0x4517
testl %ecx, %ecx
jle 0x4517
leal 0x1(%rcx), %eax
movq 0x8(%rbx), %rdx
cmpq 0x10(%rbx), %rdx
jae 0x4517
decb %cl
movl $0x1, %esi
shll %cl, %esi
notb %sil
andb %sil, (%rdx)
movl 0x18(%rbx), %ecx
decl %ecx
movl %ecx, 0x18(%rbx)
jne 0x4510
incq 0x8(%rbx)
movl $0x8, 0x18(%rbx)
movl $0x8, %ecx
decl %eax
cmpl $0x1, %eax
ja 0x44dd
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/common.c
// Function: x264_picture_delete(x264_picture_t*)
void x264_picture_delete( x264_picture_t *pic )
{
    int i;

    for( i = 0; i < pic->i_plane; i++ )
    {
        x264_free( pic->plane[i] );
    }
    x264_free( pic );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
testl %eax, %eax
jle 0x4661
xorl %r14d, %r14d
movq 0x20(%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x4656
callq 0x2110
movl 0x8(%rbx), %eax
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0x4644
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2110
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/dct.c
// Function: x264_dct_init(int, x264_dct_function_t*)
void x264_dct_init( int cpu, x264_dct_function_t *dctf )
{
    dctf->dct4x4    = dct4x4;
    dctf->dct4x4dc  = dct4x4dc;
    dctf->idct4x4   = idct4x4;
    dctf->idct4x4dc = idct4x4dc;
    dctf->dct2x2dc  = dct2x2dc;
    dctf->idct2x2dc = idct2x2dc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x3c(%rip), %rax        # 0x46ef
movq %rax, (%rsi)
leaq 0xdc(%rip), %rax        # 0x4799
movq %rax, 0x8(%rsi)
leaq 0x187(%rip), %rax       # 0x484f
movq %rax, 0x10(%rsi)
leaq 0x24f(%rip), %rax       # 0x4922
movq %rax, 0x18(%rsi)
leaq 0x2ec(%rip), %rax       # 0x49ca
movq %rax, 0x20(%rsi)
leaq 0x31c(%rip), %rax       # 0x4a05
movq %rax, 0x28(%rsi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/dump.c
// Function: myPrintf(char const*, ...)
void myPrintf(const char *fmt, ...)
{
    va_list parms;
    char buf[256];

    // Try to print in the allocated space.
    va_start(parms, fmt);
    vsprintf(buf, fmt, parms);
    va_end(parms);

    // Write the information out to a txt file
    if(fpDump)
    {    
      fprintf(fpDump, "%s", buf);
      fflush( fpDump);
    }
    printf("%s", buf);
   
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rdi, %r10
leaq -0x1d0(%rbp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x4abb
movaps %xmm0, -0x1a0(%rbp)
movaps %xmm1, -0x190(%rbp)
movaps %xmm2, -0x180(%rbp)
movaps %xmm3, -0x170(%rbp)
movaps %xmm4, -0x160(%rbp)
movaps %xmm5, -0x150(%rbp)
movaps %xmm6, -0x140(%rbp)
movaps %xmm7, -0x130(%rbp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
leaq -0x20(%rbp), %rdx
movq %rax, (%rdx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rdx)
movq %rdi, 0x10(%rdx)
leaq -0x120(%rbp), %rdi
movq %r10, %rsi
callq 0x2060
movq 0x30aea2(%rip), %rsi    # 0x30f990
testq %rsi, %rsi
je 0x4b0b
leaq -0x120(%rbp), %rdi
callq 0x20d0
movq 0x30ae8a(%rip), %rdi    # 0x30f990
callq 0x20e0
leaq 0x2273d(%rip), %rdi     # 0x2724f
leaq -0x120(%rbp), %rsi
xorl %eax, %eax
callq 0x2040
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/dump.c
// Function: IntToBinary(int, int)
char* IntToBinary(int val, int bits)
{
	int i;
	int c = 0;
    for (i = 0; i < 32; i++) g_bigBuf[i] = '\0';
 
    for (i = bits - 1; i >= 0; i--)
    {
        int on = (val & (1 << i)) ? 1 : 0;
        g_bigBuf[c] = on ? '1' : '0';
        c++;
    }

    return &g_bigBuf[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorps %xmm0, %xmm0
movaps %xmm0, 0x30ae79(%rip)   # 0x30f9b0
movaps %xmm0, 0x30ae62(%rip)   # 0x30f9a0
testl %esi, %esi
jle 0x4b6e
movl %esi, %eax
negq %rax
decl %esi
xorl %ecx, %ecx
leaq 0x30ae4e(%rip), %rdx    # 0x30f9a0
btl %esi, %edi
setae %r8b
xorb $0x31, %r8b
movb %r8b, (%rcx,%rdx)
incq %rcx
decl %esi
movq %rax, %r8
addq %rcx, %r8
jne 0x4b52
leaq 0x30ae2b(%rip), %rax    # 0x30f9a0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/dump.c
// Function: DumpDCTValues(short*)
void DumpDCTValues(short dct[64])
{

	int i;
    int c = 0;
	myPrintf("\n#Extracted DCT values from SOS#\n");
    for ( i = 0; i < 64; i++)
    {
        myPrintf("% 4d  ", dct[c++]);

        if ((c > 0) && (c % 8 == 0)) myPrintf("\n");
    }
    myPrintf("\n");
    
    fflush(stdout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x226c6(%rip), %rdi     # 0x27252
xorl %eax, %eax
callq 0x4a56
movl $0x1, %r12d
leaq 0x226d4(%rip), %r14     # 0x27274
leaq 0x1e983(%rip), %r15     # 0x2352a
movswl -0x2(%rbx,%r12,2), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x4a56
testb $0x7, %r12b
jne 0x4bc7
movq %r15, %rdi
xorl %eax, %eax
callq 0x4a56
incq %r12
cmpq $0x41, %r12
jne 0x4ba7
leaq 0x1e953(%rip), %rdi     # 0x2352a
xorl %eax, %eax
callq 0x4a56
movq 0x2e3bb(%rip), %rax     # 0x32fa0
movq (%rax), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20e0
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/dump.c
// Function: dumpByte(unsigned char*, int, int)
void dumpByte(BYTE *dct, int dx, int dy)
{
	int j;
	int i;
    for (j = 0; j < dy; j++)
    {
        for ( i = 0; i < dx; i++)
        {
            myPrintf("%03d  ", dct[j * dx + i]);

        }
        myPrintf("\n");
    }
    myPrintf("\n");
    myPrintf("*********************************************************************************************************\n");
    fflush(stdout);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, -0x2c(%rbp)
testl %edx, %edx
jle 0x4c5d
movq %rdi, %r14
movl -0x2c(%rbp), %r13d
movl %edx, %eax
movq %rax, -0x38(%rbp)
leaq 0x2265a(%rip), %r15     # 0x2727b
xorl %ebx, %ebx
cmpl $0x0, -0x2c(%rbp)
jle 0x4c43
xorl %r12d, %r12d
movzbl (%r14,%r12), %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x4a56
incq %r12
cmpq %r12, %r13
jne 0x4c2c
leaq 0x1e8e0(%rip), %rdi     # 0x2352a
xorl %eax, %eax
callq 0x4a56
incq %rbx
addq %r13, %r14
cmpq -0x38(%rbp), %rbx
jne 0x4c23
leaq 0x1e8c6(%rip), %rdi     # 0x2352a
xorl %eax, %eax
callq 0x4a56
leaq 0x22610(%rip), %rdi     # 0x27282
xorl %eax, %eax
callq 0x4a56
movq 0x2e320(%rip), %rax     # 0x32fa0
movq (%rax), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20e0
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/dump.c
// Function: printColor(long*, int)
void printColor(long *col, int size)
{
	int i;
    for (i = 0; i < size; i++)
        myPrintf("%d ", col[i]);

    myPrintf("\n");
    myPrintf("\n");
    fflush(stdout);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %esi, %esi
jle 0x4ccb
movq %rdi, %rbx
movl %esi, %r15d
leaq 0x2263b(%rip), %r14     # 0x272ed
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x4a56
incq %r12
cmpq %r12, %r15
jne 0x4cb5
leaq 0x1e858(%rip), %rbx     # 0x2352a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a56
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a56
movq 0x2e2b3(%rip), %rax     # 0x32fa0
movq (%rax), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20e0
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/dump.c
// Function: printLong(long*, int, int)
void printLong(long *dct, int dx,  int dy)
{
	int i;
	int j;
    for (j = 0; j < dy; j++)
    {
        for (i = 0; i < dx; i++)
        {
            myPrintf("%d  ", dct[j * dx + i]);

        }
        myPrintf("\n");
    }
    myPrintf("\n");
    
    fflush(stdout);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, -0x2c(%rbp)
testl %edx, %edx
jle 0x4d71
movq %rdi, %r14
movl -0x2c(%rbp), %r13d
movl %edx, %eax
movq %rax, -0x40(%rbp)
leaq (,%r13,8), %rax
movq %rax, -0x38(%rbp)
leaq 0x225bc(%rip), %r15     # 0x272f1
xorl %r12d, %r12d
cmpl $0x0, -0x2c(%rbp)
jle 0x4d56
xorl %ebx, %ebx
movq (%r14,%rbx,8), %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x4a56
incq %rbx
cmpq %rbx, %r13
jne 0x4d40
leaq 0x1e7cd(%rip), %rdi     # 0x2352a
xorl %eax, %eax
callq 0x4a56
incq %r12
addq -0x38(%rbp), %r14
cmpq -0x40(%rbp), %r12
jne 0x4d38
leaq 0x1e7b2(%rip), %rdi     # 0x2352a
xorl %eax, %eax
callq 0x4a56
movq 0x2e21a(%rip), %rax     # 0x32fa0
movq (%rax), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20e0
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/dump.c
// Function: printRangeLimit(unsigned char*, int)
void printRangeLimit(BYTE* range_limit, int size)
{
	int i;
    for ( i = 0; i < size; i++)
        myPrintf("%d ", range_limit[i]);

    myPrintf("\n");
    myPrintf("\n");
    fflush(stdout);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testl %esi, %esi
jle 0x4dd2
movq %rdi, %rbx
movl %esi, %r15d
leaq 0x22535(%rip), %r14     # 0x272ed
xorl %r12d, %r12d
movzbl (%rbx,%r12), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x4a56
incq %r12
cmpq %r12, %r15
jne 0x4dbb
leaq 0x1e751(%rip), %rbx     # 0x2352a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a56
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a56
movq 0x2e1ac(%rip), %rax     # 0x32fa0
movq (%rax), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20e0
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/dump.c
// Function: dump8x8(long*)
void dump8x8(long dct[64])
{

    int c = 0;
    int i = 0;
    for (; i < 64; i++)
    {
        myPrintf("%4d  ", (int) dct[c++]);

        if ((c > 0) && (c % 8 == 0)) myPrintf("\n");
    }
    myPrintf("\n");
    fflush(stdout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x1, %r12d
leaq 0x224d7(%rip), %r14     # 0x272f6
leaq 0x1e704(%rip), %r15     # 0x2352a
movl -0x8(%rbx,%r12,8), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x4a56
testb $0x7, %r12b
jne 0x4e45
movq %r15, %rdi
xorl %eax, %eax
callq 0x4a56
incq %r12
cmpq $0x41, %r12
jne 0x4e26
leaq 0x1e6d5(%rip), %rdi     # 0x2352a
xorl %eax, %eax
callq 0x4a56
movq 0x2e13d(%rip), %rax     # 0x32fa0
movq (%rax), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x20e0
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/frame.c
// Function: x264_frame_delete(x264_frame_t*)
void x264_frame_delete( x264_frame_t *frame )
{
    int i;
    for( i = 0; i < frame->i_plane; i++ )
    {
        x264_free( frame->buffer[i] );
    }
    x264_free( frame );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0x20(%rdi)
jle 0x4f9a
xorl %r14d, %r14d
movq (%rbx,%r14,8), %rdi
callq 0x466d
incq %r14
movslq 0x20(%rbx), %rax
cmpq %rax, %r14
jl 0x4f85
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x466d
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/frame.c
// Function: x264_frame_copy_picture(x264_frame_t*, x264_picture_t*)
void x264_frame_copy_picture( x264_frame_t *dst, x264_picture_t *src )
{
    int i;
    int ch;
    int i_stride;

    /* y */
    i_stride = X264_MIN( src->i_stride[0], dst->i_stride[0] );
    for( i = 0; i < src->i_height; i++ )
    {
        memcpy( &dst->plane[0][ i * dst->i_stride[0]],
                &src->plane[0][ i * src->i_stride[0]],
                i_stride );
    }

    /* uv */
    for( ch = 0; ch < 2; ch++ )
    {
        i_stride = X264_MIN( src->i_stride[1+ch], dst->i_stride[1+ch] );
        for( i = 0; i < src->i_height/2; i++ )
        {
            memcpy( &dst->plane[1+ch][ i * dst->i_stride[1+ch]],
                    &src->plane[1+ch][ i * src->i_stride[1+ch]],
                    i_stride );
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %eax
testl %eax, %eax
jle 0x5001
movl 0xc(%rbx), %eax
movl 0x24(%r14), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movslq %ecx, %r15
xorl %r12d, %r12d
movslq 0x24(%r14), %rdi
movslq %r12d, %r12
imulq %r12, %rdi
addq 0x48(%r14), %rdi
movslq 0xc(%rbx), %rsi
imulq %r12, %rsi
addq 0x20(%rbx), %rsi
movq %r15, %rdx
callq 0x20a0
incl %r12d
movl 0x4(%rbx), %eax
cmpl %eax, %r12d
jl 0x4fd3
movl $0x1, %r12d
movb $0x1, %cl
movl %ecx, -0x2c(%rbp)
cmpl $0x2, %eax
jl 0x5061
movl 0xc(%rbx,%r12,4), %eax
movl 0x24(%r14,%r12,4), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
movslq %ecx, %r15
xorl %r13d, %r13d
movslq 0x24(%r14,%r12,4), %rdi
movslq %r13d, %r13
imulq %r13, %rdi
addq 0x48(%r14,%r12,8), %rdi
movslq 0xc(%rbx,%r12,4), %rsi
imulq %r13, %rsi
addq 0x20(%rbx,%r12,8), %rsi
movq %r15, %rdx
callq 0x20a0
incl %r13d
movl 0x4(%rbx), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
cmpl %ecx, %r13d
jl 0x5026
movl $0x2, %r12d
testb $0x1, -0x2c(%rbp)
movl $0x0, %ecx
jne 0x5009
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq