LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_6e.h
// Function: desc6en_get_component_tag
static inline uint8_t desc6en_get_component_tag(const uint8_t *p_desc_n)
{
    uint8_t i_ref_type = desc6en_get_reference_type(p_desc_n);
    if (!(i_ref_type == 0x01 || i_ref_type == 0x02 || i_ref_type == 0x03))
        return 0;
    return p_desc_n[7];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1ac50
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
cmpl $0x1, %eax
je 0x1b079
movzbl -0x11(%rbp), %eax
cmpl $0x2, %eax
je 0x1b079
movzbl -0x11(%rbp), %eax
cmpl $0x3, %eax
je 0x1b079
movb $0x0, -0x1(%rbp)
jmp 0x1b083
movq -0x10(%rbp), %rax
movb 0x7(%rax), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_6f.h
// Function: desc6f_next_application
static inline uint8_t *desc6f_next_application(const uint8_t *p_desc,
                                               const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC6F_HEADER_SIZE;
    else
        p_desc_n += DESC6F_APPLICATION_SIZE;
    return desc_check(p_desc, p_desc_n, DESC6F_APPLICATION_SIZE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1b0b5
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x10(%rbp)
jmp 0x1b0c1
movq -0x10(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x3, %edx
callq 0x130e0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_7f15.h
// Function: desc7f15_get_ac4_toc_len
static inline uint8_t desc7f15_get_ac4_toc_len(const uint8_t *p_desc)
{
    const uint8_t *p = p_desc + DESC7F15_HEADER_SIZE;
    if (!desc7f15_get_ac4_toc_flag(p_desc))
        return 0;
    if (desc7f15_get_ac4_config_flag(p_desc))
        p++;
    return *p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1bc60
cmpb $0x0, %al
jne 0x1bcbb
movb $0x0, -0x1(%rbp)
jmp 0x1bcdd
movq -0x10(%rbp), %rdi
callq 0x1bc30
cmpb $0x0, %al
je 0x1bcd4
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb (%rax), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_7f15.h
// Function: desc7f15_ac4_channel_mode_str
static inline const char *desc7f15_ac4_channel_mode_str(uint8_t mode)
{
    switch (mode) {
        case DESC7F15_AC4_CHANNEL_MODE_MONO: return "mono";
        case DESC7F15_AC4_CHANNEL_MODE_STEREO: return "stereo";
        case DESC7F15_AC4_CHANNEL_MODE_MULTI: return "multichannel";
    }
    return "unknown";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
movl %eax, -0x10(%rbp)
testl %eax, %eax
je 0x1bd5b
jmp 0x1bd47
movl -0x10(%rbp), %eax
subl $0x1, %eax
je 0x1bd68
jmp 0x1bd51
movl -0x10(%rbp), %eax
subl $0x2, %eax
je 0x1bd75
jmp 0x1bd82
leaq 0xe7d5(%rip), %rax      # 0x2a537
movq %rax, -0x8(%rbp)
jmp 0x1bd8d
leaq 0xe7cd(%rip), %rax      # 0x2a53c
movq %rax, -0x8(%rbp)
jmp 0x1bd8d
leaq 0xe7c7(%rip), %rax      # 0x2a543
movq %rax, -0x8(%rbp)
jmp 0x1bd8d
leaq 0x87ad(%rip), %rax      # 0x24536
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1be65
movq -0x8(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x10(%rbp)
jmp 0x1be89
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1beb0
movb %al, %cl
movq -0x18(%rbp), %rax
movzbl %cl, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x2, %edx
callq 0x130e0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1bf30
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1bfb0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1bef3
movq -0x18(%rbp), %rdi
callq 0x1c030
movzbl %al, %ecx
shll $0x0, %ecx
movzbl -0x9(%rbp), %eax
addl %ecx, %eax
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1c060
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1bf1e
movq -0x18(%rbp), %rdi
callq 0x1c120
movzbl %al, %ecx
shll $0x0, %ecx
movzbl -0x9(%rbp), %eax
addl %ecx, %eax
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_7f19.h
// Function: desc7f19_presel_get_header_length
static inline uint8_t desc7f19_presel_get_header_length(const uint8_t *p_desc_n)
{
    uint8_t length = DESC7F19_PRESEL_SIZE;
    if (desc7f19_presel_get_language_code_present(p_desc_n))
        length += DESC7F19_PRESEL_LANG_SIZE;
    if (desc7f19_presel_get_text_label_present(p_desc_n))
        length += DESC7F19_PRESEL_TEXT_SIZE;
    if (desc7f19_presel_get_multi_stream_info_present(p_desc_n))
        length += DESC7F19_PRESEL_MSI_SIZE;
    if (desc7f19_presel_get_future_extension(p_desc_n))
        length += DESC7F19_PRESEL_EXT_SIZE;
    return length;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movb $0x2, -0x9(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1c150
cmpb $0x0, %al
je 0x1bf57
movzbl -0x9(%rbp), %eax
addl $0x3, %eax
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1c180
cmpb $0x0, %al
je 0x1bf6e
movzbl -0x9(%rbp), %eax
addl $0x1, %eax
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1c1b0
cmpb $0x0, %al
je 0x1bf85
movzbl -0x9(%rbp), %eax
addl $0x1, %eax
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1c1e0
cmpb $0x0, %al
je 0x1bf9c
movzbl -0x9(%rbp), %eax
addl $0x1, %eax
movb %al, -0x9(%rbp)
movb -0x9(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1c1b0
cmpb $0x0, %al
jne 0x1bfd3
movq $0x0, -0x8(%rbp)
jmp 0x1c021
movq -0x10(%rbp), %rdi
callq 0x1c210
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1bff4
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x1c021
movq -0x10(%rbp), %rdi
callq 0x1c270
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1c015
movq -0x18(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x1c021
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_7f19.h
// Function: desc7f19_presel_get_future_extension_ptr
static inline uint8_t *
desc7f19_presel_get_future_extension_ptr(const uint8_t *p_desc_n)
{
    if (!desc7f19_presel_get_future_extension(p_desc_n))
        return NULL;

    uint8_t *p;
    if ((p = desc7f19_presel_get_multi_stream_info_ptr(p_desc_n)))
        return p + DESC7F19_PRESEL_MSI_SIZE +
            desc7f19_presel_msi_get_num_aux_components(p) *
            DESC7F19_PRESEL_MSI_COMP_SIZE;
    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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1c1e0
cmpb $0x0, %al
jne 0x1c086
movq $0x0, -0x8(%rbp)
jmp 0x1c114
movq -0x10(%rbp), %rdi
callq 0x1bfb0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1c0c6
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1c030
movb %al, %cl
movq -0x20(%rbp), %rax
movzbl %cl, %ecx
shll $0x0, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x1c114
movq -0x10(%rbp), %rdi
callq 0x1c210
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1c0e7
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x1c114
movq -0x10(%rbp), %rdi
callq 0x1c270
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1c108
movq -0x18(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x1c114
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_7f19.h
// Function: desc7f19_presel_get_text_label_ptr
static inline uint8_t *
desc7f19_presel_get_text_label_ptr(const uint8_t *p_desc_n)
{
    if (!desc7f19_presel_get_text_label_present(p_desc_n))
        return NULL;

    uint8_t *p;
    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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1c180
cmpb $0x0, %al
jne 0x1c233
movq $0x0, -0x8(%rbp)
jmp 0x1c260
movq -0x10(%rbp), %rdi
callq 0x1c270
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x1c254
movq -0x18(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x8(%rbp)
jmp 0x1c260
movq -0x10(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/mpeg/psi/tsdt.h
// Function: tsdt_validate
static inline bool tsdt_validate(const uint8_t *p_tsdt)
{
    uint16_t i_section_size = psi_get_length(p_tsdt) + PSI_HEADER_SIZE
                               - PSI_CRC_SIZE;

    if (!psi_get_syntax(p_tsdt) || psi_get_section(p_tsdt)
         || psi_get_lastsection(p_tsdt)
         || psi_get_tableid(p_tsdt) != TSDT_TABLE_ID)
        return false;

    if (i_section_size < TSDT_HEADER_SIZE
         || i_section_size < TSDT_HEADER_SIZE + tsdt_get_desclength(p_tsdt))
        return false;

    if (!descl_validate(tsdt_get_descl_const(p_tsdt), tsdt_get_desclength(p_tsdt)))
        return false;

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3500
movzwl %ax, %eax
addl $0x3, %eax
subl $0x4, %eax
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4360
testb $0x1, %al
jne 0x1c601
jmp 0x1c634
movq -0x10(%rbp), %rdi
callq 0x4b30
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1c634
movq -0x10(%rbp), %rdi
callq 0x4b50
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1c634
movq -0x10(%rbp), %rdi
callq 0x3530
movzbl %al, %eax
cmpl $0x3, %eax
je 0x1c63a
movb $0x0, -0x1(%rbp)
jmp 0x1c699
movzwl -0x12(%rbp), %eax
cmpl $0x8, %eax
jl 0x1c663
movzwl -0x12(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5a80
movw %ax, %cx
movl -0x18(%rbp), %eax
movzwl %cx, %ecx
addl $0x8, %ecx
cmpl %ecx, %eax
jge 0x1c669
movb $0x0, -0x1(%rbp)
jmp 0x1c699
movq -0x10(%rbp), %rdi
callq 0x5b20
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5a80
movq -0x20(%rbp), %rdi
movzwl %ax, %esi
callq 0x5ab0
testb $0x1, %al
jne 0x1c695
movb $0x0, -0x1(%rbp)
jmp 0x1c699
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/dvb_print_si.c
// Function: handle_tsdt
static void handle_tsdt(void)
{
    PSI_TABLE_DECLARE(pp_old_tsdt_sections);

    if (psi_table_validate(pp_current_tsdt_sections) &&
        psi_table_compare(pp_current_tsdt_sections, pp_next_tsdt_sections)) {
        /* Identical TSDT. Shortcut. */
        psi_table_free(pp_next_tsdt_sections);
        psi_table_init(pp_next_tsdt_sections);
        return;
    }

    if (!tsdt_table_validate(pp_next_tsdt_sections)) {
        switch (i_print_type) {
        case PRINT_XML:
            printf("<ERROR type=\"invalid_tsdt\"/>\n");
            break;
        default:
            printf("invalid TSDT received\n");
        }
        psi_table_free(pp_next_tsdt_sections);
        psi_table_init(pp_next_tsdt_sections);
        return;
    }

    /* Switch tables. */
    psi_table_copy(pp_old_tsdt_sections, pp_current_tsdt_sections);
    psi_table_copy(pp_current_tsdt_sections, pp_next_tsdt_sections);
    psi_table_init(pp_next_tsdt_sections);

    if (psi_table_validate(pp_old_tsdt_sections))
        psi_table_free(pp_old_tsdt_sections);

    if (pb_print_table[TABLE_TSDT])
        tsdt_table_print(pp_current_tsdt_sections, print_wrapper, NULL,
                         i_print_type);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x800, %rsp            # imm = 0x800
leaq 0x4dc3e(%rip), %rdi     # 0x6a300
callq 0x4bb0
testb $0x1, %al
jne 0x1c6cd
jmp 0x1c703
leaq 0x4dc2c(%rip), %rdi     # 0x6a300
leaq 0x4e425(%rip), %rsi     # 0x6ab00
callq 0x4bd0
testb $0x1, %al
jne 0x1c6e6
jmp 0x1c703
leaq 0x4e413(%rip), %rdi     # 0x6ab00
callq 0x2de0
leaq 0x4e407(%rip), %rdi     # 0x6ab00
callq 0x2bb0
jmp 0x1c7ce
leaq 0x4e3f6(%rip), %rdi     # 0x6ab00
callq 0x5b40
testb $0x1, %al
jne 0x1c758
movl 0x1bbd7(%rip), %eax     # 0x382f0
subl $0x1, %eax
jne 0x1c730
jmp 0x1c720
leaq 0xe403(%rip), %rdi      # 0x2ab2a
movb $0x0, %al
callq 0x20b0
jmp 0x1c73e
leaq 0xe411(%rip), %rdi      # 0x2ab48
movb $0x0, %al
callq 0x20b0
leaq 0x4e3bb(%rip), %rdi     # 0x6ab00
callq 0x2de0
leaq 0x4e3af(%rip), %rdi     # 0x6ab00
callq 0x2bb0
jmp 0x1c7ce
leaq -0x800(%rbp), %rdi
leaq 0x4db9a(%rip), %rsi     # 0x6a300
callq 0x4d70
leaq 0x4db8e(%rip), %rdi     # 0x6a300
leaq 0x4e387(%rip), %rsi     # 0x6ab00
callq 0x4d70
leaq 0x4e37b(%rip), %rdi     # 0x6ab00
callq 0x2bb0
leaq -0x800(%rbp), %rdi
callq 0x4bb0
testb $0x1, %al
jne 0x1c79c
jmp 0x1c7a8
leaq -0x800(%rbp), %rdi
callq 0x2de0
testb $0x1, 0x50b53(%rip)     # 0x6d302
je 0x1c7ce
movl 0x1bb39(%rip), %ecx     # 0x382f0
leaq 0x4db42(%rip), %rdi     # 0x6a300
leaq -0x174e5(%rip), %rsi    # 0x52e0
xorl %eax, %eax
movl %eax, %edx
callq 0x5bb0
addq $0x800, %rsp            # imm = 0x800
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x1, %rdi
callq 0x2150
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x2140
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/dvb_print_si.c
// Function: handle_nit
static void handle_nit(void)
{
    if (psi_table_validate(pp_current_nit_sections) &&
        psi_table_compare(pp_current_nit_sections, pp_next_nit_sections)) {
        /* Same version NIT. Shortcut. */
        psi_table_free(pp_next_nit_sections);
        psi_table_init(pp_next_nit_sections);
        return;
    }

    if (!nit_table_validate(pp_next_nit_sections)) {
        switch (i_print_type) {
        case PRINT_XML:
            printf("<ERROR type=\"invalid_nit\"/>\n");
            break;
        default:
            printf("invalid NIT received\n");
        }
        psi_table_free(pp_next_nit_sections);
        psi_table_init(pp_next_nit_sections);
        return;
    }

    /* Switch tables. */
    psi_table_free(pp_current_nit_sections);
    psi_table_copy(pp_current_nit_sections, pp_next_nit_sections);
    psi_table_init(pp_next_nit_sections);

    if (pb_print_table[TABLE_NIT])
        nit_table_print(pp_current_nit_sections, print_wrapper, NULL,
                        iconv_wrapper, NULL, i_print_type);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x4df25(%rip), %rdi     # 0x6b300
callq 0x4bb0
testb $0x1, %al
jne 0x1d3e6
jmp 0x1d41c
leaq 0x4df13(%rip), %rdi     # 0x6b300
leaq 0x4e70c(%rip), %rsi     # 0x6bb00
callq 0x4bd0
testb $0x1, %al
jne 0x1d3ff
jmp 0x1d41c
leaq 0x4e6fa(%rip), %rdi     # 0x6bb00
callq 0x2de0
leaq 0x4e6ee(%rip), %rdi     # 0x6bb00
callq 0x2bb0
jmp 0x1d4ce
leaq 0x4e6dd(%rip), %rdi     # 0x6bb00
callq 0x1d560
testb $0x1, %al
jne 0x1d471
movl 0x1aebe(%rip), %eax     # 0x382f0
subl $0x1, %eax
jne 0x1d449
jmp 0x1d439
leaq 0xdd1f(%rip), %rdi      # 0x2b15f
movb $0x0, %al
callq 0x20b0
jmp 0x1d457
leaq 0xdd2c(%rip), %rdi      # 0x2b17c
movb $0x0, %al
callq 0x20b0
leaq 0x4e6a2(%rip), %rdi     # 0x6bb00
callq 0x2de0
leaq 0x4e696(%rip), %rdi     # 0x6bb00
callq 0x2bb0
jmp 0x1d4ce
leaq 0x4de88(%rip), %rdi     # 0x6b300
callq 0x2de0
leaq 0x4de7c(%rip), %rdi     # 0x6b300
leaq 0x4e675(%rip), %rsi     # 0x6bb00
callq 0x4d70
leaq 0x4e669(%rip), %rdi     # 0x6bb00
callq 0x2bb0
testb $0x1, 0x4fe60(%rip)     # 0x6d303
je 0x1d4ce
movl 0x1ae44(%rip), %r9d     # 0x382f0
leaq 0x4de4d(%rip), %rdi     # 0x6b300
leaq -0x181da(%rip), %rsi    # 0x52e0
xorl %eax, %eax
movl %eax, %r8d
leaq -0x826(%rip), %rcx      # 0x1cca0
movq %r8, %rdx
callq 0x1d640
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x4b50
movb %al, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
movzbl -0x12(%rbp), %eax
movzbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jg 0x1d62c
movq -0x10(%rbp), %rdi
movzbl -0x12(%rbp), %esi
callq 0x4da0
movq %rax, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5480
testb $0x1, %al
jne 0x1d5ba
movb $0x0, -0x1(%rbp)
jmp 0x1d630
jmp 0x1d5bc
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %eax
movzbl %al, %esi
callq 0x1d980
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1d61d
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1db50
movw %ax, -0x2e(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1db70
movq -0x38(%rbp), %rdi
movw -0x2e(%rbp), %cx
movzwl %cx, %esi
movzwl %ax, %edx
callq 0x1da80
cmpq -0x28(%rbp), %rax
je 0x1d61b
movb $0x0, -0x1(%rbp)
jmp 0x1d630
jmp 0x1d5bc
jmp 0x1d61f
movb -0x12(%rbp), %al
addb $0x1, %al
movb %al, -0x12(%rbp)
jmp 0x1d57f
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/nit.h
// Function: nit_table_find_ts
static inline uint8_t *nit_table_find_ts(uint8_t **pp_sections,
                                         uint16_t i_tsid, uint16_t i_onid)
{
    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;

        while ((p_ts = nit_get_ts(p_section, j)) != NULL) {
            j++;
            if (nitn_get_tsid(p_ts) == i_tsid && nitn_get_onid(p_ts) == i_onid)
                return p_ts;
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movw %si, %cx
movq %rdi, -0x10(%rbp)
movw %cx, -0x12(%rbp)
movw %ax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x4b50
movb %al, -0x15(%rbp)
movb $0x0, -0x16(%rbp)
movzbl -0x16(%rbp), %eax
movzbl -0x15(%rbp), %ecx
cmpl %ecx, %eax
jg 0x1db36
movq -0x10(%rbp), %rdi
movzbl -0x16(%rbp), %esi
callq 0x4da0
movq %rax, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %eax
movzbl %al, %esi
callq 0x1d980
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1db27
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1db50
movzwl %ax, %eax
movzwl -0x12(%rbp), %ecx
cmpl %ecx, %eax
jne 0x1db25
movq -0x28(%rbp), %rdi
callq 0x1db70
movzwl %ax, %eax
movzwl -0x14(%rbp), %ecx
cmpl %ecx, %eax
jne 0x1db25
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1db3e
jmp 0x1dad1
jmp 0x1db29
movb -0x16(%rbp), %al
addb $0x1, %al
movb %al, -0x16(%rbp)
jmp 0x1daad
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/dvb_print_si.c
// Function: handle_bat
static void handle_bat(bouquet_t *p_bouquet)
{
    if (psi_table_validate(p_bouquet->pp_current_bat_sections) &&
        psi_table_compare(p_bouquet->pp_current_bat_sections,
                          p_bouquet->pp_next_bat_sections)) {
        /* Same version BAT. Shortcut. */
        psi_table_free(p_bouquet->pp_next_bat_sections);
        psi_table_init(p_bouquet->pp_next_bat_sections);
        return;
    }

    if (!bat_table_validate(p_bouquet->pp_next_bat_sections)) {
        switch (i_print_type) {
        case PRINT_XML:
            printf("<ERROR type=\"invalid_bat\"/>\n");
            break;
        default:
            printf("invalid BAT received\n");
        }
        psi_table_free(p_bouquet->pp_next_bat_sections);
        psi_table_init(p_bouquet->pp_next_bat_sections);
        return;
    }

    /* Switch tables. */
    psi_table_free(p_bouquet->pp_current_bat_sections);
    psi_table_copy(p_bouquet->pp_current_bat_sections,
                   p_bouquet->pp_next_bat_sections);
    psi_table_init(p_bouquet->pp_next_bat_sections);

    if (pb_print_table[TABLE_BAT])
        bat_table_print(p_bouquet->pp_current_bat_sections, print_wrapper, NULL,
                        iconv_wrapper, NULL, i_print_type);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x4bb0
testb $0x1, %al
jne 0x1ddaf
jmp 0x1ddf2
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
addq $0x808, %rsi            # imm = 0x808
callq 0x4bd0
testb $0x1, %al
jne 0x1ddcd
jmp 0x1ddf2
movq -0x8(%rbp), %rdi
addq $0x808, %rdi            # imm = 0x808
callq 0x2de0
movq -0x8(%rbp), %rdi
addq $0x808, %rdi            # imm = 0x808
callq 0x2bb0
jmp 0x1debb
movq -0x8(%rbp), %rdi
addq $0x808, %rdi            # imm = 0x808
callq 0x1d560
testb $0x1, %al
jne 0x1de53
movl 0x1a4e4(%rip), %eax     # 0x382f0
subl $0x1, %eax
jne 0x1de23
jmp 0x1de13
leaq 0xd490(%rip), %rdi      # 0x2b2aa
movb $0x0, %al
callq 0x20b0
jmp 0x1de31
leaq 0xd49d(%rip), %rdi      # 0x2b2c7
movb $0x0, %al
callq 0x20b0
movq -0x8(%rbp), %rdi
addq $0x808, %rdi            # imm = 0x808
callq 0x2de0
movq -0x8(%rbp), %rdi
addq $0x808, %rdi            # imm = 0x808
callq 0x2bb0
jmp 0x1debb
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
callq 0x2de0
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
addq $0x808, %rsi            # imm = 0x808
callq 0x4d70
movq -0x8(%rbp), %rdi
addq $0x808, %rdi            # imm = 0x808
callq 0x2bb0
testb $0x1, 0x4f475(%rip)     # 0x6d304
je 0x1debb
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movl 0x1a450(%rip), %r9d     # 0x382f0
leaq -0x18bc7(%rip), %rsi    # 0x52e0
xorl %eax, %eax
movl %eax, %r8d
leaq -0x1213(%rip), %rcx     # 0x1cca0
movq %r8, %rdx
callq 0x1ded0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/sdt.h
// Function: sdt_validate
static inline bool sdt_validate(const uint8_t *p_sdt)
{
    uint16_t i_section_size = psi_get_length(p_sdt) + PSI_HEADER_SIZE
                               - PSI_CRC_SIZE;
    const uint8_t *p_sdt_n;

    if (!psi_get_syntax(p_sdt)
         || (psi_get_tableid(p_sdt) != SDT_TABLE_ID_ACTUAL
              && psi_get_tableid(p_sdt) != SDT_TABLE_ID_OTHER))
        return false;

    p_sdt_n = p_sdt + SDT_HEADER_SIZE;

    while (p_sdt_n + SDT_SERVICE_SIZE - p_sdt <= i_section_size
            && p_sdt_n + SDT_SERVICE_SIZE + sdtn_get_desclength(p_sdt_n) - p_sdt
                <= i_section_size) {
        if (!descs_validate(p_sdt_n + 3))
            return false;

        p_sdt_n += SDT_SERVICE_SIZE + sdtn_get_desclength(p_sdt_n);
    }

    return (p_sdt_n - p_sdt == i_section_size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3500
movzwl %ax, %eax
addl $0x3, %eax
subl $0x4, %eax
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4360
testb $0x1, %al
jne 0x1e211
jmp 0x1e233
movq -0x10(%rbp), %rdi
callq 0x3530
movzbl %al, %eax
cmpl $0x42, %eax
je 0x1e23c
movq -0x10(%rbp), %rdi
callq 0x3530
movzbl %al, %eax
cmpl $0x46, %eax
je 0x1e23c
movb $0x0, -0x1(%rbp)
jmp 0x1e2fc
movq -0x10(%rbp), %rax
addq $0xb, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
addq $0x5, %rcx
movq -0x10(%rbp), %rax
subq %rax, %rcx
movzwl -0x12(%rbp), %eax
movl %eax, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x21(%rbp)
jg 0x1e2a0
movq -0x20(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1e410
movw %ax, %cx
movq -0x30(%rbp), %rax
movzwl %cx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movzwl -0x12(%rbp), %ecx
cmpq %rcx, %rax
setle %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x1e2a9
jmp 0x1e2e2
movq -0x20(%rbp), %rdi
addq $0x3, %rdi
callq 0x1ce60
testb $0x1, %al
jne 0x1e2c0
movb $0x0, -0x1(%rbp)
jmp 0x1e2fc
movq -0x20(%rbp), %rdi
callq 0x1e410
movzwl %ax, %ecx
addl $0x5, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x1e248
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movzwl -0x12(%rbp), %ecx
cmpq %rcx, %rax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/dvb_print_si.c
// Function: handle_sdt
static void handle_sdt(void)
{
    if (psi_table_validate(pp_current_sdt_sections) &&
        psi_table_compare(pp_current_sdt_sections, pp_next_sdt_sections)) {
        /* Identical SDT. Shortcut. */
        psi_table_free(pp_next_sdt_sections);
        psi_table_init(pp_next_sdt_sections);
        return;
    }

    if (!sdt_table_validate(pp_next_sdt_sections)) {
        switch (i_print_type) {
        case PRINT_XML:
            printf("<ERROR type=\"invalid_sdt\"/>\n");
            break;
        default:
            printf("invalid SDT received\n");
        }
        psi_table_free(pp_next_sdt_sections);
        psi_table_init(pp_next_sdt_sections);
        return;
    }

    /* Switch tables. */
    psi_table_free(pp_current_sdt_sections);
    psi_table_copy(pp_current_sdt_sections, pp_next_sdt_sections);
    psi_table_init(pp_next_sdt_sections);

    if (pb_print_table[TABLE_SDT])
        sdt_table_print(pp_current_sdt_sections, print_wrapper, NULL,
                        iconv_wrapper, NULL, i_print_type);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x4dfe5(%rip), %rdi     # 0x6c300
callq 0x4bb0
testb $0x1, %al
jne 0x1e326
jmp 0x1e35c
leaq 0x4dfd3(%rip), %rdi     # 0x6c300
leaq 0x4e7cc(%rip), %rsi     # 0x6cb00
callq 0x4bd0
testb $0x1, %al
jne 0x1e33f
jmp 0x1e35c
leaq 0x4e7ba(%rip), %rdi     # 0x6cb00
callq 0x2de0
leaq 0x4e7ae(%rip), %rdi     # 0x6cb00
callq 0x2bb0
jmp 0x1e40e
leaq 0x4e79d(%rip), %rdi     # 0x6cb00
callq 0x1e440
testb $0x1, %al
jne 0x1e3b1
movl 0x19f7e(%rip), %eax     # 0x382f0
subl $0x1, %eax
jne 0x1e389
jmp 0x1e379
leaq 0xd02b(%rip), %rdi      # 0x2b3ab
movb $0x0, %al
callq 0x20b0
jmp 0x1e397
leaq 0xd038(%rip), %rdi      # 0x2b3c8
movb $0x0, %al
callq 0x20b0
leaq 0x4e762(%rip), %rdi     # 0x6cb00
callq 0x2de0
leaq 0x4e756(%rip), %rdi     # 0x6cb00
callq 0x2bb0
jmp 0x1e40e
leaq 0x4df48(%rip), %rdi     # 0x6c300
callq 0x2de0
leaq 0x4df3c(%rip), %rdi     # 0x6c300
leaq 0x4e735(%rip), %rsi     # 0x6cb00
callq 0x4d70
leaq 0x4e729(%rip), %rdi     # 0x6cb00
callq 0x2bb0
testb $0x1, 0x4ef22(%rip)     # 0x6d305
je 0x1e40e
movl 0x19f04(%rip), %r9d     # 0x382f0
leaq 0x4df0d(%rip), %rdi     # 0x6c300
leaq -0x1911a(%rip), %rsi    # 0x52e0
xorl %eax, %eax
movl %eax, %r8d
leaq -0x1766(%rip), %rcx     # 0x1cca0
movq %r8, %rdx
callq 0x1e540
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/sdt.h
// Function: sdt_table_validate
static inline bool sdt_table_validate(uint8_t **pp_sections)
{
    uint8_t i_last_section = psi_table_get_lastsection(pp_sections);
    uint8_t i;
    uint16_t i_onid;

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

        if (!psi_check_crc(p_section))
            return false;

        if (!i)
            i_onid = sdt_get_onid(p_section);
        else if (sdt_get_onid(p_section) != i_onid)
            return false;

        while ((p_service = sdt_get_service(p_section, j)) != NULL) {
            j++;
            /* check that the service is not already in the table */
            if (sdt_table_find_service(pp_sections, sdtn_get_sid(p_service))
                 != p_service)
                return false;
        }
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x4b50
movb %al, -0x11(%rbp)
movb $0x0, -0x12(%rbp)
movzbl -0x12(%rbp), %eax
movzbl -0x11(%rbp), %ecx
cmpl %ecx, %eax
jg 0x1e52c
movq -0x10(%rbp), %rdi
movzbl -0x12(%rbp), %esi
callq 0x4da0
movq %rax, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5480
testb $0x1, %al
jne 0x1e49d
movb $0x0, -0x1(%rbp)
jmp 0x1e530
cmpb $0x0, -0x12(%rbp)
jne 0x1e4b2
movq -0x20(%rbp), %rdi
callq 0x1e9a0
movw %ax, -0x14(%rbp)
jmp 0x1e4ce
movq -0x20(%rbp), %rdi
callq 0x1e9a0
movzwl %ax, %eax
movzwl -0x14(%rbp), %ecx
cmpl %ecx, %eax
je 0x1e4cc
movb $0x0, -0x1(%rbp)
jmp 0x1e530
jmp 0x1e4ce
jmp 0x1e4d0
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %eax
movzbl %al, %esi
callq 0x1e9c0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1e51d
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
callq 0x1eb30
movq -0x38(%rbp), %rdi
movzwl %ax, %esi
callq 0x1ea80
cmpq -0x28(%rbp), %rax
je 0x1e51b
movb $0x0, -0x1(%rbp)
jmp 0x1e530
jmp 0x1e4d0
jmp 0x1e51f
movb -0x12(%rbp), %al
addb $0x1, %al
movb %al, -0x12(%rbp)
jmp 0x1e45f
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/sdt.h
// Function: sdt_table_find_service
static inline uint8_t *sdt_table_find_service(uint8_t **pp_sections,
                                              uint16_t i_sid)
{
    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_service;
        int j = 0;

        while ((p_service = sdt_get_service(p_section, j)) != NULL) {
            if (sdtn_get_sid(p_service) == i_sid)
                return p_service;
            j++;
        }
    }

    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movq %rdi, -0x10(%rbp)
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x4b50
movb %al, -0x13(%rbp)
movb $0x0, -0x14(%rbp)
movzbl -0x14(%rbp), %eax
movzbl -0x13(%rbp), %ecx
cmpl %ecx, %eax
jg 0x1eb18
movq -0x10(%rbp), %rdi
movzbl -0x14(%rbp), %esi
callq 0x4da0
movq %rax, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %eax
movzbl %al, %esi
callq 0x1e9c0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1eb0c
movq -0x28(%rbp), %rdi
callq 0x1eb30
movzwl %ax, %eax
movzwl -0x12(%rbp), %ecx
cmpl %ecx, %eax
jne 0x1eb01
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1eb20
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1eaca
jmp 0x1eb0e
movb -0x14(%rbp), %al
addb $0x1, %al
movb %al, -0x14(%rbp)
jmp 0x1eaa6
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/tdt.h
// Function: tdt_validate
static inline bool tdt_validate(const uint8_t *p_tdt)
{
    uint16_t i_section_size = psi_get_length(p_tdt) + PSI_HEADER_SIZE;
    uint8_t i_tid = psi_get_tableid(p_tdt);

    if (psi_get_syntax(p_tdt) || i_tid != TDT_TABLE_ID
         || i_section_size < TDT_HEADER_SIZE)
        return false;

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3500
movzwl %ax, %eax
addl $0x3, %eax
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3530
movb %al, -0x13(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4360
testb $0x1, %al
jne 0x1ec6a
movzbl -0x13(%rbp), %eax
cmpl $0x70, %eax
jne 0x1ec6a
movzwl -0x12(%rbp), %eax
cmpl $0x8, %eax
jge 0x1ec70
movb $0x0, -0x1(%rbp)
jmp 0x1ec74
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/tdt_print.h
// Function: tdt_print
static inline void tdt_print(uint8_t *p_tdt,
                             f_print pf_print, void *print_opaque,
                             f_iconv pf_iconv, void *iconv_opaque,
                             print_type_t i_print_type)
{
    (void) pf_iconv;
    (void) iconv_opaque;

    time_t ts;
    char ts_str[24];

    ts = dvb_time_format_UTC(tdt_get_utc(p_tdt), NULL, ts_str);

    switch (i_print_type) {
    case PRINT_XML:
        pf_print(print_opaque, "<TDT time=\"%ld\" time_dec=\"%s\"/>",
                 ts, ts_str);
        break;
    default:
        pf_print(print_opaque, "new TDT time=%ld time_dec=\"%s\"",
                 ts, ts_str);
        pf_print(print_opaque, "end TDT");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1ed20
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdx
callq 0x19440
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x1ece5
jmp 0x1ecc7
movq -0x10(%rbp), %r8
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq 0xc87c(%rip), %rsi      # 0x2b55a
movb $0x0, %al
callq *%r8
jmp 0x1ed14
movq -0x10(%rbp), %r8
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq 0xc87e(%rip), %rsi      # 0x2b57a
movb $0x0, %al
callq *%r8
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdi
leaq 0xc889(%rip), %rsi      # 0x2b599
movb $0x0, %al
callq *%rcx
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/tot.h
// Function: tot_validate
static inline bool tot_validate(const uint8_t *p_tot)
{
    uint16_t i_section_size = psi_get_length(p_tot) + PSI_HEADER_SIZE;
    uint8_t i_tid = psi_get_tableid(p_tot);

    if (psi_get_syntax(p_tot) || i_tid != TOT_TABLE_ID
         || i_section_size < TOT_HEADER_SIZE + PSI_CRC_SIZE)
        return false;

    /* TOT is a syntax0 table with CRC */
    if (!psi_check_crc(p_tot))
        return false;

    if (i_section_size < TOT_HEADER_SIZE
         || i_section_size < TOT_HEADER_SIZE + tot_get_desclength(p_tot))
        return false;

    if (!descs_validate(p_tot + 8))
        return false;

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3500
movzwl %ax, %eax
addl $0x3, %eax
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3530
movb %al, -0x13(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4360
testb $0x1, %al
jne 0x1edba
movzbl -0x13(%rbp), %eax
cmpl $0x73, %eax
jne 0x1edba
movzwl -0x12(%rbp), %eax
cmpl $0xe, %eax
jge 0x1edc0
movb $0x0, -0x1(%rbp)
jmp 0x1ee1d
movq -0x10(%rbp), %rdi
callq 0x5480
testb $0x1, %al
jne 0x1edd3
movb $0x0, -0x1(%rbp)
jmp 0x1ee1d
movzwl -0x12(%rbp), %eax
cmpl $0xa, %eax
jl 0x1edfc
movzwl -0x12(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1ef10
movw %ax, %cx
movl -0x18(%rbp), %eax
movzwl %cx, %ecx
addl $0xa, %ecx
cmpl %ecx, %eax
jge 0x1ee02
movb $0x0, -0x1(%rbp)
jmp 0x1ee1d
movq -0x10(%rbp), %rdi
addq $0x8, %rdi
callq 0x1ce60
testb $0x1, %al
jne 0x1ee19
movb $0x0, -0x1(%rbp)
jmp 0x1ee1d
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/tot_print.h
// Function: tot_print
static inline void tot_print(uint8_t *p_tot,
                             f_print pf_print, void *print_opaque,
                             f_iconv pf_iconv, void *iconv_opaque,
                             print_type_t i_print_type)
{
    time_t ts;
    char ts_str[24];

    ts = dvb_time_format_UTC(tot_get_utc(p_tot), NULL, ts_str);

    switch (i_print_type) {
    case PRINT_XML:
        pf_print(print_opaque, "<TOT time=\"%ld\" time_dec=\"%s\">",
                 ts, ts_str);
        break;
    default:
        pf_print(print_opaque, "new TOT time=%ld time_dec=\"%s\"",
                 ts, ts_str);
    }

    descs_print(tot_get_descs(p_tot), pf_print, print_opaque,
                pf_iconv, iconv_opaque, i_print_type);

    switch (i_print_type) {
    case PRINT_XML:
        pf_print(print_opaque, "</TOT>");
        break;
    default:
        pf_print(print_opaque, "end TOT");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1ed20
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdx
callq 0x19440
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x1ee95
jmp 0x1ee77
movq -0x10(%rbp), %r8
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq 0xc76b(%rip), %rsi      # 0x2b5f9
movb $0x0, %al
callq *%r8
jmp 0x1eeb1
movq -0x10(%rbp), %r8
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq 0xc76c(%rip), %rsi      # 0x2b618
movb $0x0, %al
callq *%r8
movq -0x8(%rbp), %rdi
callq 0x1ef40
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %r9d
callq 0x1ced0
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x1eef5
jmp 0x1eee0
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdi
leaq 0xc748(%rip), %rsi      # 0x2b637
movb $0x0, %al
callq *%rcx
jmp 0x1ef08
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdi
leaq 0xc73a(%rip), %rsi      # 0x2b63e
movb $0x0, %al
callq *%rcx
addq $0x50, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/rst.h
// Function: rst_validate
static inline bool rst_validate(const uint8_t *p_rst)
{
    if (psi_get_syntax(p_rst) || psi_get_tableid(p_rst) != RST_TABLE_ID)
        return false;
    if (psi_get_length(p_rst) % RST_STATUS_SIZE)
        return false;

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4360
testb $0x1, %al
jne 0x1ef8a
movq -0x10(%rbp), %rdi
callq 0x3530
movzbl %al, %eax
cmpl $0x71, %eax
je 0x1ef90
movb $0x0, -0x1(%rbp)
jmp 0x1efb3
movq -0x10(%rbp), %rdi
callq 0x3500
movzwl %ax, %eax
movl $0x9, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x1efaf
movb $0x0, -0x1(%rbp)
jmp 0x1efb3
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/dit.h
// Function: dit_validate
static inline bool dit_validate(const uint8_t *p_dit)
{
    uint16_t i_section_size = psi_get_length(p_dit) + PSI_HEADER_SIZE;
    uint8_t i_tid = psi_get_tableid(p_dit);

    if (psi_get_syntax(p_dit) || i_tid != DIT_TABLE_ID
         || i_section_size < DIT_HEADER_SIZE)
        return false;

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3500
movzwl %ax, %eax
addl $0x3, %eax
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3530
movb %al, -0x13(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4360
testb $0x1, %al
jne 0x1f2fa
movzbl -0x13(%rbp), %eax
cmpl $0x7e, %eax
jne 0x1f2fa
movzwl -0x12(%rbp), %eax
cmpl $0x3, %eax
jge 0x1f300
movb $0x0, -0x1(%rbp)
jmp 0x1f304
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/dit_print.h
// Function: dit_print
static inline void dit_print(uint8_t *p_dit,
                             f_print pf_print, void *print_opaque,
                             f_iconv pf_iconv, void *iconv_opaque,
                             print_type_t i_print_type)
{
    (void) pf_iconv;
    (void) iconv_opaque;

    switch (i_print_type) {
    case PRINT_XML:
        pf_print(print_opaque, "<DIT transition_flag=\"%u\"/>",
                 dit_get_transition_flag(p_dit));
        break;
    default:
        pf_print(print_opaque, "new DIT transition_flag=%u",
                 dit_get_transition_flag(p_dit));
        pf_print(print_opaque, "end DIT");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x1f36d
jmp 0x1f33a
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1f3c0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rcx
andb $0x1, %al
movzbl %al, %edx
leaq 0xc449(%rip), %rsi      # 0x2b7b0
movb $0x0, %al
callq *%rcx
jmp 0x1f3b1
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1f3c0
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rcx
andb $0x1, %al
movzbl %al, %edx
leaq 0xc432(%rip), %rsi      # 0x2b7cc
movb $0x0, %al
callq *%rcx
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdi
leaq 0xc43a(%rip), %rsi      # 0x2b7e7
movb $0x0, %al
callq *%rcx
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/eit.h
// Function: eit_validate
static inline bool eit_validate(const uint8_t *p_eit)
{
    uint16_t i_section_size = psi_get_length(p_eit) + PSI_HEADER_SIZE
                               - PSI_CRC_SIZE;
    uint8_t i_tid = psi_get_tableid(p_eit);
    const uint8_t *p_eit_n;

    if (!psi_get_syntax(p_eit)
         || (i_tid != EIT_TABLE_ID_PF_ACTUAL
              && i_tid != EIT_TABLE_ID_PF_OTHER
              && !(i_tid >= EIT_TABLE_ID_SCHED_ACTUAL_FIRST
                    && i_tid <= EIT_TABLE_ID_SCHED_ACTUAL_LAST)
              && !(i_tid >= EIT_TABLE_ID_SCHED_OTHER_FIRST
                    && i_tid <= EIT_TABLE_ID_SCHED_OTHER_LAST)))
        return false;

    if (!psi_check_crc(p_eit))
        return false;

    p_eit_n = p_eit + EIT_HEADER_SIZE;

    while (p_eit_n + EIT_EVENT_SIZE - p_eit <= i_section_size
            && p_eit_n + EIT_EVENT_SIZE + eitn_get_desclength(p_eit_n) - p_eit
                <= i_section_size) {
        if (!descs_validate(p_eit_n + 10))
            return false;

        p_eit_n += EIT_EVENT_SIZE + eitn_get_desclength(p_eit_n);
    }

    return (p_eit_n - p_eit == i_section_size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3500
movzwl %ax, %eax
addl $0x3, %eax
subl $0x4, %eax
movw %ax, -0x12(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3530
movb %al, -0x13(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4360
testb $0x1, %al
jne 0x1fa0d
jmp 0x1fa43
movzbl -0x13(%rbp), %eax
cmpl $0x4e, %eax
je 0x1fa4c
movzbl -0x13(%rbp), %eax
cmpl $0x4f, %eax
je 0x1fa4c
movzbl -0x13(%rbp), %eax
cmpl $0x50, %eax
jl 0x1fa31
movzbl -0x13(%rbp), %eax
cmpl $0x5f, %eax
jle 0x1fa4c
movzbl -0x13(%rbp), %eax
cmpl $0x60, %eax
jl 0x1fa43
movzbl -0x13(%rbp), %eax
cmpl $0x6f, %eax
jle 0x1fa4c
movb $0x0, -0x1(%rbp)
jmp 0x1fb22
movq -0x10(%rbp), %rdi
callq 0x5480
testb $0x1, %al
jne 0x1fa62
movb $0x0, -0x1(%rbp)
jmp 0x1fb22
movq -0x10(%rbp), %rax
addq $0xe, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
addq $0xc, %rcx
movq -0x10(%rbp), %rax
subq %rax, %rcx
movzwl -0x12(%rbp), %eax
movl %eax, %edx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x21(%rbp)
jg 0x1fac6
movq -0x20(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x200d0
movw %ax, %cx
movq -0x30(%rbp), %rax
movzwl %cx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movzwl -0x12(%rbp), %ecx
cmpq %rcx, %rax
setle %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x1facf
jmp 0x1fb08
movq -0x20(%rbp), %rdi
addq $0xa, %rdi
callq 0x1ce60
testb $0x1, %al
jne 0x1fae6
movb $0x0, -0x1(%rbp)
jmp 0x1fb22
movq -0x20(%rbp), %rdi
callq 0x200d0
movzwl %ax, %ecx
addl $0xc, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x1fa6e
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movzwl -0x12(%rbp), %ecx
cmpq %rcx, %rax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)