// File: /workspace/github_c_makefile_star2_O1/videolan[P]bitstream/examples/dvb_gen_si.c
// Function: build_desc4e
static void build_desc4e(uint8_t *desc) {
    uint8_t k = 0;
    uint8_t *item_n;
    char *item1_desc = "Director";
    char *item1_text = "Famous director";
    char *item2_desc = "Year";
    char *item2_text = "2011";
    char *item3_desc = "Rating";
    char *item3_text = "***++";
    char *text = "Wow, what an event!";

    desc4e_init(desc);
    desc_set_length(desc, 255);

    desc4e_set_desc_number(desc, 0);
    desc4e_set_last_desc_number(desc, 0);
    desc4e_set_lang(desc, (uint8_t *)"eng");
    desc4e_set_items_length(desc, 0);

    {
        desc4e_set_items_length(desc, 255);
        uint8_t *first_item = desc4e_get_item(desc, 0);

        item_n = desc4e_get_item(desc, k++);
        desc4en_set_item_description(item_n, (uint8_t *)item1_desc, strlen(item1_desc));
        desc4en_set_item_text(item_n, (uint8_t *)item1_text, strlen(item1_text));

        item_n = desc4e_get_item(desc, k++);
        desc4en_set_item_description(item_n, (uint8_t *)item2_desc, strlen(item2_desc));
        desc4en_set_item_text(item_n, (uint8_t *)item2_text, strlen(item2_text));

        item_n = desc4e_get_item(desc, k++);
        desc4en_set_item_description(item_n, (uint8_t *)item3_desc, strlen(item3_desc));
        desc4en_set_item_text(item_n, (uint8_t *)item3_text, strlen(item3_text));

        item_n = desc4e_get_item(desc, k);
        desc4e_set_items_length(desc, item_n - first_item);
    }

    desc4e_set_text(desc, (uint8_t *)text, strlen(text));
    desc4e_set_length(desc);
}

// Assembly:
movabsq $0x8ff676e6500ff4e, %rax # imm = 0x8FF676E6500FF4E
movq %rax, (%rdi)
leaq 0x2(%rdi), %rcx
leaq 0x7(%rdi), %rax
movabsq $0x726f746365726944, %rdx # imm = 0x726F746365726944
movq %rdx, 0x8(%rdi)
movb $0xf, 0x10(%rdi)
movabsq $0x642073756f6d6146, %rdx # imm = 0x642073756F6D6146
movq %rdx, 0x11(%rdi)
movabsq $0x726f746365726964, %rdx # imm = 0x726F746365726964
movq %rdx, 0x18(%rdi)
xorl %esi, %esi
movq %rax, %rdx
testb %sil, %sil
jne 0x9896
leaq 0x106(%rdi), %rsi
movb (%rax), %dl
incb %dl
movzbl %dl, %edx
addb (%rax,%rdx), %dl
incb %dl
movzbl %dl, %edx
addq %rax, %rdx
movb $0x1, %r8b
cmpq %rdx, %rcx
ja 0x9881
leaq 0x2(%rdx), %r8
movzbl 0x1(%rdi), %r9d
addq %rcx, %r9
cmpq %r9, %r8
seta %r8b
leaq 0x2(%rdx), %r9
xorl %r10d, %r10d
cmpq %rsi, %r9
cmovaq %r10, %rdx
testb %r8b, %r8b
cmovneq %r10, %rdx
movb $0x4, %sil
movb %sil, (%rdx)
movl $0x72616559, 0x1(%rdx)  # imm = 0x72616559
movb %sil, 0x5(%rdx)
movl $0x31313032, 0x6(%rdx)  # imm = 0x31313032
cmpb $0x7, 0x1(%rdi)
movb 0x6(%rdi), %dl
setb %sil
cmpb $0x2, %dl
setb %r8b
xorl %r10d, %r10d
orb %sil, %r8b
cmoveq %rax, %r10
je 0x98d1
movq %r10, %r9
jmp 0x993e
movzbl %dl, %edx
addq %rdi, %rdx
addq $0x7, %rdx
movb $-0x1, %r8b
xorl %esi, %esi
movq %rax, %r9
testq %r10, %r10
je 0x9900
movb (%r10), %r9b
incb %r9b
movzbl %r9b, %r9d
addb (%r10,%r9), %r9b
incb %r9b
movzbl %r9b, %r9d
addq %r10, %r9
movb $0x1, %r10b
cmpq %r9, %rcx
ja 0x991b
leaq 0x2(%r9), %r10
movzbl 0x1(%rdi), %r11d
addq %rcx, %r11
cmpq %r11, %r10
seta %r10b
leaq 0x2(%r9), %r11
cmpq %rdx, %r11
seta %r11b
orb %r10b, %r11b
cmovneq %rsi, %r9
jne 0x993e
leal 0x1(%r8), %r11d
movq %r9, %r10
testb %r8b, %r8b
movl %r11d, %r8d
jne 0x98e0
movb $0x6, (%r9)
movl $0x69746152, 0x1(%r9)   # imm = 0x69746152
movw $0x676e, 0x5(%r9)       # imm = 0x676E
movb $0x5, 0x7(%r9)
movl $0x2b2a2a2a, 0x8(%r9)   # imm = 0x2B2A2A2A
movb $0x2b, 0xc(%r9)
cmpb $0x7, 0x1(%rdi)
movb 0x6(%rdi), %dl
setb %sil
cmpb $0x2, %dl
setb %r8b
xorl %r10d, %r10d
orb %sil, %r8b
cmoveq %rax, %r10
je 0x9986
movq %r10, %r9
jmp 0x99f3
movzbl %dl, %edx
addq %rdi, %rdx
addq $0x7, %rdx
movb $-0x2, %r8b
xorl %esi, %esi
movq %rax, %r9
testq %r10, %r10
je 0x99b5
movb (%r10), %r9b
incb %r9b
movzbl %r9b, %r9d
addb (%r10,%r9), %r9b
incb %r9b
movzbl %r9b, %r9d
addq %r10, %r9
movb $0x1, %r10b
cmpq %r9, %rcx
ja 0x99d0
leaq 0x2(%r9), %r10
movzbl 0x1(%rdi), %r11d
addq %rcx, %r11
cmpq %r11, %r10
seta %r10b
leaq 0x2(%r9), %r11
cmpq %rdx, %r11
seta %r11b
orb %r10b, %r11b
cmovneq %rsi, %r9
jne 0x99f3
leal 0x1(%r8), %r11d
movq %r9, %r10
testb %r8b, %r8b
movl %r11d, %r8d
jne 0x9995
subq %rax, %r9
movb %r9b, 0x6(%rdi)
movzbl %r9b, %ecx
movb $0x13, 0x7(%rdi,%rcx)
movups 0xb66(%rip), %xmm0      # 0xa570
movups %xmm0, 0x1(%rax,%rcx)
movl $0x21746e65, 0x10(%rax,%rcx) # imm = 0x21746E65
addb $0x19, %cl
movb %cl, 0x1(%rdi)
retq