LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonfreetype/src/utils.c
// Function: moonfreetype_pushsizemetrics
int pushsizemetrics(lua_State *L, FT_Size size)
    {
    lua_newtable(L);
    lua_pushinteger(L, size->metrics.x_ppem);
    lua_setfield(L, -2, "x_ppem");
    lua_pushinteger(L, size->metrics.y_ppem);
    lua_setfield(L, -2, "y_ppem");
    lua_pushinteger(L, size->metrics.x_scale);
    lua_setfield(L, -2, "x_scale");
    lua_pushinteger(L, size->metrics.y_scale);
    lua_setfield(L, -2, "y_scale");
    lua_pushinteger(L, size->metrics.ascender);
    lua_setfield(L, -2, "ascender");
    lua_pushinteger(L, size->metrics.descender);
    lua_setfield(L, -2, "descender");
    lua_pushinteger(L, size->metrics.height);
    lua_setfield(L, -2, "height");
    lua_pushinteger(L, size->metrics.max_advance);
    lua_setfield(L, -2, "max_advance");
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x73d0
movzwl 0x18(%r14), %esi
movq %rbx, %rdi
callq 0x7540
leaq 0x30b3(%rip), %rdx      # 0x138e4
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movzwl 0x1a(%r14), %esi
movq %rbx, %rdi
callq 0x7540
leaq 0x3099(%rip), %rdx      # 0x138eb
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x3083(%rip), %rdx      # 0x138f2
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x306e(%rip), %rdx      # 0x138fa
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x2134(%rip), %rdx      # 0x129dd
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movq 0x38(%r14), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x2120(%rip), %rdx      # 0x129e6
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movq 0x40(%r14), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x212b(%rip), %rdx      # 0x12a0e
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movq 0x48(%r14), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x3002(%rip), %rdx      # 0x13902
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
pushq $0x1
popq %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonfreetype/src/utils.c
// Function: moonfreetype_pushbitmapsize
int pushbitmapsize(lua_State *L, FT_Bitmap_Size size)
    {
    lua_newtable(L);
    lua_pushinteger(L, size.height);
    lua_setfield(L, -2, "height");
    lua_pushinteger(L, size.width);
    lua_setfield(L, -2, "width");
    lua_pushinteger(L, size.size);
    lua_setfield(L, -2, "size");
    lua_pushinteger(L, size.x_ppem);
    lua_setfield(L, -2, "x_ppem");
    lua_pushinteger(L, size.y_ppem);
    lua_setfield(L, -2, "y_ppem");
    return 1;
    }

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x73d0
movswq 0x20(%rsp), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x20d8(%rip), %rdx      # 0x12a0e
pushq $-0x2
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movswq 0x22(%rsp), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x26be(%rip), %rdx      # 0x13016
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x2c56(%rip), %rdx      # 0x135cc
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x2f50(%rip), %rdx      # 0x138e4
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
movq 0x38(%rsp), %rsi
movq %rbx, %rdi
callq 0x7540
leaq 0x2f39(%rip), %rdx      # 0x138eb
movq %rbx, %rdi
movl %ebp, %esi
callq 0x74f0
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonfreetype/src/variants.c
// Function: Get_char_variant_index
static int Get_char_variant_index(lua_State *L)
    {
    FT_Face *face = checkface(L, 1);
    FT_ULong charcode = luaL_checkinteger(L, 2);
    FT_ULong selector = luaL_checkinteger(L, 3);
    FT_UInt glyph_index = FT_Face_GetCharVariantIndex(*face, charcode, selector);
    pushindex(L, glyph_index);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x7ac0
movq %rax, %r15
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x7780
movq %rax, %r12
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0x7780
movq (%r15), %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x7300
movq %r14, %rdi
movl %eax, %esi
callq 0x7ce0
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonfreetype/src/variants.c
// Function: Get_char_variant_is_default
static int Get_char_variant_is_default(lua_State *L)
    {
    FT_Face *face = checkface(L, 1);
    FT_ULong charcode = luaL_checkinteger(L, 2);
    FT_ULong selector = luaL_checkinteger(L, 3);
    FT_Int res = FT_Face_GetCharVariantIsDefault(*face, charcode, selector);
    if(res == -1)
        return 0; /* nil -> not a variant */
    lua_pushboolean(L, res);
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x7ac0
movq %rax, %r15
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x7780
movq %rax, %r12
pushq $0x3
popq %rsi
movq %r14, %rdi
callq 0x7780
movq (%r15), %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x7b10
cmpl $-0x1, %eax
je 0x10ae0
movq %r14, %rdi
movl %eax, %esi
callq 0x7820
jmp 0x10ae2
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonfreetype/src/variants.c
// Function: Get_variant_selectors
static int Get_variant_selectors(lua_State *L)
    {
    size_t i;
    FT_Face *face = checkface(L, 1);
    FT_UInt32 *selector = FT_Face_GetVariantSelectors(*face);
    if(selector == NULL)
        return 0;
    lua_newtable(L);
    i = 0;
    while(selector[i] != 0)
        {
        lua_pushinteger(L, selector[i]);
        i++;
        lua_seti(L, -2, i);
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x7ac0
movq (%rax), %rdi
callq 0x7210
testq %rax, %rax
je 0x10b4c
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x73d0
pushq $0x1
popq %r12
pushq $-0x2
popq %rbp
movl -0x4(%r15,%r12,4), %esi
testq %rsi, %rsi
je 0x10b4e
movq %r14, %rdi
callq 0x7540
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x76b0
incq %r12
jmp 0x10b28
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonfreetype/src/variants.c
// Function: Get_variants_of_char
static int Get_variants_of_char(lua_State *L)
    {
    size_t i;
    FT_Face *face = checkface(L, 1);
    FT_ULong charcode = luaL_checkinteger(L, 2);
    FT_UInt32 *selector = FT_Face_GetVariantsOfChar(*face, charcode);
    if(selector == NULL)
        return 0;
    lua_newtable(L);
    i = 0;
    while(selector[i] != 0)
        {
        lua_pushinteger(L, selector[i]);
        i++;
        lua_seti(L, -2, i);
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x7ac0
movq %rax, %r15
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x7780
movq (%r15), %rdi
movq %rax, %rsi
callq 0x7a00
testq %rax, %rax
je 0x10bc6
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x73d0
pushq $0x1
popq %r12
pushq $-0x2
popq %rbp
movl -0x4(%r15,%r12,4), %esi
testq %rsi, %rsi
je 0x10bc8
movq %r14, %rdi
callq 0x7540
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x76b0
incq %r12
jmp 0x10ba2
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/stetre[P]moonfreetype/src/variants.c
// Function: Get_chars_of_variant
static int Get_chars_of_variant(lua_State *L)
    {
    size_t i;
    FT_Face *face = checkface(L, 1);
    FT_ULong selector = luaL_checkinteger(L, 2);
    FT_UInt32 *charcode = FT_Face_GetCharsOfVariant(*face, selector);
    if(charcode == NULL)
        return 0;
    lua_newtable(L);
    i = 0;
    while(charcode[i] != 0)
        {
        lua_pushinteger(L, charcode[i]);
        i++;
        lua_seti(L, -2, i);
        }
    return 1;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0x7ac0
movq %rax, %r15
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x7780
movq (%r15), %rdi
movq %rax, %rsi
callq 0x70a0
testq %rax, %rax
je 0x10c40
movq %rax, %r15
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x73d0
pushq $0x1
popq %r12
pushq $-0x2
popq %rbp
movl -0x4(%r15,%r12,4), %esi
testq %rsi, %rsi
je 0x10c42
movq %r14, %rdi
callq 0x7540
movq %r14, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x76b0
incq %r12
jmp 0x10c1c
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_02/getfloat.c
// Function: main
int main(void)
{
  float number = 0.0;

  getfloat(&number);
  printf("number: %f\n", number);

  return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
andl $0x0, (%rbx)
movq %rbx, %rdi
callq 0x11ab
cvtss2sd (%rbx), %xmm0
leaq 0xe74(%rip), %rdi       # 0x2010
movb $0x1, %al
callq 0x1050
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_02/getfloat.c
// Function: getfloat
int getfloat(float *pn)
{
  int c, sign;

  while (isspace(c = getch()))
    ;

  if (!isdigit(c) && c != EOF && c != '+' && c != '-' && c != '.')
  {
    ungetch(c);
    return 0;
  }

  sign = (c == '-') ? -1 : 1;

  if (c == '+' || c == '-')
  {
    if (!isdigit(c = getch()))
    {
      ungetch(c);
      ungetch(sign == 1 ? '+' : '-');
      return 0;
    }
  }

  for (*pn = 0; isdigit(c); c = getch())
  {
    *pn = 10 * *pn + (c - '0');
  }

  if (c == '.')
  {
    int i;
    for (i = 1; (c = getch()) && isdigit(c); ++i)
    {
      *pn += (c - '0') / (pow(10, i));
    }
  }

  *pn = *pn * sign;

  if (c != EOF)
  {
    ungetch(c);
  }

  return c;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1070
movq %rax, %r14
movq (%r14), %r12
callq 0x1312
movl %eax, %r15d
cltq
testb $0x20, 0x1(%r12,%rax,2)
jne 0x11c1
movq (%r14), %r12
movzwl (%r12,%rax,2), %ecx
btl $0xb, %ecx
jb 0x1207
xorl %ebp, %ebp
leal 0x1(%r15), %ecx
cmpl $0x2f, %ecx
ja 0x12f5
movabsq $0xd00000000001, %rdx   # imm = 0xD00000000001
btq %rcx, %rdx
jae 0x12f5
xorl %r13d, %r13d
cmpl $0x2d, %r15d
setne %bpl
je 0x121a
cmpl $0x2b, %r15d
jne 0x1248
callq 0x1312
movslq %eax, %rcx
testb $0x8, 0x1(%r12,%rcx,2)
jne 0x1248
xorl %ebx, %ebx
cmpl $0x2d, %r15d
sete %bl
movl %eax, %edi
callq 0x1333
leal 0x2b(,%rbx,2), %eax
xorl %ebp, %ebp
jmp 0x12f5
movb %bpl, %r13b
leal -0x1(,%r13,2), %ebp
andl $0x0, (%rbx)
movq (%r14), %rcx
movslq %eax, %rdx
testb $0x8, 0x1(%rcx,%rdx,2)
je 0x1285
addl $-0x30, %eax
cvtsi2ss %eax, %xmm0
movss (%rbx), %xmm1
mulss 0xd8e(%rip), %xmm1      # 0x2004
addss %xmm0, %xmm1
movss %xmm1, (%rbx)
callq 0x1312
jmp 0x1256
cmpl $0x2e, %eax
jne 0x12e2
pushq $0x1
popq %r15
callq 0x1312
testl %eax, %eax
je 0x12e0
movq (%r14), %rcx
movslq %eax, %rdx
testb $0x8, 0x1(%rcx,%rdx,2)
je 0x12e2
addl $-0x30, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, (%rsp)
cvtsi2sd %r15d, %xmm1
movsd 0xd4b(%rip), %xmm0      # 0x2008
callq 0x1040
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
cvtss2sd (%rbx), %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, (%rbx)
incl %r15d
jmp 0x128e
xorl %eax, %eax
cvtsi2ss %ebp, %xmm0
mulss (%rbx), %xmm0
movss %xmm0, (%rbx)
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x12fe
movl %eax, %edi
callq 0x1333
jmp 0x1301
pushq $-0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/deoxysneq128128v13/ref/deoxys.c
// Function: set_block_number_in_tweak
static void set_block_number_in_tweak(uint8_t *tweak, const uint64_t block_no) {
    tweak[ 8] = (tweak[8]&0xf0) ^ ((block_no >> 56ULL) & 0xf);
    tweak[ 9] = ((block_no >> 48ULL) & 0xff);
    tweak[10] = ((block_no >> 40ULL) & 0xff);
    tweak[11] = ((block_no >> 32ULL) & 0xff);
    tweak[12] = ((block_no >> 24ULL) & 0xff);
    tweak[13] = ((block_no >> 16ULL) & 0xff);
    tweak[14] = ((block_no >>  8ULL) & 0xff);
    tweak[15] = ((block_no >>  0ULL) & 0xff);
}

// Assembly:
movq %rsi, %rax
movb 0x8(%rdi), %cl
andb $-0x10, %cl
movq %rsi, %rdx
shrq $0x38, %rdx
andb $0xf, %dl
orb %cl, %dl
movb %dl, 0x8(%rdi)
vpbroadcastq %rsi, %ymm0
vpsrlvq 0x2aba(%rip), %ymm0, %ymm0 # 0x4020
vpmovqb %ymm0, 0x9(%rdi)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0xd(%rdi)
movb %ah, 0xe(%rdi)
movb %al, 0xf(%rdi)
vzeroupper
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/psi/psi.h
// Function: psi_set_crc
static inline void psi_set_crc(uint8_t *p_section)
{
    uint32_t i_crc = 0xffffffff;
    uint16_t i_end = psi_get_length(p_section)
                      + PSI_HEADER_SIZE - PSI_CRC_SIZE;
    uint16_t i;

    for (i = 0; i < i_end; i++)
        i_crc = (i_crc << 8) ^ p_psi_crc_table[(i_crc >> 24) ^ (p_section[i])];

    p_section[i_end] = i_crc >> 24;
    p_section[i_end + 1] = (i_crc >> 16) & 0xff;
    p_section[i_end + 2] = (i_crc >> 8) & 0xff;
    p_section[i_end + 3] = i_crc & 0xff;
}

// Assembly:
movzbl 0x1(%rdi), %eax
andl $0xf, %eax
shll $0x8, %eax
movzbl 0x2(%rdi), %ecx
addl %ecx, %eax
decl %eax
movzwl %ax, %eax
pushq $-0x1
popq %rsi
xorl %ecx, %ecx
leaq 0x2273(%rip), %rdx      # 0x7050
cmpq %rcx, %rax
je 0x4e00
movl %esi, %r8d
shll $0x8, %r8d
shrl $0x18, %esi
movzbl (%rdi,%rcx), %r9d
xorl %esi, %r9d
xorl (%rdx,%r9,4), %r8d
incq %rcx
movl %r8d, %esi
jmp 0x4ddd
bswapl %esi
movl %esi, (%rdi,%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/dvb_gen_si.c
// Function: output_psi_section
static void output_psi_section(uint8_t *section, uint16_t pid, uint8_t *cc) {
    uint16_t section_length = psi_get_length(section) + PSI_HEADER_SIZE;
    uint16_t section_offset = 0;
    do {
        uint8_t ts[TS_SIZE];
        uint8_t ts_offset = 0;
        memset(ts, 0xff, TS_SIZE);

        psi_split_section(ts, &ts_offset, section, &section_offset);

        ts_set_pid(ts, pid);
        ts_set_cc(ts, *cc);
        (*cc)++;
        *cc &= 0xf;

        if (section_offset == section_length)
            psi_split_end(ts, &ts_offset);

        if (write(fileno(stdout), ts, TS_SIZE) < 0)
            perror("write");
    } while (section_offset < section_length);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movzbl 0x1(%rdi), %eax
andl $0xf, %eax
shll $0x8, %eax
movq %rdi, 0x18(%rsp)
movzbl 0x2(%rdi), %ecx
leal (%rcx,%rax), %ebp
addl $0x3, %ebp
movl %esi, 0x14(%rsp)
movl %esi, %eax
shrl $0x8, %eax
andb $0x1f, %al
movl %eax, 0xc(%rsp)
xorl %r12d, %r12d
movl %ebp, 0x10(%rsp)
movl $0xbc, %edx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
movl $0xff, %esi
callq 0x1070
movq 0x18(%rsp), %rax
movzbl 0x1(%rax), %ebx
movzbl 0x2(%rax), %r15d
movl $0x10000047, 0x20(%rsp) # imm = 0x10000047
movq %r14, %rdi
callq 0x4fe6
movq %rax, %rbp
subq %r14, %rbp
testw %r12w, %r12w
jne 0x4ee8
cmpb $-0x45, %bpl
jb 0x4eb8
movb $-0x44, %bl
cmpb $-0x44, %bpl
je 0x4eb3
movzbl %bpl, %eax
leaq (%rsp,%rax), %rdi
addq $0x20, %rdi
movl $0xbc, %edx
subq %rax, %rdx
movl $0xff, %esi
callq 0x1070
xorl %r12d, %r12d
jmp 0x4f31
movq %rax, %r13
leaq 0x20(%rsp), %rax
movl %eax, %r14d
subl %r13d, %r14d
addb %bpl, %r14b
je 0x4edd
movq %r13, %rdi
incq %rdi
movzbl %r14b, %edx
movq %r13, %rsi
callq 0x10c0
incl %ebp
movb %r14b, (%r13)
orb $0x40, 0x21(%rsp)
andl $0xf, %ebx
shll $0x8, %ebx
subl %r12d, %r15d
leal (%r15,%rbx), %eax
addl $0x3, %eax
movb $-0x44, %cl
subb %bpl, %cl
movzbl %cl, %ecx
movzwl %ax, %r13d
cmpl %r13d, %ecx
cmovbl %ecx, %r13d
movzbl %bpl, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x20, %rdi
movzwl %r12w, %esi
addq 0x18(%rsp), %rsi
movq %r13, %rdx
callq 0x1080
addb %r13b, %bl
addl %r12d, %r13d
movl %r13d, %r12d
movb 0x21(%rsp), %al
movb 0x23(%rsp), %cl
andb $-0x20, %al
addb 0xc(%rsp), %al
movb %al, 0x21(%rsp)
movl 0x14(%rsp), %eax
movb %al, 0x22(%rsp)
movb 0x5168(%rip), %al       # 0xa0b9
andb $-0x10, %cl
movl %eax, %edx
andb $0xf, %dl
orb %cl, %dl
movb %dl, 0x23(%rsp)
incb %al
andb $0xf, %al
movb %al, 0x5150(%rip)       # 0xa0b9
movl 0x10(%rsp), %ebp
cmpw %bp, %r12w
jne 0x4f95
cmpb $-0x44, %bl
je 0x4f95
movzbl %bl, %eax
leaq (%rsp,%rax), %rdi
addq $0x20, %rdi
movl $0xbc, %edx
subq %rax, %rdx
movl $0xff, %esi
callq 0x1070
movq 0x503c(%rip), %rax      # 0x9fd8
movq (%rax), %rdi
callq 0x1090
movl $0xbc, %edx
movl %eax, %edi
leaq 0x20(%rsp), %rsi
callq 0x1040
testq %rax, %rax
js 0x4fc6
cmpw %bp, %r12w
jb 0x4e46
jmp 0x4fd4
leaq 0x2483(%rip), %rdi      # 0x7450
callq 0x10d0
jmp 0x4fba
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/mpeg/ts.h
// Function: ts_payload
static inline uint8_t *ts_payload(uint8_t *p_ts)
{
    if (!ts_has_payload(p_ts))
        return p_ts + TS_SIZE;
    if (!ts_has_adaptation(p_ts))
        return p_ts + TS_HEADER_SIZE;
    return p_ts + TS_HEADER_SIZE + 1 + ts_get_adaptation(p_ts);
}

// Assembly:
movq %rdi, %rax
movb 0x3(%rdi), %cl
testb $0x10, %cl
jne 0x4ff8
addq $0xbc, %rax
retq
testb $0x20, %cl
jne 0x5002
addq $0x4, %rax
retq
movzbl 0x4(%rax), %ecx
addq %rcx, %rax
addq $0x5, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/nit.h
// Function: nit_get_ts
static inline uint8_t *nit_get_ts(uint8_t *p_nit, uint8_t n)
{
    uint16_t i_section_size = psi_get_length(p_nit) + PSI_HEADER_SIZE
                               - PSI_CRC_SIZE;
    uint8_t *p_nit_n = p_nit + NIT_HEADER_SIZE + nit_get_desclength(p_nit)
                        + NIT_HEADER2_SIZE;
    if (p_nit_n - p_nit > i_section_size) return NULL;

    while (n) {
        if (p_nit_n + NIT_TS_SIZE - p_nit > i_section_size) return NULL;
        p_nit_n += NIT_TS_SIZE + nitn_get_desclength(p_nit_n);
        n--;
    }
    if (p_nit_n - p_nit >= i_section_size) return NULL;
    return p_nit_n;
}

// Assembly:
movzbl 0x1(%rdi), %eax
andl $0xf, %eax
shll $0x8, %eax
movzbl 0x2(%rdi), %ecx
addl %eax, %ecx
decl %ecx
movzbl 0x8(%rdi), %eax
andl $0xf, %eax
shll $0x8, %eax
movzbl 0x9(%rdi), %edx
leaq (%rax,%rdx), %r8
addq $0xc, %r8
movzwl %cx, %ecx
cmpq %rcx, %r8
jle 0x50dc
xorl %eax, %eax
retq
orq %rdx, %rax
leaq (%rdi,%rax), %rdx
addq $0xc, %rdx
xorl %eax, %eax
subb $0x1, %sil
jb 0x511c
movq %rdx, %r8
subq %rdi, %r8
addq $0x6, %r8
cmpq %rcx, %r8
jg 0x50db
movzbl 0x4(%rdx), %r8d
andl $0xf, %r8d
shll $0x8, %r8d
movzbl 0x5(%rdx), %r9d
orq %r8, %r9
addq %r9, %rdx
addq $0x6, %rdx
jmp 0x50e9
movq %rdx, %rsi
subq %rdi, %rsi
xorl %eax, %eax
cmpq %rcx, %rsi
cmovlq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/dvb_gen_si.c
// Function: build_desc41
static void build_desc41(uint8_t *desc) {
    uint8_t k = 0;
    uint8_t *service_n;

    desc41_init(desc);
    desc_set_length(desc, 255);

    service_n = desc41_get_service(desc, k++);
    desc41n_set_sid(service_n, sid);
    desc41n_set_type(service_n, 1);

    service_n = desc41_get_service(desc, k++);
    desc41n_set_sid(service_n, sid + 100);
    desc41n_set_type(service_n, 2);

    service_n = desc41_get_service(desc, k++);
    desc41n_set_sid(service_n, sid + 200);
    desc41n_set_type(service_n, 1);

    service_n = desc41_get_service(desc, k++);
    desc41n_set_sid(service_n, sid + 300);
    desc41n_set_type(service_n, 2);

    service_n = desc41_get_service(desc, k);
    desc_set_length(desc, service_n - desc - DESC_HEADER_SIZE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movw $0xff41, (%rdi)         # imm = 0xFF41
leaq 0x195(%rip), %r14       # 0x52d7
xorl %esi, %esi
movq %r14, %rdx
callq 0x500e
movzwl 0x4f37(%rip), %ecx      # 0xa08a
movb %ch, (%rax)
movb %cl, 0x1(%rax)
movb $0x1, %bpl
movb %bpl, 0x2(%rax)
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
movzwl 0x4f16(%rip), %ecx      # 0xa08a
addl $0x64, %ecx
movb %ch, (%rax)
movb %cl, 0x1(%rax)
movb $0x2, %r15b
movb %r15b, 0x2(%rax)
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
movzwl 0x4ef2(%rip), %ecx      # 0xa08a
addl $0xc8, %ecx
movb %ch, (%rax)
movb %cl, 0x1(%rax)
movb %bpl, 0x2(%rax)
pushq $0x3
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
movzwl 0x4ece(%rip), %ecx      # 0xa08a
addl $0x12c, %ecx            # imm = 0x12C
movb %ch, (%rax)
movb %cl, 0x1(%rax)
movb %r15b, 0x2(%rax)
pushq $0x4
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
subl %ebx, %eax
addb $-0x2, %al
movb %al, 0x1(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_5b.h
// Function: desc5b_next_data
static inline uint8_t *desc5b_next_data(const uint8_t *p_desc,
                                        const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC5B_HEADER_SIZE;
    else
        p_desc_n += DESC5B_DATA_SIZE + desc5bn_get_networkname_length(p_desc_n);
    return desc_check(p_desc, p_desc_n, DESC5B_DATA_SIZE);
}

// Assembly:
testq %rsi, %rsi
je 0x51fe
movzbl 0x3(%rsi), %eax
leaq (%rsi,%rax), %rcx
addq $0x4, %rcx
jmp 0x5202
leaq 0x2(%rdi), %rcx
testq %rdi, %rdi
je 0x5210
leaq 0x2(%rdi), %rdx
cmpq %rcx, %rdx
jbe 0x5213
xorl %eax, %eax
retq
leaq 0x4(%rcx), %rsi
movzbl 0x1(%rdi), %eax
addq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rsi
cmovbeq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_62.h
// Function: desc62_next_frequency
static inline uint8_t *desc62_next_frequency(const uint8_t *p_desc,
                                             const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC62_HEADER_SIZE;
    else
        p_desc_n += DESC62_FREQ_SIZE;
    return desc_check(p_desc, p_desc_n, DESC62_FREQ_SIZE);
}

// Assembly:
leaq 0x4(%rsi), %rcx
leaq 0x3(%rdi), %rax
testq %rsi, %rsi
cmoveq %rax, %rcx
testq %rdi, %rdi
je 0x5245
leaq 0x2(%rdi), %rdx
cmpq %rcx, %rdx
jbe 0x5248
xorl %eax, %eax
retq
leaq 0x4(%rcx), %rsi
movzbl 0x1(%rdi), %eax
addq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rsi
cmovbeq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_6c.h
// Function: desc6c_next_cell
static inline uint8_t *desc6c_next_cell(const uint8_t *p_desc,
                                        const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC6C_HEADER_SIZE;
    else
        p_desc_n += DESC6C_DATA_SIZE
            + desc6cn_get_subcell_info_loop_length(p_desc_n);
    return desc_check(p_desc, p_desc_n, DESC6C_DATA_SIZE);
}

// Assembly:
testq %rsi, %rsi
je 0x5270
movzbl 0x9(%rsi), %eax
leaq (%rsi,%rax), %rcx
addq $0xa, %rcx
jmp 0x5274
leaq 0x2(%rdi), %rcx
testq %rdi, %rdi
je 0x5282
leaq 0x2(%rdi), %rdx
cmpq %rcx, %rdx
jbe 0x5285
xorl %eax, %eax
retq
leaq 0xa(%rcx), %rsi
movzbl 0x1(%rdi), %eax
addq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rsi
cmovbeq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_6d.h
// Function: desc6d_next_cell
static inline uint8_t *desc6d_next_cell(const uint8_t *p_desc,
                                        const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC6D_HEADER_SIZE;
    else
        p_desc_n += DESC6D_DATA_SIZE
            + desc6dn_get_subcell_info_loop_length(p_desc_n);
    return desc_check(p_desc, p_desc_n, DESC6D_DATA_SIZE);
}

// Assembly:
testq %rsi, %rsi
je 0x52ad
movzbl 0x6(%rsi), %eax
leaq (%rsi,%rax), %rcx
addq $0x7, %rcx
jmp 0x52b1
leaq 0x2(%rdi), %rcx
testq %rdi, %rdi
je 0x52bf
leaq 0x2(%rdi), %rdx
cmpq %rcx, %rdx
jbe 0x52c2
xorl %eax, %eax
retq
leaq 0x7(%rcx), %rsi
movzbl 0x1(%rdi), %eax
addq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rsi
cmovbeq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_41.h
// Function: desc41_next_service
static inline uint8_t *desc41_next_service(const uint8_t *p_desc,
                                           const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC41_HEADER_SIZE;
    else
        p_desc_n += DESC41_SERVICE_SIZE;
    return desc_check(p_desc, p_desc_n, DESC41_SERVICE_SIZE);
}

// Assembly:
leaq 0x3(%rsi), %rcx
leaq 0x2(%rdi), %rdx
testq %rsi, %rsi
cmoveq %rdx, %rcx
testq %rdi, %rdi
sete %al
cmpq %rcx, %rdx
seta %sil
orb %al, %sil
je 0x52fb
xorl %eax, %eax
retq
leaq 0x3(%rcx), %rsi
movzbl 0x1(%rdi), %eax
addq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rsi
cmovbeq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/sdt.h
// Function: sdt_get_service
static inline uint8_t *sdt_get_service(uint8_t *p_sdt, uint8_t n)
{
    uint16_t i_section_size = psi_get_length(p_sdt) + PSI_HEADER_SIZE
                               - PSI_CRC_SIZE;
    uint8_t *p_sdt_n = p_sdt + SDT_HEADER_SIZE;

    while (n) {
        if (p_sdt_n + SDT_SERVICE_SIZE - p_sdt > i_section_size) return NULL;
        p_sdt_n += SDT_SERVICE_SIZE + sdtn_get_desclength(p_sdt_n);
        n--;
    }
    if (p_sdt_n - p_sdt >= i_section_size) return NULL;
    return p_sdt_n;
}

// Assembly:
movzbl 0x1(%rdi), %eax
andl $0xf, %eax
shll $0x8, %eax
movzbl 0x2(%rdi), %ecx
addl %ecx, %eax
decl %eax
leaq 0xb(%rdi), %rcx
movzwl %ax, %edx
xorl %eax, %eax
subb $0x1, %sil
jb 0x5395
movq %rcx, %r8
subq %rdi, %r8
addq $0x5, %r8
cmpq %rdx, %r8
jg 0x53a4
movzbl 0x3(%rcx), %r8d
andl $0xf, %r8d
shll $0x8, %r8d
movzbl 0x4(%rcx), %r9d
orq %r8, %r9
addq %r9, %rcx
addq $0x5, %rcx
jmp 0x5362
movq %rcx, %rsi
subq %rdi, %rsi
xorl %eax, %eax
cmpq %rdx, %rsi
cmovlq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/dvb_gen_si.c
// Function: build_desc49
static void build_desc49(uint8_t *desc, bool b_available) {
    uint8_t k = 0;
    uint8_t *code_n;

    desc49_init(desc);
    desc49_set_country_availability_flag(desc, b_available);

    desc_set_length(desc, 255);

    code_n = desc49_get_code(desc, k++);
    desc49n_set_code(code_n, (uint8_t *)"GBR");

    code_n = desc49_get_code(desc, k++);
    desc49n_set_code(code_n, (uint8_t *)"FRA");

    code_n = desc49_get_code(desc, k++);
    desc49n_set_code(code_n, (uint8_t *)"BUL");

    code_n = desc49_get_code(desc, k);
    desc_set_length(desc, code_n - desc - DESC_HEADER_SIZE);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movw $0xff49, (%rdi)         # imm = 0xFF49
shlb $0x7, %sil
orb $0x7f, %sil
movb %sil, 0x2(%rdi)
leaq 0x5e(%rip), %r14        # 0x5422
xorl %esi, %esi
movq %r14, %rdx
callq 0x500e
movw $0x4247, (%rax)         # imm = 0x4247
movb $0x52, 0x2(%rax)
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
movw $0x5246, (%rax)         # imm = 0x5246
movb $0x41, 0x2(%rax)
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
movw $0x5542, (%rax)         # imm = 0x5542
movb $0x4c, 0x2(%rax)
pushq $0x3
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
subl %ebx, %eax
addb $-0x2, %al
movb %al, 0x1(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_49.h
// Function: desc49_next_code
static inline uint8_t *desc49_next_code(const uint8_t *p_desc,
                                        const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC49_HEADER_SIZE;
    else
        p_desc_n += DESC49_CODE_SIZE;
    return desc_check(p_desc, p_desc_n, DESC49_CODE_SIZE);
}

// Assembly:
testq %rsi, %rsi
cmoveq %rdi, %rsi
testq %rdi, %rdi
je 0x543b
leaq 0x3(%rsi), %rax
leaq 0x2(%rdi), %rcx
cmpq %rax, %rcx
jbe 0x543e
xorl %eax, %eax
retq
addq $0x6, %rsi
movzbl 0x1(%rdi), %edx
addq %rdx, %rcx
xorl %edx, %edx
cmpq %rcx, %rsi
cmovaq %rdx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_51.h
// Function: desc51_next_logical_cell
static inline uint8_t *desc51_next_logical_cell(const uint8_t *p_desc,
                                                const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC51_HEADER_SIZE;
    else
        p_desc_n += desc51n_get_data_size(p_desc_n);
    return desc_check(p_desc, p_desc_n, DESC51_DATA_SIZE);
}

// Assembly:
testq %rsi, %rsi
je 0x547d
movzbl 0x2(%rsi), %eax
movzbl 0x3(%rsi,%rax), %ecx
decl %ecx
cmpl $0x3, %ecx
ja 0x548d
leaq 0x1bd1(%rip), %rdx      # 0x7040
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addl $0xa, %eax
jmp 0x5490
leaq 0x3(%rdi), %rsi
jmp 0x5496
addl $0x6, %eax
jmp 0x5490
addl $0xc, %eax
jmp 0x5490
addl $0x4, %eax
movzbl %al, %eax
addq %rax, %rsi
testq %rdi, %rdi
je 0x54a4
leaq 0x2(%rdi), %rcx
cmpq %rsi, %rcx
jbe 0x54a7
xorl %eax, %eax
retq
leaq 0x4(%rsi), %rdx
movzbl 0x1(%rdi), %eax
addq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rdx
cmovbeq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_5d.h
// Function: desc5d_next_data
static inline uint8_t *desc5d_next_data(const uint8_t *p_desc,
                                        const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC5D_HEADER_SIZE;
    else
        p_desc_n += DESC5D_DATA_SIZE
            + desc5dn_get_provider_name_length(p_desc_n)
            + desc5dn_get_service_name_length(p_desc_n);
    return desc_check(p_desc, p_desc_n, DESC5D_DATA_SIZE);
}

// Assembly:
testq %rsi, %rsi
je 0x54d7
movzbl 0x3(%rsi), %eax
leaq (%rsi,%rax), %rcx
movzbl 0x4(%rsi,%rax), %eax
addq %rax, %rcx
addq $0x5, %rcx
jmp 0x54db
leaq 0x2(%rdi), %rcx
testq %rdi, %rdi
je 0x54e9
leaq 0x2(%rdi), %rdx
cmpq %rcx, %rdx
jbe 0x54ec
xorl %eax, %eax
retq
leaq 0x5(%rcx), %rsi
movzbl 0x1(%rdi), %eax
addq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rsi
cmovbeq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_6e.h
// Function: desc6e_next_announcement
static inline uint8_t *desc6e_next_announcement(const uint8_t *p_desc,
                                                const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC6E_HEADER_SIZE;
    else
        p_desc_n += desc6en_get_data_size(p_desc_n);
    return desc_check(p_desc, p_desc_n, DESC6E_DATA_SIZE);
}

// Assembly:
testq %rsi, %rsi
je 0x551c
movb (%rsi), %al
andb $0x7, %al
decb %al
leaq 0x1(%rsi), %rcx
addq $0x8, %rsi
cmpb $0x3, %al
cmovaeq %rcx, %rsi
jmp 0x5520
leaq 0x4(%rdi), %rsi
testq %rdi, %rdi
je 0x552e
leaq 0x2(%rdi), %rcx
cmpq %rsi, %rcx
jbe 0x5531
xorl %eax, %eax
retq
leaq 0x1(%rsi), %rdx
movzbl 0x1(%rdi), %eax
addq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rdx
cmovbeq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_4b.h
// Function: desc4b_next_reference
static inline uint8_t *desc4b_next_reference(const uint8_t *p_desc,
                                             const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC4B_HEADER_SIZE;
    else
        p_desc_n += DESC4B_REFERENCE_SIZE;
    return desc_check(p_desc, p_desc_n, DESC4B_REFERENCE_SIZE);
}

// Assembly:
leaq 0x6(%rsi), %rcx
leaq 0x2(%rdi), %rdx
testq %rsi, %rsi
cmoveq %rdx, %rcx
testq %rdi, %rdi
sete %al
cmpq %rcx, %rdx
seta %sil
orb %al, %sil
je 0x556a
xorl %eax, %eax
retq
leaq 0x6(%rcx), %rsi
movzbl 0x1(%rdi), %eax
addq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rsi
cmovbeq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/eit.h
// Function: eit_get_event
static inline uint8_t *eit_get_event(uint8_t *p_eit, uint8_t n)
{
    uint16_t i_section_size = psi_get_length(p_eit) + PSI_HEADER_SIZE
                               - PSI_CRC_SIZE;
    uint8_t *p_eit_n = p_eit + EIT_HEADER_SIZE;
    if (p_eit_n - p_eit > i_section_size) return NULL;

    while (n) {
        if (p_eit_n + EIT_EVENT_SIZE - p_eit > i_section_size) return NULL;
        p_eit_n += EIT_EVENT_SIZE + eitn_get_desclength(p_eit_n);
        n--;
    }
    if (p_eit_n - p_eit >= i_section_size) return NULL;

    return p_eit_n;
}

// Assembly:
movzbl 0x1(%rdi), %eax
andl $0xf, %eax
shll $0x8, %eax
movzbl 0x2(%rdi), %ecx
addl %ecx, %eax
decl %eax
cmpw $0xe, %ax
jae 0x559a
xorl %eax, %eax
retq
movzwl %ax, %edx
leaq 0xe(%rdi), %rcx
xorl %eax, %eax
subb $0x1, %sil
jb 0x55d6
movq %rcx, %r8
subq %rdi, %r8
addq $0xc, %r8
cmpq %rdx, %r8
jg 0x5599
movzbl 0xa(%rcx), %r8d
andl $0xf, %r8d
shll $0x8, %r8d
movzbl 0xb(%rcx), %r9d
orq %r8, %r9
addq %r9, %rcx
addq $0xc, %rcx
jmp 0x55a3
movq %rcx, %rsi
subq %rdi, %rsi
xorl %eax, %eax
cmpq %rdx, %rsi
cmovlq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/eit.h
// Function: eitn_set_start_time
static inline void eitn_set_start_time(uint8_t *p_eit_n, uint64_t i_start_time)
{
    p_eit_n[2] = (i_start_time >> 32) & 0xff;
    p_eit_n[3] = (i_start_time >> 24) & 0xff;
    p_eit_n[4] = (i_start_time >> 16) & 0xff;
    p_eit_n[5] = (i_start_time >>  8) & 0xff;
    p_eit_n[6] = i_start_time         & 0xff;
}

// Assembly:
movq %rsi, %rax
movq %rsi, %rcx
shrq $0x20, %rcx
movb %cl, 0x2(%rdi)
movl %eax, %ecx
shrl $0x18, %ecx
movb %cl, 0x3(%rdi)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x4(%rdi)
movb %ah, 0x5(%rdi)
movb %al, 0x6(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/datetime.h
// Function: dvb_time_encode_UTC
static inline uint64_t dvb_time_encode_UTC(time_t ts) {
    struct tm tm;
    uint16_t mjd = 0;
    uint32_t bcd = 0;

    gmtime_r(&ts, &tm);

    mjd = dvb_mjd_set(tm.tm_year, tm.tm_mon + 1, tm.tm_mday);

    bcd  = dec2bcd(tm.tm_hour) << 16;
    bcd |= dec2bcd(tm.tm_min ) << 8;
    bcd |= dec2bcd(tm.tm_sec );

    return (uint64_t)((uint64_t)mjd << 24) | bcd;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x48, %rsp
leaq 0x8(%rsp), %rax
movq %rdi, (%rax)
leaq 0x10(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1060
movl 0x14(%rbx), %eax
movl 0x10(%rbx), %ecx
cmpl $0x2, %ecx
sbbl $0x0, %eax
leal 0xc(%rcx), %esi
cmpl $0x2, %ecx
cmovael %ecx, %esi
imull $0x5b5, %eax, %eax      # imm = 0x5B5
pushq $0x4
popq %rcx
cltd
idivl %ecx
movl %eax, %ecx
addl 0xc(%rbx), %ecx
imull $0x4ab51, %esi, %eax    # imm = 0x4AB51
addl $0x956a2, %eax          # imm = 0x956A2
movl $0x2710, %esi           # imm = 0x2710
cltd
idivl %esi
movl %eax, %esi
movl 0x8(%rbx), %eax
pushq $0xa
popq %rbp
cltd
idivl %ebp
movl %eax, %edi
movl %edx, %r8d
movl (%rbx), %r10d
movl 0x4(%rbx), %eax
cltd
idivl %ebp
movl %edx, %r11d
movl %eax, %r9d
movl %r10d, %eax
cltd
idivl %ebp
addl %esi, %ecx
addl $0x3a6c, %ecx           # imm = 0x3A6C
shll $0x14, %edi
shll $0x10, %r8d
addl %r8d, %edi
shll $0xc, %r9d
shll $0x8, %r11d
addl %r11d, %r9d
orl %edi, %r9d
shll $0x4, %eax
addl %edx, %eax
orl %r9d, %eax
movzwl %cx, %ecx
shlq $0x18, %rcx
orq %rcx, %rax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x6500ff4e, (%rdi)     # imm = 0x6500FF4E
movw $0x676e, %bp            # imm = 0x676E
movw %bp, 0x4(%rdi)
movb $-0x1, 0x6(%rdi)
leaq 0x1a7(%rip), %r14       # 0x58cc
xorl %esi, %esi
movq %r14, %rdx
callq 0x500e
movq %rax, %r15
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x500e
movb $0x8, (%rax)
movabsq $0x726f746365726944, %rcx # imm = 0x726F746365726944
movq %rcx, 0x1(%rax)
movb $0xf, 0x9(%rax)
movabsq $0x642073756f6d6146, %rcx # imm = 0x642073756F6D6146
movq %rcx, 0xa(%rax)
movabsq $0x726f746365726964, %rcx # imm = 0x726F746365726964
movq %rcx, 0x11(%rax)
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
movb $0x4, %cl
movb %cl, (%rax)
movl $0x72616559, 0x1(%rax)  # imm = 0x72616559
movb %cl, 0x5(%rax)
movl $0x31313032, 0x6(%rax)  # imm = 0x31313032
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
movb $0x6, (%rax)
movw %bp, 0x5(%rax)
movl $0x69746152, 0x1(%rax)  # imm = 0x69746152
movb $0x5, 0x7(%rax)
movl $0x2b2a2a2a, 0x8(%rax)  # imm = 0x2B2A2A2A
movb $0x2b, 0xc(%rax)
pushq $0x3
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
subq %r15, %rax
movb %al, 0x6(%rbx)
movzbl %al, %eax
movb $0x13, 0x7(%rbx,%rax)
movups 0x1d74(%rip), %xmm0     # 0x7555
movups %xmm0, 0x8(%rbx,%rax)
movl $0x21746e65, 0x17(%rbx,%rax) # imm = 0x21746E65
addb $0x19, %al
movb %al, 0x1(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/dvb_gen_si.c
// Function: build_desc54
static void build_desc54(uint8_t *desc) {
    uint8_t k = 0;
    uint8_t *content_n;

    desc54_init(desc);
    desc_set_length(desc, 255);

    content_n = desc54_get_content(desc, k++);
    desc54n_set_content_l1(content_n, 2);
    desc54n_set_content_l2(content_n, 4);
    desc54n_set_user(content_n, 78);

    content_n = desc54_get_content(desc, k++);
    desc54n_set_content_l1(content_n, 6);
    desc54n_set_content_l2(content_n, 8);
    desc54n_set_user(content_n, 177);

    content_n = desc54_get_content(desc, k);
    desc_set_length(desc, content_n - desc - DESC_HEADER_SIZE);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movw $0xff54, (%rdi)         # imm = 0xFF54
leaq 0x1c6(%rip), %r14       # 0x59d7
xorl %esi, %esi
movq %r14, %rdx
callq 0x500e
movw $0x4e24, (%rax)         # imm = 0x4E24
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
movw $0xb168, (%rax)         # imm = 0xB168
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
subl %ebx, %eax
addb $-0x2, %al
movb %al, 0x1(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/dvb_gen_si.c
// Function: build_desc55
static void build_desc55(uint8_t *desc) {
    uint8_t k = 0;
    uint8_t *rating_n;

    desc55_init(desc);
    desc_set_length(desc, 255);

    rating_n = desc55_get_rating(desc, k++);
    desc55n_set_country_code(rating_n, (uint8_t *)"USA");
    desc55n_set_rating(rating_n, 0);

    rating_n = desc55_get_rating(desc, k++);
    desc55n_set_country_code(rating_n, (uint8_t *)"CHI");
    desc55n_set_rating(rating_n, 15);

    rating_n = desc55_get_rating(desc, k++);
    desc55n_set_country_code(rating_n, (uint8_t *)"FRA");
    desc55n_set_rating(rating_n, 12);

    rating_n = desc55_get_rating(desc, k++);
    desc55n_set_country_code(rating_n, (uint8_t *)"BUL");
    desc55n_set_rating(rating_n, 24);

    rating_n = desc55_get_rating(desc, k);
    desc_set_length(desc, rating_n - desc - DESC_HEADER_SIZE);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movw $0xff55, (%rdi)         # imm = 0xFF55
leaq 0x1e4(%rip), %r14       # 0x5a47
xorl %esi, %esi
movq %r14, %rdx
callq 0x500e
movl $0x415355, (%rax)       # imm = 0x415355
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
movl $0xf494843, (%rax)      # imm = 0xF494843
pushq $0x2
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
movl $0xc415246, (%rax)      # imm = 0xC415246
pushq $0x3
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
movl $0x184c5542, (%rax)     # imm = 0x184C5542
pushq $0x4
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x500e
subl %ebx, %eax
addb $-0x2, %al
movb %al, 0x1(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_4e.h
// Function: desc4e_next_item
static inline uint8_t *desc4e_next_item(const uint8_t *p_desc,
                                        const uint8_t *p_desc_n)
{
    uint8_t items_length = desc4e_get_items_length(p_desc);
    if (!p_desc_n)
        p_desc_n = desc4e_get_items(p_desc);
    else
        p_desc_n += desc4en_get_item_length(p_desc_n);
    return desc4e_check_item(p_desc, p_desc_n, items_length);
}

// Assembly:
movzbl 0x6(%rdi), %ecx
testq %rsi, %rsi
je 0x58f2
movb (%rsi), %al
incb %al
movzbl %al, %eax
addb (%rsi,%rax), %al
incb %al
movzbl %al, %eax
addq %rsi, %rax
leaq 0x2(%rdi), %rdx
cmpq %rax, %rdx
jbe 0x58f6
jmp 0x590a
leaq 0x7(%rdi), %rax
leaq 0x2(%rax), %rdx
movzbl 0x1(%rdi), %esi
addq %rdi, %rsi
addq $0x2, %rsi
cmpq %rsi, %rdx
jbe 0x590d
xorl %eax, %eax
retq
addq %rdi, %rcx
addq $0x7, %rcx
xorl %esi, %esi
cmpq %rcx, %rdx
cmovaq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_4a.h
// Function: desc4a_next_ext_event
static inline uint8_t *desc4a_next_ext_event(const uint8_t *p_desc,
                                             const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC4A_HEADER_SIZE;
    else
        p_desc_n += desc4an_get_ext_event_length(p_desc_n);
    return desc_check(p_desc, p_desc_n, DESC4A_EXT_EVENT_SIZE);
}

// Assembly:
testq %rsi, %rsi
je 0x5935
movb 0x2(%rsi), %al
movl %eax, %ecx
andb $0xc, %cl
cmpb $0xc, %cl
jne 0x593b
pushq $0x5
popq %rax
jmp 0x5955
leaq 0x9(%rdi), %rsi
jmp 0x5958
cmpb $0x4, %cl
sete %cl
addb %cl, %cl
movl %eax, %edx
andb $0x2, %dl
addb %al, %al
andb $0x2, %al
addb %dl, %al
addb %cl, %al
addb $0x3, %al
movzbl %al, %eax
addq %rax, %rsi
testq %rdi, %rdi
je 0x5966
leaq 0x2(%rdi), %rcx
cmpq %rsi, %rcx
jbe 0x5969
xorl %eax, %eax
retq
leaq 0x3(%rsi), %rdx
movzbl 0x1(%rdi), %eax
addq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rdx
cmovbeq %rsi, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_4a.h
// Function: desc4an_set_ext_event_target_onid
static inline void desc4an_set_ext_event_target_onid(uint8_t *p_desc_n, uint16_t i_target_onid)
{
    if (desc4an_ext_event_have_user_defined_id(p_desc_n))
        return;
    uint8_t ofs = desc4an_ext_event_have_target_tsid(p_desc_n) ? 5 : 3;
    if (desc4an_get_ext_event_onid_id_flag(p_desc_n)) {
        p_desc_n[ofs + 0] = (i_target_onid >> 8) & 0xff;
        p_desc_n[ofs + 1] =  i_target_onid       & 0xff;
    }
}

// Assembly:
movb 0x2(%rdi), %cl
movl %ecx, %eax
andb $0xc, %al
cmpb $0xc, %al
sete %dl
testb $0x2, %cl
sete %cl
orb %dl, %cl
jne 0x59a4
xorl %ecx, %ecx
cmpb $0x4, %al
sete %cl
rolw $0x8, %si
movw %si, 0x3(%rdi,%rcx,2)
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_4a.h
// Function: desc4an_set_ext_event_service_id
static inline void desc4an_set_ext_event_service_id(uint8_t *p_desc_n, uint16_t i_service_id)
{
    if (desc4an_ext_event_have_user_defined_id(p_desc_n))
        return;
    uint8_t ofs = desc4an_ext_event_have_target_tsid(p_desc_n) ? 5 : 3;
    if (desc4an_get_ext_event_onid_id_flag(p_desc_n))
        ofs += 2;
    if (desc4an_get_ext_event_service_id_flag(p_desc_n)) {
        p_desc_n[ofs + 0] = (i_service_id >> 8) & 0xff;
        p_desc_n[ofs + 1] =  i_service_id       & 0xff;
    }
}

// Assembly:
movb 0x2(%rdi), %al
movl %eax, %ecx
andb $0xc, %cl
cmpb $0xc, %cl
sete %dl
testb $0x1, %al
sete %r8b
orb %dl, %r8b
jne 0x59d6
cmpb $0x4, %cl
sete %cl
addb %cl, %cl
andb $0x2, %al
addb %cl, %al
movzbl %al, %eax
rolw $0x8, %si
movw %si, 0x3(%rax,%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_54.h
// Function: desc54_next_content
static inline uint8_t *desc54_next_content(const uint8_t *p_desc,
                                           const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC54_HEADER_SIZE;
    else
        p_desc_n += DESC54_CONTENT_SIZE;
    return desc_check(p_desc, p_desc_n, DESC54_CONTENT_SIZE);
}

// Assembly:
testq %rsi, %rsi
cmoveq %rdi, %rsi
testq %rdi, %rdi
sete %al
cmpq %rdi, %rsi
setb %cl
orb %al, %cl
je 0x59f1
xorl %eax, %eax
retq
leaq 0x2(%rsi), %rcx
addq $0x4, %rsi
movzbl 0x1(%rdi), %eax
leaq (%rdi,%rax), %rdx
addq $0x2, %rdx
xorl %eax, %eax
cmpq %rdx, %rsi
cmovbeq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_53.h
// Function: desc53_next_ca
static inline uint8_t *desc53_next_ca(const uint8_t *p_desc,
                                      const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC53_HEADER_SIZE;
    else
        p_desc_n += DESC53_CA_SIZE;
    return desc_check(p_desc, p_desc_n, DESC53_CA_SIZE);
}

// Assembly:
testq %rsi, %rsi
cmoveq %rdi, %rsi
testq %rdi, %rdi
sete %al
cmpq %rdi, %rsi
setb %cl
orb %al, %cl
je 0x5a29
xorl %eax, %eax
retq
leaq 0x2(%rsi), %rcx
addq $0x4, %rsi
movzbl 0x1(%rdi), %eax
leaq (%rdi,%rax), %rdx
addq $0x2, %rdx
xorl %eax, %eax
cmpq %rdx, %rsi
cmovbeq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/desc_55.h
// Function: desc55_next_rating
static inline uint8_t *desc55_next_rating(const uint8_t *p_desc,
                                          const uint8_t *p_desc_n)
{
    if (!p_desc_n)
        p_desc_n = p_desc + DESC55_HEADER_SIZE;
    else
        p_desc_n += DESC55_RATING_SIZE;
    return desc_check(p_desc, p_desc_n, DESC55_RATING_SIZE);
}

// Assembly:
leaq 0x4(%rsi), %rcx
leaq 0x2(%rdi), %rdx
testq %rsi, %rsi
cmoveq %rdx, %rcx
testq %rdi, %rdi
sete %al
cmpq %rcx, %rdx
seta %sil
orb %al, %sil
je 0x5a6b
xorl %eax, %eax
retq
leaq 0x4(%rcx), %rsi
movzbl 0x1(%rdi), %eax
addq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rsi
cmovbeq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/videolan[P]bitstream/examples/./bitstream/dvb/si/tdt.h
// Function: tdt_set_utc
static inline void tdt_set_utc(uint8_t *p_tdt, uint64_t i_utc)
{
    p_tdt[3] = (i_utc >> 32) & 0xff;
    p_tdt[4] = (i_utc >> 24) & 0xff;
    p_tdt[5] = (i_utc >> 16) & 0xff;
    p_tdt[6] = (i_utc >> 8) & 0xff;
    p_tdt[7] = i_utc & 0xff;
}

// Assembly:
movq %rsi, %rax
movq %rsi, %rcx
shrq $0x20, %rcx
movb %cl, 0x3(%rdi)
movl %eax, %ecx
shrl $0x18, %ecx
movb %cl, 0x4(%rdi)
movl %eax, %ecx
shrl $0x10, %ecx
movb %cl, 0x5(%rdi)
movb %ah, 0x6(%rdi)
movb %al, 0x7(%rdi)
retq