// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/ait_print.h
// Function: ait_table_print
static inline void ait_table_print(uint8_t **pp_sections,
                                   f_print pf_print, void *print_opaque,
                                   f_iconv pf_iconv, void *iconv_opaque,
                                   print_type_t i_print_type)
{
    uint8_t i_last_section = psi_table_get_lastsection(pp_sections);
    uint8_t i;

    uint16_t idext = psi_table_get_tableidext(pp_sections);
    uint8_t test = idext & 0x8000 ? 1 : 0;
    uint16_t type = idext & 0x7fff;

    switch (i_print_type) {
    case PRINT_XML:
        pf_print(print_opaque, "<AIT test=\"%s\" type=\"%hu\" version=\"%hhu\" "
                 "current_next=\"%d\">",
                 test ? "true" : "false",
                 type,
                 psi_table_get_version(pp_sections),
                 !psi_table_get_current(pp_sections) ? 0 : 1);
        break;
    default:
        pf_print(print_opaque, "new AIT %stype=%hu version=%hhu%s",
                 test ? "test " : "",
                 type,
                 psi_table_get_version(pp_sections),
                 !psi_table_get_current(pp_sections) ? " (next)" : "");
    }

    descs_print(ait_get_descs(psi_table_get_section(pp_sections, 0)),
                pf_print, print_opaque, pf_iconv, iconv_opaque, i_print_type);

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

        ait_each_app(p_section, p_app) {
            switch (i_print_type) {
                case PRINT_XML:
                    break;
                default:
                    pf_print(print_opaque, "  * app organisation=%u id=%hu "
                             "control_code=%s",
                             aitn_get_organisation_id(p_app),
                             aitn_get_application_id(p_app),
                             aitn_control_code_txt(aitn_get_control_code(p_app))
                             );
                    break;
            }

            aitn_each_desc(p_app, p_desc) {
                uint8_t tag = desc_get_tag(p_desc);

                switch (tag) {
#define CASE_DESC(Value, Name) \
                case AIT_DESC_##Value: \
                    if (ait_desc_##Name##_validate(p_desc)) \
                        ait_desc_##Name##_print(p_desc, \
                                                pf_print, print_opaque, \
                                                pf_iconv, iconv_opaque, \
                                                i_print_type); \
                    else \
                        desc_print_error(p_desc, pf_print, print_opaque, \
                                         i_print_type); \
                    break;

                CASE_DESC(APP, app)
                CASE_DESC(APP_NAME, app_name)
                CASE_DESC(TRANSPORT_PROTO, transport_proto)
                CASE_DESC(APP_LOCATION, app_location)
#undef CASE_DESC

                default:
                    desc_print(p_desc, pf_print, print_opaque, i_print_type);
                    break;
                }
            }
        }
    }

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %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), %rax
movq (%rax), %rdi
callq 0x4b50
movb %al, -0x2d(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4b90
movw %ax, -0x30(%rbp)
movzwl -0x30(%rbp), %eax
shrl $0xf, %eax
movb %al, -0x31(%rbp)
movzwl -0x30(%rbp), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movw %ax, -0x34(%rbp)
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x21cf4
jmp 0x21c67
movq -0x10(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movzbl -0x31(%rbp), %edx
leaq 0xa173(%rip), %rax      # 0x2bdf5
leaq 0xa129(%rip), %rcx      # 0x2bdb2
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x70(%rbp)
movzwl -0x34(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4b70
movzbl %al, %eax
movl %eax, -0x64(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5840
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rdx
movl -0x68(%rbp), %ecx
movl -0x64(%rbp), %r8d
movq -0x60(%rbp), %r10
movb %al, %sil
xorb $-0x1, %sil
movl $0x1, %r9d
xorl %eax, %eax
testb $0x1, %sil
cmovnel %eax, %r9d
leaq 0xa556(%rip), %rsi      # 0x2c240
movb $0x0, %al
callq *%r10
jmp 0x21d9a
movq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x98(%rbp)
movzbl -0x31(%rbp), %edx
leaq 0x93ad(%rip), %rax      # 0x2b0bf
leaq 0xa585(%rip), %rcx      # 0x2c29e
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x90(%rbp)
movzwl -0x34(%rbp), %eax
movl %eax, -0x88(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x4b70
movzbl %al, %eax
movl %eax, -0x84(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x5840
movq -0x98(%rbp), %rdi
movq -0x90(%rbp), %rdx
movl -0x88(%rbp), %ecx
movl -0x84(%rbp), %r8d
movq -0x80(%rbp), %r10
movb %al, %sil
xorb $-0x1, %sil
leaq 0x9340(%rip), %r9       # 0x2b0bf
leaq 0x21da(%rip), %rax      # 0x23f60
testb $0x1, %sil
cmovneq %rax, %r9
leaq 0xa4e7(%rip), %rsi      # 0x2c27c
movb $0x0, %al
callq *%r10
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x4da0
movq %rax, %rdi
callq 0x22090
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
movb $0x0, -0x2e(%rbp)
movzbl -0x2e(%rbp), %eax
movzbl -0x2d(%rbp), %ecx
cmpl %ecx, %eax
jg 0x22054
movq -0x8(%rbp), %rdi
movzbl -0x2e(%rbp), %esi
callq 0x4da0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x21a90
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x22045
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x21e16
jmp 0x21e14
jmp 0x21e87
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x48(%rbp), %rdi
callq 0x220b0
movl %eax, -0xa8(%rbp)
movq -0x48(%rbp), %rdi
callq 0x220f0
movzwl %ax, %eax
movl %eax, -0xa4(%rbp)
movq -0x48(%rbp), %rdi
callq 0x221c0
movzbl %al, %edi
callq 0x22110
movq -0xb0(%rbp), %rdi
movl -0xa8(%rbp), %edx
movl -0xa4(%rbp), %ecx
movq -0xa0(%rbp), %r9
movq %rax, %r8
leaq 0xa422(%rip), %rsi      # 0x2c2a4
movb $0x0, %al
callq *%r9
movq -0x48(%rbp), %rdi
callq 0x221e0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x56a0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x2202d
movq -0x50(%rbp), %rdi
callq 0x5700
movb %al, -0x51(%rbp)
movzbl -0x51(%rbp), %eax
movq %rax, -0xb8(%rbp)
subq $0x15, %rax
ja 0x21ff9
movq -0xb8(%rbp), %rax
leaq 0x198e(%rip), %rcx      # 0x23868
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x50(%rbp), %rdi
callq 0x22200
testb $0x1, %al
jne 0x21ef2
jmp 0x21f11
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %r9d
callq 0x22270
jmp 0x21f25
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x7a00
jmp 0x2200d
movq -0x50(%rbp), %rdi
callq 0x22540
testb $0x1, %al
jne 0x21f39
jmp 0x21f58
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %r9d
callq 0x22570
jmp 0x21f6c
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x7a00
jmp 0x2200d
movq -0x50(%rbp), %rdi
callq 0x22680
testb $0x1, %al
jne 0x21f80
jmp 0x21f9f
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %r9d
callq 0x226d0
jmp 0x21fb3
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x7a00
jmp 0x2200d
movq -0x50(%rbp), %rdi
callq 0x22790
testb $0x1, %al
jne 0x21fc4
jmp 0x21fe3
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
movl -0x2c(%rbp), %r9d
callq 0x227c0
jmp 0x21ff7
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x7a00
jmp 0x2200d
movq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x12ed0
jmp 0x2200f
movq -0x48(%rbp), %rdi
callq 0x221e0
movq %rax, %rdi
movq -0x50(%rbp), %rsi
callq 0x56a0
movq %rax, -0x50(%rbp)
jmp 0x21ea0
jmp 0x2202f
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x21a90
movq %rax, -0x48(%rbp)
jmp 0x21dff
jmp 0x22047
movb -0x2e(%rbp), %al
addb $0x1, %al
movb %al, -0x2e(%rbp)
jmp 0x21dcd
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x22073
jmp 0x2205e
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdi
leaq 0xa266(%rip), %rsi      # 0x2c2d3
movb $0x0, %al
callq *%rcx
jmp 0x22086
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdi
leaq 0xa258(%rip), %rsi      # 0x2c2da
movb $0x0, %al
callq *%rcx
addq $0xc0, %rsp
popq %rbp
retq
nop