LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]skylark/src/main_test.c
// Function: main
int
main(int argc, char* argv[])
{
    long num_tests = sizeof(TESTS) / sizeof(*TESTS);

    long successful_tests = 0;
    long failed_tests = 0;

    for (long i = 0; i < num_tests; i++) {
        test_func test = TESTS[i];
        if (test()) {
            successful_tests++;
        } else {
            failed_tests++;
        }
    }

    printf("%ld successful %s, %ld failed %s\n",
        successful_tests,
        successful_tests == 1 ? "test" : "tests",
        failed_tests,
        failed_tests == 1 ? "test" : "tests");

    return failed_tests == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %r15d, %r15d
leaq 0x3785(%rip), %r12      # 0x4dc0
xorl %ebx, %ebx
xorl %r14d, %r14d
cmpq $0x30, %r15
je 0x165e
callq *(%r15,%r12)
movzbl %al, %ecx
xorb $0x1, %al
movzbl %al, %eax
addq %rax, %rbx
addq %rcx, %r14
addq $0x8, %r15
jmp 0x1640
cmpq $0x1, %r14
leaq 0xf21(%rip), %rax       # 0x258a
leaq 0xf1f(%rip), %r8        # 0x258f
movq %r8, %rdx
cmoveq %rax, %rdx
cmpq $0x1, %rbx
cmoveq %rax, %r8
leaq 0xee2(%rip), %rdi       # 0x2568
movq %r14, %rsi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x1030
xorl %eax, %eax
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/psi/psi.h
// Function: psi_table_section
static inline bool psi_table_section(uint8_t **pp_sections, uint8_t *p_section)
{
    uint8_t i_section = psi_get_section( p_section );
    uint8_t i_last_section = psi_get_lastsection( p_section );
    uint8_t i_version = psi_get_version( p_section );
    uint16_t i_tableidext = psi_get_tableidext( p_section );
    int i;

    free(pp_sections[i_section]);
    pp_sections[i_section] = p_section;

    for (i = 0; i <= i_last_section; i++) {
        uint8_t *p = pp_sections[i];
        if (p == NULL)
            return false;
        if (psi_get_lastsection(p) != i_last_section
             || psi_get_version(p) != i_version
             || psi_get_tableidext(p) != i_tableidext)
            return false;
    }

    /* free spurious, invalid sections */
    for (; i < PSI_TABLE_MAX_SECTIONS; i++) {
        free(pp_sections[i]);
        pp_sections[i] = NULL;
    }

    /* a new, full table is available */
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movzbl 0x6(%rsi), %r13d
movzbl 0x7(%rsi), %r15d
movb 0x5(%rsi), %bpl
movzwl 0x3(%rsi), %r12d
rolw $0x8, %r12w
movq (%rdi,%r13,8), %rdi
callq 0x2030
movq %r14, (%rbx,%r13,8)
leaq 0x1(%r15), %rax
xorl %r14d, %r14d
cmpq %r14, %rax
je 0x5b98
movq (%rbx,%r14,8), %rcx
testq %rcx, %rcx
je 0x5bb9
cmpb %r15b, 0x7(%rcx)
jne 0x5bb9
movb 0x5(%rcx), %dl
xorb %bpl, %dl
testb $0x3e, %dl
jne 0x5bb9
movzwl 0x3(%rcx), %ecx
rolw $0x8, %cx
cmpw %r12w, %cx
jne 0x5bb9
incq %r14
jmp 0x5b66
movq %r15, %r12
cmpq $0xff, %r12
je 0x5bb9
movq 0x8(%rbx,%r12,8), %rdi
callq 0x2030
andq $0x0, 0x8(%rbx,%r12,8)
incq %r12
jmp 0x5b9b
cmpq %r15, %r14
seta %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/psi/psi.h
// Function: psi_table_compare
static inline bool psi_table_compare(uint8_t **pp_sections1,
                                     uint8_t **pp_sections2)
{
    uint8_t i_last_section = psi_table_get_lastsection(pp_sections1);
    uint8_t i;

    if (i_last_section != psi_table_get_lastsection(pp_sections2))
        return false;

    for (i = 0; i <= i_last_section; i++) {
        const uint8_t *p_section1 = psi_table_get_section(pp_sections1, i);
        const uint8_t *p_section2 = psi_table_get_section(pp_sections2, i);
        if (!psi_compare(p_section1, p_section2))
            return false;
    }

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdi), %rax
movb 0x7(%rax), %r15b
movq (%rsi), %rax
cmpb 0x7(%rax), %r15b
jne 0x5c15
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
cmpb %r15b, %r12b
seta %bpl
ja 0x5c17
movzbl %r12b, %eax
shll $0x3, %eax
movq (%r14,%rax), %rdi
movq (%rbx,%rax), %rsi
callq 0x5e3d
incb %r12b
testb %al, %al
jne 0x5bef
jmp 0x5c17
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/dvb_print_si.c
// Function: handle_pmt_es
static void handle_pmt_es(uint8_t *p_pmt, bool b_select)
{
    pmt_each_es(p_pmt, p_es) {
        uint16_t i_pid = pmtn_get_pid(p_es);
        uint8_t i_type = pmtn_get_streamtype(p_es);

        switch (i_type) {
            case PMT_STREAMTYPE_PRIVATE_PSI:
                pmtn_each_desc(p_es, p_desc) {
                    uint8_t tag = desc_get_tag(p_desc);

                    switch (tag) {
                        case 0x6f:
                            if (b_select)
                                p_pids[i_pid].i_psi_refcount++;
                            else
                                p_pids[i_pid].i_psi_refcount--;
                            break;
                        default:
                            break;
                    }
                }
                break;
            case PMT_STREAMTYPE_SCTE_35:
                if (b_select)
                    p_pids[i_pid].i_psi_refcount++;
                else
                    p_pids[i_pid].i_psi_refcount--;
                break;
            default:
                break;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %esi, %esi
callq 0x5ef6
movq %rax, %r15
decl %ebx
orl $0x1, %ebx
leaq 0x1547c(%rip), %r13     # 0x1b150
testq %r15, %r15
je 0x5d66
movzbl 0x1(%r15), %ecx
andl $0x1f, %ecx
shll $0x8, %ecx
movzbl 0x2(%r15), %eax
orq %rcx, %rax
movzbl (%r15), %ecx
cmpl $0x86, %ecx
je 0x5d48
cmpl $0x5, %ecx
jne 0x5d53
leaq 0x3(%r15), %r12
leaq 0x5(%r15), %rcx
movzbl 0x3(%r15), %edx
movzbl 0x4(%r15), %esi
andl $0xf, %edx
shll $0x8, %edx
orl %esi, %edx
imulq $0x18, %rax, %rbp
addq %r13, %rbp
cmpl $0x2, %edx
movl $0x0, %eax
cmovaeq %rcx, %rax
testq %rax, %rax
je 0x5d53
cmpb $0x6f, (%rax)
jne 0x5d3b
addl %ebx, (%rbp)
movq %r12, %rdi
movq %rax, %rsi
callq 0x5f67
jmp 0x5d2e
movzwl %ax, %eax
imulq $0x18, %rax, %rax
addl %ebx, (%rax,%r13)
movq %r14, %rdi
movq %r15, %rsi
callq 0x5ef6
movq %rax, %r15
jmp 0x5cd4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/dvb_print_si.c
// Function: print_wrapper
static void print_wrapper(void *_unused, const char *psz_format, ...)
{
    char psz_fmt[strlen(psz_format) + 2];
    va_list args;
    va_start(args, psz_format);
    strcpy(psz_fmt, psz_format);
    strcat(psz_fmt, "\n");
    vprintf(psz_fmt, args);
    va_end(args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %rbx
leaq -0xf0(%rbp), %r12
movq %rdx, 0x10(%r12)
movq %rcx, 0x18(%r12)
movq %r8, 0x20(%r12)
movq %r9, 0x28(%r12)
testb %al, %al
je 0x5dd5
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %rsi, %rdi
callq 0x20a0
movq %rsp, %r14
addq $0x11, %rax
andq $-0x10, %rax
subq %rax, %r14
movq %r14, %rsp
leaq -0x40(%rbp), %r15
movq %r12, 0x10(%r15)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%r15)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r15)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2050
movq %r14, %rdi
callq 0x20a0
movw $0xa, (%rax,%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2170
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/psi/psi.h
// Function: psi_compare
static inline bool psi_compare(const uint8_t *p_section1,
                               const uint8_t *p_section2)
{
    return psi_get_version(p_section1) == psi_get_version(p_section2)
        && psi_get_length(p_section1) == psi_get_length(p_section2)
        && !memcmp(p_section1, p_section2,
                   psi_get_length(p_section1) + PSI_HEADER_SIZE);
}

// Assembly:
movb 0x5(%rsi), %al
xorb 0x5(%rdi), %al
testb $0x3e, %al
jne 0x5e81
movzbl 0x1(%rdi), %eax
andl $0xf, %eax
shll $0x8, %eax
movzbl 0x2(%rdi), %edx
orq %rax, %rdx
movzbl 0x1(%rsi), %eax
andl $0xf, %eax
shll $0x8, %eax
movzbl 0x2(%rsi), %ecx
orl %eax, %ecx
cmpw %cx, %dx
jne 0x5e81
pushq %rax
addq $0x3, %rdx
callq 0x2180
testl %eax, %eax
sete %al
addq $0x8, %rsp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/psi/descriptors.h
// Function: descl_validate
static inline bool descl_validate(const uint8_t *p_descl, uint16_t i_length)
{
    const uint8_t *p_desc = p_descl;

    while (p_desc + DESC_HEADER_SIZE - p_descl <= i_length)
        p_desc += DESC_HEADER_SIZE + desc_get_length(p_desc);

    return (p_desc - p_descl == i_length);
}

// Assembly:
movl %esi, %eax
movq %rdi, %rcx
movq %rcx, %rdx
subq %rdi, %rdx
leaq 0x2(%rdx), %rsi
cmpq %rax, %rsi
jg 0x5fc0
movzbl 0x1(%rcx), %edx
addq %rdx, %rcx
addq $0x2, %rcx
jmp 0x5fa4
cmpq %rax, %rdx
sete %al
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/psi/cat.h
// Function: cat_table_validate
static inline bool cat_table_validate(uint8_t **pp_sections)
{
    uint8_t i_last_section = psi_table_get_lastsection(pp_sections);
    uint8_t i;

    for (i = 0; i <= i_last_section; i++) {
        uint8_t *p_section = psi_table_get_section(pp_sections, i);

        if (!psi_check_crc(p_section))
            return false;
    }

    return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movb 0x7(%rax), %bpl
xorl %ecx, %ecx
movl %ecx, %r14d
cmpb %bpl, %cl
ja 0x5ff4
movzbl %r14b, %eax
movq (%rbx,%rax,8), %rdi
callq 0x5e84
leal 0x1(%r14), %ecx
testb %al, %al
jne 0x5fd7
cmpb %bpl, %r14b
seta %al
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/psi/cat_print.h
// Function: cat_table_print
static inline void cat_table_print(uint8_t **pp_sections, f_print pf_print,
                                   void *opaque, print_type_t i_print_type)
{
    uint8_t i_last_section = psi_table_get_lastsection(pp_sections);
    uint8_t i;
    const char *psz_table_name = "CAT";

    if (psi_get_tableid(psi_table_get_section(pp_sections, 0)) == TSDT_TABLE_ID)
        psz_table_name = "TSDT";

    switch (i_print_type) {
    case PRINT_XML:
        pf_print(opaque, "<%s version=\"%hhu\" current_next=\"%d\">",
                 psz_table_name,
                 psi_table_get_version(pp_sections),
                 !psi_table_get_current(pp_sections) ? 0 : 1);
        break;
    default:
        pf_print(opaque, "new %s version=%hhu%s",
                 psz_table_name,
                 psi_table_get_version(pp_sections),
                 !psi_table_get_current(pp_sections) ? " (next)" : "");
    }

    for (i = 0; i <= i_last_section; i++) {
        uint8_t *p_section = psi_table_get_section(pp_sections, i);

        descl_print(cat_get_descl(p_section), cat_get_desclength(p_section),
                    pf_print, opaque, NULL, NULL, i_print_type);
    }

    switch (i_print_type) {
    case PRINT_XML:
        pf_print(opaque, "</%s>", psz_table_name);
        break;
    default:
        pf_print(opaque, "end %s", psz_table_name);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movq (%rdi), %rax
movb 0x7(%rax), %r15b
cmpb $0x3, (%rax)
leaq 0x8df6(%rip), %rcx      # 0xee13
leaq 0x8deb(%rip), %rbx      # 0xee0f
cmoveq %rcx, %rbx
movzbl 0x5(%rax), %r8d
movl %r8d, %ecx
shrl %ecx
andl $0x1f, %ecx
andl $0x1, %r8d
cmpl $0x1, %esi
jne 0x6051
leaq 0x8dd3(%rip), %rsi      # 0xee18
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5d75
jmp 0x6077
testb %r8b, %r8b
leaq 0x8d23(%rip), %rax      # 0xed7e
leaq 0xfdc8(%rip), %r8       # 0x15e2a
cmoveq %rax, %r8
leaq 0x8dd1(%rip), %rsi      # 0xee3e
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5d75
xorl %r12d, %r12d
cmpb %r15b, %r12b
ja 0x60af
movzbl %r12b, %eax
movq (%r14,%rax,8), %rax
leaq 0x8(%rax), %rdi
movzbl 0x1(%rax), %ecx
andl $0xf, %ecx
shll $0x8, %ecx
movzbl 0x2(%rax), %eax
addl %ecx, %eax
addl $-0x9, %eax
movzwl %ax, %esi
xorl %edx, %edx
movl %ebp, %ecx
callq 0x60d6
incb %r12b
jmp 0x607a
cmpl $0x1, %ebp
leaq 0x8d9b(%rip), %rax      # 0xee54
leaq 0x8d9a(%rip), %rsi      # 0xee5a
cmoveq %rax, %rsi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5d75
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/psi/descriptors.h
// Function: desc_print_begin
static inline void desc_print_begin(const uint8_t *p_desc, f_print pf_print,
                                    void *opaque, print_type_t i_print_type)
{

    switch (i_print_type) {
    case PRINT_XML:
    {
        uint8_t i, i_length = desc_get_length(p_desc);
        char psz_value[2 * i_length + 1];

        for (i = 0; i < i_length; i++)
            sprintf(psz_value + 2 * i, "%2.2hhx", p_desc[2 + i]);
        psz_value[2 * i] = '\0';

        pf_print(opaque, "<DESC id=\"0x%02x\" length=\"%u\" value=\"%s\">",
                 desc_get_tag(p_desc), i_length, psz_value);
        break;
    }
    default:
        break;
    }
}

// Assembly:
cmpl $0x1, %esi
jne 0xb7e3
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsp, -0x38(%rbp)
movzbl 0x1(%rdi), %r14d
leal 0x10(,%r14,2), %eax
andl $-0x10, %eax
movq %rsp, %r12
subq %rax, %r12
movq %r12, %rsp
leaq 0x36d5(%rip), %r13      # 0xee61
movq %r12, -0x30(%rbp)
xorl %r15d, %r15d
cmpq %r15, %r14
je 0xb7b4
movzbl 0x2(%rbx,%r15), %edx
movq %r12, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x21e0
incq %r15
addq $0x2, %r12
jmp 0xb793
movb $0x0, (%r12)
movzbl (%rbx), %edx
leaq 0x36a6(%rip), %rsi      # 0xee69
movl %r14d, %ecx
movq -0x30(%rbp), %r8
xorl %eax, %eax
callq 0x5d75
movq -0x38(%rbp), %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_83p28.h
// Function: desc83p28_print
static inline void desc83p28_print(uint8_t *p_desc, f_print pf_print,
                                   void *opaque, print_type_t i_print_type)
{
    desc83p28_each_service(p_desc, p_desc_n) {
        switch (i_print_type) {
        case PRINT_XML:
            pf_print(opaque,
            "<%s sid=\"%hu\" visible=\"%d\" lcn=\"%hu\" />",
            desc_get_tag(p_desc) == 0x88 ? "HD_SIMULCAST_LCN_DESC" : "LCN_DESC",
            desc83p28n_get_sid(p_desc_n),
            desc83p28n_get_visible(p_desc_n) ? 1 : 0,
            desc83p28n_get_lcn(p_desc_n));
            break;
        default:
            pf_print(opaque,
            "    - desc %hhx lcn sid=%hu%s lcn=%hu", desc_get_tag(p_desc),
            desc83p28n_get_sid(p_desc_n),
            desc83p28n_get_visible(p_desc_n) ? " visible" : "",
            desc83p28n_get_lcn(p_desc_n));
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x2(%rdi), %r13
cmpb $0x4, 0x1(%rdi)
movl $0x0, %ecx
cmovaeq %r13, %rcx
leaq 0x36eb(%rip), %rbp      # 0xeef7
leaq 0x36be(%rip), %r12      # 0xeed1
testq %rcx, %rcx
je 0xb8de
movq %rcx, %r15
movzbl (%r14), %edx
cmpl $0x1, %ebx
jne 0xb876
leaq 0x368c(%rip), %rax      # 0xeebb
cmpl $0x88, %edx
je 0xb83e
leaq 0x368a(%rip), %rax      # 0xeec8
movzwl (%r15), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
movzbl 0x2(%r15), %edx
movl %edx, %r8d
shrl $0x7, %r8d
andl $0x3, %edx
shll $0x8, %edx
movzbl 0x3(%r15), %r9d
orl %edx, %r9d
leaq 0x3629(%rip), %rsi      # 0xee93
movq %rax, %rdx
xorl %eax, %eax
callq 0x5d75
jmp 0xb8ac
movzbl 0x2(%r15), %eax
movq %rbp, %r8
testb %al, %al
js 0xb889
leaq 0xa5a1(%rip), %r8       # 0x15e2a
movzwl (%r15), %ecx
rolw $0x8, %cx
movzwl %cx, %ecx
andl $0x3, %eax
shll $0x8, %eax
movzbl 0x3(%r15), %r9d
orl %eax, %r9d
movq %r12, %rsi
xorl %eax, %eax
callq 0x5d75
leaq 0x4(%r15), %rax
movl $0x0, %ecx
cmpq %rax, %r13
ja 0xb813
addq $0x8, %r15
movzbl 0x1(%r14), %ecx
addq %r13, %rcx
cmpq %rcx, %r15
movl $0x0, %ecx
cmovaq %rcx, %rax
movq %rax, %rcx
jmp 0xb813
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_40.h
// Function: desc40_print
static inline void desc40_print(const uint8_t *p_desc,
                                f_print pf_print, void *print_opaque,
                                f_iconv pf_iconv, void *iconv_opaque,
                                print_type_t i_print_type)
{
    uint8_t i_network_name_length;
    bool b_bouquet_name = desc_get_tag(p_desc) == 0x47;
    const uint8_t *p_network_name = desc40_get_networkname(p_desc,
                                                     &i_network_name_length);
    char *psz_network_name = dvb_string_get(p_network_name,
                                            i_network_name_length,
                                            pf_iconv, iconv_opaque);

    switch (i_print_type) {
    case PRINT_XML:
        psz_network_name = dvb_string_xml_escape(psz_network_name);
        if ( !b_bouquet_name )
            pf_print(print_opaque, "<NETWORK_NAME_DESC networkname=\"%s\"/>",
                     psz_network_name);
        else
            pf_print(print_opaque, "<BOUQUET_NAME_DESC bouquetname=\"%s\"/>",
                     psz_network_name);
        break;
    default:
        if ( !b_bouquet_name )
            pf_print(print_opaque, "    - desc 40 networkname=\"%s\"",
                     psz_network_name);
        else
            pf_print(print_opaque, "    - desc 47 bouquetname=\"%s\"",
                     psz_network_name);
    }
    free(psz_network_name);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebp
movq %rsi, %rdx
movb (%rdi), %r14b
movzbl 0x1(%rdi), %esi
addq $0x2, %rdi
callq 0xc6fc
movq %rax, %rbx
cmpl $0x1, %ebp
jne 0xb957
movq %rbx, %rdi
callq 0xc802
movq %rax, %rbx
cmpb $0x47, %r14b
jne 0xb966
leaq 0x5fc9(%rip), %rsi      # 0x1191e
jmp 0xb976
cmpb $0x47, %r14b
jne 0xb96f
leaq 0x5fff(%rip), %rsi      # 0x11963
jmp 0xb976
leaq 0x5f8b(%rip), %rsi      # 0x118f8
jmp 0xb976
leaq 0x5fce(%rip), %rsi      # 0x11944
movq %rbx, %rdx
xorl %eax, %eax
callq 0x5d75
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2030
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_46.h
// Function: desc46_print
static inline void desc46_print(uint8_t *p_desc, f_print pf_print,
                                void *opaque, print_type_t i_print_type)
{
    desc46_each_language(p_desc, p_desc_n) {
        switch (i_print_type) {
        case PRINT_XML:
            pf_print(opaque,
                 "<%s language=\"%3.3s\" type=\"0x%hhx\" type_txt=\"%s\" mag=\"%hhu\" page=\"0x%hhx\"/>",
                 desc_get_tag(p_desc) == 0x46 ? "VBI_TELX_DESC" : "TELX_DESC",
                 (const char *)desc46n_get_code(p_desc_n),
                 desc46n_get_teletexttype(p_desc_n),
                 desc46_get_teletexttype_txt(desc46n_get_teletexttype(p_desc_n)),
                 desc46n_get_teletextmagazine(p_desc_n),
                 desc46n_get_teletextpage(p_desc_n));
            break;
        default:
            pf_print(opaque,
                 "    - desc %x %s language=%3.3s type=0x%hhx type_txt=\"%s\" mag=%hhu page=0x%hhx",
                 desc_get_tag(p_desc),
                 desc_get_tag(p_desc) == 0x46 ? "vbi_telx" : "telx",
                 (const char *)desc46n_get_code(p_desc_n),
                 desc46n_get_teletexttype(p_desc_n),
                 desc46_get_teletexttype_txt(desc46n_get_teletexttype(p_desc_n)),
                 desc46n_get_teletextmagazine(p_desc_n),
                 desc46n_get_teletextpage(p_desc_n));
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x2(%rdi), %rax
cmpb $0x5, 0x1(%rdi)
movl $0x0, %ecx
movq %rax, 0x8(%rsp)
cmovaeq %rax, %rcx
movq %rdi, 0x10(%rsp)
testq %rcx, %rcx
je 0xbab6
movq %rcx, %r13
movzbl (%r14), %ebp
cmpl $0x1, %ebx
jne 0xba1e
leaq 0x65eb(%rip), %r15      # 0x11fc1
cmpl $0x46, %ebp
je 0xb9e2
leaq 0x65e3(%rip), %r15      # 0x11fc5
movzbl 0x3(%r13), %r12d
movl %r12d, %ebp
shrl $0x3, %ebp
movl %ebp, %edi
callq 0xcae9
andl $0x7, %r12d
movzbl 0x4(%r13), %edi
leaq 0x6571(%rip), %rsi      # 0x11f75
movq %r15, %rdx
movq %r13, %rcx
movl %ebp, %r8d
movq %rax, %r9
xorl %eax, %eax
pushq %rdi
pushq %r12
callq 0x5d75
popq %rax
popq %rcx
jmp 0xba80
movl %ebx, %r14d
leaq 0x65f6(%rip), %r15      # 0x1201e
cmpl $0x46, %ebp
je 0xba34
leaq 0x65ee(%rip), %r15      # 0x12022
movzbl 0x3(%r13), %ebx
movl %ebx, %r12d
shrl $0x3, %r12d
movl %r12d, %edi
callq 0xcae9
movq %rax, %rdi
andl $0x7, %ebx
movzbl 0x4(%r13), %r10d
subq $0x8, %rsp
leaq 0x6571(%rip), %rsi      # 0x11fcf
movl %ebp, %edx
movq %r15, %rcx
movq %r13, %r8
movl %r12d, %r9d
xorl %eax, %eax
pushq %r10
pushq %rbx
pushq %rdi
callq 0x5d75
addq $0x20, %rsp
movl %r14d, %ebx
movq 0x10(%rsp), %r14
leaq 0x5(%r13), %rax
movl $0x0, %ecx
cmpq %rax, 0x8(%rsp)
ja 0xb9ba
addq $0xa, %r13
movzbl 0x1(%r14), %ecx
addq 0x8(%rsp), %rcx
cmpq %rcx, %r13
movl $0x0, %ecx
cmovaq %rcx, %rax
movq %rax, %rcx
jmp 0xb9ba
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_5b.h
// Function: desc5b_print
static inline void desc5b_print(const uint8_t *p_desc,
                                f_print pf_print, void *print_opaque,
                                f_iconv pf_iconv, void *iconv_opaque,
                                print_type_t i_print_type)
{
    bool b_bouquet = desc_get_tag(p_desc) == 0x5c;

    desc5b_each_data(p_desc, p_desc_n) {
        uint8_t i_network_name_length;
        const uint8_t *p_network_name = desc5bn_get_networkname(p_desc_n, &i_network_name_length);
        char *psz_network_name = dvb_string_get(p_network_name, i_network_name_length, pf_iconv, iconv_opaque);
        switch (i_print_type) {
        case PRINT_XML:
            psz_network_name = dvb_string_xml_escape(psz_network_name);
            pf_print(print_opaque,
                     !b_bouquet
                      ? "<MULTILINGUAL_NETWORK_NAME_DESC code=\"%3.3s\" networkname=\"%s\"/>"
                      : "<MULTILINGUAL_BOUQUET_NAME_DESC code=\"%3.3s\" bouquetname=\"%s\"/>",
                     desc5bn_get_code(p_desc_n),
                     psz_network_name
                    );
            break;
        default:
            pf_print(print_opaque,
                     !b_bouquet
                      ? "    - desc 5b multilingual_network_name code=\"%3.3s\" networkname=\"%s\""
                      : "    - desc 5c multilingual_bouquet_name code=\"%3.3s\" bouquetname=\"%s\"",
                     desc5bn_get_code(p_desc_n),
                     psz_network_name
                    );
        }
        free(psz_network_name);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
cmpb $0x5c, (%rdi)
leaq 0x7b95(%rip), %rax      # 0x13694
leaq 0x7b48(%rip), %rcx      # 0x1364e
cmoveq %rax, %rcx
movq %rcx, 0x8(%rsp)
leaq 0x7af8(%rip), %rax      # 0x1360e
leaq 0x7ab1(%rip), %r12      # 0x135ce
cmoveq %rax, %r12
movq %rsi, %r13
cmpb $0x4, 0x1(%rdi)
movq %rdi, 0x10(%rsp)
leaq 0x2(%rdi), %r14
movl $0x0, %edx
cmovaeq %r14, %rdx
testq %rdx, %rdx
je 0xbbcb
movq %rdx, %rbp
movzbl 0x3(%rdx), %esi
leaq 0x4(%rdx), %rdi
movq %r13, %rdx
callq 0xc6fc
movq %rax, %r15
cmpl $0x1, %ebx
jne 0xbb74
movq %r15, %rdi
callq 0xc802
movq %rax, %r15
movq %r12, %rsi
movq %rbp, %rdx
movq %rax, %rcx
jmp 0xbb7f
movq 0x8(%rsp), %rsi
movq %rbp, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x5d75
movq %r15, %rdi
callq 0x2030
movzbl 0x3(%rbp), %ecx
leaq (%rcx,%rbp), %rax
addq $0x4, %rax
movl $0x0, %edx
cmpq %rax, %r14
ja 0xbb3a
addq %rcx, %rbp
addq $0x8, %rbp
movq 0x10(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
addq %r14, %rcx
cmpq %rcx, %rbp
movl $0x0, %ecx
cmovaq %rcx, %rax
movq %rax, %rdx
jmp 0xbb3a
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_67.h
// Function: desc67_print
static inline void desc67_print(const uint8_t *p_desc, f_print pf_print,
                                void *opaque, print_type_t i_print_type)
{
    uint8_t i_bytes_length, i;
    bool b_dsng_desc = desc_get_tag(p_desc) == 0x68;
    const uint8_t *p_bytes = desc67_get_bytes(p_desc, &i_bytes_length);
    char psz_bytes[2 * 255 + 1];
    char psz_bytes_txt[255 + 1];

    for (i = 0; i < i_bytes_length; i++) {
        sprintf(psz_bytes + 2 * i, "%02x", p_bytes[i]);
        if (p_bytes[i] >= 32 && p_bytes[i] <= 127 && p_bytes[i] != '"')
            psz_bytes_txt[i] = p_bytes[i];
        else
            psz_bytes_txt[i] = '.';
    }
    psz_bytes[2 * i] = '\0';
    psz_bytes_txt[i] = '\0';

    switch (i_print_type) {
    case PRINT_XML:
        pf_print(opaque,
                 !b_dsng_desc
                  ? "<TRANSPORT_STREAM_DESC bytes=\"%s\"/>"
                  : "<DSNG_DESC bytes=\"%s\"/>",
                 psz_bytes
                );
        break;
    default:
        pf_print(opaque,
                 !b_dsng_desc
                  ? "    - desc 67 transport_stream bytes=\"%s\" bytes_txt=\"%s\""
                  : "    - desc 68 dsng bytes=\"%s\" bytes_txt=\"%s\"",
                 psz_bytes,
                 psz_bytes_txt
                );
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x318, %rsp            # imm = 0x318
movl %esi, 0xc(%rsp)
movq %rdi, %r14
movb (%rdi), %al
movb %al, 0xb(%rsp)
movzbl 0x1(%rdi), %r13d
leaq 0x110(%rsp), %r15
leaq 0x433a(%rip), %r12      # 0xff46
pushq $0x2e
popq %rbp
xorl %ebx, %ebx
cmpq %rbx, %r13
je 0xbc48
movzbl 0x2(%r14,%rbx), %edx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x21e0
movzbl 0x2(%r14,%rbx), %eax
cmpb $0x22, %al
movl %eax, %ecx
cmovel %ebp, %ecx
cmpb $0x20, %al
cmovll %ebp, %ecx
movb %cl, 0x10(%rsp,%rbx)
incq %rbx
addq $0x2, %r15
jmp 0xbc11
xorl %eax, %eax
movb %al, (%r15)
movb %al, 0x10(%rsp,%r13)
cmpl $0x1, 0xc(%rsp)
jne 0xbc81
cmpb $0x68, 0xb(%rsp)
leaq 0x8124(%rip), %rax      # 0x13d89
leaq 0x80f9(%rip), %rsi      # 0x13d65
cmoveq %rax, %rsi
leaq 0x110(%rsp), %rdx
xorl %eax, %eax
callq 0x5d75
jmp 0xbcac
cmpb $0x68, 0xb(%rsp)
leaq 0x814d(%rip), %rax      # 0x13dda
leaq 0x810d(%rip), %rsi      # 0x13da1
cmoveq %rax, %rsi
leaq 0x110(%rsp), %rdx
leaq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0x5d75
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/psi/descriptors.h
// Function: desc_print
static inline void desc_print(const uint8_t *p_desc, f_print pf_print,
                              void *opaque, print_type_t i_print_type)
{
    uint8_t i, i_length;
    char psz_value[2 * 255 + 1];

    switch (i_print_type) {
    case PRINT_XML:
        pf_print(opaque, "<UNKNOWN_DESC />");
        break;
    default:
        i_length = desc_get_length(p_desc);

        for (i = 0; i < i_length; i++)
            sprintf(psz_value + 2 * i, "%02x", p_desc[2 + i]);
        psz_value[2 * i] = '\0';

        pf_print(opaque, "    - desc %02x unknown length=%u value=%s",
            desc_get_tag(p_desc), i_length, psz_value);
    }
}

// Assembly:
cmpl $0x1, %esi
jne 0xc016
leaq 0x984d(%rip), %rsi      # 0x1585c
xorl %eax, %eax
jmp 0x5d75
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %r14
movzbl 0x1(%rdi), %ebx
movq %rsp, %r15
leaq 0x3f0f(%rip), %r12      # 0xff46
xorl %r13d, %r13d
cmpq %r13, %rbx
je 0xc05b
movzbl 0x2(%r14,%r13), %edx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x21e0
incq %r13
addq $0x2, %r15
jmp 0xc03a
movb $0x0, (%r15)
movzbl (%r14), %edx
leaq 0x9803(%rip), %rsi      # 0x1586d
movq %rsp, %r8
movl %ebx, %ecx
xorl %eax, %eax
callq 0x5d75
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/psi/desc_02.h
// Function: desc02_get_level_txt
static inline const char *desc02_get_level_txt(const uint8_t level) {
    return level == 4  ? "High"      :
           level == 6  ? "High 1440" :
           level == 8  ? "Main"      :
           level == 10 ? "Low"       : "Reserved";
}

// Assembly:
cmpl $0x4, %edi
je 0xc0d6
cmpl $0x6, %edi
je 0xc0ce
cmpl $0x8, %edi
jne 0xc0de
leaq 0x31fa(%rip), %rax      # 0xf2c7
retq
leaq 0x3207(%rip), %rax      # 0xf2dc
retq
leaq 0x31c5(%rip), %rax      # 0xf2a2
retq
cmpb $0xa, %dil
leaq 0x31fd(%rip), %rcx      # 0xf2e6
leaq 0x31e3(%rip), %rax      # 0xf2d3
cmoveq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/psi/desc_2a.h
// Function: desc2a_get_N
static inline uint32_t desc2a_get_N(const uint8_t *p_desc)
{
    if (!desc2a_get_picture_and_timing_info_present(p_desc))
        return 0;
    if (desc2a_get_90khz_flag(p_desc))
        return 0;
    return (p_desc[4] << 24) | (p_desc[5] << 16) | (p_desc[6] << 8) | p_desc[7];
}

// Assembly:
xorl %eax, %eax
testb $0x1, 0x2(%rdi)
je 0xc4ae
cmpb $0x0, 0x3(%rdi)
js 0xc4ae
movl 0x4(%rdi), %eax
bswapl %eax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/psi/desc_2a.h
// Function: desc2a_get_K
static inline uint32_t desc2a_get_K(const uint8_t *p_desc)
{
    if (!desc2a_get_picture_and_timing_info_present(p_desc))
        return 0;
    if (desc2a_get_90khz_flag(p_desc))
        return 0;
    return (p_desc[8] << 24) | (p_desc[9] << 16) | (p_desc[10] << 8) | p_desc[11];
}

// Assembly:
xorl %eax, %eax
testb $0x1, 0x2(%rdi)
je 0xc4c2
cmpb $0x0, 0x3(%rdi)
js 0xc4c2
movl 0x8(%rdi), %eax
bswapl %eax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/psi/desc_2a.h
// Function: desc2a_get_num_units_in_tick
static inline uint32_t desc2a_get_num_units_in_tick(const uint8_t *p_desc)
{
    uint8_t ofs;
    if (!desc2a_get_picture_and_timing_info_present(p_desc))
        return 0;
    ofs = desc2a_get_90khz_flag(p_desc) == 0 ? 12 : 4;
    return (p_desc[ofs+0] << 24) | (p_desc[ofs+1] << 16) | (p_desc[ofs+2] << 8) | p_desc[ofs+3];
}

// Assembly:
xorl %eax, %eax
testb $0x1, 0x2(%rdi)
je 0xc4da
xorl %eax, %eax
cmpb $0x0, 0x3(%rdi)
setns %al
movl 0x4(%rdi,%rax,8), %eax
bswapl %eax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/strings.h
// Function: dvb_string_get
static inline char *dvb_string_get_inner(const uint8_t *p_string,
        size_t i_length, f_iconv pf_iconv, void *iconv_opaque,
        const char *psz_default_encoding)
{
    if (i_length) {
        const char *psz_encoding =
            dvb_string_get_encoding(&p_string, &i_length, psz_default_encoding);
        if (psz_encoding == NULL || !i_length) {
            /* try one-byte charset */
            char *psz_string = (char *)malloc(i_length + 1);
            memcpy(psz_string, p_string, i_length);
            psz_string[i_length] = '\0';
            return psz_string;
        }

        return pf_iconv(iconv_opaque, psz_encoding, (char *)p_string, i_length);
    }

    return strdup("");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0xc72c
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %ecx
testq %rcx, %rcx
je 0xc7da
movq %rdx, %rax
cmpb $0x1f, %cl
jbe 0xc73d
leaq 0x525b(%rip), %rsi      # 0x11982
jmp 0xc7b9
leaq 0x96f7(%rip), %rdi      # 0x15e2a
popq %rbx
popq %r14
popq %r15
jmp 0x2200
leaq -0x1(%rbx), %rdx
cmpl $0x10, %ecx
setne %sil
cmpq $0x2, %rdx
setb %dil
orb %sil, %dil
jne 0xc77f
movb 0x2(%r14), %dl
leaq 0x3(%r14), %rcx
addq $-0x3, %rbx
cmpb $0x0, 0x1(%r14)
setne %sil
leal -0x10(%rdx), %edi
cmpb $-0xf, %dil
setb %dil
orb %sil, %dil
je 0xc7a5
movq %rcx, %r14
jmp 0xc7da
cmpl $0x1f, %ecx
setne %sil
testq %rdx, %rdx
sete %dil
orb %sil, %dil
je 0xc7d2
incq %r14
leaq 0xe434(%rip), %rsi      # 0x1abd0
leaq (%rsi,%rcx,8), %rsi
movq %rdx, %rbx
jmp 0xc7b6
movzbl %dl, %edx
leaq 0xe391(%rip), %rsi      # 0x1ab40
leaq (%rsi,%rdx,8), %rsi
movq %rcx, %r14
movq (%rsi), %rsi
testq %rbx, %rbx
je 0xc7da
testq %rsi, %rsi
je 0xc7da
xorl %edi, %edi
movq %r14, %rdx
movq %rbx, %rcx
popq %rbx
popq %r14
popq %r15
jmpq *%rax
addq $0x2, %r14
addq $-0x2, %rbx
leaq 0x1(%rbx), %rdi
callq 0x2160
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2150
movb $0x0, (%r15,%rbx)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/numbers.h
// Function: dvb_bcd_get
static inline unsigned int dvb_bcd_get(const uint8_t *p_bcd, uint8_t i_width)
{
    unsigned int i_result = 0;

    while (i_width >= 8) {
        i_result *= 10;
        i_result += (*p_bcd) >> 4;
        i_result *= 10;
        i_result += (*p_bcd) & 0xf;
        i_width -= 8;
        p_bcd++;
    }

    if (i_width == 4) {
        i_result *= 10;
        i_result += (*p_bcd) >> 4;
    }

    return i_result;
}

// Assembly:
xorl %eax, %eax
cmpb $0x8, %sil
jb 0xcad7
imull $0xa, %eax, %ecx
movzbl (%rdi), %eax
movl %eax, %edx
shrl $0x4, %edx
addl %ecx, %edx
imull $0xa, %edx, %ecx
andl $0xf, %eax
addl %ecx, %eax
addb $-0x8, %sil
incq %rdi
jmp 0xcab3
cmpb $0x4, %sil
jne 0xcae8
imull $0xa, %eax, %ecx
movzbl (%rdi), %eax
shrl $0x4, %eax
addl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_4a.h
// Function: desc4a_get_mobile_nid
static inline uint16_t desc4a_get_mobile_nid(const uint8_t *p_desc)
{
    if (desc4a_have_mobile_nid(p_desc))
        return (p_desc[10] << 8) | p_desc[11];
    else
        return 0;
}

// Assembly:
movb 0x9(%rdi), %al
shrb $0x4, %al
decb %al
cmpb $0x2, %al
ja 0xcb2a
movzwl 0xa(%rdi), %eax
rolw $0x8, %ax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_4a.h
// Function: desc4a_get_mobile_initial_sid
static inline uint16_t desc4a_get_mobile_initial_sid(const uint8_t *p_desc)
{
    if (!desc4a_get_mobile_origin_type(p_desc)) {
        uint8_t ofs = 10;
        if (desc4a_have_mobile_nid(p_desc))
            ofs += 2;
        return (p_desc[ofs + 0] << 8) | p_desc[ofs + 1];
    }
    return 0;
}

// Assembly:
movb 0x9(%rdi), %al
testb $0x1, %al
jne 0xcb4a
shrb $0x4, %al
decb %al
xorl %ecx, %ecx
cmpb $0x3, %al
setb %cl
movzwl 0xa(%rdi,%rcx,2), %eax
rolw $0x8, %ax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_4a.h
// Function: desc4an_get_ext_event_user_defined_id
static inline uint16_t desc4an_get_ext_event_user_defined_id(const uint8_t *p_desc_n)
{
    if (desc4an_ext_event_have_user_defined_id(p_desc_n))
        return (p_desc_n[3] << 8) | p_desc_n[4];
    else
        return 0;
}

// Assembly:
movb 0x2(%rdi), %al
notb %al
testb $0xc, %al
jne 0xcbbf
movzwl 0x3(%rdi), %eax
rolw $0x8, %ax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_4a.h
// Function: desc4an_get_ext_event_target_tsid
static inline uint16_t desc4an_get_ext_event_target_tsid(const uint8_t *p_desc_n)
{
    if (desc4an_ext_event_have_target_tsid(p_desc_n))
        return (p_desc_n[3] << 8) | p_desc_n[4];
    else
        return 0;
}

// Assembly:
movb 0x2(%rdi), %al
andb $0xc, %al
cmpb $0x4, %al
jne 0xcbd4
movzwl 0x3(%rdi), %eax
rolw $0x8, %ax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_4a.h
// Function: desc4an_get_ext_event_target_onid
static inline uint16_t desc4an_get_ext_event_target_onid(const uint8_t *p_desc_n)
{
    if (desc4an_ext_event_have_user_defined_id(p_desc_n))
        return 0;
    uint8_t ofs = desc4an_ext_event_have_target_tsid(p_desc_n) ? 5 : 3;
    if (desc4an_get_ext_event_onid_id_flag(p_desc_n))
        return (p_desc_n[ofs + 0] << 8) | p_desc_n[ofs + 1];
    else
        return 0;
}

// Assembly:
movb 0x2(%rdi), %cl
movl %ecx, %eax
andb $0xc, %al
cmpb $0xc, %al
sete %dl
testb $0x2, %cl
sete %cl
orb %dl, %cl
je 0xcbf0
xorl %eax, %eax
retq
xorl %ecx, %ecx
cmpb $0x4, %al
sete %cl
movzwl 0x3(%rdi,%rcx,2), %eax
rolw $0x8, %ax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_4a.h
// Function: desc4an_get_ext_event_service_id
static inline uint16_t desc4an_get_ext_event_service_id(const uint8_t *p_desc_n)
{
    if (desc4an_ext_event_have_user_defined_id(p_desc_n))
        return 0;
    uint8_t ofs = desc4an_ext_event_have_target_tsid(p_desc_n) ? 5 : 3;
    if (desc4an_get_ext_event_onid_id_flag(p_desc_n))
        ofs += 2;
    if (desc4an_get_ext_event_service_id_flag(p_desc_n))
        return (p_desc_n[ofs + 0] << 8) | p_desc_n[ofs + 1];
    else
        return 0;
}

// Assembly:
movb 0x2(%rdi), %al
movl %eax, %ecx
andb $0xc, %cl
cmpb $0xc, %cl
sete %dl
testb $0x1, %al
sete %sil
orb %dl, %sil
je 0xcc1d
xorl %eax, %eax
retq
cmpb $0x4, %cl
sete %cl
addb %cl, %cl
andb $0x2, %al
addb %cl, %al
movzbl %al, %eax
movzwl 0x3(%rax,%rdi), %eax
rolw $0x8, %ax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_51.h
// Function: desc51n_get_data_size
static inline uint8_t desc51n_get_data_size(const uint8_t *p_desc_n)
{
    uint8_t size =
        DESC51_DATA_SIZE + desc51n_get_elementary_cell_field_length(p_desc_n);
    switch (desc51n_get_cell_linkage_info(p_desc_n)) {
        case 1: size += 2; break;
        case 2: size += 6; break;
        case 3: size += 6; break;
        case 4: size += 8; break;
    }
    return size;
}

// Assembly:
movzbl 0x2(%rdi), %eax
movzbl 0x3(%rdi,%rax), %ecx
decl %ecx
cmpl $0x3, %ecx
ja 0xcc62
leaq 0x1853(%rip), %rdx      # 0xe4a0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addl $0xa, %eax
retq
addl $0x6, %eax
retq
addl $0xc, %eax
retq
addl $0x4, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/datetime.h
// Function: dvb_time_format_UTC
static inline time_t dvb_time_format_UTC(uint64_t UTC_time, struct tm *tm, char *output) {
    struct tm tm_local;
    if (tm == NULL)
        tm = &tm_local;
    time_t ts = dvb_time_decode_UTC(UTC_time);
    tm = gmtime_r(&ts, tm);
    if (output)
        sprintf(output, "%04d-%02d-%02d %02d:%02d:%02d UTC",
            tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
            tm->tm_hour, tm->tm_min, tm->tm_sec);
    return ts;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rax
shrq $0x18, %rax
movzwl %ax, %r9d
imull $0x14, %r9d, %eax
addl $0xfffb6604, %eax       # imm = 0xFFFB6604
movl $0x1c89, %ecx           # imm = 0x1C89
cltd
idivl %ecx
movl %eax, %ecx
imull $0x5b5, %eax, %eax      # imm = 0x5B5
pushq $-0x4
popq %r8
cltd
idivl %r8d
movl %eax, %r8d
addl %r9d, %r8d
imull $0x2710, %r8d, %r9d     # imm = 0x2710
leal -0x8ea1ea8(%r9), %eax
movl $0x4ab51, %r10d         # imm = 0x4AB51
cltd
idivl %r10d
addl $0xf6d482ea, %r9d       # imm = 0xF6D482EA
cmpl $0x956a2, %r9d          # imm = 0x956A2
adcl $0x0, %ecx
movq %rsi, %rbx
leal -0xc(%rax), %esi
cmpl $0x956a2, %r9d          # imm = 0x956A2
cmovael %eax, %esi
andl $0xffffff, %edi         # imm = 0xFFFFFF
imull $0x4ab51, %eax, %eax    # imm = 0x4AB51
movl $0xffffd8f0, %r9d       # imm = 0xFFFFD8F0
cltd
idivl %r9d
addl %r8d, %eax
addl $0xffffc594, %eax       # imm = 0xFFFFC594
leaq 0x18(%rsp), %rdx
movl %eax, 0x4(%rdx)
movl %ecx, 0xc(%rdx)
addl $-0x2, %esi
movl %esi, 0x8(%rdx)
leaq 0x14(%rsp), %rcx
leaq 0x10(%rsp), %r14
xorl %esi, %esi
movq %r14, %r8
callq 0xcd7a
movq %r14, %rdi
callq 0x21b0
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
leaq 0x10(%rsp), %rsi
callq 0x2100
testq %rbx, %rbx
je 0xcd6d
movl $0x76c, %edx            # imm = 0x76C
addl 0x14(%rax), %edx
movl 0x10(%rax), %ecx
incl %ecx
movl 0xc(%rax), %r8d
movl 0x8(%rax), %r9d
movl (%rax), %r10d
movl 0x4(%rax), %r11d
leaq 0x65b4(%rip), %rsi      # 0x13311
movq %rbx, %rdi
xorl %eax, %eax
pushq %r10
pushq %r11
callq 0x21e0
popq %rcx
popq %rdx
movq 0x8(%rsp), %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/datetime.h
// Function: dvb_time_decode_bcd
static inline void dvb_time_decode_bcd(uint32_t bcd, int *seconds, int *hour, int *min, int *sec) {
    *hour = bcd2dec( (bcd >> 16) & 0xff );
    *min  = bcd2dec( (bcd >>  8) & 0xff );
    *sec  = bcd2dec(  bcd        & 0xff );
    if (seconds)
        *seconds = *hour * 3600 + *min * 60 + *sec;
}

// Assembly:
movl %edi, %eax
shrl $0x10, %eax
movl %edi, %r9d
shrl $0x14, %r9d
andl $0xf, %r9d
imull $0xa, %r9d, %r9d
andl $0xf, %eax
addl %r9d, %eax
movl %eax, (%rdx)
movl %edi, %eax
shrl $0x8, %eax
movl %edi, %r9d
shrl $0xc, %r9d
andl $0xf, %r9d
imull $0xa, %r9d, %r9d
andl $0xf, %eax
addl %r9d, %eax
movl %eax, (%rcx)
movl %edi, %eax
shrl $0x4, %eax
andl $0xf, %eax
imull $0xa, %eax, %eax
andl $0xf, %edi
addl %eax, %edi
movl %edi, (%r8)
testq %rsi, %rsi
je 0xcdd9
imull $0xe10, (%rdx), %eax    # imm = 0xE10
imull $0x3c, (%rcx), %ecx
addl %edi, %eax
addl %ecx, %eax
movl %eax, (%rsi)
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_7f19.h
// Function: desc7f19_next_presel
static inline uint8_t *desc7f19_next_presel(const uint8_t *p_desc,
                                            const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC7F19_HEADER_SIZE;
    else
        p_desc_n = p_desc_n + desc7f19_presel_get_length(p_desc_n);
    return desc_check(p_desc, p_desc_n, DESC7F19_PRESEL_SIZE);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0xd020
movq %rsi, %r14
movq %rsi, %rdi
callq 0xd045
movzbl %al, %ecx
addq %r14, %rcx
leaq 0x2(%rbx), %rax
cmpq %rcx, %rax
jbe 0xd024
xorl %eax, %eax
jmp 0xd03d
leaq 0x4(%rbx), %rcx
leaq 0x2(%rcx), %rdx
movzbl 0x1(%rbx), %eax
leaq (%rbx,%rax), %rsi
addq $0x2, %rsi
xorl %eax, %eax
cmpq %rsi, %rdx
cmovbeq %rcx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_7f19.h
// Function: desc7f19_presel_get_length
static inline uint8_t desc7f19_presel_get_length(const uint8_t *p_desc_n)
{
    uint8_t length = desc7f19_presel_get_header_length(p_desc_n);

    uint8_t *p;
    if ((p = desc7f19_presel_get_multi_stream_info_ptr(p_desc_n)))
        length +=
            desc7f19_presel_msi_get_num_aux_components(p) *
            DESC7F19_PRESEL_MSI_COMP_SIZE;
    if ((p = desc7f19_presel_get_future_extension_ptr(p_desc_n)))
        length +=
            desc7f19_presel_ext_get_length(p) * DESC7F19_PRESEL_EXT_BYTE_SIZE;

    return length;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0xd161
xorl %ecx, %ecx
testb %al, %al
setne %cl
leal (%rcx,%rcx,2), %ebx
addl $0x2, %ebx
movq %r14, %rdi
callq 0xd16c
cmpb $0x1, %al
sbbb $-0x1, %bl
movq %r14, %rdi
callq 0xd177
cmpb $0x1, %al
sbbb $-0x1, %bl
movq %r14, %rdi
callq 0xd182
movl %eax, %ebp
cmpb $0x1, %al
sbbb $-0x1, %bl
movq %r14, %rdi
callq 0xd118
testq %rax, %rax
je 0xd0a3
movq %rax, %rdi
callq 0xd157
addb %bl, %al
movl %eax, %ebx
testb %bpl, %bpl
je 0xd10b
movq %r14, %rdi
callq 0xd118
testq %rax, %rax
je 0xd0cc
movq %rax, %r15
movq %rax, %rdi
callq 0xd157
movzbl %al, %eax
leaq (%r15,%rax), %rdi
incq %rdi
jmp 0xd0fe
movq %r14, %rdi
callq 0xd18d
testq %rax, %rax
je 0xd0e1
movq %rax, %rdi
incq %rdi
jmp 0xd0fe
movq %r14, %rdi
callq 0xd1ba
testq %rax, %rax
je 0xd0f7
movq %rax, %rdi
addq $0x3, %rdi
jmp 0xd0fe
addq $0x2, %r14
movq %r14, %rdi
pushq $0x3
popq %rsi
pushq $0x5
popq %rdx
callq 0xc13e
addb %al, %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_7f19.h
// Function: desc7f19_presel_get_multi_stream_info_ptr
static inline uint8_t *
desc7f19_presel_get_multi_stream_info_ptr(const uint8_t *p_desc_n)
{
    if (!desc7f19_presel_get_multi_stream_info_present(p_desc_n))
        return NULL;

    uint8_t *p;
    if ((p = desc7f19_presel_get_text_label_ptr(p_desc_n)))
        return p + DESC7F19_PRESEL_TEXT_SIZE;
    if ((p = desc7f19_presel_get_language_code_ptr(p_desc_n)))
        return p + DESC7F19_PRESEL_LANG_SIZE;
    return (uint8_t *)(p_desc_n + DESC7F19_PRESEL_SIZE);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0xd177
testb %al, %al
je 0xd137
movq %rbx, %rdi
callq 0xd18d
testq %rax, %rax
je 0xd13b
incq %rax
jmp 0xd155
xorl %eax, %eax
jmp 0xd155
movq %rbx, %rdi
callq 0xd1ba
testq %rax, %rax
je 0xd14e
addq $0x3, %rax
jmp 0xd155
addq $0x2, %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/dvb_print_si.c
// Function: iconv_append_null
static char *iconv_append_null(const char *p_string, size_t i_length)
{
    char *psz_string = malloc(i_length + 1);
    memcpy(psz_string, p_string, i_length);
    psz_string[i_length] = '\0';
    return psz_string;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1(%rsi), %rdi
callq 0x2160
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x2150
movb $0x0, (%r15,%rbx)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/nit.h
// Function: nit_table_validate
static inline bool nit_table_validate(uint8_t **pp_sections)
{
    uint8_t i_last_section = psi_table_get_lastsection(pp_sections);
    uint8_t i;

    for (i = 0; i <= i_last_section; i++) {
        uint8_t *p_section = psi_table_get_section(pp_sections, i);
        uint8_t *p_ts;
        int j = 0;

        if (!psi_check_crc(p_section))
            return false;

        while ((p_ts = nit_get_ts(p_section, j)) != NULL) {
            j++;
            /* check that the TS is not already in the table */
            if (nit_table_find_ts(pp_sections, nitn_get_tsid(p_ts),
                                  nitn_get_onid(p_ts)) != p_ts)
                return false;
        }
    }

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, 0x10(%rsp)
movq (%rdi), %rax
movb 0x7(%rax), %r12b
xorl %eax, %eax
movq %rax, (%rsp)
cmpb %r12b, %al
ja 0xd4fc
movzbl (%rsp), %eax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %rdi
movq %rdi, 0x18(%rsp)
callq 0x5e84
testb %al, %al
je 0xd4fc
xorl %ebx, %ebx
movzbl %bl, %esi
movq 0x18(%rsp), %rdi
callq 0xd512
testq %rax, %rax
je 0xd4f1
incb %bl
movl %ebx, 0xc(%rsp)
movzwl (%rax), %r14d
rolw $0x8, %r14w
movq %rax, 0x20(%rsp)
movzwl 0x2(%rax), %ebx
rolw $0x8, %bx
xorl %ebp, %ebp
movl %r12d, %r15d
cmpb %r12b, %bpl
ja 0xd4db
movzbl %bpl, %eax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %r12
xorl %r13d, %r13d
movzbl %r13b, %esi
movq %r12, %rdi
callq 0xd512
testq %rax, %rax
je 0xd4d3
movzwl (%rax), %ecx
rolw $0x8, %cx
cmpw %r14w, %cx
jne 0xd4ce
movzwl 0x2(%rax), %ecx
rolw $0x8, %cx
cmpw %bx, %cx
je 0xd4dd
incb %r13b
jmp 0xd4a3
incb %bpl
movl %r15d, %r12d
jmp 0xd48b
xorl %eax, %eax
cmpq 0x20(%rsp), %rax
movl %r15d, %r12d
movl 0xc(%rsp), %ebx
je 0xd457
jmp 0xd4fc
movq (%rsp), %rax
incb %al
jmp 0xd429
cmpb %r12b, (%rsp)
seta %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq