LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./utilities.hpp
// Function: ymn::chk_expr(char const*, bool, std::ostream&)
inline bool chk_expr(const char* expr, bool status, std::ostream& ostream)
{
    if (!status)
        if (ostream)
            ostream << "error: " << expr << " failed" << std::endl;

    return status;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
testl %esi, %esi
jne 0x6155
movq (%rdx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rdx,%rax)
jne 0x6155
movq %rdi, %r14
leaq 0xecd6(%rip), %rsi      # 0x14e01
movq %rdx, %rdi
callq 0x2120
movq %rax, %rdi
movq %r14, %rsi
callq 0x2120
leaq 0xecc4(%rip), %rsi      # 0x14e09
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x20b0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./istream.hpp
// Function: ymn::istream<0>::read_exp_golomb_u(unsigned int&)
bool read_exp_golomb_u(uint32_t& value)
    {
        bool status;
        uint32_t leading_zero_bits;
        uint32_t v;

        leading_zero_bits = 0;
        while ((status = read_bits(1, v)) && (0 == v))
            leading_zero_bits++;

        if (!status) {
            m_position -= leading_zero_bits;
            return false;
        }

        if (leading_zero_bits) {
            status = read_bits(leading_zero_bits, v);
            if (!status) {
                m_position -= leading_zero_bits + 1;
                return false;
            }
            v += (1U << leading_zero_bits) - 1;
        } else
            v = 0;

        value = v;
        return true;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
pushq $0x1
popq %rbp
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x5fee
decl %r12d
testb %al, %al
je 0x6198
cmpl $0x0, 0xc(%rsp)
je 0x617d
movl %r12d, %ebp
notl %ebp
testb %al, %al
je 0x61c9
cmpl $-0x1, %r12d
je 0x61cd
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x5fee
testb %al, %al
je 0x61d5
pushq $-0x1
popq %rax
movl %ebp, %ecx
shll %cl, %eax
notl %eax
addl 0xc(%rsp), %eax
jmp 0x61cf
movl %ebp, %esi
jmp 0x61db
xorl %eax, %eax
movl %eax, (%rbx)
movb $0x1, %al
jmp 0x61e9
negl %r12d
movl %r12d, %esi
addq $0x10, %r14
movq %r14, %rdi
callq 0x6900
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./utilities.hpp
// Function: bool ymn::chk_range<unsigned int>(char const*, unsigned int, unsigned int, unsigned int, std::ostream&)
inline bool chk_range(const char* item_name, T item_value, T min, T max, std::ostream& ostream)
{
    if ((item_value >= min) && (item_value <= max))
        return true;

    if (ostream) {
        ostream << "error: value of '" << item_name << "' " << HEXDEC(item_value);
        ostream << " shall be in range [" << HEXDEC(min) << ", " << HEXDEC(max) << "]";
        ostream << std::endl;
    }

    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl %edx, %esi
setae %al
cmpl %ecx, %esi
setbe %bpl
andb %al, %bpl
jne 0x63e2
movq %r8, %rbx
movq (%r8), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r8,%rax)
jne 0x63e2
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r13
leaq 0xec90(%rip), %rsi      # 0x14ece
movq %rbx, %rdi
callq 0x2120
movq %rax, %rdi
movq %r13, %rsi
callq 0x2120
leaq 0xec88(%rip), %rsi      # 0x14ee0
movq %rax, %rdi
callq 0x2120
leaq 0xddbd(%rip), %rsi      # 0x14024
movq %rax, %rdi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movl %r12d, %r13d
movq %rax, %rdi
movq %r13, %rsi
callq 0x20e0
leaq 0xdd8e(%rip), %rsi      # 0x14027
movq %rax, %rdi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movq %r13, %rsi
callq 0x20e0
leaq 0xe82e(%rip), %rsi      # 0x14af6
movq %rax, %rdi
callq 0x2120
leaq 0xec0c(%rip), %rsi      # 0x14ee3
movq %rbx, %rdi
callq 0x2120
movq %rax, %rdi
leaq 0xdd3b(%rip), %r12      # 0x14024
movq %r12, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movl %r15d, %r15d
movq %rax, %rdi
movq %r15, %rsi
callq 0x20e0
movq %rax, %rdi
leaq 0xdd09(%rip), %r13      # 0x14027
movq %r13, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movq %r15, %rsi
callq 0x20e0
movq %rax, %rdi
leaq 0xe7a6(%rip), %r15      # 0x14af6
movq %r15, %rsi
callq 0x2120
leaq 0xeb99(%rip), %rsi      # 0x14ef8
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
movq %r12, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movl %r14d, %r14d
movq %rax, %rdi
movq %r14, %rsi
callq 0x20e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
movq %r14, %rsi
callq 0x20e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x2120
leaq 0xeafa(%rip), %rsi      # 0x14ecc
movq %rax, %rdi
callq 0x2120
movq %rbx, %rdi
callq 0x20b0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./scaling_matrices.hpp
// Function: ymn::h264::scaling_matrices::set_defaults()
void set_defaults()
    {
        for (std::size_t i = 0; i < TABLE_ELEMENTS(scaling_matrices_4x4); ++i)
            scaling_matrices_4x4[i].set_defaults();

        for (std::size_t i = 0; i < TABLE_ELEMENTS(scaling_matrices_8x8); ++i)
            scaling_matrices_8x8[i].set_defaults();

        set_valid(true);
    }

// Assembly:
pushq $0x20
popq %rax
movaps 0xe252(%rip), %xmm0     # 0x14650
cmpq $0xe0, %rax
je 0x6415
movups %xmm0, (%rdi,%rax)
movb $0x1, -0x8(%rdi,%rax)
addq $0x20, %rax
jmp 0x63fe
leaq 0xe0(%rdi), %rax
xorl %ecx, %ecx
cmpq $0x1e0, %rcx            # imm = 0x1E0
je 0x6445
movups %xmm0, 0x30(%rax,%rcx)
movups %xmm0, 0x20(%rax,%rcx)
movups %xmm0, 0x10(%rax,%rcx)
movups %xmm0, (%rax,%rcx)
movb $0x1, -0x8(%rax,%rcx)
addq $0x50, %rcx
jmp 0x641e
movb $0x1, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./istream.hpp
// Function: ymn::istream<0>::read_exp_golomb_s(int&)
bool read_exp_golomb_s(int32_t& value)
    {
        bool status;
        uint32_t leading_zero_bits;
        uint32_t v;

        leading_zero_bits = 0;
        while ((status = read_bits(1, v)) && (0 == v))
            leading_zero_bits++;

        if (!status) {
            m_position -= leading_zero_bits;
            return false;
        }

        if (leading_zero_bits) {
            status = read_bits(leading_zero_bits, v);
            if (!status) {
                m_position -= leading_zero_bits + 1;
                return false;
            }

            v += (1U << leading_zero_bits) - 1;
            if (v & 0x01)
                v = (v + 1) / 2;
            else
                v = -(v / 2);
        } else
            v = 0;

        value = v;
        return true;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
pushq $0x1
popq %rbp
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x5fee
decl %r12d
testb %al, %al
je 0x6482
cmpl $0x0, 0xc(%rsp)
je 0x6467
movl %r12d, %ebp
notl %ebp
testb %al, %al
je 0x64c2
cmpl $-0x1, %r12d
je 0x64c6
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq 0x5fee
testb %al, %al
je 0x64ca
pushq $-0x1
popq %rdx
movl %ebp, %ecx
shll %cl, %edx
movl %edx, %ecx
notl %ecx
movl 0xc(%rsp), %eax
addl %eax, %ecx
testb $0x1, %cl
jne 0x64e0
shrl %ecx
negl %ecx
movl %ecx, %eax
jmp 0x64e4
movl %ebp, %esi
jmp 0x64d0
xorl %eax, %eax
jmp 0x64e4
negl %r12d
movl %r12d, %esi
addq $0x10, %r14
movq %r14, %rdi
callq 0x6900
xorl %eax, %eax
jmp 0x64e8
subl %edx, %eax
shrl %eax
movl %eax, (%rbx)
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./istream.hpp
// Function: bool ymn::istream<0>::read<unsigned char>(unsigned char&)
bool read(T& value)
    {
        if (m_position.m_bit_position) {
            m_status |= ISTREAM_STATUS_IMPROPER_ALLIGMENT;
            if (m_error_function)
                m_error_function(m_position, m_position + sizeof(T) * BITS_PER_BYTE);
            return false;
        }

        const void* p = readbytes(sizeof(T));
        if (p) {
            value = *(reinterpret_cast<const T*>(p));
            return true;
        }
        else {
            m_status |= ISTREAM_STATUS_EOS_REACHED;
            if (m_error_function)
                m_error_function(m_position, m_position + sizeof(T) * BITS_PER_BYTE);
            return false;
        }
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x10(%rdi), %rbx
cmpq $0x0, 0x18(%rdi)
je 0x6946
orb $0x2, 0x20(%r14)
jmp 0x696e
movq 0x10(%r14), %rax
leaq 0x1(%rax), %rcx
cmpq 0x8(%r14), %rcx
ja 0x6969
movq (%r14), %rdx
movq %rcx, 0x10(%r14)
testq %rdx, %rdx
je 0x6969
movb (%rdx,%rax), %al
movb %al, (%rsi)
movb $0x1, %al
jmp 0x69a0
orb $0x1, 0x20(%r14)
cmpq $0x0, 0x38(%r14)
je 0x699e
addq $0x28, %r14
pushq $0x8
popq %rsi
movq %rbx, %rdi
callq 0x68dd
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
movq %r14, %rdi
movq %rbx, %rsi
movq %rcx, %rdx
callq 0x68ca
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/h264_cabac_decoder.cpp
// Function: ymn::h264_cabac_decoder::decode_bypass()
int h264_cabac_decoder::decode_bypass()
{
    uint32_t bits = 0;

    m_codIOffset <<= 1;
    m_stream.read_bits(1, bits);
    m_codIOffset |= bits;

    if (m_codIOffset < m_codIRange)
        return 0;
    else {
        m_codIOffset -= m_codIRange;
        return 1;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
andl $0x0, (%r14)
shll 0x4c(%rdi)
pushq $0x1
popq %rbp
movl %ebp, %esi
movq %r14, %rdx
callq 0x5fee
movl 0x4c(%rbx), %ecx
orl (%r14), %ecx
movl 0x48(%rbx), %edx
movl %ecx, 0x4c(%rbx)
xorl %eax, %eax
subl %edx, %ecx
jb 0x6a4f
movl %ecx, 0x4c(%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/h264_cabac_decoder.cpp
// Function: ymn::h264_cabac_decoder::decode_terminate()
int h264_cabac_decoder::decode_terminate()
{
    m_codIRange -= 2;

    if (m_codIOffset < m_codIRange) {

        // renormalization process
        uint8_t shift = renormalization_shift_table[m_codIRange];
        m_codIRange <<= shift;
        m_codIOffset <<= shift;
        if (shift > 0) {
            uint32_t bits = 0;
            m_stream.read_bits(shift, bits);
            m_codIOffset |= bits;
        }

        return 0;
    }
    else
        return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl 0x48(%rdi), %eax
movl 0x4c(%rdi), %edx
addl $-0x2, %eax
movl %eax, 0x48(%rdi)
cmpl %eax, %edx
jae 0x6aae
movq %rdi, %rbx
movl %eax, %ecx
leaq 0x106f4(%rip), %rsi     # 0x17170
movzbl (%rcx,%rsi), %ecx
shll %cl, %eax
shll %cl, %edx
xorl %ebp, %ebp
movl %eax, 0x48(%rdi)
movl %edx, 0x4c(%rdi)
testl %ecx, %ecx
je 0x6ab1
leaq 0xc(%rsp), %r14
andl $0x0, (%r14)
movq %rbx, %rdi
movl %ecx, %esi
movq %r14, %rdx
callq 0x5fee
movl (%r14), %eax
orl %eax, 0x4c(%rbx)
jmp 0x6ab1
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/h264_cabac_decoder.cpp
// Function: ymn::h264_cabac_decoder::decode_decision(int)
int h264_cabac_decoder::decode_decision(int ctxIdx)
{
    context_variable& state = m_context_variables[ctxIdx];
    int codIRangeLPS = range_tab_lps[(m_codIRange & 0xC0) + state.pStateIdx];
    int binVal;

    m_codIRange -= codIRangeLPS;

    if (m_codIOffset >= m_codIRange) {
        binVal = 1 - state.valMPS;
        m_codIOffset -= m_codIRange;
        m_codIRange = codIRangeLPS;
        state.pStateIdx = trans_idx_lps[state.pStateIdx];
        if (0 == state.pStateIdx)
            state.valMPS ^= 1;
    }
    else {
        binVal = state.valMPS;
        state.pStateIdx = trans_idx_mps[state.pStateIdx];
    }

    // renormalization process
    uint8_t shift = renormalization_shift_table[m_codIRange];
    m_codIRange <<= shift;
    m_codIOffset <<= shift;
    if (shift > 0) {
        uint32_t bits = 0;
        m_stream.read_bits(shift, bits);
        m_codIOffset |= bits;
    }

    return binVal;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movslq %esi, %rcx
movl 0x48(%rdi), %edi
movl 0x4c(%rbx), %r9d
movl %edi, %eax
andl $0xc0, %eax
movslq 0x50(%rbx,%rcx,8), %rsi
addl %esi, %eax
leaq 0xe50a(%rip), %rdx      # 0x14ff0
movzbl (%rax,%rdx), %eax
subl %eax, %edi
movl %r9d, %edx
movl 0x54(%rbx,%rcx,8), %r8d
subl %edi, %edx
jae 0x6b11
leaq 0xe631(%rip), %rax      # 0x15130
movzbl (%rsi,%rax), %eax
movl %eax, 0x50(%rbx,%rcx,8)
movl %r9d, %edx
movl %edi, %eax
movl %r8d, %ebp
jmp 0x6b34
pushq $0x1
popq %rbp
subl %r8d, %ebp
leaq 0xe5d2(%rip), %rdi      # 0x150f0
movzbl (%rsi,%rdi), %edi
movl %edi, 0x50(%rbx,%rcx,8)
cmpl $0x1, %esi
ja 0x6b34
xorl $0x1, %r8d
movl %r8d, 0x54(%rbx,%rcx,8)
movl %eax, %ecx
leaq 0x10633(%rip), %rsi     # 0x17170
movzbl (%rcx,%rsi), %ecx
shll %cl, %eax
shll %cl, %edx
movl %eax, 0x48(%rbx)
movl %edx, 0x4c(%rbx)
testl %ecx, %ecx
je 0x6b6b
leaq 0xc(%rsp), %r14
andl $0x0, (%r14)
movq %rbx, %rdi
movl %ecx, %esi
movq %r14, %rdx
callq 0x5fee
movl (%r14), %eax
orl %eax, 0x4c(%rbx)
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/h264_cabac_decoder.cpp
// Function: ymn::h264_cabac_decoder::init_context_variables(ymn::h264::slice_header const&, int)
void h264_cabac_decoder::init_context_variables(const h264::slice_header& slice_header, int32_t slice_qp)
{
    const int8_t (*table)[2];
    h264::slice_type_e slice_type = h264::to_slice_type_e(slice_header.slice_type);

    if ((slice_type == h264::slice_type_e::I) || (slice_type == h264::slice_type_e::SI))
        table = init_tab_context_variables_I;
    else
        table = init_tab_context_variables_PB[slice_header.cabac_init_idc];

    for (size_t ctxIdx = 0; ctxIdx < m_context_variables.size(); ++ctxIdx) {
        int preCtxState = (((table[ctxIdx][0]/*m*/ * slice_qp) >> 4) + table[ctxIdx][1]/*n*/);
        preCtxState = std::clamp(preCtxState, 1, 126);

        if (preCtxState <= 63) {
            m_context_variables[ctxIdx].pStateIdx = 63 - preCtxState; // 0 ... 62
            m_context_variables[ctxIdx].valMPS = 0;
        }
        else {
            m_context_variables[ctxIdx].pStateIdx = preCtxState - 64; // 0 ... 62
            m_context_variables[ctxIdx].valMPS = 1;
        }
    }
}

// Assembly:
movl %edx, %ecx
movl 0x18(%rsi), %eax
movl $0x5, %r8d
xorl %edx, %edx
divl %r8d
leaq 0xe5e3(%rip), %rax      # 0x15170
cmpl $0x2, %edx
je 0x6bab
cmpl $0x4, %edx
je 0x6bab
movl 0x958(%rsi), %edx
shlq $0xb, %rdx
leaq 0xedc8(%rip), %rax      # 0x15970
addq %rdx, %rax
pushq %rbp
pushq %rbx
xorl %edx, %edx
movl $0x7e, %esi
movl $0x1, %r8d
movl $0x3f, %r9d
cmpq $0x400, %rdx            # imm = 0x400
je 0x6c19
movsbl (%rax,%rdx,2), %r10d
imull %ecx, %r10d
sarl $0x4, %r10d
movsbl 0x1(%rax,%rdx,2), %r11d
addl %r10d, %r11d
cmpl $0x7e, %r11d
movl %esi, %r10d
cmovll %r11d, %r10d
cmpl $0x2, %r10d
jge 0x6bf3
movl %r8d, %r10d
movl %r9d, %ebx
subl %r10d, %ebx
addl $-0x40, %r10d
xorl %ebp, %ebp
cmpl $0x40, %r11d
cmovll %ebx, %r10d
setge %bpl
movl %r10d, 0x50(%rdi,%rdx,8)
movl %ebp, 0x54(%rdi,%rdx,8)
incq %rdx
jmp 0x6bc0
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/h264_cabac_decoder.cpp
// Function: ymn::h264_cabac_decoder::init_decoding_engine(ymn::h264::slice_data const&)
void h264_cabac_decoder::init_decoding_engine(const h264::slice_data& slice_data)
{
    if (slice_data.bit_pos > 0)
    {
        /* realign and init stream */
        m_stream = istream(slice_data.data + 1, slice_data.size - 1);
    }
    else
    {
        /* init stream (it's already aligned) */
        m_stream = istream(slice_data.data, slice_data.size);
    }

    m_codIRange = 0x1FE; // 510
    m_stream.read_bits(9, m_codIOffset);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x20(%rsi)
je 0x6c3d
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rdx
incq %rax
decq %rdx
jmp 0x6c45
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rdx
xorps %xmm0, %xmm0
movq %rsp, %rcx
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, (%rcx)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x679e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6cb6
movq 0x38(%r14), %rax
testq %rax, %rax
je 0x6c83
leaq 0x48(%rsp), %rdi
pushq $0x3
popq %rdx
movq %rdi, %rsi
callq *%rax
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x6c98
movq %rsp, %rdi
pushq $0x3
popq %rdx
movq %rdi, %rsi
callq *%rax
movl $0x1fe, 0x48(%rbx)      # imm = 0x1FE
leaq 0x4c(%rbx), %rdx
pushq $0x9
popq %rsi
movq %rbx, %rdi
callq 0x5fee
addq $0x68, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./istream.hpp
// Function: ymn::istream<0>::operator=(ymn::istream<0> const&)
istream& operator = (const istream& other)
    {
        m_buffer         = other.m_buffer;
        m_size           = other.m_size;
        m_position       = other.m_position;
        m_status         = other.m_status;
        m_error_function = other.m_error_function;

        return *this;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, (%rdi)
movups 0x8(%rsi), %xmm0
movups %xmm0, 0x8(%rdi)
movq 0x18(%rsi), %rax
movq %rax, 0x18(%rdi)
movl 0x20(%rsi), %eax
movl %eax, 0x20(%rdi)
addq $0x28, %rsi
addq $0x28, %rdi
callq 0x6ce8
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/h264_decoder.cpp
// Function: ymn::h264_decoder::feed(unsigned char const*, unsigned long)
void h264_decoder::feed(const uint8_t* data, std::size_t count)
{
    size_t n_written;

    do {
        n_written = m_parser.write(data, count);
        if (0 == n_written) {
            m_parser.reset();
            continue;
        }

        if (n_written > count) {
            std::cerr << "error: parser swallowed more data then requested (this is really bad)" << std::endl;
            m_parser.reset();
            continue;
        }

        parse();

        data += n_written;
        count -= n_written;
    } while (count > 0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x80(%rdi), %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x30da
testq %rax, %rax
je 0x6dd0
movq %rax, %rbp
movq %r12, %r13
subq %rax, %r13
jae 0x6df9
movq 0x17234(%rip), %rdi     # 0x1dff0
leaq 0xd73d(%rip), %rsi      # 0x14500
callq 0x2120
movq %rax, %rdi
callq 0x20b0
movq 0x40(%r14), %rax
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
movq %rax, 0x98(%r14)
orq $-0x1, 0xa0(%r14)
andq $0x0, 0x100(%r14)
jmp 0x6e07
movq %r14, %rdi
callq 0x6e1c
addq %rbp, %rbx
movq %r13, %r12
testq %r12, %r12
jne 0x6d97
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/h264_decoder.cpp
// Function: ymn::h264_decoder::init_chroma_qp_tables()
void h264_decoder::init_chroma_qp_tables()
{
    const int depth = m_active_sps->bit_depth_luma_minus8;
    const int max_qp = 51 + 6 * depth;
    int offset;

#define QP(qp, depth) ((qp) + 6 * (depth))
#define CHROMA_QP_TABLE_END(d)                                        \
    QP(0,  d), QP(1,  d), QP(2,  d), QP(3,  d), QP(4,  d), QP(5,  d), \
    QP(6,  d), QP(7,  d), QP(8,  d), QP(9,  d), QP(10, d), QP(11, d), \
    QP(12, d), QP(13, d), QP(14, d), QP(15, d), QP(16, d), QP(17, d), \
    QP(18, d), QP(19, d), QP(20, d), QP(21, d), QP(22, d), QP(23, d), \
    QP(24, d), QP(25, d), QP(26, d), QP(27, d), QP(28, d), QP(29, d), \
    QP(29, d), QP(30, d), QP(31, d), QP(32, d), QP(32, d), QP(33, d), \
    QP(34, d), QP(34, d), QP(35, d), QP(35, d), QP(36, d), QP(36, d), \
    QP(37, d), QP(37, d), QP(37, d), QP(38, d), QP(38, d), QP(38, d), \
    QP(39, d), QP(39, d), QP(39, d), QP(39, d)

    /* One chroma qp table for each supported bit depth (8, 9, 10). */
    static const uint8_t chroma_qp[3][H264_QP_MAX + 1] =
    {
        {CHROMA_QP_TABLE_END(0)},
        {0, 1, 2, 3, 4, 5, CHROMA_QP_TABLE_END(1)},
        {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, CHROMA_QP_TABLE_END(2)}
    };

    offset = m_active_pps->chroma_qp_index_offset;
    for (int q = 0; q < max_qp + 1; ++q)
        m_chroma_qp_table[0][q] = chroma_qp[depth][std::clamp(q + offset, 0, max_qp)];

    offset = m_active_pps->second_chroma_qp_index_offset;
    for (int q = 0; q < max_qp + 1; ++q)
        m_chroma_qp_table[1][q] = chroma_qp[depth][std::clamp(q + offset, 0, max_qp)];

#undef CHROMA_QP_TABLE_END
#undef QP
}

// Assembly:
movq 0x88358(%rdi), %rax
movq 0x88360(%rdi), %rdx
movslq 0x18(%rax), %r10
imulq $0x6, %r10, %rax
addq $0x33, %rax
movl 0x440(%rdx), %esi
movslq %esi, %r8
xorl %r9d, %r9d
shlq $0x6, %r10
leaq 0x1037f(%rip), %rcx     # 0x173f0
addq %r10, %rcx
cmpq %rax, %r9
jg 0x70a8
leal (%rsi,%r9), %r10d
cmpl %r10d, %eax
cmovll %eax, %r10d
movq %r8, %r11
addq %r9, %r11
movslq %r10d, %r10
movl $0x0, %r11d
cmovnsq %r10, %r11
movb (%r11,%rcx), %r10b
movb %r10b, 0xa63d0(%rdi,%r9)
incq %r9
jmp 0x7074
movl 0x708(%rdx), %edx
movslq %edx, %rsi
xorl %r8d, %r8d
cmpq %rax, %r8
jg 0x70e8
leal (%rdx,%r8), %r9d
cmpl %r9d, %eax
cmovll %eax, %r9d
movq %rsi, %r10
addq %r8, %r10
movslq %r9d, %r9
movl $0x0, %r10d
cmovnsq %r9, %r10
movb (%r10,%rcx), %r9b
movb %r9b, 0xa6410(%rdi,%r8)
incq %r8
jmp 0x70b4
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/h264_decoder.cpp
// Function: ymn::h264_decoder::init_dequant4x4_coeff_table()
void h264_decoder::init_dequant4x4_coeff_table()
{
    int i, j;
    const int depth = m_active_sps->bit_depth_luma_minus8;
    const int max_qp = 51 + 6 * depth;

    static const uint8_t v[6][3] =
    {
        {10, 13, 16},
        {11, 14, 18},
        {13, 16, 20},
        {14, 18, 23},
        {16, 20, 25},
        {18, 23, 29},
    };

    for (i = 0; i < SL_4x4_NUM; ++i) {
        m_dequant4x4_coeff[i] = &m_dequant4x4_buffer[i];
        for (j = 0; j < i; ++j) {
            if (0 == std::memcmp(m_active_pps->sm.scaling_matrices_4x4[j].scaling_list,
                                 m_active_pps->sm.scaling_matrices_4x4[i].scaling_list, 16)) {
                m_dequant4x4_coeff[i] = &m_dequant4x4_buffer[j];
                break;
            }
        }
        if (j < i)
            continue;

        for (int q = 0; q < max_qp + 1; ++q) {
            int shift = q / 6;
            int idx   = q % 6;
            for (int x = 0; x < 16; ++x) {
                uint8_t idx2 = (x & 1) + ((x >> 2) & 1);
                uint8_t level_scale_4x4 =
                    m_active_pps->sm.scaling_matrices_4x4[i].scaling_list[x] * v[idx][idx2];
                (*m_dequant4x4_coeff[i])[q][x] = level_scale_4x4 << shift;
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x88358(%rdi), %rax
imull $0x6, 0x18(%rax), %r8d
leaq 0x88370(%rdi), %r9
addl $0x34, %r8d
xorl %r10d, %r10d
testl %r8d, %r8d
cmovlel %r10d, %r8d
movq %rdi, -0x18(%rsp)
leaq 0x87370(%rdi), %rax
movq %rax, -0x10(%rsp)
movq $-0x1000, %rbx          # imm = 0xF000
movl $0x478, %edi            # imm = 0x478
movl $0x6, %ebp
leaq 0x10372(%rip), %r15     # 0x174b0
movq %r9, -0x8(%rsp)
cmpq $0x6, %r10
je 0x7231
movq %r10, %rax
shlq $0xc, %rax
addq -0x8(%rsp), %rax
movq -0x18(%rsp), %rcx
movq %rax, 0xa6370(%rcx,%r10,8)
movq 0x88360(%rcx), %r13
movq %r10, %rax
shlq $0x5, %rax
addq %r13, %rax
addq $0x478, %rax            # imm = 0x478
leaq 0x478(%r13), %rcx
xorl %edx, %edx
addq $-0x1000, %rdx          # imm = 0xF000
cmpq %rdx, %rbx
je 0x71dd
movdqu (%rax), %xmm0
movdqu (%rcx), %xmm1
addq $0x20, %rcx
pcmpeqb %xmm0, %xmm1
pmovmskb %xmm1, %esi
cmpl $0xffff, %esi           # imm = 0xFFFF
jne 0x7186
movq -0x10(%rsp), %rax
subq %rdx, %rax
movq -0x18(%rsp), %rcx
movq %rax, 0xa6370(%rcx,%r10,8)
incq %r10
addq $-0x1000, %rbx          # imm = 0xF000
addq $0x1000, %r9            # imm = 0x1000
addq $0x20, %rdi
jmp 0x7143
addq %rdi, %r13
movq %r9, %r12
xorl %esi, %esi
cmpq %r8, %rsi
je 0x71c3
movl %esi, %eax
xorl %edx, %edx
divl %ebp
movl %eax, %ecx
xorl %r11d, %r11d
cmpq $0x10, %r11
je 0x7228
movl %r11d, %eax
andl $0x1, %eax
btl $0x2, %r11d
adcq $0x0, %rax
leaq (%rdx,%rdx,2), %r14
addq %r15, %r14
movb (%rax,%r14), %al
mulb (%r13,%r11)
movzbl %al, %eax
shll %cl, %eax
movl %eax, (%r12,%r11,4)
incq %r11
jmp 0x71f5
incq %rsi
addq $0x40, %r12
jmp 0x71e5
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/h264_decoder.cpp
// Function: ymn::h264_decoder::init_dequantisation_tables()
void h264_decoder::init_dequantisation_tables()
{
    init_dequant4x4_coeff_table();
    if (m_active_pps->transform_8x8_mode_flag)
        init_dequant8x8_coeff_table();

    if (m_active_sps->qpprime_y_zero_transform_bypass_flag) {
        for (int i = 0; i < SL_4x4_NUM; ++i)
            for (int x = 0; x < 16; ++x)
                (*m_dequant4x4_coeff[i])[0][x] = 1 << 6;

        if (m_active_pps->transform_8x8_mode_flag)
            for (int i = 0; i < SL_8x8_NUM; ++i)
                for (int x = 0; x < 64; ++x)
                    (*m_dequant8x8_coeff[i])[0][x] = 1 << 6;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x70ea
movq 0x88360(%rbx), %rax
cmpl $0x0, 0x450(%rax)
je 0x73f1
movq %rbx, %rdi
callq 0x723c
movq 0x88358(%rbx), %rax
cmpl $0x0, 0x20(%rax)
je 0x7460
xorl %eax, %eax
cmpq $0x6, %rax
je 0x7427
movq 0xa6370(%rbx,%rax,8), %rcx
xorl %edx, %edx
cmpq $0x10, %rdx
je 0x7422
movl $0x40, (%rcx,%rdx,4)
incq %rdx
jmp 0x7410
incq %rax
jmp 0x7400
movq 0x88360(%rbx), %rax
cmpl $0x0, 0x450(%rax)
je 0x7460
xorl %eax, %eax
cmpq $0x6, %rax
je 0x7460
movq 0xa63a0(%rbx,%rax,8), %rcx
xorl %edx, %edx
cmpq $0x40, %rdx
je 0x745b
movl $0x40, (%rcx,%rdx,4)
incq %rdx
jmp 0x7449
incq %rax
jmp 0x7439
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./aud.hpp
// Function: ymn::h264::aud::to_string[abi:cxx11]() const
inline std::string aud::to_string() const
{
    std::ostringstream stream;

    stream << "aud (access unit delimiter):" << std::endl;
    stream << P1_INFO(primary_pic_type, primary_pic_type_to_string(primary_pic_type));

    return stream.str();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x21e0
leaq 0x100dc(%rip), %rsi     # 0x176d0
movq %r15, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x20b0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x18(%rsp,%rax)
leaq 0x11710(%rip), %rsi     # 0x18d2b
movq %r15, %rdi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x2e, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl $0xffffff4f, %edx       # imm = 0xFFFFFF4F
andl 0x18(%rax,%rcx), %edx
orl $0x20, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0xd0ab(%rip), %rsi      # 0x146f9
movq %rax, %rdi
callq 0x2120
leaq 0xca4a(%rip), %r15      # 0x140a7
movq %rax, %rdi
movq %r15, %rsi
callq 0x2120
leaq 0xc9b5(%rip), %rsi      # 0x14024
movq %rax, %rdi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0xc(%r14), %esi
movq %rax, %rdi
callq 0x20e0
leaq 0xc988(%rip), %rsi      # 0x14027
movq %rax, %rdi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0xc(%r14), %esi
movq %rax, %rdi
callq 0x20e0
leaq 0xd427(%rip), %rsi      # 0x14af6
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
movq %r15, %rsi
callq 0x2120
movl 0xc(%r14), %ecx
cmpq $0x7, %rcx
ja 0x76fc
leaq 0xfe01(%rip), %rdx      # 0x174f4
movslq (%rdx,%rcx,4), %rsi
addq %rdx, %rsi
jmp 0x7703
leaq 0x11059(%rip), %rsi     # 0x1875c
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x20b0
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x2230
leaq 0x8(%rsp), %rdi
callq 0x2080
movq %rbx, %rax
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./dec_ref_pic_marking.hpp
// Function: ymn::h264::dec_ref_pic_marking_idr::to_string[abi:cxx11]() const
inline std::string dec_ref_pic_marking_idr::to_string() const
{
    std::ostringstream stream;

    stream << "  decoded reference picture marking (idr):" << std::endl;
    stream << P2(no_output_of_prior_pics_flag);
    stream << P2(long_term_reference_flag);

    return stream.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %r15
movq %rdi, 0x8(%rsp)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x21e0
leaq 0x9a61(%rip), %rsi      # 0x18414
movq %r14, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x20b0
movq (%r14), %rax
movq -0x18(%rax), %rax
pushq $0x4
popq %rcx
movq %rcx, 0x20(%rsp,%rax)
leaq 0xa352(%rip), %rsi      # 0x18d2b
movq %r14, %rdi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
pushq $0x2c
popq %rsi
movq %rsi, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl $0xffffff4f, %r13d      # imm = 0xFFFFFF4F
movl 0x18(%rax,%rcx), %edx
andl %r13d, %edx
orl $0x20, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x9a30(%rip), %rsi      # 0x1843f
movq %rax, %rdi
callq 0x2120
leaq 0x5689(%rip), %rsi      # 0x140a7
movq %rax, %rdi
callq 0x2120
leaq 0x55f7(%rip), %rbp      # 0x14024
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0xc(%r15), %esi
movq %rax, %rdi
callq 0x20e0
leaq 0x55c7(%rip), %r12      # 0x14027
movq %rax, %rdi
movq %r12, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0xc(%r15), %esi
movq %rax, %rdi
callq 0x20e0
leaq 0x6063(%rip), %rbx      # 0x14af6
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2120
movq %rax, %rdi
callq 0x20b0
movq (%r14), %rax
movq -0x18(%rax), %rax
pushq $0x4
popq %rcx
movq %rcx, 0x20(%rsp,%rax)
movq %r14, %rdi
leaq 0xa26c(%rip), %rsi      # 0x18d2b
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
pushq $0x2c
popq %rsi
movq %rsi, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
andl 0x18(%rax,%rcx), %r13d
orl $0x20, %r13d
movl %r13d, 0x18(%rax,%rcx)
leaq 0x9970(%rip), %rsi      # 0x1845c
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
leaq 0x55a9(%rip), %rsi      # 0x140a7
callq 0x2120
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0x10(%r15), %esi
movq %rax, %rdi
callq 0x20e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0x10(%r15), %esi
movq %rax, %rdi
callq 0x20e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2120
movq %rax, %rdi
callq 0x20b0
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2230
movq %r14, %rdi
callq 0x2080
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./slice_data.hpp
// Function: ymn::h264::slice_data::to_string[abi:cxx11]() const
inline std::string slice_data::to_string() const
{
    std::ostringstream stream;

    stream << "slice_data:" << std::endl;

    stream << P1(size);
    stream << P1(bit_pos);

    return stream.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %r15
movq %rdi, 0x8(%rsp)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x21e0
leaq 0x7e59(%rip), %rsi      # 0x18708
movq %r14, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x20b0
movq (%r14), %rax
movq -0x18(%rax), %rax
pushq $0x2
popq %rcx
movq %rcx, 0x20(%rsp,%rax)
leaq 0x8456(%rip), %rsi      # 0x18d2b
movq %r14, %rdi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
pushq $0x2e
popq %rsi
movq %rsi, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl $0xffffff4f, %r13d      # imm = 0xFFFFFF4F
movl 0x18(%rax,%rcx), %edx
andl %r13d, %edx
orl $0x20, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x784a(%rip), %rsi      # 0x18155
movq %rax, %rdi
callq 0x2120
leaq 0x378d(%rip), %rsi      # 0x140a7
movq %rax, %rdi
callq 0x2120
leaq 0x36fb(%rip), %rbp      # 0x14024
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq 0x18(%r15), %rsi
movq %rax, %rdi
callq 0x20e0
leaq 0x36cb(%rip), %r12      # 0x14027
movq %rax, %rdi
movq %r12, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movq 0x18(%r15), %rsi
movq %rax, %rdi
callq 0x20e0
leaq 0x4167(%rip), %rbx      # 0x14af6
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2120
movq %rax, %rdi
callq 0x20b0
movq (%r14), %rax
movq -0x18(%rax), %rax
pushq $0x2
popq %rcx
movq %rcx, 0x20(%rsp,%rax)
movq %r14, %rdi
leaq 0x8370(%rip), %rsi      # 0x18d2b
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
pushq $0x2e
popq %rsi
movq %rsi, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
andl 0x18(%rax,%rcx), %r13d
orl $0x20, %r13d
movl %r13d, 0x18(%rax,%rcx)
leaq 0x7d2c(%rip), %rsi      # 0x18714
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
leaq 0x36ad(%rip), %rsi      # 0x140a7
callq 0x2120
movq %rax, %rdi
movq %rbp, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movq 0x20(%r15), %rsi
movq %rax, %rdi
callq 0x20e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movq 0x20(%r15), %rsi
movq %rax, %rdi
callq 0x20e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2120
movq %rax, %rdi
callq 0x20b0
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2230
movq %r14, %rdi
callq 0x2080
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./h264_parser.hpp
// Function: ymn::h264_parser::h264_parser(unsigned long, ymn::h264_parser_container_e)
explicit h264_parser(std::size_t capacity, h264_parser_container_e container) :
        base_parser<uint8_t>(capacity),
        m_parse_function(nullptr),
        m_aud(),
        m_sps_table(),
        m_recent_sps(-1),
        m_pps_table(),
        m_recent_pps(-1),
        m_sei(),
        m_slice_header(),
        m_slice_data()
    {
        switch (container) {
            case h264_parser_container_e::NONE:
                m_parse_function = &h264_parser::parse_nal_units;
                break;

            case h264_parser_container_e::ANNEX_B:
                m_parse_function = &h264_parser::parse_byte_stream_nal_units;
                break;

            default:
                /* do nothing */
                break;
        }

#if defined(DEBUG)
        std::cout << __PRETTY_FUNCTION__ << std::endl;
        std::cout << to_string() << std::endl;
#endif
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
callq 0x3030
leaq 0xd22e(%rip), %rax      # 0x1dce0
movq %rax, (%rbx)
movb $0x0, 0x120(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x108(%rbx)
leaq 0xd0db(%rip), %rax      # 0x1dba8
movq %rax, 0x118(%rbx)
movl $0x128, %r14d           # imm = 0x128
leaq (%rbx,%r14), %rdi
callq 0x11054
addq $0xb00, %r14            # imm = 0xB00
cmpq $0x16128, %r14          # imm = 0x16128
jne 0x10ada
orl $-0x1, 0x16128(%rbx)
leaq 0x16130(%rbx), %r14
xorl %r15d, %r15d
leaq (%r14,%r15), %rdi
callq 0x110b2
addq $0x718, %r15            # imm = 0x718
cmpq $0x71800, %r15          # imm = 0x71800
jne 0x10b04
orl $-0x1, 0x87930(%rbx)
xorl %r14d, %r14d
movb %r14b, 0x87940(%rbx)
leaq 0xd103(%rip), %rax      # 0x1dc38
movq %rax, 0x87938(%rbx)
leaq 0x87960(%rbx), %rdi
callq 0x110cc
movb %r14b, 0x882e8(%rbx)
leaq 0xd172(%rip), %rax      # 0x1dcc8
movq %rax, 0x882e0(%rbx)
testl %ebp, %ebp
je 0x10b6f
cmpl $0x1, %ebp
jne 0x10b85
leaq -0xacb1(%rip), %rax     # 0x5ebc
jmp 0x10b76
leaq -0xacbe(%rip), %rax     # 0x5eb8
movq %rax, 0x108(%rbx)
andq $0x0, 0x110(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./h264_dimensions.hpp
// Function: ymn::h264_dimensions::reset(ymn::h264::sps const&)
void reset(const h264::sps& sps)
    {
        mb_width  = (sps.pic_width_in_mbs_minus1 + 1);
        mb_height = (sps.pic_height_in_map_units_minus1 + 1) * (2 - sps.frame_mbs_only_flag);
        mb_num    = mb_width * mb_height;

        width = 16 * mb_width;
        height = 16 * mb_height;
    }

// Assembly:
movl 0x6f4(%rsi), %eax
incl %eax
movl %eax, (%rdi)
movl 0x6f8(%rsi), %ecx
incl %ecx
pushq $0x2
popq %rdx
subl 0x6fc(%rsi), %edx
imull %ecx, %edx
movl %edx, 0x4(%rdi)
movl %edx, %ecx
imull %eax, %ecx
movl %ecx, 0x8(%rdi)
shll $0x4, %eax
movl %eax, 0xc(%rdi)
shll $0x4, %edx
movl %edx, 0x10(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./scaling_matrices.hpp
// Function: ymn::h264::scaling_list_nxn<16ul>::to_string[abi:cxx11]() const
inline std::string scaling_list_4x4::to_string() const
{
    std::ostringstream stream;

    stream << P3(scaling_list_present_flag);

    if (scaling_list_present_flag) {
        int i = 0;
        while (i < 16) {
            if (!(i % 4)) stream << "        ";
            stream << "0x" << std::setfill('0') << std::setw(2) << std::hex << static_cast<int>(scaling_list[i]) << " ";
            ++i;
            if (!(i % 4)) stream << std::endl;
        }
    }

    return stream.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x21e0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0x6, 0x20(%rsp,%rax)
leaq 0x7b40(%rip), %rsi      # 0x18d2b
movq %rbx, %rdi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x2a, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl $0xffffff4f, %edx       # imm = 0xFFFFFF4F
andl 0x18(%rax,%rcx), %edx
orl $0x20, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x7aeb(%rip), %rsi      # 0x18d09
movq %rax, %rdi
callq 0x2120
leaq 0x2e7a(%rip), %rsi      # 0x140a7
movq %rax, %rdi
callq 0x2120
leaq 0x2de8(%rip), %rsi      # 0x14024
movq %rax, %rdi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0xc(%r14), %esi
movq %rax, %rdi
callq 0x20e0
leaq 0x2dbb(%rip), %rsi      # 0x14027
movq %rax, %rdi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0xc(%r14), %esi
movq %rax, %rdi
callq 0x20e0
leaq 0x385a(%rip), %rsi      # 0x14af6
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x20b0
cmpl $0x0, 0xc(%r14)
je 0x11350
xorl %r15d, %r15d
leaq 0x10(%rsp), %r12
leaq 0x2d5e(%rip), %r13      # 0x14024
pushq $0x30
popq %rbp
leaq 0x7a5a(%rip), %rbx      # 0x18d2a
cmpq $0x10, %r15
je 0x11350
testb $0x3, %r15b
jne 0x112eb
movq %r12, %rdi
leaq 0x7a3d(%rip), %rsi      # 0x18d23
callq 0x2120
movq %r12, %rdi
movq %r13, %rsi
callq 0x2120
movq %rax, %rdi
movl %ebp, %esi
callq 0x2220
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x2, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movzbl 0x10(%r14,%r15), %esi
movq %rax, %rdi
callq 0x2270
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2120
leal 0x1(%r15), %eax
testb $0x3, %al
jne 0x1134b
movq %r12, %rdi
callq 0x20b0
incq %r15
jmp 0x112d0
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2230
leaq 0x10(%rsp), %rdi
callq 0x2080
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/./scaling_matrices.hpp
// Function: ymn::h264::scaling_list_nxn<64ul>::to_string[abi:cxx11]() const
inline std::string scaling_list_8x8::to_string() const
{
    std::ostringstream stream;

    stream << P3(scaling_list_present_flag);

    if (scaling_list_present_flag) {
        int i = 0;
        while (i < 64) {
            if (!(i % 8)) stream << "        ";
            stream << "0x" << std::setfill('0') << std::setw(2) << std::hex << static_cast<int>(scaling_list[i]) << " ";
            ++i;
            if (!(i % 8)) stream << std::endl;
        }
    }

    return stream.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x21e0
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq $0x6, 0x20(%rsp,%rax)
leaq 0x796c(%rip), %rsi      # 0x18d2b
movq %rbx, %rdi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x2a, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl $0xffffff4f, %edx       # imm = 0xFFFFFF4F
andl 0x18(%rax,%rcx), %edx
orl $0x20, %edx
movl %edx, 0x18(%rax,%rcx)
leaq 0x7917(%rip), %rsi      # 0x18d09
movq %rax, %rdi
callq 0x2120
leaq 0x2ca6(%rip), %rsi      # 0x140a7
movq %rax, %rdi
callq 0x2120
leaq 0x2c14(%rip), %rsi      # 0x14024
movq %rax, %rdi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0xc(%r14), %esi
movq %rax, %rdi
callq 0x20e0
leaq 0x2be7(%rip), %rsi      # 0x14027
movq %rax, %rdi
callq 0x2120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0xc(%r14), %esi
movq %rax, %rdi
callq 0x20e0
leaq 0x3686(%rip), %rsi      # 0x14af6
movq %rax, %rdi
callq 0x2120
movq %rax, %rdi
callq 0x20b0
cmpl $0x0, 0xc(%r14)
je 0x11524
xorl %r15d, %r15d
leaq 0x10(%rsp), %r12
leaq 0x2b8a(%rip), %r13      # 0x14024
pushq $0x30
popq %rbp
leaq 0x7886(%rip), %rbx      # 0x18d2a
cmpq $0x40, %r15
je 0x11524
testb $0x7, %r15b
jne 0x114bf
movq %r12, %rdi
leaq 0x7869(%rip), %rsi      # 0x18d23
callq 0x2120
movq %r12, %rdi
movq %r13, %rsi
callq 0x2120
movq %rax, %rdi
movl %ebp, %esi
callq 0x2220
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x2, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movzbl 0x10(%r14,%r15), %esi
movq %rax, %rdi
callq 0x2270
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2120
leal 0x1(%r15), %eax
testb $0x7, %al
jne 0x1151f
movq %r12, %rdi
callq 0x20b0
incq %r15
jmp 0x114a4
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x2230
leaq 0x10(%rsp), %rdi
callq 0x2080
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/picture.cpp
// Function: ymn::h264::picture::picture(ymn::h264_decoder const&, ymn::h264::slice_header const&)
picture::picture(const h264_decoder& decoder, const h264::slice_header& sh) :
    m_decoder{decoder},
    m_picture_structure{},
    m_context_variables{},
    m_mbs{nullptr}
{
    init_coxtext_variables(sh);
    m_mbs = new h264::mb[m_decoder.m_dimensions.mb_num];
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
leaq 0xc7c7(%rip), %rax      # 0x1dd30
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
andl $0x0, 0x10(%rdi)
addq $0x18, %rdi
movl $0xda8, %edx            # imm = 0xDA8
xorl %esi, %esi
callq 0x20c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x115be
movq 0x8(%rbx), %rax
movslq 0x88348(%rax), %rax
movl $0xb0, %ecx
mulq %rcx
pushq $-0x1
popq %rdi
cmovnoq %rax, %rdi
callq 0x2030
movq %rax, 0xdb8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/lukasz-wiecaszek[P]h264iframedecoder/picture.cpp
// Function: ymn::h264::picture::advance_mb_pos()
mb* picture::advance_mb_pos()
{
    if (m_context_variables.mb_aff_frame) {
        if ((m_context_variables.mb_y & 1) == 0)
            m_context_variables.mb_y++; /* move to bottom macroblock of a macroblock pair */
        else {
            m_context_variables.mb_y--; /* move to top macroblock of a macroblock pair */
            m_context_variables.mb_x++; /* move to right macroblock pair */
            if (m_context_variables.mb_x >= m_decoder.m_dimensions.mb_width) {
                m_context_variables.mb_x = 0;
                m_context_variables.mb_y +=2;
            }
        }
    }
    else {
        m_context_variables.mb_x++; /* move to right macroblock */
        if (m_context_variables.mb_x >= m_decoder.m_dimensions.mb_width) {
            m_context_variables.mb_x = 0;
            m_context_variables.mb_y++;
            if (m_picture_structure != picture_structure_e::frame)
                m_context_variables.mb_y++;
        }
    }

    update_mb_pos();

    return m_context_variables.curr_mb;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x1, 0x18(%rdi)
jne 0x11746
movl 0x20(%rbx), %eax
testb $0x1, %al
jne 0x11772
orl $0x1, %eax
jmp 0x11792
movl 0x1c(%rbx), %eax
incl %eax
movl %eax, 0x1c(%rbx)
movq 0x8(%rbx), %rcx
cmpl 0x88340(%rcx), %eax
jl 0x11795
andl $0x0, 0x1c(%rbx)
movl 0x20(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x20(%rbx)
cmpl $0x0, 0x10(%rbx)
je 0x11795
addl $0x2, %eax
jmp 0x11792
leal -0x1(%rax), %ecx
movl %ecx, 0x20(%rbx)
movl 0x1c(%rbx), %ecx
incl %ecx
movl %ecx, 0x1c(%rbx)
movq 0x8(%rbx), %rdx
cmpl 0x88340(%rdx), %ecx
jl 0x11795
andl $0x0, 0x1c(%rbx)
incl %eax
movl %eax, 0x20(%rbx)
movq %rbx, %rdi
callq 0x116f4
movq 0x28(%rbx), %rax
popq %rbx
retq
nop