LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/predict.c
// Function: x264_predict_4x4_init(int, void (**)(unsigned char*, int))
void x264_predict_4x4_init( int cpu, x264_predict_t pf[12] )
{
    pf[I_PRED_4x4_V]      = predict_4x4_v;
    pf[I_PRED_4x4_H]      = predict_4x4_h;
    pf[I_PRED_4x4_DC]     = predict_4x4_dc;
    pf[I_PRED_4x4_DDL]    = predict_4x4_ddl;
    pf[I_PRED_4x4_DDR]    = predict_4x4_ddr;
    pf[I_PRED_4x4_VR]     = predict_4x4_vr;
    pf[I_PRED_4x4_HD]     = predict_4x4_hd;
    pf[I_PRED_4x4_VL]     = predict_4x4_vl;
    pf[I_PRED_4x4_HU]     = predict_4x4_hu;
    pf[I_PRED_4x4_DC_LEFT]= predict_4x4_dc_left;
    pf[I_PRED_4x4_DC_TOP] = predict_4x4_dc_top;
    pf[I_PRED_4x4_DC_128] = predict_4x4_dc_128;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x7e(%rip), %rax        # 0xaf91
movq %rax, (%rsi)
leaq 0xa4(%rip), %rax        # 0xafc1
movq %rax, 0x8(%rsi)
leaq 0xba(%rip), %rax        # 0xafe2
movq %rax, 0x10(%rsi)
leaq 0x11a(%rip), %rax       # 0xb04d
movq %rax, 0x18(%rsi)
leaq 0x1f8(%rip), %rax       # 0xb136
movq %rax, 0x20(%rsi)
leaq 0x2f4(%rip), %rax       # 0xb23d
movq %rax, 0x28(%rsi)
leaq 0x403(%rip), %rax       # 0xb357
movq %rax, 0x30(%rsi)
leaq 0x50d(%rip), %rax       # 0xb46c
movq %rax, 0x38(%rsi)
leaq 0x5f0(%rip), %rax       # 0xb55a
movq %rax, 0x40(%rsi)
leaq 0x69c(%rip), %rax       # 0xb611
movq %rax, 0x48(%rsi)
leaq 0x6d8(%rip), %rax       # 0xb658
movq %rax, 0x50(%rsi)
leaq 0x711(%rip), %rax       # 0xb69c
movq %rax, 0x58(%rsi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/predict.c
// Function: predict_4x4_v(unsigned char*, int)
static void predict_4x4_v( uint8_t *src, int i_stride )
{
    int i,j;

    for( i = 0; i < 4; i++ )
    {
        for( j = 0; j < 4; j++ )
        {
            src[i * i_stride +j] = src[j - i_stride];
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %esi, %rax
movq %rdi, %rcx
subq %rax, %rcx
xorl %edx, %edx
xorl %esi, %esi
movb (%rcx,%rsi), %r8b
movb %r8b, (%rdi,%rsi)
incq %rsi
cmpq $0x4, %rsi
jne 0xafa2
incq %rdx
addq %rax, %rdi
cmpq $0x4, %rdx
jne 0xafa0
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/predict.c
// Function: predict_4x4_dc(unsigned char*, int)
static void predict_4x4_dc( uint8_t *src, int i_stride )
{
    int x,y;
    int dc = ( src[-1+0*i_stride] + src[-1+i_stride]+
               src[-1+2*i_stride] + src[-1+3*i_stride] +
               src[0 - i_stride]  + src[1 - i_stride] +
               src[2 - i_stride]  + src[3 - i_stride] + 4 ) >> 3;

    for( y = 0; y < 4; y++ )
    {
        for( x = 0; x < 4; x++ )
        {
            src[x] = dc;
        }
        src += i_stride;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl -0x1(%rdi), %ecx
movslq %esi, %rax
movzbl -0x1(%rdi,%rax), %edx
addl %ecx, %edx
leaq (%rdi,%rax), %rcx
movzbl -0x1(%rdi,%rax,2), %esi
addl %edx, %esi
leaq (%rax,%rax,2), %rdx
movzbl -0x1(%rdi,%rdx), %edx
movq %rdi, %r8
subq %rax, %r8
movzbl (%r8), %r9d
addl %edx, %r9d
addl %esi, %r9d
movzbl 0x1(%r8), %edx
movzbl 0x2(%r8), %esi
addl %edx, %esi
addl %r9d, %esi
movzbl 0x3(%r8), %edx
addl %esi, %edx
addl $0x4, %edx
shrl $0x3, %edx
movzbl %dl, %edx
imull $0x1010101, %edx, %edx  # imm = 0x1010101
movl %edx, (%rdi)
movl %edx, (%rdi,%rax)
movl %edx, (%rax,%rcx)
addq %rax, %rcx
movl %edx, (%rax,%rcx)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/predict.c
// Function: predict_4x4_dc_left(unsigned char*, int)
static void predict_4x4_dc_left( uint8_t *src, int i_stride )
{
    int x,y;
    int dc = ( src[-1+0*i_stride] + src[-1+i_stride]+
               src[-1+2*i_stride] + src[-1+3*i_stride] + 2 ) >> 2;

    for( y = 0; y < 4; y++ )
    {
        for( x = 0; x < 4; x++ )
        {
            src[x] = dc;
        }
        src += i_stride;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzbl -0x1(%rdi), %eax
movslq %esi, %rcx
movzbl -0x1(%rdi,%rcx), %edx
addl %eax, %edx
leaq (%rdi,%rcx), %rax
movzbl -0x1(%rdi,%rcx,2), %esi
addl %edx, %esi
leaq (%rcx,%rcx,2), %rdx
movzbl -0x1(%rdi,%rdx), %edx
addl %esi, %edx
addl $0x2, %edx
shrl $0x2, %edx
movzbl %dl, %edx
imull $0x1010101, %edx, %edx  # imm = 0x1010101
movl %edx, (%rdi)
movl %edx, (%rdi,%rcx)
movl %edx, (%rcx,%rax)
addq %rcx, %rax
movl %edx, (%rcx,%rax)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/predict.c
// Function: predict_4x4_dc_top(unsigned char*, int)
static void predict_4x4_dc_top( uint8_t *src, int i_stride )
{
    int x,y;
    int dc = ( src[0 - i_stride] + src[1 - i_stride] +
               src[2 - i_stride] + src[3 - i_stride] + 2 ) >> 2;

    for( y = 0; y < 4; y++ )
    {
        for( x = 0; x < 4; x++ )
        {
            src[x] = dc;
        }
        src += i_stride;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %esi, %rax
movq %rdi, %rcx
subq %rax, %rcx
movzbl (%rcx), %edx
movzbl 0x1(%rcx), %esi
addl %edx, %esi
movzbl 0x2(%rcx), %edx
addl %esi, %edx
movzbl 0x3(%rcx), %ecx
addl %edx, %ecx
addl $0x2, %ecx
shrl $0x2, %ecx
movzbl %cl, %ecx
imull $0x1010101, %ecx, %ecx  # imm = 0x1010101
movl %ecx, (%rdi)
movl %ecx, (%rdi,%rax)
addq %rax, %rdi
movl %ecx, (%rax,%rdi)
addq %rax, %rdi
movl %ecx, (%rax,%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/core/predict.c
// Function: predict_4x4_dc_128(unsigned char*, int)
static void predict_4x4_dc_128( uint8_t *src, int i_stride )
{
    int x,y;
    for( y = 0; y < 4; y++ )
    {
        for( x = 0; x < 4; x++ )
        {
            src[x] = 128;
        }
        src += i_stride;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq %esi, %rax
movl $0x80808080, %ecx       # imm = 0x80808080
movl %ecx, (%rdi)
movl %ecx, (%rdi,%rax)
addq %rax, %rdi
movl %ecx, (%rax,%rdi)
addq %rax, %rdi
movl %ecx, (%rax,%rdi)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/decoder/decoder.c
// Function: x264_nal_decode(x264_nal_t*, unsigned char*, int)
int x264_nal_decode(x264_nal_t *nal, uint8_t *p_data, int i_data) {LOG_CALL;
    uint8_t *src = p_data;
    uint8_t *end = &src[i_data];
    uint8_t *dst = nal->p_payload;

    nal->i_type = src[0]&0x1f;
    nal->i_ref_idc = (src[0] >> 5)&0x03;

    src++;

    while (src < end)
    {
        if (src < end - 3 && src[0] == 0x00 && src[1] == 0x00 && src[2] == 0x03)
        {
            *dst++ = 0x00;
            *dst++ = 0x00;

            src += 3;
            continue;
        }
        *dst++ = *src++;
    }

    //nal->i_payload = (int)(dst - (uint8_t*)p_data);
    nal->i_payload = (int) (dst - (uint8_t*) nal->p_payload);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1bade(%rip), %rdi     # 0x271b4
leaq 0x1dfb7(%rip), %rsi     # 0x29694
leaq 0x1dfc2(%rip), %rdx     # 0x296a6
xorl %eax, %eax
callq 0x4a56
movq 0x10(%rbx), %rax
movzbl (%r14), %ecx
andl $0x1f, %ecx
movl %ecx, 0x4(%rbx)
movzbl (%r14), %ecx
shrl $0x5, %ecx
andl $0x3, %ecx
movl %ecx, (%rbx)
cmpl $0x2, %r15d
jl 0xb763
movslq %r15d, %rcx
addq %r14, %rcx
incq %r14
leaq -0x3(%rcx), %rdx
cmpq %rdx, %r14
setb %dil
movb (%r14), %sil
testb %sil, %sil
sete %r8b
andb %dil, %r8b
cmpb $0x1, %r8b
jne 0xb74f
cmpb $0x0, 0x1(%r14)
jne 0xb74f
cmpb $0x3, 0x2(%r14)
jne 0xb74f
movw $0x0, (%rax)
addq $0x2, %rax
addq $0x3, %r14
jmp 0xb758
incq %r14
movb %sil, (%rax)
incq %rax
cmpq %rcx, %r14
jb 0xb718
movq 0x10(%rbx), %rcx
jmp 0xb766
movq %rax, %rcx
subl %ecx, %eax
movl %eax, 0x8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/decoder/decoder.c
// Function: x264_slice_idr(x264_t*)
static void x264_slice_idr(x264_t *h) {LOG_CALL;
    int i;

    h->i_poc_msb = 0;
    h->i_poc_lsb = 0;
    h->i_frame_offset = 0;
    h->i_frame_num = 0;

    if (h->sps)
    {
        for (i = 0; i < h->sps->i_num_ref_frames + 1; i++)
        {
            h->freference[i]->i_poc = -1;
        }

        h->fdec = h->freference[0];
        h->i_ref0 = 0;
        h->i_ref1 = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x19771(%rip), %rdi     # 0x271b4
leaq 0x1bc4a(%rip), %rsi     # 0x29694
leaq 0x1bd74(%rip), %rdx     # 0x297c5
xorl %eax, %eax
callq 0x4a56
xorps %xmm0, %xmm0
movups %xmm0, 0xc8(%rbx)
movq 0x8ed8(%rbx), %rax
testq %rax, %rax
je 0xdab0
movl 0x434(%rax), %eax
testl %eax, %eax
js 0xda94
incq %rax
xorl %ecx, %ecx
movq 0x10eff0(%rbx,%rcx,8), %rdx
movl $0xffffffff, 0x68(%rdx) # imm = 0xFFFFFFFF
incq %rcx
cmpq %rcx, %rax
jne 0xda7d
movq 0x10eff0(%rbx), %rax
movq %rax, 0x10efe0(%rbx)
xorl %eax, %eax
movl %eax, 0x10f078(%rbx)
movl %eax, 0x10f100(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/decoder/decoder.c
// Function: x264_decoder_close(x264_t*)
void x264_decoder_close(x264_t *h) {LOG_CALL;
    int i;

    if (h->picture->i_width != 0 && h->picture->i_height != 0)
    {
        for (i = 0; i < h->sps->i_num_ref_frames + 1; i++)
        {
            x264_frame_delete(h->freference[i]);
        }
        x264_free(h->mb);
    }

    /* free vlc table */
    for (i = 0; i < 5; i++)
    {
        x264_vlc_table_lookup_delete(h->x264_coeff_token_lookup[i]);
    }
    x264_vlc_table_lookup_delete(h->x264_level_prefix_lookup);

    for (i = 0; i < 15; i++)
    {
        x264_vlc_table_lookup_delete(h->x264_total_zeros_lookup[i]);
    }
    for (i = 0; i < 3; i++)
    {
        x264_vlc_table_lookup_delete(h->x264_total_zeros_dc_lookup[i]);
    }
    for (i = 0; i < 7; i++)
    {
        x264_vlc_table_lookup_delete(h->x264_run_before_lookup[i]);
    }

    x264_free(h->picture);
    x264_free(h);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x196ec(%rip), %rdi     # 0x271b4
leaq 0x1bbc5(%rip), %rsi     # 0x29694
leaq 0x1bcbf(%rip), %rdx     # 0x29795
xorl %eax, %eax
callq 0x4a56
movq 0x10ee48(%rbx), %rax
cmpl $0x0, (%rax)
je 0xdb35
cmpl $0x0, 0x4(%rax)
je 0xdb35
movq 0x8ed8(%rbx), %rax
cmpl $0x0, 0x434(%rax)
js 0xdb29
movq $-0x1, %r14
movq 0x10eff8(%rbx,%r14,8), %rdi
callq 0x4f72
movq 0x8ed8(%rbx), %rax
movslq 0x434(%rax), %rax
incq %r14
cmpq %rax, %r14
jl 0xdb06
movq 0x10efe8(%rbx), %rdi
callq 0x466d
movl $0x21e79, %r14d         # imm = 0x21E79
movq (%rbx,%r14,8), %rdi
callq 0x12c05
incq %r14
cmpq $0x21e7e, %r14          # imm = 0x21E7E
jne 0xdb3b
movq 0x10f3f0(%rbx), %rdi
callq 0x12c05
movl $0x21e7f, %r14d         # imm = 0x21E7F
movq (%rbx,%r14,8), %rdi
callq 0x12c05
incq %r14
cmpq $0x21e8e, %r14          # imm = 0x21E8E
jne 0xdb62
movl $0x21e8e, %r14d         # imm = 0x21E8E
movq (%rbx,%r14,8), %rdi
callq 0x12c05
incq %r14
cmpq $0x21e91, %r14          # imm = 0x21E91
jne 0xdb7d
movl $0x21e91, %r14d         # imm = 0x21E91
movq (%rbx,%r14,8), %rdi
callq 0x12c05
incq %r14
cmpq $0x21e98, %r14          # imm = 0x21E98
jne 0xdb98
movq 0x10ee48(%rbx), %rdi
callq 0x466d
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x466d
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/decoder/decoder.c
// Function: x264_slice_header_dec_ref_pic_marking(x264_t*, bs_s*, int)
static int x264_slice_header_dec_ref_pic_marking(x264_t *h, bs_t *s, int i_nal_type) {LOG_CALL;
    if (i_nal_type == NAL_SLICE_IDR)
    {
        int b_no_output_of_prior_pics = bs_read1(s,"b_no_output_of_prior_pics");
        int b_long_term_reference_flag = bs_read1(s,"b_long_term_reference_flag");

        /* TODO */
        if (b_no_output_of_prior_pics)
        {

        }

        if (b_long_term_reference_flag)
        {

        }
    } else
    {
        int b_adaptive_ref_pic_marking_mode = bs_read1(s,"b_adaptive_ref_pic_marking_mode");
        if (b_adaptive_ref_pic_marking_mode)
        {
            return -1;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x195d8(%rip), %rdi     # 0x271b4
leaq 0x1bab1(%rip), %rsi     # 0x29694
leaq 0x1be64(%rip), %rdx     # 0x29a4e
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x4a56
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
cmpl $0x5, %r15d
jne 0xdc91
cmpq %rcx, %rax
jae 0xdc32
movl 0x18(%rbx), %ecx
decl %ecx
movl %ecx, 0x18(%rbx)
movzbl (%rax), %edx
xorl %r14d, %r14d
btl %ecx, %edx
setb %r14b
testl %ecx, %ecx
jne 0xdc32
incq %rax
movq %rax, 0x8(%rbx)
movl $0x8, 0x18(%rbx)
leaq 0x1bd9f(%rip), %rdi     # 0x299d8
leaq 0x1be34(%rip), %rdx     # 0x29a74
xorl %r15d, %r15d
movl %r14d, %esi
xorl %eax, %eax
callq 0x4a56
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
jae 0xdc7e
movl 0x18(%rbx), %ecx
decl %ecx
movl %ecx, 0x18(%rbx)
movzbl (%rax), %edx
xorl %r15d, %r15d
btl %ecx, %edx
setb %r15b
testl %ecx, %ecx
jne 0xdc7e
incq %rax
movq %rax, 0x8(%rbx)
movl $0x8, 0x18(%rbx)
leaq 0x1bd53(%rip), %rdi     # 0x299d8
leaq 0x1be02(%rip), %rdx     # 0x29a8e
movl %r15d, %esi
jmp 0xdcdc
cmpq %rcx, %rax
jae 0xdccc
movl 0x18(%rbx), %ecx
decl %ecx
movl %ecx, 0x18(%rbx)
movzbl (%rax), %edx
xorl %esi, %esi
btl %ecx, %edx
setb %sil
testl %ecx, %ecx
jne 0xdcbc
incq %rax
movq %rax, 0x8(%rbx)
movl $0x8, 0x18(%rbx)
leaq 0x1bd15(%rip), %rdi     # 0x299d8
leaq 0x1bddf(%rip), %rdx     # 0x29aa9
jmp 0xdcdc
leaq 0x1bd05(%rip), %rdi     # 0x299d8
leaq 0x1bdcf(%rip), %rdx     # 0x29aa9
xorl %esi, %esi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4a56
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/decoder/macroblock.c
// Function: x264_mb_partition_ref_set(x264_macroblock_t*, int, int, int)
void x264_mb_partition_ref_set(x264_macroblock_t *mb, int i_list, int i_part, int i_ref) {LOG_CALL;
    int x, y;
    int w, h;
    int dx, dy;

    x264_mb_partition_getxy(mb, i_part, 0, &x, &y);
    if (mb->i_partition == D_16x16)
    {
        w = 4;
        h = 4;
    } else if (mb->i_partition == D_16x8)
    {
        w = 4;
        h = 2;
    } else if (mb->i_partition == D_8x16)
    {
        w = 2;
        h = 4;
    } else
    {
        /* D_8x8 */
        w = 2;
        h = 2;
    }

    for (dx = 0; dx < w; dx++)
    {
        for (dy = 0; dy < h; dy++)
        {
            mb->partition[x + dx][y + dy].i_ref[i_list] = i_ref;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %r12d
movl %esi, %r15d
movq %rdi, %r14
leaq 0x194a4(%rip), %rdi     # 0x271b4
leaq 0x1c339(%rip), %rsi     # 0x2a050
leaq 0x1c347(%rip), %rdx     # 0x2a065
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x4a56
movl 0x1c(%r14), %eax
addl $-0xd, %eax
cmpl $0x3, %eax
ja 0xdd8c
movl $0x4, %ecx
leaq 0x1be90(%rip), %rdx     # 0x29bd0
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movl %r12d, %ecx
shrl $0x1f, %ecx
addl %r12d, %ecx
andl $-0x2, %ecx
subl %ecx, %r12d
movl %r12d, %r13d
addl %r12d, %r13d
movl $0x2, %eax
movl %ecx, %r12d
jmp 0xdd94
movl %r12d, %r13d
addl %r12d, %r13d
movl $0x2, %eax
xorl %r12d, %r12d
jmp 0xdd99
xorl %r12d, %r12d
jmp 0xdd85
addl %r12d, %r12d
movl $0x2, %ecx
movl $0x4, %eax
jmp 0xdd99
movl $0x2, %eax
xorl %r12d, %r12d
movl $0x2, %ecx
movslq %r15d, %rdx
movslq %r12d, %rsi
movslq %r13d, %rdi
leaq (%rdi,%rdi,4), %rdi
shlq $0x5, %rdi
leaq (%rsi,%rsi,4), %rsi
leaq (%rdi,%rsi,8), %rsi
leaq (%rsi,%rdx,4), %rdx
addq %r14, %rdx
addq $0x30, %rdx
shll $0x3, %ecx
leaq (%rcx,%rcx,4), %rcx
xorl %esi, %esi
xorl %edi, %edi
movl %ebx, (%rdx,%rdi)
addq $0x28, %rdi
cmpq %rdi, %rcx
jne 0xddc8
incq %rsi
addq $0xa0, %rdx
cmpq %rax, %rsi
jne 0xddc6
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/decoder/macroblock.c
// Function: x264_mb_partition_mv_set(x264_macroblock_t*, int, int, int, int*)
void x264_mb_partition_mv_set(x264_macroblock_t *mb, int i_list, int i_part, int i_sub, int mv[2]) {LOG_CALL;
    int x, y;
    int w, h;
    int dx, dy;

    x264_mb_partition_getxy(mb, i_part, i_sub, &x, &y);
    x264_mb_partition_size(mb, i_part, i_sub, &w, &h);

    for (dx = 0; dx < w; dx++)
    {
        for (dy = 0; dy < h; dy++)
        {
            mb->partition[x + dx][y + dy].mv[i_list][0] = mv[0];
            mb->partition[x + dx][y + dy].mv[i_list][1] = mv[1];
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movl %ecx, %r12d
movl %edx, %r13d
movl %esi, -0x2c(%rbp)
movq %rdi, %r14
leaq 0x1939e(%rip), %rdi     # 0x271b4
leaq 0x1c233(%rip), %rsi     # 0x2a050
leaq 0x1c25b(%rip), %rdx     # 0x2a07f
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x4a56
movl 0x1c(%r14), %eax
cmpl $0xd, %eax
je 0xde65
movl $0x4, %edx
cmpl $0xf, %eax
je 0xde53
cmpl $0xe, %eax
jne 0xdeaa
addl %r13d, %r13d
movl $0x2, %edx
movl %r13d, %eax
jmp 0xdeac
addl %r13d, %r13d
movl $0x2, %ecx
xorl %eax, %eax
movl %r13d, %r15d
jmp 0xdf15
movl %r13d, %eax
shrl $0x1f, %eax
addl %r13d, %eax
andl $-0x2, %eax
movslq %r13d, %rcx
subl %eax, %r13d
movl %r13d, %r15d
addl %r13d, %r15d
movl 0x20(%r14,%rcx,4), %ecx
cmpl $0xa, %ecx
ja 0xded0
movl $0x111, %edx            # imm = 0x111
btl %ecx, %edx
jb 0xdeb3
movl $0x222, %edx            # imm = 0x222
btl %ecx, %edx
jb 0xdecd
movl $0x444, %edx            # imm = 0x444
btl %ecx, %edx
jae 0xded0
addl %r12d, %r15d
jmp 0xded0
xorl %eax, %eax
movl $0x4, %ecx
jmp 0xdf15
movl %r12d, %edx
shrl $0x1f, %edx
addl %r12d, %edx
movl %edx, %esi
andl $-0x2, %esi
subl %esi, %r12d
addl %r12d, %r15d
sarl %edx
addl %edx, %eax
jmp 0xded0
addl %r12d, %eax
cmpl $0xa, %ecx
ja 0xdf0b
movl $0x1, %edx
movl $0x111, %esi            # imm = 0x111
btl %ecx, %esi
jb 0xdefd
movl $0x222, %esi            # imm = 0x222
btl %ecx, %esi
jb 0xdf04
movl $0x444, %edx            # imm = 0x444
btl %ecx, %edx
jae 0xdf0b
movl $0x2, %edx
movl $0x1, %ecx
jmp 0xdf15
movl $0x2, %ecx
jmp 0xdf15
movl $0x2, %ecx
movl $0x2, %edx
movslq -0x2c(%rbp), %rsi
cltq
movslq %r15d, %rdi
leaq (%rdi,%rdi,4), %rdi
shlq $0x5, %rdi
leaq (%rax,%rax,4), %rax
leaq (%rdi,%rax,8), %rax
leaq (%rax,%rsi,8), %rax
addq %r14, %rax
addq $0x3c, %rax
shll $0x3, %edx
leaq (%rdx,%rdx,4), %rdx
xorl %esi, %esi
xorl %edi, %edi
movl (%rbx), %r8d
movl %r8d, -0x4(%rax,%rdi)
movl 0x4(%rbx), %r8d
movl %r8d, (%rax,%rdi)
addq $0x28, %rdi
cmpq %rdi, %rdx
jne 0xdf44
incq %rsi
addq $0xa0, %rax
cmpq %rcx, %rsi
jne 0xdf42
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/decoder/../core/bs.h
// Function: bs_read_te(bs_s*, int, char const*)
static inline int
bs_read_te(bs_t *s, int x, const char str[]) {LOG_CALL;
    if (x == 1)
    {
        return 1 - _bs_read1(s);
    }
    else if (x > 1)
    {
        return _bs_read_ue(s);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x1808e(%rip), %rdi     # 0x271b4
leaq 0x1a67b(%rip), %rsi     # 0x297a8
leaq 0x1b0c9(%rip), %rdx     # 0x2a1fd
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x4a56
cmpl $0x1, %r15d
jne 0xf181
movq 0x8(%rbx), %rax
xorl %r14d, %r14d
cmpq 0x10(%rbx), %rax
jae 0xf178
movl 0x18(%rbx), %ecx
decl %ecx
movl %ecx, 0x18(%rbx)
movzbl (%rax), %edx
xorl %r14d, %r14d
btl %ecx, %edx
setb %r14b
testl %ecx, %ecx
jne 0xf178
incq %rax
movq %rax, 0x8(%rbx)
movl $0x8, 0x18(%rbx)
xorl $0x1, %r14d
jmp 0xf23e
jle 0xf23e
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rsi
xorl %eax, %eax
cmpq %rsi, %rdx
jae 0xf1b6
movl 0x18(%rbx), %ecx
decl %ecx
movl %ecx, 0x18(%rbx)
movzbl (%rdx), %edi
jne 0xf1b1
incq %rdx
movq %rdx, 0x8(%rbx)
movl $0x8, 0x18(%rbx)
btl %ecx, %edi
jb 0xf1c4
cmpq %rsi, %rdx
jae 0xf1c4
cmpl $0x1f, %eax
ja 0xf1c4
incl %eax
jmp 0xf191
xorl %edi, %edi
testl %eax, %eax
je 0xf22d
leaq 0x1acaf(%rip), %r9      # 0x29e80
movl %eax, %r8d
cmpq %rsi, %rdx
jae 0xf22d
movslq 0x18(%rbx), %r10
movl %r10d, %ecx
subl %r8d, %ecx
movzbl (%rdx), %r11d
jns 0xf20a
andl (%r9,%r10,4), %r11d
negb %cl
shll %cl, %r11d
orl %r11d, %edi
incq %rdx
movq %rdx, 0x8(%rbx)
movl $0x8, 0x18(%rbx)
subl %r10d, %r8d
jg 0xf1d4
jmp 0xf22d
shrl %cl, %r11d
movl %r8d, %esi
andl (%r9,%rsi,4), %r11d
orl %r11d, %edi
movl %ecx, 0x18(%rbx)
cmpl %r8d, %r10d
jne 0xf22d
incq %rdx
movq %rdx, 0x8(%rbx)
movl $0x8, 0x18(%rbx)
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r14d
notl %r14d
addl %edi, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/decoder/../core/bs.h
// Function: bs_read1(bs_s*, char const*)
static inline uint32_t
bs_read1(bs_t *s, const char str[]) {

    if (s->p < s->p_end)
    {
        unsigned int i_result;

        s->i_left--;
        i_result = (*s->p >> s->i_left)&0x01;
        if (s->i_left == 0)
        {
            s->p++;
            s->i_left = 8;
        }
        

        myPrintf("bs_read1 %u %s\n", i_result, str);
    
        return i_result;
    }
    myPrintf("bs_read1 %u %s\n", 0,str);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rdx
movq 0x8(%rdi), %rax
xorl %ebx, %ebx
cmpq 0x10(%rdi), %rax
jae 0x11941
movl 0x18(%rdi), %ecx
decl %ecx
movl %ecx, 0x18(%rdi)
movzbl (%rax), %esi
xorl %ebx, %ebx
btl %ecx, %esi
setb %bl
testl %ecx, %ecx
jne 0x11941
incq %rax
movq %rax, 0x8(%rdi)
movl $0x8, 0x18(%rdi)
leaq 0x18090(%rip), %rdi     # 0x299d8
movl %ebx, %esi
xorl %eax, %eax
callq 0x4a56
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/decoder/../core/bs.h
// Function: bs_read_ue(bs_s*, char const*)
static inline int
bs_read_ue(bs_t *s, const char str[]) {
    int i = 0;

    while (_bs_read1(s) == 0 && s->p < s->p_end && i < 32)
    {
        i++;
    }
    int ret =( (1 << i) - 1 + _bs_read(s, i));
    myPrintf("bs_read_ue %d %s\n", ret, str);
    return ret;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rdx
movq 0x8(%rdi), %rsi
movq 0x10(%rdi), %r8
xorl %eax, %eax
cmpq %r8, %rsi
jae 0x11995
movl 0x18(%rdi), %ecx
decl %ecx
movl %ecx, 0x18(%rdi)
movzbl (%rsi), %r9d
jne 0x1198f
incq %rsi
movq %rsi, 0x8(%rdi)
movl $0x8, 0x18(%rdi)
btl %ecx, %r9d
jb 0x119a3
cmpq %r8, %rsi
jae 0x119a3
cmpl $0x1f, %eax
ja 0x119a3
incl %eax
jmp 0x1196e
xorl %r9d, %r9d
testl %eax, %eax
je 0x11a0c
leaq 0x18a0f(%rip), %r11     # 0x2a3c0
movl %eax, %r10d
cmpq %r8, %rsi
jae 0x11a0c
movslq 0x18(%rdi), %rbx
movl %ebx, %ecx
subl %r10d, %ecx
movzbl (%rsi), %r14d
jns 0x119e9
andl (%r11,%rbx,4), %r14d
negb %cl
shll %cl, %r14d
orl %r14d, %r9d
incq %rsi
movq %rsi, 0x8(%rdi)
movl $0x8, 0x18(%rdi)
subl %ebx, %r10d
jg 0x119b4
jmp 0x11a0c
shrl %cl, %r14d
movl %r10d, %r8d
andl (%r11,%r8,4), %r14d
orl %r14d, %r9d
movl %ecx, 0x18(%rdi)
cmpl %r10d, %ebx
jne 0x11a0c
incq %rsi
movq %rsi, 0x8(%rdi)
movl $0x8, 0x18(%rdi)
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %ebx
notl %ebx
addl %r9d, %ebx
leaq 0x17f75(%rip), %rdi     # 0x29996
movl %ebx, %esi
xorl %eax, %eax
callq 0x4a56
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/decoder/vlc.c
// Function: x264_vlc_table_lookup_new(vlc_t const*, int, int)
x264_vlc_table_t *x264_vlc_table_lookup_new( const vlc_t *vlc, int i_vlc, int i_lookup_bits )
{
    x264_vlc_table_t *table = (x264_vlc_table_t *)x264_aligned_alloc( sizeof( x264_vlc_table_t ) );

    table->i_lookup_bits = i_lookup_bits;
    table->i_lookup = 0;
    table->lookup   = NULL;

    vlc_table_create_part( table, vlc, i_lookup_bits, i_vlc, 0, 0 );

    return table;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
movl $0x10, %edi
callq 0x461e
movq %rax, %r12
movl %ebx, (%rax)
movl $0x0, 0x4(%rax)
movq $0x0, 0x8(%rax)
movq %rax, %rdi
movq %r15, %rsi
movl %ebx, %edx
movl %r14d, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x12a2b
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/encoder/encoder.c
// Function: x264_nal_encode(unsigned char*, int*, int, x264_nal_t*)
int x264_nal_encode(uint8_t *p_data, int *pi_data, int b_annexeb, x264_nal_t *nal) {LOG_CALL;
    uint8_t *dst = p_data;
    uint8_t *src = nal->p_payload;
    uint8_t *end = &nal->p_payload[nal->i_payload];

    int i_count = 0;

    /* FIXME this code doesn't check overflow */

    if (b_annexeb)
    {
        /* long nal start code (we always use long ones)*/
        *dst++ = 0x00;
        *dst++ = 0x00;
        *dst++ = 0x00;
        *dst++ = 0x01;
    }

    /* nal header */
    *dst++ = (0x00 << 7) | (nal->i_ref_idc << 5) | nal->i_type;

    while (src < end)
    {
        if (i_count == 2 && *src <= 0x03)
        {
            *dst++ = 0x03;
            i_count = 0;
        }
        if (*src == 0)
        {
            i_count++;
        } else
        {
            i_count = 0;
        }
        *dst++ = *src++;
    }
    *pi_data = dst - (uint8_t*) p_data;

    return *pi_data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x12938(%rip), %rdi     # 0x271b4
leaq 0x166a5(%rip), %rsi     # 0x2af28
leaq 0x16744(%rip), %rdx     # 0x2afce
xorl %eax, %eax
callq 0x4a56
movq 0x10(%r15), %rcx
movslq 0x8(%r15), %rdx
movq %r14, %rsi
testl %r12d, %r12d
je 0x148ac
movl $0x1000000, (%r14)      # imm = 0x1000000
leaq 0x4(%r14), %rsi
movl (%r15), %eax
shll $0x5, %eax
orl 0x4(%r15), %eax
movb %al, (%rsi)
leaq 0x1(%rsi), %rax
testl %edx, %edx
jle 0x14908
addq %rcx, %rdx
xorl %edi, %edi
xorl %r8d, %r8d
movb (%rcx), %r9b
cmpl $0x2, %r8d
jne 0x148ed
movl $0x2, %r8d
cmpb $0x3, %r9b
ja 0x148ed
addq $0x2, %rsi
movb $0x3, (%rax)
movb (%rcx), %r9b
xorl %r8d, %r8d
movq %rsi, %rax
movq %rax, %rsi
incl %r8d
testb %r9b, %r9b
cmovnel %edi, %r8d
incq %rcx
movb %r9b, (%rax)
incq %rax
cmpq %rdx, %rcx
jb 0x148c8
subl %r14d, %eax
movl %eax, (%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/encoder/encoder.c
// Function: x264_encoder_headers(x264_t*, x264_nal_t**, int*)
int x264_encoder_headers(x264_t *h, x264_nal_t **pp_nal, int *pi_nal) {LOG_CALL;
    /* init bitstream context */
    h->i_nal = 0;
    bs_init(&h->bs, h->p_bitstream, h->i_bitstream);

    /* Put SPS and PPS */
    if (h->i_frame == 0)
    {
        /* generate sequence parameters */
        x264_nal_start(h, NAL_SPS, NAL_PRIORITY_HIGHEST);
        x264_sps_write(&h->bs, h->sps);
        x264_nal_end(h);

        /* generate picture parameters */
        x264_nal_start(h, NAL_PPS, NAL_PRIORITY_HIGHEST);
        x264_pps_write(&h->bs, h->pps);
        x264_nal_end(h);
    }
    /* now set output*/
    *pi_nal = h->i_nal;
    *pp_nal = &h->nal[0];

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, -0x30(%rbp)
movq %rdi, %r14
leaq 0x1287f(%rip), %r12     # 0x271b4
leaq 0x165ec(%rip), %rsi     # 0x2af28
leaq 0x1669b(%rip), %rdx     # 0x2afde
movq %r12, %rdi
xorl %eax, %eax
callq 0x4a56
movl $0x0, 0x4(%r14)
movq 0x58(%r14), %r13
movslq 0x50(%r14), %rbx
leaq 0x16578(%rip), %rsi     # 0x2aedc
leaq 0x14e52(%rip), %rdx     # 0x297bd
movq %r12, %rdi
xorl %eax, %eax
callq 0x4a56
movq %r13, 0x60(%r14)
movq %r13, 0x68(%r14)
addq %r13, %rbx
movq %rbx, 0x70(%r14)
movl $0x8, 0x78(%r14)
cmpl $0x0, 0xc0(%r14)
jne 0x149ec
leaq 0x60(%r14), %r12
movq %r14, %rdi
movl $0x7, %esi
movl $0x3, %edx
callq 0x14a0f
movq 0x8ed8(%r14), %rsi
movq %r12, %rdi
callq 0x1f972
movq %r14, %rdi
callq 0x14b18
movq %r14, %rdi
movl $0x8, %esi
movl $0x3, %edx
callq 0x14a0f
movq 0x10dae0(%r14), %rsi
movq %r12, %rdi
callq 0x2123b
movq %r14, %rdi
callq 0x14b18
movl 0x4(%r14), %eax
movl %eax, (%r15)
addq $0x8, %r14
movq -0x30(%rbp), %rax
movq %r14, (%rax)
xorl %eax, %eax
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/encoder/encoder.c
// Function: x264_nal_start(x264_t*, int, int)
static void x264_nal_start(x264_t *h, int i_type, int i_ref_idc) {LOG_CALL;
    x264_nal_t *nal = &h->nal[h->i_nal];

    nal->i_ref_idc = i_ref_idc;
    nal->i_type = i_type;

    bs_align_0(&h->bs); /* not needed */

    nal->i_payload = 0;
    nal->p_payload = &h->p_bitstream[bs_pos(&h->bs) / 8];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x12787(%rip), %r12     # 0x271b4
leaq 0x164f4(%rip), %rsi     # 0x2af28
leaq 0x166bb(%rip), %rdx     # 0x2b0f6
movq %r12, %rdi
xorl %eax, %eax
callq 0x4a56
movslq 0x4(%rbx), %rax
leaq (%rax,%rax,2), %rax
leaq (%rbx,%rax,8), %r13
addq $0x8, %r13
movl %r14d, (%r13)
movl %r15d, 0x4(%r13)
leaq 0x16478(%rip), %rsi     # 0x2aedc
leaq 0x12750(%rip), %rdx     # 0x271bb
movq %r12, %rdi
xorl %eax, %eax
callq 0x4a56
movl 0x78(%rbx), %ecx
cmpl $0x8, %ecx
je 0x14abe
testl %ecx, %ecx
jle 0x14abe
leal 0x1(%rcx), %eax
movq 0x68(%rbx), %rdx
cmpq 0x70(%rbx), %rdx
jae 0x14abe
decb %cl
movl $0x1, %esi
shll %cl, %esi
notb %sil
andb %sil, (%rdx)
movl 0x78(%rbx), %ecx
decl %ecx
movl %ecx, 0x78(%rbx)
jne 0x14ab7
incq 0x68(%rbx)
movl $0x8, 0x78(%rbx)
movl $0x8, %ecx
decl %eax
cmpl $0x1, %eax
ja 0x14a84
movl $0x0, 0x8(%r13)
movq 0x58(%rbx), %r14
leaq 0x126e3(%rip), %rdi     # 0x271b4
leaq 0x16404(%rip), %rsi     # 0x2aedc
leaq 0x167b2(%rip), %rdx     # 0x2b291
xorl %eax, %eax
callq 0x4a56
movl 0x68(%rbx), %eax
subl 0x60(%rbx), %eax
shll $0x3, %eax
subl 0x78(%rbx), %eax
leal 0x8(%rax), %ecx
addl $0xf, %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
sarl $0x3, %eax
cltq
addq %r14, %rax
movq %rax, 0x10(%r13)
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/encoder/encoder.c
// Function: x264_nal_end(x264_t*)
static void x264_nal_end(x264_t *h) {LOG_CALL;
    x264_nal_t *nal = &h->nal[h->i_nal];

    bs_align_0(&h->bs); /* not needed */

    nal->i_payload = &h->p_bitstream[bs_pos(&h->bs) / 8] - nal->p_payload;

    h->i_nal++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x12688(%rip), %r14     # 0x271b4
leaq 0x163f5(%rip), %rsi     # 0x2af28
leaq 0x165cb(%rip), %rdx     # 0x2b105
movq %r14, %rdi
xorl %eax, %eax
callq 0x4a56
movslq 0x4(%rbx), %r15
leaq 0x1638d(%rip), %rsi     # 0x2aedc
leaq 0x12665(%rip), %rdx     # 0x271bb
movq %r14, %rdi
xorl %eax, %eax
callq 0x4a56
movl 0x78(%rbx), %ecx
cmpl $0x8, %ecx
je 0x14ba9
testl %ecx, %ecx
jle 0x14ba9
leal 0x1(%rcx), %eax
movq 0x68(%rbx), %rdx
cmpq 0x70(%rbx), %rdx
jae 0x14ba9
decb %cl
movl $0x1, %esi
shll %cl, %esi
notb %sil
andb %sil, (%rdx)
movl 0x78(%rbx), %ecx
decl %ecx
movl %ecx, 0x78(%rbx)
jne 0x14ba2
incq 0x68(%rbx)
movl $0x8, 0x78(%rbx)
movl $0x8, %ecx
decl %eax
cmpl $0x1, %eax
ja 0x14b6f
leaq (%r15,%r15,2), %r14
movl 0x58(%rbx), %r15d
leaq 0x125fc(%rip), %rdi     # 0x271b4
leaq 0x1631d(%rip), %rsi     # 0x2aedc
leaq 0x166cb(%rip), %rdx     # 0x2b291
xorl %eax, %eax
callq 0x4a56
movl 0x68(%rbx), %eax
subl 0x60(%rbx), %eax
shll $0x3, %eax
subl 0x78(%rbx), %eax
leal 0x8(%rax), %ecx
addl $0xf, %eax
testl %ecx, %ecx
cmovnsl %ecx, %eax
sarl $0x3, %eax
addl %r15d, %eax
subl 0x18(%rbx,%r14,8), %eax
movl %eax, 0x10(%rbx,%r14,8)
incl 0x4(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/encoder/encoder.c
// Function: x264_encoder_frame_put(x264_frame_t**, x264_frame_t*)
static void x264_encoder_frame_put(x264_frame_t *buffer[X264_BFRAME_MAX], x264_frame_t *frame) {LOG_CALL;
    int i;

    /* put the frame in buffer */
    for (i = 0; buffer[i] != NULL; i++)
    {
        if (i >= X264_BFRAME_MAX)
        {
            fprintf(stderr, "not enough room\n");
            return;
        }
    }
    buffer[i] = frame;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1094f(%rip), %rdi     # 0x271b4
leaq 0x146bc(%rip), %rsi     # 0x2af28
leaq 0x148da(%rip), %rdx     # 0x2b14d
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x4a56
cmpq $0x0, (%r14)
je 0x1689a
xorl %eax, %eax
cmpq $0x10, %rax
je 0x168a9
leaq 0x1(%rax), %r15
cmpq $0x0, 0x8(%r14,%rax,8)
movq %r15, %rax
jne 0x16885
movq %rbx, (%r14,%r15,8)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x2e30
jmp 0x1689e
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/encoder/encoder.c
// Function: x264_slice_header_init(x264_slice_header_t*, x264_param_t*, x264_sps_t*, x264_pps_t*, int, int, int)
static void x264_slice_header_init(x264_slice_header_t *sh, x264_param_t *param,
        x264_sps_t *sps, x264_pps_t *pps,
        int i_type, int i_idr_pic_id, int i_frame) {LOG_CALL;
    /* First we fill all field */
    sh->sps = sps;
    sh->pps = pps;

    sh->i_type = i_type;
    sh->i_first_mb = 0;
    sh->i_pps_id = pps->i_id;

    sh->i_frame_num = i_frame;

    sh->b_field_pic = 0; /* Not field support for now */
    sh->b_bottom_field = 1; /* not yet used */

    sh->i_idr_pic_id = i_idr_pic_id;

    /* poc stuff, fixed later */
    sh->i_poc_lsb = 0;
    sh->i_delta_poc_bottom = 0;
    sh->i_delta_poc[0] = 0;
    sh->i_delta_poc[1] = 0;

    sh->i_redundant_pic_cnt = 0;

    sh->b_direct_spatial_mv_pred = 0;

    sh->b_num_ref_idx_override = 0;
    sh->i_num_ref_idx_l0_active = 1;
    sh->i_num_ref_idx_l1_active = 1;

    sh->i_cabac_init_idc = param->i_cabac_init_idc;

    sh->i_qp_delta = 0;
    sh->b_sp_for_swidth = 0;
    sh->i_qs_delta = 0;

    if (param->b_deblocking_filter)
    {
        sh->i_disable_deblocking_filter_idc = 0;
    } else
    {
        sh->i_disable_deblocking_filter_idc = 1;
    }
    sh->i_alpha_c0_offset = 0;
    sh->i_beta_offset = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, -0x30(%rbp)
movl %r8d, -0x2c(%rbp)
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x108db(%rip), %rdi     # 0x271b4
leaq 0x14648(%rip), %rsi     # 0x2af28
leaq 0x1488e(%rip), %rdx     # 0x2b175
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x4a56
movq %r15, (%rbx)
movq %r13, 0x8(%rbx)
movl -0x2c(%rbp), %eax
movl %eax, 0x10(%rbx)
movl %r12d, 0x14(%rbx)
movl (%r13), %eax
movl %eax, 0x18(%rbx)
movl 0x10(%rbp), %eax
movl %eax, 0x1c(%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x20(%rbx)
movl -0x30(%rbp), %eax
movl %eax, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x2c(%rbx)
movups %xmm0, 0x38(%rbx)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x48(%rbx)
movl 0x30(%r14), %eax
movl %eax, 0x50(%rbx)
movq %r12, 0x54(%rbx)
movl %r12d, 0x5c(%rbx)
xorl %eax, %eax
cmpl %r12d, 0x28(%r14)
sete %al
movl %eax, 0x60(%rbx)
movq %r12, 0x64(%rbx)
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/encoder/../core/bs.h
// Function: bs_write_ue(bs_s*, unsigned int, char const*)
static inline void
bs_write_ue(bs_t *s, unsigned int val, const char str[]) {
    myPrintf( "bs_write_ue %u %s\n", val, str);
    int i_size = 0;
    static const int i_size0_255[256] = {
                                         1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
                                         6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
                                         7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
                                         7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
                                         8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
                                         8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
                                         8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
                                         8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8
    };

    if (val == 0)
    {
        _bs_write(s, 1, 1);
    }
    else
    {
        unsigned int tmp = ++val;

        if (tmp >= 0x00010000)
        {
            i_size += 16;
            tmp >>= 16;
        }
        if (tmp >= 0x100)
        {
            i_size += 8;
            tmp >>= 8;
        }
        i_size += i_size0_255[tmp];

        _bs_write(s, 2 * i_size - 1, val);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x14900(%rip), %rdi     # 0x2b27e
xorl %eax, %eax
callq 0x4a56
testl %r14d, %r14d
je 0x16a26
incl %r14d
movl %r14d, %ecx
shrl $0x10, %ecx
xorl %edx, %edx
cmpl $0x10000, %r14d         # imm = 0x10000
setae %dl
cmovbl %r14d, %ecx
shll $0x4, %edx
leal 0x8(%rdx), %eax
movl %ecx, %esi
shrl $0x8, %esi
cmpl $0x100, %ecx            # imm = 0x100
cmovbl %edx, %eax
cmovbl %ecx, %esi
leaq 0x1490b(%rip), %rcx     # 0x2b2d0
addl (%rcx,%rsi,4), %eax
jle 0x16a4e
addl %eax, %eax
movq 0x8(%rbx), %rdx
cmpq 0x10(%rbx), %rdx
jae 0x16a4e
movb 0x18(%rbx), %cl
decb %cl
movl $0x1, %esi
shll %cl, %esi
leal -0x2(%rax), %ecx
movzbl %cl, %ecx
movb (%rdx), %dil
movl %esi, %r8d
notb %r8b
andb %dil, %r8b
orb %sil, %dil
btl %ecx, %r14d
movzbl %dil, %ecx
movzbl %r8b, %esi
cmovbl %ecx, %esi
movb %sil, (%rdx)
decl 0x18(%rbx)
jne 0x16a1d
incq 0x8(%rbx)
movl $0x8, 0x18(%rbx)
decl %eax
cmpl $0x1, %eax
ja 0x169d0
jmp 0x16a4e
movq 0x8(%rbx), %rax
cmpq 0x10(%rbx), %rax
jae 0x16a4e
movb 0x18(%rbx), %cl
decb %cl
movl $0x1, %edx
shll %cl, %edx
orb %dl, (%rax)
decl 0x18(%rbx)
jne 0x16a4e
incq 0x8(%rbx)
movl $0x8, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/encoder/encoder.c
// Function: x264_psnr(unsigned char*, int, unsigned char*, int, int, int)
static float x264_psnr(uint8_t *pix1, int i_pix_stride, uint8_t *pix2, int i_pix2_stride, int i_width, int i_height) {LOG_CALL;
    int64_t i_sqe = 0;

    int x, y;

    for (y = 0; y < i_height; y++)
    {
        for (x = 0; x < i_width; x++)
        {
            int tmp;

            tmp = pix1[y * i_pix_stride + x] - pix2[y * i_pix2_stride + x];

            i_sqe += tmp * tmp;
        }
    }

    if (i_sqe == 0)
    {
        return -1.0;
    }
    return (float) (10.0 * log((double) 65025.0 * (double) i_height * (double) i_width / (double) i_sqe) / log(10.0));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r13d
movl %r8d, %ebx
movl %ecx, -0x2c(%rbp)
movq %rdx, %r15
movl %esi, %r14d
movq %rdi, %r12
leaq 0x1073a(%rip), %rdi     # 0x271b4
leaq 0x144a7(%rip), %rsi     # 0x2af28
leaq 0x14837(%rip), %rdx     # 0x2b2bf
xorl %eax, %eax
callq 0x4a56
movss 0x14471(%rip), %xmm0    # 0x2af08
testl %r13d, %r13d
jle 0x16b24
movslq %r14d, %rcx
movslq -0x2c(%rbp), %rdx
movl %r13d, %esi
movl %ebx, %edi
xorl %r8d, %r8d
xorl %eax, %eax
testl %ebx, %ebx
jle 0x16ad4
xorl %r9d, %r9d
movzbl (%r12,%r9), %r10d
movzbl (%r15,%r9), %r11d
subl %r11d, %r10d
imull %r10d, %r10d
addq %r10, %rax
incq %r9
cmpq %r9, %rdi
jne 0x16ab8
incq %r8
addq %rdx, %r15
addq %rcx, %r12
cmpq %rsi, %r8
jne 0x16ab1
testq %rax, %rax
je 0x16b24
cvtsi2sd %r13d, %xmm1
mulsd 0x1441c(%rip), %xmm1    # 0x2af10
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
mulsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
callq 0x2090
mulsd 0x14400(%rip), %xmm0    # 0x2af18
divsd 0x14400(%rip), %xmm0    # 0x2af20
cvtsd2ss %xmm0, %xmm0
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/encoder/macroblock.c
// Function: x264_mb_encode_i4x4(x264_t*, x264_macroblock_t*, int, int)
void x264_mb_encode_i4x4(x264_t *h, x264_macroblock_t *mb, int idx, int i_qscale) {LOG_CALL;
    x264_mb_context_t *ctx = mb->context;

    uint8_t *p_src = ctx->p_img[0] + 4 * block_idx_x[idx] + 4 * block_idx_y[idx] * ctx->i_img[0];
    int i_src = ctx->i_img[0];
    uint8_t *p_dst = ctx->p_fdec[0] + 4 * block_idx_x[idx] + 4 * block_idx_y[idx] * ctx->i_fdec[0];
    int i_dst = ctx->i_fdec[0];

    int16_t luma[4][4];
    int16_t dct4x4[4][4];

    /* we calculate diff */
    h->pixf.sub4x4(luma, p_src, i_src, p_dst, i_dst);

    /* calculate dct coeffs */
    h->dctf.dct4x4(dct4x4, luma);
    quant_4x4(dct4x4, i_qscale, 1);

    scan_zigzag_4x4full(mb->block[idx].luma4x4, dct4x4);

    /* output samples to fdec */
    x264_mb_dequant_4x4(dct4x4, i_qscale);
    h->dctf.idct4x4(luma, dct4x4);

    /* put pixel to fdec */
    h->pixf.add4x4(p_dst, i_dst, luma);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, -0x2c(%rbp)
movl %edx, %r15d
movq %rsi, %r14
movq %rsi, -0x38(%rbp)
movq %rdi, %r13
leaq 0x10320(%rip), %rdi     # 0x271b4
leaq 0x168c9(%rip), %rsi     # 0x2d764
leaq 0x168ed(%rip), %rdx     # 0x2d78f
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4a56
movq 0x10(%r14), %rax
movslq %r15d, %r14
leaq 0x13187(%rip), %rcx     # 0x2a040
movzbl (%r14,%rcx), %ecx
shll $0x2, %ecx
movq 0x18(%rax), %rdi
addq %rcx, %rdi
leaq 0x13161(%rip), %rdx     # 0x2a030
movzbl (%r14,%rdx), %r9d
shll $0x2, %r9d
movslq 0x30(%rax), %rdx
movq %rdx, %rsi
imulq %r9, %rsi
addq %rdi, %rsi
addq 0x40(%rax), %rcx
movl 0x58(%rax), %r8d
imull %r8d, %r9d
movslq %r9d, %r12
addq %rcx, %r12
leaq -0x80(%rbp), %rdi
movq %r12, %rcx
movl %r8d, -0x30(%rbp)
callq *0x10f350(%r13)
leaq -0x60(%rbp), %r15
movq %r15, %rdi
leaq -0x80(%rbp), %rsi
movq %r13, -0x40(%rbp)
callq *0x10f398(%r13)
movq %r15, %rdi
movl -0x2c(%rbp), %r15d
movl %r15d, %esi
movl $0x1, %edx
callq 0x16fde
movq %r14, %rax
shlq $0x7, %rax
leaq (%rax,%r14,4), %rax
movq -0x38(%rbp), %rcx
leaq (%rcx,%rax), %r14
addq $0x368, %r14            # imm = 0x368
leaq 0x1336f(%rip), %rdx     # 0x2a2c4
leaq 0x10258(%rip), %rdi     # 0x271b4
leaq 0x16801(%rip), %rsi     # 0x2d764
xorl %eax, %eax
callq 0x4a56
leaq 0x14c5f(%rip), %rax     # 0x2bbd0
leaq 0x14c98(%rip), %rcx     # 0x2bc10
movslq (%rbx,%rax), %rdx
movslq (%rbx,%rcx), %rsi
leaq -0x60(,%rdx,8), %rdx
addq %rbp, %rdx
movswl (%rdx,%rsi,2), %edx
movl %edx, (%r14,%rbx)
addq $0x4, %rbx
cmpq $0x40, %rbx
jne 0x16f78
leaq -0x60(%rbp), %r14
movq %r14, %rdi
movl %r15d, %esi
callq 0x6874
leaq -0x80(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
movq -0x40(%rbp), %rbx
callq *0x10f3a8(%rbx)
movq %r12, %rdi
movl -0x30(%rbp), %esi
movq %r13, %rdx
callq *0x10f368(%rbx)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/encoder/macroblock.c
// Function: quant_4x4(short (*) [4], int, int)
static void quant_4x4(int16_t dct[4][4], int i_qscale, int b_intra) {LOG_CALL;
    const int i_qbits = 15 + i_qscale / 6;
    const int i_mf = i_qscale % 6;
    const int f = (1 << i_qbits) / (b_intra ? 3 : 6);

    int x, y;
    for (y = 0; y < 4; y++)
    {
        for (x = 0; x < 4; x++)
        {
            if (dct[y][x] > 0)
            {
                dct[y][x] = (f + dct[y][x] * quant_mf[i_mf][y][x]) >> i_qbits;
            } else
            {
                dct[y][x] = -((f - dct[y][x] * quant_mf[i_mf][y][x]) >> i_qbits);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
leaq 0x101bb(%rip), %rdi     # 0x271b4
leaq 0x16764(%rip), %rsi     # 0x2d764
leaq 0x108c4(%rip), %rdx     # 0x278cb
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x4a56
movslq %r15d, %rsi
imulq $0x2aaaaaab, %rsi, %rax # imm = 0x2AAAAAAB
movq %rax, %rdx
shrq $0x3f, %rdx
shrq $0x20, %rax
leal (%rax,%rdx), %ecx
addl $0xf, %ecx
addl %edx, %eax
addl %eax, %eax
leal (%rax,%rax,2), %eax
subl %eax, %esi
movl $0x1, %eax
shll %cl, %eax
xorl %edx, %edx
testl %r14d, %r14d
sete %dl
leal (%rdx,%rdx,2), %edi
addl $0x3, %edi
cltd
idivl %edi
movslq %esi, %rsi
shlq $0x6, %rsi
leaq 0x149f5(%rip), %rdx     # 0x2ba50
addq %rsi, %rdx
xorl %esi, %esi
movswl (%rbx,%rsi,2), %r8d
movl (%rdx,%rsi,4), %edi
imull %r8d, %edi
testl %r8d, %r8d
jle 0x17077
addl %eax, %edi
sarl %cl, %edi
jmp 0x17086
movl %eax, %r8d
subl %edi, %r8d
sarl %cl, %r8d
negl %r8d
movl %r8d, %edi
movw %di, (%rbx,%rsi,2)
incq %rsi
cmpq $0x4, %rsi
jne 0x17060
incq %r12
addq $0x8, %rbx
addq $0x10, %rdx
cmpq $0x4, %r12
jne 0x1705e
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/akumrao[P]videoAnalyzer/encoder/macroblock.c
// Function: x264_mb_decimate_score(int*, int)
static int x264_mb_decimate_score(int *dct, int i_max) {LOG_CALL;
    static const int i_ds_table[16] = {3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

    int i_score = 0;
    int idx = i_max - 1;

    while (idx >= 0 && dct[idx] == 0)
    {
        idx--;
    }

    while (idx >= 0)
    {
        int i_run;

        if (abs(dct[idx--]) > 1)
        {
            return 9;
        }

        i_run = 0;
        while (idx >= 0 && dct[idx] == 0)
        {
            idx--;
            i_run++;
        }
        i_score += i_ds_table[i_run];
    }

    return i_score;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %r14
leaq 0xf134(%rip), %rdi      # 0x271b4
leaq 0x156dd(%rip), %rsi     # 0x2d764
leaq 0x15a8e(%rip), %rdx     # 0x2db1c
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x4a56
movl %r15d, %eax
decq %rax
testl %r15d, %r15d
jle 0x18107
movl %eax, %ecx
decl %r15d
decq %rax
cmpl $0x0, (%r14,%rcx,4)
je 0x1809d
xorl %ebx, %ebx
leaq 0x13b96(%rip), %rax     # 0x2bc50
movl %r15d, %ecx
movl (%r14,%rcx,4), %edx
movl %edx, %esi
negl %esi
cmovsl %edx, %esi
cmpl $0x1, %esi
ja 0x18114
testl %r15d, %r15d
jle 0x1811b
movq %rax, %rdx
leal -0x1(%r15), %esi
cmpl $0x0, (%r14,%rsi,4)
jne 0x180ed
addq $0x4, %rdx
movl %esi, %r15d
testl %esi, %esi
jne 0x180d5
jmp 0x180fd
addl (%rdx), %ebx
leal -0x1(%r15), %ecx
testl %r15d, %r15d
movl %ecx, %r15d
jg 0x180ba
jmp 0x18107
leaq 0x13b4c(%rip), %rax     # 0x2bc50
addl (%rax,%rcx,4), %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x9, %ebx
jmp 0x18107
addl $0x3, %ebx
jmp 0x18107