// File: /workspace/github_c_makefile_star2_O0/videolan[P]bitstream/examples/./bitstream/scte/35_print.h
// Function: scte35_insert_print
static inline void scte35_insert_print(const uint8_t *p_scte35,
        f_print pf_print, void *print_opaque, print_type_t i_print_type)
{
    uint64_t i_pts_adjustment = scte35_get_pts_adjustment(p_scte35);
    uint32_t i_event_id = scte35_insert_get_event_id(p_scte35);

    if (scte35_insert_has_cancel(p_scte35)) {
        switch (i_print_type) {
        case PRINT_XML:
            pf_print(print_opaque,
                     "<SCTE35 command=\"%" PRIu8 "\" command_str=\"insert\" pts_adjustment=\"%" PRIu64 "\" event_id=\"%" PRIu32 "\" cancel=\"1\">",
                     SCTE35_INSERT_COMMAND, i_pts_adjustment, i_event_id);
            break;
        default:
            pf_print(print_opaque,
                     "new SCTE35 command=%" PRIu8 " command_str=insert pts_adjustment=%" PRIu64 " event_id=%" PRIu32 " cancel=true",
                     SCTE35_INSERT_COMMAND, i_pts_adjustment, i_event_id);
        }
        return;
    }

    bool b_out_of_network = scte35_insert_has_out_of_network(p_scte35);
    bool b_program_splice = scte35_insert_has_program_splice(p_scte35);
    bool b_duration = scte35_insert_has_duration(p_scte35);
    bool b_splice_immediate = scte35_insert_has_splice_immediate(p_scte35);
    uint16_t i_unique_program_id = scte35_insert_get_unique_program_id(p_scte35);

    char psz_duration[256];
    psz_duration[0] = '\0';
    psz_duration[255] = '\0';
    if (b_duration) {
        const uint8_t *p_break_duration =
            scte35_insert_get_break_duration(p_scte35);
        bool b_auto_return =
            scte35_break_duration_has_auto_return(p_break_duration);
        uint64_t i_duration =
            scte35_break_duration_get_duration(p_break_duration);

        switch (i_print_type) {
        case PRINT_XML:
            snprintf(psz_duration, 255,
                     " auto_return=\"%d\" duration=\"%" PRIu64 "\"",
                     b_auto_return ? 1 : 0, i_duration);
            break;
        default:
            snprintf(psz_duration, 255,
                     " auto_return=%s duration=%" PRIu64 "",
                     b_auto_return ? "true" : "false", i_duration);
        }
    }

    char psz_splice_time[256];
    psz_splice_time[0] = '\0';
    psz_splice_time[255] = '\0';
    if (b_splice_immediate) {
        switch (i_print_type) {
        case PRINT_XML:
            snprintf(psz_splice_time, 255, " splice_time=\"immediate\"");
            break;
        default:
            snprintf(psz_splice_time, 255, " splice_time=immediate");
        }
    } else {
        const uint8_t *p_splice_time = NULL;
        if (b_program_splice)
            p_splice_time = scte35_insert_get_splice_time(p_scte35);
        else if (scte35_insert_get_component_count(p_scte35))
            p_splice_time = scte35_insert_component_get_splice_time(
                    scte35_insert_get_component(p_scte35, 0));

        if (p_splice_time == NULL ||
            !scte35_splice_time_has_time_specified(p_splice_time)) {
            switch (i_print_type) {
            case PRINT_XML:
                snprintf(psz_splice_time, 255, " splice_time=\"undefined\"");
                break;
            default:
                snprintf(psz_splice_time, 255, " splice_time=undefined");
            }
        } else {
            uint64_t i_pts_time =
                scte35_splice_time_get_pts_time(p_splice_time);

            switch (i_print_type) {
            case PRINT_XML:
                snprintf(psz_splice_time, 255, " splice_time=\"%" PRIu64 "\"",
                         i_pts_time);
                break;
            default:
                snprintf(psz_splice_time, 255, " splice_time=%" PRIu64 "",
                         i_pts_time);
            }
        }
    }

    switch (i_print_type) {
    case PRINT_XML:
        pf_print(print_opaque,
                 "<SCTE35 command=\"%" PRIu8 "\" command_str=\"insert\" pts_adjustment=\"%" PRIu64 "\" event_id=\"%" PRIu32 "\" cancel=\"0\" out_of_network=\"%d\" program_splice=\"%d\"%s%s unique_program_id=\"%" PRIu16 "\">",
                 SCTE35_INSERT_COMMAND, i_pts_adjustment, i_event_id,
                 b_out_of_network ? 1 : 0, b_program_splice ? 1 : 0,
                 psz_splice_time, psz_duration, i_unique_program_id);
        break;
    default:
        pf_print(print_opaque,
                 "new SCTE35 command=%" PRIu8 " command_str=insert pts_adjustment=%" PRIu64 " event_id=%" PRIu32 " cancel=false out_of_network=%s program_splice=%s%s%s unique_program_id=%" PRIu16,
                 SCTE35_INSERT_COMMAND, i_pts_adjustment, i_event_id,
                 b_out_of_network ? "true" : "false",
                 b_program_splice ? "true" : "false",
                 psz_splice_time, psz_duration, i_unique_program_id);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x290, %rsp            # imm = 0x290
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movl %ecx, -0x2c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x21450
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
callq 0x21560
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20b00
testb $0x1, %al
jne 0x20ec5
jmp 0x20f18
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x20ef2
jmp 0x20ecf
movq -0x20(%rbp), %r9
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rcx
movl -0x3c(%rbp), %r8d
leaq 0xae24(%rip), %rsi      # 0x2bd0a
movl $0x5, %edx
movb $0x0, %al
callq *%r9
jmp 0x20f13
movq -0x20(%rbp), %r9
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rcx
movl -0x3c(%rbp), %r8d
leaq 0xae5a(%rip), %rsi      # 0x2bd63
movl $0x5, %edx
movb $0x0, %al
callq *%r9
jmp 0x21275
movq -0x18(%rbp), %rdi
callq 0x215b0
andb $0x1, %al
movb %al, -0x3d(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20b40
andb $0x1, %al
movb %al, -0x3e(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20bc0
andb $0x1, %al
movb %al, -0x3f(%rbp)
movq -0x18(%rbp), %rdi
callq 0x20b80
andb $0x1, %al
movb %al, -0x40(%rbp)
movq -0x18(%rbp), %rdi
callq 0x215f0
movw %ax, -0x42(%rbp)
movb $0x0, -0x150(%rbp)
movb $0x0, -0x51(%rbp)
testb $0x1, -0x3f(%rbp)
je 0x21025
movq -0x18(%rbp), %rdi
callq 0x21630
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rdi
callq 0x216e0
movb %al, -0x159(%rbp)
movq -0x158(%rbp), %rdi
callq 0x21710
movq %rax, -0x168(%rbp)
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x20fe7
jmp 0x20fb1
leaq -0x150(%rbp), %rdi
movb -0x159(%rbp), %dl
xorl %ecx, %ecx
movl $0x1, %eax
testb $0x1, %dl
cmovnel %eax, %ecx
movq -0x168(%rbp), %r8
movl $0xff, %esi
leaq 0xadd9(%rip), %rdx      # 0x2bdb7
movb $0x0, %al
callq 0x20d0
jmp 0x21023
leaq -0x150(%rbp), %rdi
movb -0x159(%rbp), %dl
leaq 0xadfa(%rip), %rcx      # 0x2bdf5
leaq 0xadb0(%rip), %rax      # 0x2bdb2
testb $0x1, %dl
cmovneq %rax, %rcx
movq -0x168(%rbp), %r8
movl $0xff, %esi
leaq 0xadbc(%rip), %rdx      # 0x2bdd8
movb $0x0, %al
callq 0x20d0
jmp 0x21025
movb $0x0, -0x270(%rbp)
movb $0x0, -0x171(%rbp)
testb $0x1, -0x40(%rbp)
je 0x2107e
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x2105f
jmp 0x21043
leaq -0x270(%rbp), %rdi
movl $0xff, %esi
leaq 0xada5(%rip), %rdx      # 0x2bdfb
movb $0x0, %al
callq 0x20d0
jmp 0x21079
leaq -0x270(%rbp), %rdi
movl $0xff, %esi
leaq 0xada2(%rip), %rdx      # 0x2be14
movb $0x0, %al
callq 0x20d0
jmp 0x2118b
movq $0x0, -0x278(%rbp)
testb $0x1, -0x3e(%rbp)
je 0x210a1
movq -0x18(%rbp), %rdi
callq 0x20c30
movq %rax, -0x278(%rbp)
jmp 0x210ca
movq -0x18(%rbp), %rdi
callq 0x20d70
cmpb $0x0, %al
je 0x210c8
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x20c60
movq %rax, %rdi
callq 0x20dd0
movq %rax, -0x278(%rbp)
jmp 0x210ca
cmpq $0x0, -0x278(%rbp)
je 0x210e4
movq -0x278(%rbp), %rdi
callq 0x20da0
testb $0x1, %al
jne 0x21126
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x2110a
jmp 0x210ee
leaq -0x270(%rbp), %rdi
movl $0xff, %esi
leaq 0xad2a(%rip), %rdx      # 0x2be2b
movb $0x0, %al
callq 0x20d0
jmp 0x21124
leaq -0x270(%rbp), %rdi
movl $0xff, %esi
leaq 0xafad(%rip), %rdx      # 0x2c0ca
movb $0x0, %al
callq 0x20d0
jmp 0x21189
movq -0x278(%rbp), %rdi
callq 0x21770
movq %rax, -0x280(%rbp)
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x21166
jmp 0x21143
leaq -0x270(%rbp), %rdi
movq -0x280(%rbp), %rcx
movl $0xff, %esi
leaq 0xace7(%rip), %rdx      # 0x2be44
movb $0x0, %al
callq 0x20d0
jmp 0x21187
leaq -0x270(%rbp), %rdi
movq -0x280(%rbp), %rcx
movl $0xff, %esi
leaq 0xaef9(%rip), %rdx      # 0x2c079
movb $0x0, %al
callq 0x20d0
jmp 0x21189
jmp 0x2118b
movl -0x2c(%rbp), %eax
subl $0x1, %eax
jne 0x21200
jmp 0x21195
movq -0x20(%rbp), %r10
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rcx
movl -0x3c(%rbp), %r8d
movb -0x3d(%rbp), %dl
xorl %r9d, %r9d
movl $0x1, %eax
testb $0x1, %dl
cmovnel %eax, %r9d
movb -0x3e(%rbp), %dl
xorl %r14d, %r14d
movl $0x1, %eax
testb $0x1, %dl
cmovnel %eax, %r14d
leaq -0x270(%rbp), %rbx
leaq -0x150(%rbp), %r11
movzwl -0x42(%rbp), %eax
leaq 0xac75(%rip), %rsi      # 0x2be57
movl $0x5, %edx
movl %r14d, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq *%r10
jmp 0x21275
movq -0x20(%rbp), %r10
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rcx
movl -0x3c(%rbp), %r8d
movb -0x3d(%rbp), %dl
leaq 0xabdb(%rip), %r9       # 0x2bdf5
leaq 0xab91(%rip), %rax      # 0x2bdb2
testb $0x1, %dl
cmovneq %rax, %r9
movb -0x3e(%rbp), %dl
leaq 0xabc3(%rip), %r14      # 0x2bdf5
leaq 0xab79(%rip), %rax      # 0x2bdb2
testb $0x1, %dl
cmovneq %rax, %r14
leaq -0x270(%rbp), %rbx
leaq -0x150(%rbp), %r11
movzwl -0x42(%rbp), %eax
leaq 0xac9a(%rip), %rsi      # 0x2bef3
movl $0x5, %edx
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movb $0x0, %al
callq *%r10
addq $0x290, %rsp            # imm = 0x290
popq %rbx
popq %r14
popq %rbp
retq
nopw %cs:(%rax,%rax)