LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
leaq 0x186f6(%rip), %rdi     # 0x28eb0
leaq 0x1aaf7(%rip), %rsi     # 0x2b2b8
leaq 0x1aeaa(%rip), %rdx     # 0x2b672
movb $0x0, %al
callq 0x4d20
cmpl $0x5, -0x1c(%rbp)
jne 0x1080d
movq -0x18(%rbp), %rdi
leaq 0x1aeb8(%rip), %rsi     # 0x2b698
callq 0x10c40
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x1aebf(%rip), %rsi     # 0x2b6b2
callq 0x10c40
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x10803
jmp 0x10803
cmpl $0x0, -0x24(%rbp)
je 0x1080b
jmp 0x1080b
jmp 0x10831
movq -0x18(%rbp), %rdi
leaq 0x1aeb5(%rip), %rsi     # 0x2b6cd
callq 0x10c40
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x1082f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x10838
jmp 0x10831
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10d70
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x19(%rbp)
jne 0x10a3d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x10(%rdx), %rcx
movb %al, -0x19(%rbp)
jae 0x10a3d
cmpl $0x20, -0x14(%rbp)
setl %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x10a46
jmp 0x10a51
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x10a07
movl -0x14(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x10df0
movl %eax, %ecx
movl -0x20(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x1ab35(%rip), %rdi     # 0x2b5ba
movb $0x0, %al
callq 0x4d20
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x10ccb
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
sarl %cl, %eax
andl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x10cae
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x8, 0x18(%rax)
movl -0x1c(%rbp), %esi
movq -0x18(%rbp), %rdx
leaq 0x1a940(%rip), %rdi     # 0x2b5fc
movb $0x0, %al
callq 0x4d20
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x10ce6
movq -0x18(%rbp), %rdx
leaq 0x1a926(%rip), %rdi     # 0x2b5fc
xorl %esi, %esi
movb $0x0, %al
callq 0x4d20
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/../core/bs.h
// Function: bs_read_se(bs_s*, char const*)
static inline int
bs_read_se(bs_t *s, const char str[]) {
    int val = _bs_read_ue(s);
    int ret = val & 0x01 ? (val + 1) / 2 : -(val / 2);
    myPrintf("bs_read_se %d %s \n", ret,str);
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10f00
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x10d2a
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
jmp 0x10d3e
movl -0x14(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq 0x1a8ba(%rip), %rdi     # 0x2b60c
movb $0x0, %al
callq 0x4d20
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/../core/bs.h
// Function: bs_read1(bs_s*)
static inline uint32_t
_bs_read1(bs_t *s) {

    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;
        }
        

    
        return i_result;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x10dde
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x18(%rcx), %ecx
sarl %cl, %eax
andl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x10dd6
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x8, 0x18(%rax)
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x10de5
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/../core/bs.h
// Function: bs_read_ue(bs_s*)
static inline int
_bs_read_ue(bs_t *s) {
    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));
    return ret;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x10d70
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
jne 0x10f49
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rdx
xorl %eax, %eax
cmpq 0x10(%rdx), %rcx
movb %al, -0x11(%rbp)
jae 0x10f49
cmpl $0x20, -0xc(%rbp)
setl %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x10f52
jmp 0x10f5d
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x10f13
movl -0xc(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x10df0
movl %eax, %ecx
movl -0x18(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
leaq 0x17f04(%rip), %rdi     # 0x28eb0
leaq 0x1ac1d(%rip), %rsi     # 0x2bbd0
leaq 0x1ac2b(%rip), %rdx     # 0x2bbe5
movb $0x0, %al
callq 0x4d20
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
xorl %edx, %edx
leaq -0x18(%rbp), %rcx
leaq -0x1c(%rbp), %r8
callq 0x110b0
movq -0x8(%rbp), %rax
cmpl $0x10, 0x1c(%rax)
jne 0x10ff1
movl $0x4, -0x20(%rbp)
movl $0x4, -0x24(%rbp)
jmp 0x11037
movq -0x8(%rbp), %rax
cmpl $0xe, 0x1c(%rax)
jne 0x1100b
movl $0x4, -0x20(%rbp)
movl $0x2, -0x24(%rbp)
jmp 0x11035
movq -0x8(%rbp), %rax
cmpl $0xf, 0x1c(%rax)
jne 0x11025
movl $0x2, -0x20(%rbp)
movl $0x4, -0x24(%rbp)
jmp 0x11033
movl $0x2, -0x20(%rbp)
movl $0x2, -0x24(%rbp)
jmp 0x11035
jmp 0x11037
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x110a2
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x11095
movl -0x14(%rbp), %edx
movq -0x8(%rbp), %rax
addq $0x30, %rax
movl -0x18(%rbp), %ecx
addl -0x28(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movl -0x1c(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1104d
jmp 0x11097
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x1103e
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
leaq 0x17c50(%rip), %rdi     # 0x28eb0
leaq 0x1a969(%rip), %rsi     # 0x2bbd0
leaq 0x1a991(%rip), %rdx     # 0x2bbff
movb $0x0, %al
callq 0x4d20
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
leaq -0x24(%rbp), %rcx
leaq -0x28(%rbp), %r8
callq 0x110b0
movq -0x8(%rbp), %rdi
movl -0x10(%rbp), %esi
movl -0x14(%rbp), %edx
leaq -0x2c(%rbp), %rcx
leaq -0x30(%rbp), %r8
callq 0x11360
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jge 0x1135a
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x1134a
movq -0x20(%rbp), %rax
movl (%rax), %edx
movq -0x8(%rbp), %rax
addq $0x30, %rax
movl -0x24(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movl -0x28(%rbp), %ecx
addl -0x38(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
movl %edx, 0x8(%rax,%rcx,8)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x8(%rbp), %rax
addq $0x30, %rax
movl -0x24(%rbp), %ecx
addl -0x34(%rbp), %ecx
movslq %ecx, %rcx
imulq $0xa0, %rcx, %rcx
addq %rcx, %rax
movl -0x28(%rbp), %ecx
addl -0x38(%rbp), %ecx
movslq %ecx, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movslq -0xc(%rbp), %rcx
movl %edx, 0xc(%rax,%rcx,8)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x112bd
jmp 0x1134c
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x112aa
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
leaq 0x169f6(%rip), %rdi     # 0x28eb0
leaq 0x18f0b(%rip), %rsi     # 0x2b3cc
leaq 0x198bb(%rip), %rdx     # 0x2bd83
movb $0x0, %al
callq 0x4d20
cmpl $0x1, -0x14(%rbp)
jne 0x124ec
movq -0x10(%rbp), %rdi
callq 0x13b70
movl %eax, %ecx
movl $0x1, %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x12509
cmpl $0x1, -0x14(%rbp)
jle 0x12500
movq -0x10(%rbp), %rdi
callq 0x13d00
movl %eax, -0x4(%rbp)
jmp 0x12509
jmp 0x12502
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/macroblock.c
// Function: array_zero_set(int*, int)
static inline void array_zero_set(int *l, int i_count) {LOG_CALL;
    int i;

    for (i = 0; i < i_count; i++)
    {
        l[i] = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x1626a(%rip), %rdi     # 0x28eb0
leaq 0x18f83(%rip), %rsi     # 0x2bbd0
leaq 0x191ae(%rip), %rdx     # 0x2be02
movb $0x0, %al
callq 0x4d20
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x12c84
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x12c62
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/macroblock.c
// Function: x264_mb_pred_mode16x16_valid(x264_macroblock_t*, int)
static int x264_mb_pred_mode16x16_valid(x264_macroblock_t *mb, int i_mode) {LOG_CALL;
    if ((mb->i_neighbour & (MB_LEFT | MB_TOP)) == (MB_LEFT | MB_TOP))
    {
        return i_mode;
    } else if ((mb->i_neighbour & MB_LEFT))
    {
        if (i_mode == I_PRED_16x16_DC)
        {
            return I_PRED_16x16_DC_LEFT;
        } else if (i_mode == I_PRED_16x16_H)
        {
            return I_PRED_16x16_H;
        }

        fprintf(stderr, "invalid 16x16 prediction\n");
        return I_PRED_16x16_DC_LEFT;
    } else if ((mb->i_neighbour & MB_TOP))
    {
        if (i_mode == I_PRED_16x16_DC)
        {
            return I_PRED_16x16_DC_TOP;
        } else if (i_mode == I_PRED_16x16_V)
        {
            return I_PRED_16x16_V;
        }

        fprintf(stderr, "invalid 16x16 prediction\n");
        return I_PRED_16x16_DC_TOP;
    } else
    {
        return I_PRED_16x16_DC_128;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq 0x15ada(%rip), %rdi     # 0x28eb0
leaq 0x187f3(%rip), %rsi     # 0x2bbd0
leaq 0x18a2d(%rip), %rdx     # 0x2be11
movb $0x0, %al
callq 0x4d20
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x3, %eax
cmpl $0x3, %eax
jne 0x13405
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x134af
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x13458
cmpl $0x2, -0x14(%rbp)
jne 0x13426
movl $0x4, -0x4(%rbp)
jmp 0x134af
cmpl $0x1, -0x14(%rbp)
jne 0x13435
movl $0x1, -0x4(%rbp)
jmp 0x134af
jmp 0x13437
movq 0x22b92(%rip), %rax     # 0x35fd0
movq (%rax), %rdi
leaq 0x189e6(%rip), %rsi     # 0x2be2e
movb $0x0, %al
callq 0x2160
movl $0x4, -0x4(%rbp)
jmp 0x134af
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x134a8
cmpl $0x2, -0x14(%rbp)
jne 0x13476
movl $0x5, -0x4(%rbp)
jmp 0x134af
cmpl $0x0, -0x14(%rbp)
jne 0x13485
movl $0x0, -0x4(%rbp)
jmp 0x134af
jmp 0x13487
movq 0x22b42(%rip), %rax     # 0x35fd0
movq (%rax), %rdi
leaq 0x18996(%rip), %rsi     # 0x2be2e
movb $0x0, %al
callq 0x2160
movl $0x5, -0x4(%rbp)
jmp 0x134af
movl $0x6, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/macroblock.c
// Function: unscan_zigzag_4x4full(short (*) [4], int*)
static inline void unscan_zigzag_4x4full(int16_t dct[4][4], int level[16]) {LOG_CALL;
    int i;

    for (i = 0; i < 16; i++)
    {
        dct[scan_zigzag_y[i]][scan_zigzag_x[i]] = level[i];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x159d9(%rip), %rdi     # 0x28eb0
leaq 0x186f2(%rip), %rsi     # 0x2bbd0
leaq 0x18963(%rip), %rdx     # 0x2be48
movb $0x0, %al
callq 0x4d20
movl $0x0, -0x14(%rbp)
cmpl $0x10, -0x14(%rbp)
jge 0x1353f
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rsi
leaq 0x185fa(%rip), %rcx     # 0x2bb10
movslq (%rcx,%rsi,4), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rsi
leaq 0x18624(%rip), %rcx     # 0x2bb50
movslq (%rcx,%rsi,4), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x134f3
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/macroblock.c
// Function: unscan_zigzag_4x4(short (*) [4], int*)
static inline void unscan_zigzag_4x4(int16_t dct[4][4], int level[15]) {LOG_CALL;
    int i;

    for (i = 1; i < 16; i++)
    {
        dct[scan_zigzag_y[i]][scan_zigzag_x[i]] = level[i - 1];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x15949(%rip), %rdi     # 0x28eb0
leaq 0x18662(%rip), %rsi     # 0x2bbd0
leaq 0x188e9(%rip), %rdx     # 0x2be5e
movb $0x0, %al
callq 0x4d20
movl $0x1, -0x14(%rbp)
cmpl $0x10, -0x14(%rbp)
jge 0x135d4
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rsi
leaq 0x18565(%rip), %rcx     # 0x2bb10
movslq (%rcx,%rsi,4), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rsi
leaq 0x1858f(%rip), %rcx     # 0x2bb50
movslq (%rcx,%rsi,4), %rcx
movw %dx, (%rax,%rcx,2)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x13583
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/macroblock.c
// Function: x264_mb_pred_mode8x8_valid(x264_macroblock_t*, int)
static int x264_mb_pred_mode8x8_valid(x264_macroblock_t *mb, int i_mode) {LOG_CALL;
    if ((mb->i_neighbour & (MB_LEFT | MB_TOP)) == (MB_LEFT | MB_TOP))
    {
        return i_mode;
    } else if ((mb->i_neighbour & MB_LEFT))
    {
        if (i_mode == I_PRED_CHROMA_DC)
        {
            return I_PRED_CHROMA_DC_LEFT;
        } else if (i_mode == I_PRED_CHROMA_H)
        {
            return I_PRED_CHROMA_H;
        }

        fprintf(stderr, "invalid 8x8 prediction\n");
        return I_PRED_CHROMA_DC_LEFT;
    } else if ((mb->i_neighbour & MB_TOP))
    {
        if (i_mode == I_PRED_CHROMA_DC)
        {
            return I_PRED_CHROMA_DC_TOP;
        } else if (i_mode == I_PRED_CHROMA_V)
        {
            return I_PRED_CHROMA_V;
        }

        fprintf(stderr, "invalid 8x8 prediction\n");
        return I_PRED_CHROMA_DC_TOP;
    } else
    {
        return I_PRED_CHROMA_DC_128;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq 0x1568a(%rip), %rdi     # 0x28eb0
leaq 0x183a3(%rip), %rsi     # 0x2bbd0
leaq 0x18685(%rip), %rdx     # 0x2beb9
movb $0x0, %al
callq 0x4d20
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x3, %eax
cmpl $0x3, %eax
jne 0x13855
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x138ff
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x138a8
cmpl $0x0, -0x14(%rbp)
jne 0x13876
movl $0x4, -0x4(%rbp)
jmp 0x138ff
cmpl $0x1, -0x14(%rbp)
jne 0x13885
movl $0x1, -0x4(%rbp)
jmp 0x138ff
jmp 0x13887
movq 0x22742(%rip), %rax     # 0x35fd0
movq (%rax), %rdi
leaq 0x1863c(%rip), %rsi     # 0x2bed4
movb $0x0, %al
callq 0x2160
movl $0x4, -0x4(%rbp)
jmp 0x138ff
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x138f8
cmpl $0x0, -0x14(%rbp)
jne 0x138c6
movl $0x5, -0x4(%rbp)
jmp 0x138ff
cmpl $0x2, -0x14(%rbp)
jne 0x138d5
movl $0x2, -0x4(%rbp)
jmp 0x138ff
jmp 0x138d7
movq 0x226f2(%rip), %rax     # 0x35fd0
movq (%rax), %rdi
leaq 0x185ec(%rip), %rsi     # 0x2bed4
movb $0x0, %al
callq 0x2160
movl $0x5, -0x4(%rbp)
jmp 0x138ff
movl $0x6, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/macroblock.c
// Function: unscan_zigzag_2x2_dc(short (*) [2], int*)
static inline void unscan_zigzag_2x2_dc(int16_t dct[2][2], int level[4]) {LOG_CALL;
    dct[0][0] = level[0];
    dct[0][1] = level[1];
    dct[1][0] = level[2];
    dct[1][1] = level[3];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x15589(%rip), %rdi     # 0x28eb0
leaq 0x182a2(%rip), %rsi     # 0x2bbd0
leaq 0x185b7(%rip), %rdx     # 0x2beec
movb $0x0, %al
callq 0x4d20
movq -0x10(%rbp), %rax
movl (%rax), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, (%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x2(%rax)
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x6(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/macroblock.c
// Function: bs_read_vlc(bs_s*, x264_vlc_table_t*)
static int bs_read_vlc(bs_t *s, x264_vlc_table_t *table) {LOG_CALL;
    int i_nb_bits;
    int i_value = 0;
    int i_bits;
    int i_index;
    int i_level = 0;

    i_index = bs_show(s, table->i_lookup_bits);
    if (i_index >= table->i_lookup)
    {
        return ( -1);
    }
    i_value = table->lookup[i_index].i_value;
    i_bits = table->lookup[i_index].i_size;

    myPrintf( "bits=%d, value=%d", i_bits, i_value);
    
    while (i_bits < 0)
    {
        myPrintf( "bits=%d, value=%d", i_bits, i_value);
        
        i_level++;
        if (i_level > 5)
        {
            return ( -1); // FIXME what to do ?
        }
        bs_skip(s, table->i_lookup_bits);
        i_nb_bits = -i_bits;

        i_index = bs_show(s, i_nb_bits) + i_value;
        if (i_index >= table->i_lookup)
        {
            return ( -1);
        }
        i_value = table->lookup[i_index].i_value;
        i_bits = table->lookup[i_index].i_size;
    }
    bs_skip(s, i_bits);

    return ( i_value);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x15109(%rip), %rdi     # 0x28eb0
leaq 0x17e22(%rip), %rsi     # 0x2bbd0
leaq 0x18016(%rip), %rdx     # 0x2bdcb
movb $0x0, %al
callq 0x4d20
movl $0x0, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %esi
callq 0x13ef0
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jl 0x13df4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x13edd
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,8), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %esi
movl -0x20(%rbp), %edx
leaq 0x17fb1(%rip), %rdi     # 0x2bdd7
movb $0x0, %al
callq 0x4d20
cmpl $0x0, -0x24(%rbp)
jge 0x13ecb
movl -0x24(%rbp), %esi
movl -0x20(%rbp), %edx
leaq 0x17f93(%rip), %rdi     # 0x2bdd7
movb $0x0, %al
callq 0x4d20
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x5, -0x2c(%rbp)
jle 0x13e63
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x13edd
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %esi
callq 0x13fb0
xorl %eax, %eax
subl -0x24(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x13ef0
addl -0x20(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jl 0x13ea1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x13edd
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
movl (%rax,%rcx,8), %eax
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
movl 0x4(%rax,%rcx,8), %eax
movl %eax, -0x24(%rbp)
jmp 0x13e2d
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
callq 0x13fb0
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/../core/bs.h
// Function: bs_show(bs_s*, int)
static inline uint32_t
bs_show(bs_t *s, int i_count) {LOG_CALL;
#if 0
    bs_t s_tmp = *s;
    return bs_read(&s_tmp, i_count);
#else
    if (s->p < s->p_end && i_count > 0)
    {
        uint32_t i_cache = ((s->p[0] << 24)+(s->p[1] << 16)+(s->p[2] << 8) + s->p[3]) << (8 - s->i_left);
        return ( i_cache >> (32 - i_count));
    }
    return 0;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq 0x14faa(%rip), %rdi     # 0x28eb0
leaq 0x174bf(%rip), %rsi     # 0x2b3cc
leaq 0x17ed5(%rip), %rdx     # 0x2bde9
movb $0x0, %al
callq 0x4d20
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x13f94
cmpl $0x0, -0x14(%rbp)
jle 0x13f94
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
shll $0x18, %eax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movzbl 0x1(%rcx), %ecx
shll $0x10, %ecx
addl %ecx, %eax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movzbl 0x2(%rcx), %ecx
shll $0x8, %ecx
addl %ecx, %eax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movzbl 0x3(%rcx), %ecx
addl %ecx, %eax
movq -0x10(%rbp), %rdx
movl $0x8, %ecx
subl 0x18(%rdx), %ecx
shll %cl, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl $0x20, %ecx
subl -0x14(%rbp), %ecx
shrl %cl, %eax
movl %eax, -0x4(%rbp)
jmp 0x13f9b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/../core/bs.h
// Function: bs_skip(bs_s*, int)
static inline void
bs_skip(bs_t *s, int i_count) {
    s->i_left -= i_count;

    while (s->i_left <= 0)
    {
        s->p++;
        s->i_left += 8;
    }
    
    myPrintf("bs_skip %d, %u \n", i_count, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0xc(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jg 0x13ff7
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x8, %ecx
movl %ecx, 0x18(%rax)
jmp 0x13fce
movl -0xc(%rbp), %esi
leaq 0x17df0(%rip), %rdi     # 0x2bdf1
xorl %edx, %edx
movb $0x0, %al
callq 0x4d20
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl $0x10, %edi
callq 0x4160
movq %rax, -0x18(%rbp)
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x15100
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/decoder/vlc.c
// Function: vlc_table_realloc(x264_vlc_table_t*, int)
static int  vlc_table_realloc( x264_vlc_table_t *table, int i_size )
{
    int i_index;

    i_index = table->i_lookup;

    table->i_lookup += i_size;
    table->lookup =(vlc_lookup_t *) x264_realloc( table->lookup, sizeof( vlc_lookup_t ) * table->i_lookup );

    return( i_index );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movslq 0x4(%rax), %rax
shlq $0x3, %rax
movl %eax, %esi
callq 0x43e0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/encoder/analyse.c
// Function: predict_16x16_mode_available(x264_macroblock_t*, int*, int*)
static void predict_16x16_mode_available( x264_macroblock_t *mb, int *mode, int *pi_count )
{
    if( ( mb->i_neighbour & (MB_LEFT|MB_TOP) ) == (MB_LEFT|MB_TOP) )
    {
        /* top and left avaible */
        *mode++ = I_PRED_16x16_V;
        *mode++ = I_PRED_16x16_H;
        *mode++ = I_PRED_16x16_DC;
        *mode++ = I_PRED_16x16_P;
        *pi_count = 4;
    }
    else if( ( mb->i_neighbour & MB_LEFT ) )
    {
        /* left available*/
        *mode++ = I_PRED_16x16_DC_LEFT;
        *mode++ = I_PRED_16x16_H;
        *pi_count = 2;
    }
    else if( ( mb->i_neighbour & MB_TOP ) )
    {
        /* top available*/
        *mode++ = I_PRED_16x16_DC_TOP;
        *mode++ = I_PRED_16x16_V;
        *pi_count = 2;
    }
    else
    {
        /* none avaible */
        *mode = I_PRED_16x16_DC_128;
        *pi_count = 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x3, %eax
cmpl $0x3, %eax
jne 0x16e92
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x1, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x2, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x3, (%rax)
movq -0x18(%rbp), %rax
movl $0x4, (%rax)
jmp 0x16f34
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x16ed7
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x4, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x1, (%rax)
movq -0x18(%rbp), %rax
movl $0x2, (%rax)
jmp 0x16f32
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x16f1c
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x5, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movl $0x2, (%rax)
jmp 0x16f30
movq -0x10(%rbp), %rax
movl $0x6, (%rax)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
jmp 0x16f32
jmp 0x16f34
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/encoder/../core/bs.h
// Function: bs_size_ue(unsigned int)
static inline int
bs_size_ue(unsigned int val) {LOG_CALL;
    static const int i_size0_254[255] = {
                                         1, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 7, 7,
                                         9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9,
                                         11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
                                         11, 11, 11, 11, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
                                         13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
                                         13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13,
                                         13, 13, 13, 13, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
                                         15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
                                         15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
                                         15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
                                         15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15,
                                         15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15
    };

    if (val < 255)
    {
        return i_size0_254[val];
    }
    else
    {
        int i_size = 0;

        val++;

        if (val >= 0x10000)
        {
            i_size += 32;
            val = (val >> 16) - 1;
        }
        if (val >= 0x100)
        {
            i_size += 16;
            val = (val >> 8) - 1;
        }
        return i_size0_254[val] + i_size;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
leaq 0x11f5e(%rip), %rdi     # 0x28eb0
leaq 0x15ad3(%rip), %rsi     # 0x2ca2c
leaq 0x15ae1(%rip), %rdx     # 0x2ca41
movb $0x0, %al
callq 0x4d20
cmpl $0xff, -0x8(%rbp)
jae 0x16f84
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x155a4(%rip), %rax     # 0x2c520
movl (%rax,%rcx,4), %eax
movl %eax, -0x4(%rbp)
jmp 0x16fe5
movl $0x0, -0xc(%rbp)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
cmpl $0x10000, -0x8(%rbp)    # imm = 0x10000
jb 0x16fb2
movl -0xc(%rbp), %eax
addl $0x20, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shrl $0x10, %eax
subl $0x1, %eax
movl %eax, -0x8(%rbp)
cmpl $0x100, -0x8(%rbp)      # imm = 0x100
jb 0x16fd0
movl -0xc(%rbp), %eax
addl $0x10, %eax
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
shrl $0x8, %eax
subl $0x1, %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl %eax, %ecx
leaq 0x15544(%rip), %rax     # 0x2c520
movl (%rax,%rcx,4), %eax
addl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/encoder/../core/bs.h
// Function: bs_size_te(int, int)
static inline int
bs_size_te(int x, int val) {LOG_CALL;
    if (x == 1)
    {
        return 1;
    }
    else if (x > 1)
    {
        return bs_size_ue(val);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0x11c5b(%rip), %rdi     # 0x28eb0
leaq 0x157d0(%rip), %rsi     # 0x2ca2c
leaq 0x157e9(%rip), %rdx     # 0x2ca4c
movb $0x0, %al
callq 0x4d20
cmpl $0x1, -0x8(%rbp)
jne 0x17279
movl $0x1, -0x4(%rbp)
jmp 0x17295
cmpl $0x1, -0x8(%rbp)
jle 0x1728c
movl -0xc(%rbp), %edi
callq 0x16f40
movl %eax, -0x4(%rbp)
jmp 0x17295
jmp 0x1728e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/encoder/analyse.c
// Function: predict_8x8_mode_available(x264_macroblock_t*, int*, int*)
static void predict_8x8_mode_available( x264_macroblock_t *mb, int *mode, int *pi_count )
{
    if( ( mb->i_neighbour & (MB_LEFT|MB_TOP) ) == (MB_LEFT|MB_TOP) )
    {
        /* top and left avaible */
        *mode++ = I_PRED_CHROMA_V;
        *mode++ = I_PRED_CHROMA_H;
        *mode++ = I_PRED_CHROMA_DC;
        *mode++ = I_PRED_CHROMA_P;
        *pi_count = 4;
    }
    else if( ( mb->i_neighbour & MB_LEFT ) )
    {
        /* left available*/
        *mode++ = I_PRED_CHROMA_DC_LEFT;
        *mode++ = I_PRED_CHROMA_H;
        *pi_count = 2;
    }
    else if( ( mb->i_neighbour & MB_TOP ) )
    {
        /* top available*/
        *mode++ = I_PRED_CHROMA_DC_TOP;
        *mode++ = I_PRED_CHROMA_V;
        *pi_count = 2;
    }
    else
    {
        /* none avaible */
        *mode = I_PRED_CHROMA_DC_128;
        *pi_count = 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x3, %eax
cmpl $0x3, %eax
jne 0x17902
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x2, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x1, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x3, (%rax)
movq -0x18(%rbp), %rax
movl $0x4, (%rax)
jmp 0x179a4
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x17947
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x4, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x1, (%rax)
movq -0x18(%rbp), %rax
movl $0x2, (%rax)
jmp 0x179a2
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1798c
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x5, (%rax)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x10(%rbp)
movl $0x2, (%rax)
movq -0x18(%rbp), %rax
movl $0x2, (%rax)
jmp 0x179a0
movq -0x10(%rbp), %rax
movl $0x6, (%rax)
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
jmp 0x179a2
jmp 0x179a4
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x10f32(%rip), %rdi     # 0x28eb0
leaq 0x14b0f(%rip), %rsi     # 0x2ca94
leaq 0x14bae(%rip), %rdx     # 0x2cb3a
movb $0x0, %al
callq 0x4d20
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movslq 0x8(%rcx), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x18013
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x1, (%rax)
movq -0x20(%rbp), %rax
movl (%rax), %eax
shll $0x5, %eax
orl $0x0, %eax
movq -0x20(%rbp), %rcx
orl 0x4(%rcx), %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x180b0
cmpl $0x2, -0x3c(%rbp)
jne 0x1806e
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x3, %eax
jg 0x1806e
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x3, (%rax)
movl $0x0, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x18085
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x1808c
movl $0x0, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb (%rax), %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
jmp 0x18039
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0x10dc5(%rip), %rdi     # 0x28eb0
leaq 0x149a2(%rip), %rsi     # 0x2ca94
leaq 0x14a51(%rip), %rdx     # 0x2cb4a
movb $0x0, %al
callq 0x4d20
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rsi
movq -0x8(%rbp), %rax
movl 0x50(%rax), %edx
callq 0x181c0
movq -0x8(%rbp), %rax
cmpl $0x0, 0xc0(%rax)
jne 0x1819c
movq -0x8(%rbp), %rdi
movl $0x7, %esi
movl $0x3, %edx
callq 0x18230
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x8(%rbp), %rax
movq 0x8ed8(%rax), %rsi
callq 0x233e0
movq -0x8(%rbp), %rdi
callq 0x182e0
movq -0x8(%rbp), %rdi
movl $0x8, %esi
movl $0x3, %edx
callq 0x18230
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
movq -0x8(%rbp), %rax
movq 0x10dae0(%rax), %rsi
callq 0x23ea0
movq -0x8(%rbp), %rdi
callq 0x182e0
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rcx
addq $0x8, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
leaq 0x10c67(%rip), %rdi     # 0x28eb0
leaq 0x14844(%rip), %rsi     # 0x2ca94
leaq 0x14a0b(%rip), %rdx     # 0x2cc62
movb $0x0, %al
callq 0x4d20
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x10(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
callq 0x1a690
movq -0x18(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
callq 0x1a170
movq -0x20(%rbp), %rcx
movl $0x8, %esi
cltd
idivl %esi
cltq
addq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x10bbd(%rip), %rdi     # 0x28eb0
leaq 0x1479a(%rip), %rsi     # 0x2ca94
leaq 0x14970(%rip), %rdx     # 0x2cc71
movb $0x0, %al
callq 0x4d20
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq -0x8(%rbp), %rcx
movslq 0x4(%rcx), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
callq 0x1a690
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
callq 0x1a170
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
subq %rcx, %rax
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/encoder/encoder.c
// Function: x264_encoder_frame_put_from_picture(x264_t*, x264_frame_t**, x264_picture_t*)
static x264_frame_t *x264_encoder_frame_put_from_picture(x264_t *h, x264_frame_t *buffer[X264_BFRAME_MAX], x264_picture_t *picture) {LOG_CALL;
    int i;
    x264_frame_t *frame;

    /* get an unused bframe */
    frame = h->frame_unused[0];
    for (i = 0; i < X264_BFRAME_MAX; i++)
    {
        h->frame_unused[i] = h->frame_unused[i + 1];
    }
    h->frame_unused[X264_BFRAME_MAX] = NULL;

    /* copy the picture in it */
    x264_frame_copy_picture(frame, picture);

    /* put the frame in buffer */
    x264_encoder_frame_put(buffer, frame);

    buffer[i] = frame;
    return frame;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq 0xf565(%rip), %rdi      # 0x28eb0
leaq 0x13142(%rip), %rsi     # 0x2ca94
leaq 0x13325(%rip), %rdx     # 0x2cc7e
movb $0x0, %al
callq 0x4d20
movq -0x8(%rbp), %rax
movq 0x10ef58(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x10, -0x1c(%rbp)
jge 0x199ac
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq 0x10ef58(%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, 0x10ef58(%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x19976
movq -0x8(%rbp), %rax
movq $0x0, 0x10efd8(%rax)
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x5490
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x19a70
movq -0x28(%rbp), %rdx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop