// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/dvb/si/eit_print.h
// Function: eit_print
static inline void eit_print(uint8_t *p_eit,
                             f_print pf_print, void *print_opaque,
                             f_iconv pf_iconv, void *iconv_opaque,
                             print_type_t i_print_type)
{
    uint8_t *p_event;
    uint8_t j = 0;
    uint8_t i_tid = psi_get_tableid(p_eit);
    const char *psz_tid = "unknown";

    if (i_tid == EIT_TABLE_ID_PF_ACTUAL)
        psz_tid = "actual_pf";
    else if (i_tid == EIT_TABLE_ID_PF_OTHER)
        psz_tid = "other_pf";
    else if (i_tid >= EIT_TABLE_ID_SCHED_ACTUAL_FIRST && i_tid <= EIT_TABLE_ID_SCHED_ACTUAL_LAST)
        psz_tid = "actual_schedule";
    else if (i_tid >= EIT_TABLE_ID_SCHED_OTHER_FIRST && i_tid <= EIT_TABLE_ID_SCHED_OTHER_LAST)
        psz_tid = "other_schedule";

    switch (i_print_type) {
    case PRINT_XML:
        pf_print(print_opaque,
                "<EIT tableid=\"0x%02x\" type=\"%s\" service_id=\"%u\""
                " version=\"%u\" section=\"%u\" last_section=\"%u\""
                " current_next=\"%u\" segment_last_section=\"%u\""
                " tsid=\"%u\" onid=\"%u\">",
                 i_tid, psz_tid,
                 eit_get_sid(p_eit),
                 psi_get_version(p_eit),
                 psi_get_section(p_eit),
                 psi_get_lastsection(p_eit),
                 !psi_get_current(p_eit) ? 0 : 1,
                 eit_get_segment_last_sec_number(p_eit),
                 eit_get_tsid(p_eit),
                 eit_get_onid(p_eit)
                );
        break;
    default:
        pf_print(print_opaque,
                 "new EIT tableid=0x%02x type=%s service_id=%u version=%u%s"
                 " section=%u/%u segment_last_section=%u tsid=%u"
                 " onid=%u",
                 i_tid, psz_tid,
                 eit_get_sid(p_eit),
                 psi_get_version(p_eit),
                 !psi_get_current(p_eit) ? " (next)" : "",
                 psi_get_section(p_eit),
                 psi_get_lastsection(p_eit),
                 eit_get_segment_last_sec_number(p_eit),
                 eit_get_tsid(p_eit),
                 eit_get_onid(p_eit)
                );
    }

    while ((p_event = eit_get_event(p_eit, j)) != NULL) {
        j++;
        char start_str[24];
        int duration, hour, min, sec;
        time_t start_ts;

        start_ts = dvb_time_format_UTC(eitn_get_start_time(p_event), NULL, start_str);

        dvb_time_decode_bcd(eitn_get_duration_bcd(p_event), &duration, &hour, &min, &sec);

        switch (i_print_type) {
        case PRINT_XML:
            pf_print(print_opaque, "<EVENT id=\"%u\" start_time=\"%ld\" start_time_dec=\"%s\""
                                   " duration=\"%u\" duration_dec=\"%u:%02u:%02u\""
                                   " running=\"%d\" free_CA=\"%d\">",
                     eitn_get_event_id(p_event),
                     start_ts, start_str,
                     duration, hour, min, sec,
                     eitn_get_running(p_event),
                     eitn_get_ca(p_event)
                    );
            break;
        default:
            pf_print(print_opaque, "  * EVENT id=%u start_time=%ld start_time_dec=\"%s\" duration=%u duration_dec=%u:%02u:%02u running=%d free_CA=%d",
                     eitn_get_event_id(p_event),
                     start_ts, start_str,
                     duration, hour, min, sec,
                     eitn_get_running(p_event),
                     eitn_get_ca(p_event)
                    );
        }

        descs_print(eitn_get_descs(p_event), pf_print, print_opaque,
                    pf_iconv, iconv_opaque, i_print_type);

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x170, %rsp            # imm = 0x170
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq %r8, -0x48(%rbp)
movl %r9d, -0x4c(%rbp)
movb $0x0, -0x59(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3530
movb %al, -0x5a(%rbp)
leaq 0x49c5(%rip), %rax      # 0x24536
movq %rax, -0x68(%rbp)
movzbl -0x5a(%rbp), %eax
cmpl $0x4e, %eax
jne 0x1fb8b
leaq 0xbde7(%rip), %rax      # 0x2b96c
movq %rax, -0x68(%rbp)
jmp 0x1fbe3
movzbl -0x5a(%rbp), %eax
cmpl $0x4f, %eax
jne 0x1fba1
leaq 0xbddb(%rip), %rax      # 0x2b976
movq %rax, -0x68(%rbp)
jmp 0x1fbe1
movzbl -0x5a(%rbp), %eax
cmpl $0x50, %eax
jl 0x1fbc0
movzbl -0x5a(%rbp), %eax
cmpl $0x5f, %eax
jg 0x1fbc0
leaq 0xbdc5(%rip), %rax      # 0x2b97f
movq %rax, -0x68(%rbp)
jmp 0x1fbdf
movzbl -0x5a(%rbp), %eax
cmpl $0x60, %eax
jl 0x1fbdd
movzbl -0x5a(%rbp), %eax
cmpl $0x6f, %eax
jg 0x1fbdd
leaq 0xbdb6(%rip), %rax      # 0x2b98f
movq %rax, -0x68(%rbp)
jmp 0x1fbdf
jmp 0x1fbe1
jmp 0x1fbe3
movl -0x4c(%rbp), %eax
subl $0x1, %eax
jne 0x1fcfd
jmp 0x1fbf1
movq -0x30(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xc8(%rbp)
movzbl -0x5a(%rbp), %eax
movl %eax, -0xbc(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4b90
movzwl %ax, %eax
movl %eax, -0xac(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4b70
movzbl %al, %eax
movl %eax, -0xa8(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4b30
movzbl %al, %r12d
movq -0x28(%rbp), %rdi
callq 0x4b50
movzbl %al, %r15d
movq -0x28(%rbp), %rdi
callq 0x5840
movb %al, %cl
xorb $-0x1, %cl
movl $0x1, %r14d
xorl %eax, %eax
testb $0x1, %cl
cmovnel %eax, %r14d
movq -0x28(%rbp), %rdi
callq 0x20100
movzbl %al, %ebx
movq -0x28(%rbp), %rdi
callq 0x20120
movzwl %ax, %eax
movl %eax, -0xa4(%rbp)
movq -0x28(%rbp), %rdi
callq 0x20140
movq -0xc8(%rbp), %rdi
movl -0xbc(%rbp), %edx
movq -0xb8(%rbp), %rcx
movl -0xac(%rbp), %r8d
movl -0xa8(%rbp), %r9d
movl -0xa4(%rbp), %r11d
movq -0xa0(%rbp), %r10
movzwl %ax, %eax
leaq 0xbcc6(%rip), %rsi      # 0x2b99e
movl %r12d, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movb $0x0, %al
callq *%r10
jmp 0x1fe0a
movq -0x30(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xf8(%rbp)
movzbl -0x5a(%rbp), %eax
movl %eax, -0xec(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4b90
movzwl %ax, %eax
movl %eax, -0xdc(%rbp)
movq -0x28(%rbp), %rdi
callq 0x4b70
movzbl %al, %eax
movl %eax, -0xd8(%rbp)
movq -0x28(%rbp), %rdi
callq 0x5840
movb %al, %cl
xorb $-0x1, %cl
leaq 0xb35e(%rip), %r12      # 0x2b0bf
leaq 0x41f8(%rip), %rax      # 0x23f60
testb $0x1, %cl
cmovneq %rax, %r12
movq -0x28(%rbp), %rdi
callq 0x4b30
movzbl %al, %r15d
movq -0x28(%rbp), %rdi
callq 0x4b50
movzbl %al, %r14d
movq -0x28(%rbp), %rdi
callq 0x20100
movzbl %al, %ebx
movq -0x28(%rbp), %rdi
callq 0x20120
movzwl %ax, %eax
movl %eax, -0xd4(%rbp)
movq -0x28(%rbp), %rdi
callq 0x20140
movq -0xf8(%rbp), %rdi
movl -0xec(%rbp), %edx
movq -0xe8(%rbp), %rcx
movl -0xdc(%rbp), %r8d
movl -0xd8(%rbp), %r9d
movl -0xd4(%rbp), %r11d
movq -0xd0(%rbp), %r10
movzwl %ax, %eax
leaq 0xbc51(%rip), %rsi      # 0x2ba3b
movq %r12, (%rsp)
movl %r15d, 0x8(%rsp)
movl %r14d, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movl %r11d, 0x20(%rsp)
movl %eax, 0x28(%rsp)
movb $0x0, %al
callq *%r10
jmp 0x1fe0c
movq -0x28(%rbp), %rdi
movzbl -0x59(%rbp), %esi
callq 0x20160
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x2007f
movb -0x59(%rbp), %al
incb %al
movb %al, -0x59(%rbp)
movq -0x58(%rbp), %rdi
callq 0x20240
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x80(%rbp), %rdx
callq 0x19440
movq %rax, -0x98(%rbp)
movq -0x58(%rbp), %rdi
callq 0x20290
movl %eax, %edi
leaq -0x84(%rbp), %rsi
leaq -0x88(%rbp), %rdx
leaq -0x8c(%rbp), %rcx
leaq -0x90(%rbp), %r8
callq 0x19760
movl -0x4c(%rbp), %eax
subl $0x1, %eax
jne 0x1ff61
jmp 0x1fe89
movq -0x30(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x58(%rbp), %rdi
callq 0x202c0
movzwl %ax, %eax
movl %eax, -0x11c(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x110(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x108(%rbp)
movl -0x88(%rbp), %r15d
movl -0x8c(%rbp), %r14d
movl -0x90(%rbp), %ebx
movq -0x58(%rbp), %rdi
callq 0x202e0
movzbl %al, %eax
movl %eax, -0x104(%rbp)
movq -0x58(%rbp), %rdi
callq 0x20300
movq -0x128(%rbp), %rdi
movl -0x11c(%rbp), %edx
movq -0x118(%rbp), %rcx
movq -0x110(%rbp), %r8
movl -0x108(%rbp), %r9d
movl -0x104(%rbp), %r11d
movq -0x100(%rbp), %r10
andb $0x1, %al
movzbl %al, %eax
leaq 0xbb6a(%rip), %rsi      # 0x2baab
movl %r15d, (%rsp)
movl %r14d, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq *%r10
jmp 0x20034
movq -0x30(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x158(%rbp)
movq -0x58(%rbp), %rdi
callq 0x202c0
movzwl %ax, %eax
movl %eax, -0x14c(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x140(%rbp)
movl -0x84(%rbp), %eax
movl %eax, -0x138(%rbp)
movl -0x88(%rbp), %r15d
movl -0x8c(%rbp), %r14d
movl -0x90(%rbp), %ebx
movq -0x58(%rbp), %rdi
callq 0x202e0
movzbl %al, %eax
movl %eax, -0x134(%rbp)
movq -0x58(%rbp), %rdi
callq 0x20300
movq -0x158(%rbp), %rdi
movl -0x14c(%rbp), %edx
movq -0x148(%rbp), %rcx
movq -0x140(%rbp), %r8
movl -0x138(%rbp), %r9d
movl -0x134(%rbp), %r11d
movq -0x130(%rbp), %r10
andb $0x1, %al
movzbl %al, %eax
leaq 0xbb0b(%rip), %rsi      # 0x2bb24
movl %r15d, (%rsp)
movl %r14d, 0x8(%rsp)
movl %ebx, 0x10(%rsp)
movl %r11d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movb $0x0, %al
callq *%r10
movq -0x58(%rbp), %rdi
callq 0x20320
movq %rax, %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %r8
movl -0x4c(%rbp), %r9d
callq 0x1ced0
movl -0x4c(%rbp), %eax
subl $0x1, %eax
jne 0x20078
jmp 0x20063
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rdi
leaq 0xbb21(%rip), %rsi      # 0x2bb93
movb $0x0, %al
callq *%rcx
jmp 0x2007a
jmp 0x2007a
jmp 0x1fe0c
movl -0x4c(%rbp), %eax
subl $0x1, %eax
jne 0x2009e
jmp 0x20089
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rdi
leaq 0xbb04(%rip), %rsi      # 0x2bb9c
movb $0x0, %al
callq *%rcx
jmp 0x200b1
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rdi
leaq 0xbaf6(%rip), %rsi      # 0x2bba3
movb $0x0, %al
callq *%rcx
addq $0x170, %rsp            # imm = 0x170
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopw %cs:(%rax,%rax)