// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movb (%rdi), %bpl
movzbl 0x1(%rdi), %r14d
testq %r14, %r14
je 0xf9bf
leaq 0x2(%rdi), %r15
movzbl (%r15), %ecx
testq %rcx, %rcx
je 0xfa69
movq %rsi, %rax
cmpb $0x1f, %cl
jbe 0xf9d0
leaq 0x4ec0(%rip), %rsi      # 0x1487a
jmp 0xfa45
leaq 0x935c(%rip), %rdi      # 0x18d22
callq 0x2200
jmp 0xfa59
leaq -0x1(%r14), %rdx
cmpl $0x10, %ecx
setne %sil
cmpq $0x2, %rdx
setb %r8b
orb %sil, %r8b
jne 0xfa1a
movb 0x4(%rdi), %cl
leaq 0x5(%rdi), %r15
addq $-0x3, %r14
cmpb $0x0, 0x3(%rdi)
setne %dl
leal -0x10(%rcx), %esi
cmpb $-0xf, %sil
setb %sil
orb %dl, %sil
jne 0xfa69
movzbl %cl, %ecx
leaq 0xce0c(%rip), %rdx      # 0x1c820
leaq (%rdx,%rcx,8), %rcx
jmp 0xfa42
cmpl $0x1f, %ecx
setne %sil
testq %rdx, %rdx
sete %r8b
orb %sil, %r8b
je 0xfa5e
addq $0x3, %rdi
leaq 0xce78(%rip), %rsi      # 0x1c8b0
leaq (%rsi,%rcx,8), %rcx
movq %rdi, %r15
movq %rdx, %r14
movq (%rcx), %rsi
testq %r14, %r14
je 0xfa69
testq %rsi, %rsi
je 0xfa69
xorl %edi, %edi
movq %r15, %rdx
movq %r14, %rcx
callq *%rax
movq %rax, %r12
jmp 0xfa88
addq $0x4, %rdi
addq $-0x2, %r14
movq %rdi, %r15
leaq 0x1(%r14), %rdi
callq 0x2160
movq %rax, %r12
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x2150
movb $0x0, (%r12,%r14)
cmpl $0x1, %ebx
jne 0xfad3
xorl %ebx, %ebx
testq %r12, %r12
je 0xfabc
movq %r12, %rdi
xorl %esi, %esi
callq 0x105ea
movq %rax, %rdi
callq 0x2160
testq %rax, %rax
je 0xfabc
movq %rax, %r14
movq %r12, %rdi
movq %rax, %rsi
callq 0x105ea
movq %r14, %rbx
movq %r12, %rdi
callq 0x2030
cmpb $0x47, %bpl
jne 0xfae2
leaq 0x4d45(%rip), %rsi      # 0x14816
jmp 0xfae9
cmpb $0x47, %bpl
jne 0xfaf5
leaq 0x4d7b(%rip), %rsi      # 0x1485b
jmp 0xfafc
leaq 0x4d07(%rip), %rsi      # 0x147f0
movq %rbx, %rdx
xorl %eax, %eax
callq 0x7e94
jmp 0xfb09
leaq 0x4d40(%rip), %rsi      # 0x1483c
movq %r12, %rdx
xorl %eax, %eax
callq 0x7e94
movq %r12, %rbx
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2030