#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ Parser_TsPacketLog(int, char *, ...);
unsigned short x00_Tag_DescriptorParser(int, unsigned char *);
unsigned short x48_Tag_DescriptorParser(int, unsigned char *);
unsigned short x5D_Tag_DescriptorParser(int, unsigned char *);
int Parser_SectionSDT(unsigned char *section) {
  unsigned short descriptor_offset = 0;
  unsigned short service_offset = 0;
  unsigned short section_len = 0;
  unsigned short descriptor_loop_len = 0;
  unsigned short service_loop_len = 0;
  unsigned int i = 0, j = 0;
  unsigned int data_offset = 0;
  int ret = -1;
  if (NULL == section) {
    Parser_TsPacketLog((0x00000040), "SDT error: section is NULL !\n");
    return -1;
  }
  if ((0x42 != section[0]) && (0x46 != section[0])) {
    Parser_TsPacketLog((0x00000040), "SDT table id is error : %x\n",
                       section[0]);
    return -1;
  }
  section_len = ((section[1] & 0x0F) << 8) | (section[2] & 0xFF);
  Parser_TsPacketLog((0x00000040),
                     "****************SDT Info****************\n");
  Parser_TsPacketLog((0x00000040), "SDT table id = 0x%x\n", section[0]);
  Parser_TsPacketLog((0x00000040), "SDT section_syntax_indicator = 0x%x\n",
                     (section[1] & 0x80) >> 7);
  Parser_TsPacketLog((0x00000040), "SDT section_length = 0x%x\n", section_len);
  Parser_TsPacketLog((0x00000040), "SDT transport_stream_id = 0x%x\n",
                     ((section[3] & 0xFF) << 8) | (section[4] & 0xFF));
  Parser_TsPacketLog((0x00000040), "SDT version_number = 0x%x\n",
                     (section[5] & 0x3E) >> 1);
  Parser_TsPacketLog((0x00000040), "SDT current_next_indicator = 0x%x\n",
                     section[5] & 0x01);
  Parser_TsPacketLog((0x00000040), "SDT section_number = 0x%x\n", section[6]);
  Parser_TsPacketLog((0x00000040), "SDT last_section_number = 0x%x\n",
                     section[7]);
  Parser_TsPacketLog((0x00000040), "SDT original_network_id = 0x%x\n",
                     ((section[8] & 0xFF) << 8) | (section[9] & 0xFF));
  Parser_TsPacketLog((0x00000040), "SDT crc = 0x%08x\n",
                     (section[section_len - 1] << 24) |
                         ((section[section_len] & 0xFF) << 16) |
                         ((section[section_len + 1] & 0xFF) << 8) |
                         (section[section_len + 2] & 0xFF));
  data_offset += 11;
  service_loop_len = section_len - 12;
  for (i = 0; i < service_loop_len; i += service_offset) {
    Parser_TsPacketLog((0x00000040),
                       "****************SDT Service Info****************\n");
    descriptor_loop_len = ((section[data_offset + 3] & 0x0F) << 8) |
                          (section[data_offset + 4] & 0xFF);
    Parser_TsPacketLog((0x00000040), "SDT service_id = 0x%x\n",
                       ((section[data_offset] & 0xFF) << 8) |
                           (section[data_offset + 1] & 0xFF));
    Parser_TsPacketLog((0x00000040), "SDT EIT_schedule_flag = 0x%x\n",
                       (section[data_offset + 2] & 0x02) >> 1);
    Parser_TsPacketLog((0x00000040), "SDT EIT_present_following_flag = 0x%x\n",
                       (section[data_offset + 2] & 0x01));
    Parser_TsPacketLog((0x00000040), "SDT running_status = 0x%x\n",
                       (section[data_offset + 3] & 0xE0) >> 5);
    Parser_TsPacketLog((0x00000040), "SDT free_CA_mode = 0x%x\n",
                       (section[data_offset + 3] & 0x10) >> 4);
    Parser_TsPacketLog((0x00000040), "SDT descriptors_loop_length = 0x%x\n",
                       descriptor_loop_len);
    data_offset += 5;
    for (j = 0; j < descriptor_loop_len; j += descriptor_offset) {
      Parser_TsPacketLog(
          (0x00000040),
          "****************SDT Service Descriptor Info****************\n");
      switch (section[data_offset]) {
      case 0x48:
        descriptor_offset =
            x48_Tag_DescriptorParser((0x00000040), section + data_offset);
        break;
      case 0x5D:
        descriptor_offset =
            x5D_Tag_DescriptorParser((0x00000040), section + data_offset);
        break;
      default:
        descriptor_offset =
            x00_Tag_DescriptorParser((0x00000040), section + data_offset);
        break;
      }
      descriptor_offset += 2;
      data_offset += descriptor_offset;
      Parser_TsPacketLog((0x00000040),
                         "****************************************\n");
    }
    service_offset = descriptor_loop_len + 5;
    Parser_TsPacketLog((0x00000040),
                       "****************************************\n");
  }
  Parser_TsPacketLog((0x00000040),
                     "****************************************\n");
  ret = 0;
  return ret;
}


x86 assembly (clang, -O0):
<Parser_SectionSDT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
movw   $0x0,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movw   $0x0,-0x16(%rbp)
movw   $0x0,-0x18(%rbp)
movw   $0x0,-0x1a(%rbp)
movl   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0xffffffff,-0x2c(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    11b1 <Parser_SectionSDT+0x71>
mov    $0x40,%edi
lea    0xe62(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1674 <Parser_SectionSDT+0x534>
mov    -0x10(%rbp),%rax
movzbl (%rax),%ecx
mov    $0x42,%eax
cmp    %ecx,%eax
je     11ff <Parser_SectionSDT+0xbf>
mov    -0x10(%rbp),%rax
movzbl (%rax),%ecx
mov    $0x46,%eax
cmp    %ecx,%eax
je     11ff <Parser_SectionSDT+0xbf>
mov    -0x10(%rbp),%rax
movzbl (%rax),%edx
mov    $0x40,%edi
lea    0xe32(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1674 <Parser_SectionSDT+0x534>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
and    $0xf,%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
and    $0xff,%ecx
or     %ecx,%eax
mov    %ax,-0x16(%rbp)
mov    $0x40,%edi
lea    0xe0d(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
movzbl (%rax),%edx
mov    $0x40,%edi
lea    0xe1d(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%edx
and    $0x80,%edx
sar    $0x7,%edx
mov    $0x40,%edi
lea    0xe0e(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movzwl -0x16(%rbp),%edx
mov    $0x40,%edi
lea    0xe1c(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
movzbl 0x4(%rax),%eax
and    $0xff,%eax
or     %eax,%edx
mov    $0x40,%edi
lea    0xe04(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
movzbl 0x5(%rax),%edx
and    $0x3e,%edx
sar    $0x1,%edx
mov    $0x40,%edi
lea    0xe03(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
movzbl 0x5(%rax),%edx
and    $0x1,%edx
mov    $0x40,%edi
lea    0xe00(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
movzbl 0x6(%rax),%edx
mov    $0x40,%edi
lea    0xe08(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
movzbl 0x7(%rax),%edx
mov    $0x40,%edi
lea    0xe08(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
movzbl 0x8(%rax),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
movzbl 0x9(%rax),%eax
and    $0xff,%eax
or     %eax,%edx
mov    $0x40,%edi
lea    0xdf5(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
movzwl -0x16(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
shl    $0x18,%edx
mov    -0x10(%rbp),%rax
movzwl -0x16(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
shl    $0x10,%eax
or     %eax,%edx
mov    -0x10(%rbp),%rax
movzwl -0x16(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
shl    $0x8,%eax
or     %eax,%edx
mov    -0x10(%rbp),%rax
movzwl -0x16(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
mov    $0x40,%edi
lea    0xda2(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x28(%rbp),%eax
add    $0xb,%eax
mov    %eax,-0x28(%rbp)
movzwl -0x16(%rbp),%eax
sub    $0xc,%eax
mov    %ax,-0x1a(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
movzwl -0x1a(%rbp),%ecx
cmp    %ecx,%eax
jae    1654 <Parser_SectionSDT+0x514>
mov    $0x40,%edi
lea    0xd77(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x3,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xf,%eax
shl    $0x8,%eax
mov    -0x10(%rbp),%rcx
mov    -0x28(%rbp),%edx
add    $0x4,%edx
mov    %edx,%edx
movzbl (%rcx,%rdx,1),%ecx
and    $0xff,%ecx
or     %ecx,%eax
mov    %ax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
mov    $0x40,%edi
lea    0xd39(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x2,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0x2,%edx
sar    $0x1,%edx
mov    $0x40,%edi
lea    0xd27(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x2,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0x1,%edx
mov    $0x40,%edi
lea    0xd1f(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x3,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xe0,%edx
sar    $0x5,%edx
mov    $0x40,%edi
lea    0xd1a(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x3,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0x10,%edx
sar    $0x4,%edx
mov    $0x40,%edi
lea    0xd0c(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movzwl -0x18(%rbp),%edx
mov    $0x40,%edi
lea    0xd0e(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x28(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
movzwl -0x18(%rbp),%ecx
cmp    %ecx,%eax
jae    1627 <Parser_SectionSDT+0x4e7>
lea    0xd05(%rip),%rsi
xor    %eax,%eax
mov    $0x40,%edi
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x30(%rbp)
sub    $0x48,%eax
je     159e <Parser_SectionSDT+0x45e>
jmp    158d <Parser_SectionSDT+0x44d>
mov    -0x30(%rbp),%eax
sub    $0x5d,%eax
je     15bb <Parser_SectionSDT+0x47b>
jmp    15d8 <Parser_SectionSDT+0x498>
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%eax
add    %rax,%rsi
mov    $0x40,%edi
call   1050 <x48_Tag_DescriptorParser@plt>
mov    %ax,-0x12(%rbp)
jmp    15f0 <Parser_SectionSDT+0x4b0>
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%eax
add    %rax,%rsi
mov    $0x40,%edi
call   1060 <x5D_Tag_DescriptorParser@plt>
mov    %ax,-0x12(%rbp)
jmp    15f0 <Parser_SectionSDT+0x4b0>
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%eax
add    %rax,%rsi
mov    $0x40,%edi
call   1040 <x00_Tag_DescriptorParser@plt>
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
add    $0x2,%eax
mov    %ax,-0x12(%rbp)
movzwl -0x12(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    $0x40,%edi
lea    0xc96(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movzwl -0x12(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    154f <Parser_SectionSDT+0x40f>
movzwl -0x18(%rbp),%eax
add    $0x5,%eax
mov    %ax,-0x14(%rbp)
mov    $0x40,%edi
lea    0xc69(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movzwl -0x14(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    13f2 <Parser_SectionSDT+0x2b2>
mov    $0x40,%edi
lea    0xc47(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Parser_SectionSDT>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
test   %rdi,%rdi
je     146e <Parser_SectionSDT+0x32e>
mov    %rdi,%r12
movzbl (%rdi),%edx
mov    %edx,%eax
or     $0x4,%al
cmp    $0x46,%al
jne    1483 <Parser_SectionSDT+0x343>
movzbl 0x1(%r12),%eax
and    $0xf,%eax
shl    $0x8,%rax
movzbl 0x2(%r12),%ebp
or     %rax,%rbp
lea    0xeb4(%rip),%rsi
mov    $0x40,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl (%r12),%edx
lea    0xec6(%rip),%rsi
mov    $0x40,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x1(%r12),%edx
shr    $0x7,%edx
lea    0xebf(%rip),%rsi
mov    $0x40,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
lea    0xed1(%rip),%rsi
mov    $0x40,%edi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzwl 0x3(%r12),%edx
shl    $0x10,%edx
bswap  %edx
lea    0xecc(%rip),%rsi
mov    $0x40,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x5(%r12),%edx
shr    %edx
and    $0x1f,%edx
lea    0xece(%rip),%rsi
mov    $0x40,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x5(%r12),%edx
and    $0x1,%edx
lea    0xecd(%rip),%rsi
mov    $0x40,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x6(%r12),%edx
lea    0xed7(%rip),%rsi
mov    $0x40,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x7(%r12),%edx
lea    0xed9(%rip),%rsi
mov    $0x40,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzwl 0x8(%r12),%edx
shl    $0x10,%edx
bswap  %edx
lea    0xedb(%rip),%rsi
mov    $0x40,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
mov    -0x1(%r12,%rbp,1),%edx
bswap  %edx
lea    0xee1(%rip),%rsi
mov    $0x40,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
lea    -0xc(%rbp),%eax
test   %ax,%ax
je     1457 <Parser_SectionSDT+0x317>
movzwl %ax,%eax
mov    %eax,0xc(%rsp)
mov    $0xb,%r14d
xor    %eax,%eax
jmp    12eb <Parser_SectionSDT+0x1ab>
nopw   0x0(%rax,%rax,1)
lea    0xfe0(%rip),%rbp
mov    $0x40,%edi
mov    %rbp,%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
mov    0x10(%rsp),%rax
add    %r13d,%eax
add    $0x5,%eax
cmp    0xc(%rsp),%eax
jae    1457 <Parser_SectionSDT+0x317>
mov    %rax,0x10(%rsp)
mov    $0x40,%edi
lea    0xe88(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
lea    0x3(%r14),%r15d
movzbl (%r12,%r15,1),%r13d
and    $0xf,%r13d
shl    $0x8,%r13d
lea    0x4(%r14),%eax
movzbl (%r12,%rax,1),%ebp
mov    %r14d,%eax
movzbl (%r12,%rax,1),%eax
shl    $0x8,%eax
lea    0x1(%r14),%ecx
movzbl (%r12,%rcx,1),%edx
or     %eax,%edx
mov    $0x40,%edi
lea    0xe77(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
lea    0x2(%r14),%ebx
movzbl (%r12,%rbx,1),%edx
shr    %edx
and    $0x1,%edx
mov    $0x40,%edi
lea    0xe6d(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl (%r12,%rbx,1),%edx
and    $0x1,%edx
mov    $0x40,%edi
lea    0xe70(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl (%r12,%r15,1),%edx
shr    $0x5,%edx
mov    $0x40,%edi
lea    0xe7c(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl (%r12,%r15,1),%edx
shr    $0x4,%edx
and    $0x1,%edx
mov    $0x40,%edi
lea    0xe79(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
mov    %r13d,%edx
or     %ebp,%edx
mov    $0x40,%edi
lea    0xe7a(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    $0x5,%r14d
or     %ebp,%r13d
je     12c0 <Parser_SectionSDT+0x180>
xor    %r15d,%r15d
lea    0xebd(%rip),%rbp
jmp    1419 <Parser_SectionSDT+0x2d9>
nopl   0x0(%rax)
call   1040 <x00_Tag_DescriptorParser@plt>
add    $0x2,%eax
movzwl %ax,%ebx
add    %ebx,%r14d
mov    $0x40,%edi
mov    %rbp,%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    %ebx,%r15d
cmp    %r13d,%r15d
jae    12c7 <Parser_SectionSDT+0x187>
mov    $0x40,%edi
lea    0xe45(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
mov    %r14d,%eax
lea    (%r12,%rax,1),%rsi
movzbl (%r12,%rax,1),%eax
mov    $0x40,%edi
cmp    $0x5d,%al
je     1450 <Parser_SectionSDT+0x310>
cmp    $0x48,%al
jne    13f0 <Parser_SectionSDT+0x2b0>
call   1050 <x48_Tag_DescriptorParser@plt>
jmp    13f5 <Parser_SectionSDT+0x2b5>
nopl   0x0(%rax)
call   1060 <x5D_Tag_DescriptorParser@plt>
jmp    13f5 <Parser_SectionSDT+0x2b5>
lea    0xe49(%rip),%rsi
xor    %ebx,%ebx
mov    $0x40,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
jmp    149b <Parser_SectionSDT+0x35b>
lea    0xb8b(%rip),%rsi
mov    $0x40,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
jmp    1496 <Parser_SectionSDT+0x356>
lea    0xb94(%rip),%rsi
mov    $0x40,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"SDT error: section is NULL !\0A\00"
@.str.1 = [28 x i8] c"SDT table id is error : %x\0A\00"
@.str.2 = [42 x i8] c"****************SDT Info****************\0A\00"
@.str.3 = [21 x i8] c"SDT table id = 0x%x\0A\00"
@.str.4 = [37 x i8] c"SDT section_syntax_indicator = 0x%x\0A\00"
@.str.5 = [27 x i8] c"SDT section_length = 0x%x\0A\00"
@.str.6 = [32 x i8] c"SDT transport_stream_id = 0x%x\0A\00"
@.str.7 = [27 x i8] c"SDT version_number = 0x%x\0A\00"
@.str.8 = [35 x i8] c"SDT current_next_indicator = 0x%x\0A\00"
@.str.9 = [27 x i8] c"SDT section_number = 0x%x\0A\00"
@.str.10 = [32 x i8] c"SDT last_section_number = 0x%x\0A\00"
@.str.11 = [32 x i8] c"SDT original_network_id = 0x%x\0A\00"
@.str.12 = [18 x i8] c"SDT crc = 0x%08x\0A\00"
@.str.13 = [50 x i8] c"****************SDT Service Info****************\0A\00"
@.str.14 = [23 x i8] c"SDT service_id = 0x%x\0A\00"
@.str.15 = [30 x i8] c"SDT EIT_schedule_flag = 0x%x\0A\00"
@.str.16 = [39 x i8] c"SDT EIT_present_following_flag = 0x%x\0A\00"
@.str.17 = [27 x i8] c"SDT running_status = 0x%x\0A\00"
@.str.18 = [25 x i8] c"SDT free_CA_mode = 0x%x\0A\00"
@.str.19 = [36 x i8] c"SDT descriptors_loop_length = 0x%x\0A\00"
@.str.20 = [61 x i8] c"****************SDT Service Descriptor Info****************\0A\00"
@.str.21 = [42 x i8] c"****************************************\0A\00"
define i32 @Parser_SectionSDT(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16
%8 = alloca i16
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %3
store i16 0, i16* %4
store i16 0, i16* %5
store i16 0, i16* %6
store i16 0, i16* %7
store i16 0, i16* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 -1, i32* %12
%13 = load i8*, i8** %3
%14 = icmp eq i8* null, %13
br i1 %14, label %15, label %17
15: ; preds = %1
%16 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %308
17: ; preds = %1
%18 = load i8*, i8** %3
%19 = getelementptr inbounds i8, i8* %18, i64 0
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = icmp ne i32 66, %21
br i1 %22, label %23, label %35
23: ; preds = %17
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i64 0
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = icmp ne i32 70, %27
br i1 %28, label %29, label %35
29: ; preds = %23
%30 = load i8*, i8** %3
%31 = getelementptr inbounds i8, i8* %30, i64 0
%32 = load i8, i8* %31
%33 = zext i8 %32 to i32
%34 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %33)
store i32 -1, i32* %2
br label %308
35: ; preds = %23, %17
%36 = load i8*, i8** %3
%37 = getelementptr inbounds i8, i8* %36, i64 1
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = and i32 %39, 15
%41 = shl i32 %40, 8
%42 = load i8*, i8** %3
%43 = getelementptr inbounds i8, i8* %42, i64 2
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = and i32 %45, 255
%47 = or i32 %41, %46
%48 = trunc i32 %47 to i16
store i16 %48, i16* %6
%49 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%50 = load i8*, i8** %3
%51 = getelementptr inbounds i8, i8* %50, i64 0
%52 = load i8, i8* %51
%53 = zext i8 %52 to i32
%54 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %53)
%55 = load i8*, i8** %3
%56 = getelementptr inbounds i8, i8* %55, i64 1
%57 = load i8, i8* %56
%58 = zext i8 %57 to i32
%59 = and i32 %58, 128
%60 = ashr i32 %59, 7
%61 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i32 %60)
%62 = load i16, i16* %6
%63 = zext i16 %62 to i32
%64 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i32 %63)
%65 = load i8*, i8** %3
%66 = getelementptr inbounds i8, i8* %65, i64 3
%67 = load i8, i8* %66
%68 = zext i8 %67 to i32
%69 = and i32 %68, 255
%70 = shl i32 %69, 8
%71 = load i8*, i8** %3
%72 = getelementptr inbounds i8, i8* %71, i64 4
%73 = load i8, i8* %72
%74 = zext i8 %73 to i32
%75 = and i32 %74, 255
%76 = or i32 %70, %75
%77 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i32 %76)
%78 = load i8*, i8** %3
%79 = getelementptr inbounds i8, i8* %78, i64 5
%80 = load i8, i8* %79
%81 = zext i8 %80 to i32
%82 = and i32 %81, 62
%83 = ashr i32 %82, 1
%84 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i32 %83)
%85 = load i8*, i8** %3
%86 = getelementptr inbounds i8, i8* %85, i64 5
%87 = load i8, i8* %86
%88 = zext i8 %87 to i32
%89 = and i32 %88, 1
%90 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %89)
%91 = load i8*, i8** %3
%92 = getelementptr inbounds i8, i8* %91, i64 6
%93 = load i8, i8* %92
%94 = zext i8 %93 to i32
%95 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0), i32 %94)
%96 = load i8*, i8** %3
%97 = getelementptr inbounds i8, i8* %96, i64 7
%98 = load i8, i8* %97
%99 = zext i8 %98 to i32
%100 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 %99)
%101 = load i8*, i8** %3
%102 = getelementptr inbounds i8, i8* %101, i64 8
%103 = load i8, i8* %102
%104 = zext i8 %103 to i32
%105 = and i32 %104, 255
%106 = shl i32 %105, 8
%107 = load i8*, i8** %3
%108 = getelementptr inbounds i8, i8* %107, i64 9
%109 = load i8, i8* %108
%110 = zext i8 %109 to i32
%111 = and i32 %110, 255
%112 = or i32 %106, %111
%113 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0), i32 %112)
%114 = load i8*, i8** %3
%115 = load i16, i16* %6
%116 = zext i16 %115 to i32
%117 = sub nsw i32 %116, 1
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i8, i8* %114, i64 %118
%120 = load i8, i8* %119
%121 = zext i8 %120 to i32
%122 = shl i32 %121, 24
%123 = load i8*, i8** %3
%124 = load i16, i16* %6
%125 = zext i16 %124 to i64
%126 = getelementptr inbounds i8, i8* %123, i64 %125
%127 = load i8, i8* %126
%128 = zext i8 %127 to i32
%129 = and i32 %128, 255
%130 = shl i32 %129, 16
%131 = or i32 %122, %130
%132 = load i8*, i8** %3
%133 = load i16, i16* %6
%134 = zext i16 %133 to i32
%135 = add nsw i32 %134, 1
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds i8, i8* %132, i64 %136
%138 = load i8, i8* %137
%139 = zext i8 %138 to i32
%140 = and i32 %139, 255
%141 = shl i32 %140, 8
%142 = or i32 %131, %141
%143 = load i8*, i8** %3
%144 = load i16, i16* %6
%145 = zext i16 %144 to i32
%146 = add nsw i32 %145, 2
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i8, i8* %143, i64 %147
%149 = load i8, i8* %148
%150 = zext i8 %149 to i32
%151 = and i32 %150, 255
%152 = or i32 %142, %151
%153 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i32 %152)
%154 = load i32, i32* %11
%155 = add i32 %154, 11
store i32 %155, i32* %11
%156 = load i16, i16* %6
%157 = zext i16 %156 to i32
%158 = sub nsw i32 %157, 12
%159 = trunc i32 %158 to i16
store i16 %159, i16* %8
store i32 0, i32* %9
br label %160
160: ; preds = %300, %35
%161 = load i32, i32* %9
%162 = load i16, i16* %8
%163 = zext i16 %162 to i32
%164 = icmp ult i32 %161, %163
br i1 %164, label %165, label %305
165: ; preds = %160
%166 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.13, i64 0, i64 0))
%167 = load i8*, i8** %3
%168 = load i32, i32* %11
%169 = add i32 %168, 3
%170 = zext i32 %169 to i64
%171 = getelementptr inbounds i8, i8* %167, i64 %170
%172 = load i8, i8* %171
%173 = zext i8 %172 to i32
%174 = and i32 %173, 15
%175 = shl i32 %174, 8
%176 = load i8*, i8** %3
%177 = load i32, i32* %11
%178 = add i32 %177, 4
%179 = zext i32 %178 to i64
%180 = getelementptr inbounds i8, i8* %176, i64 %179
%181 = load i8, i8* %180
%182 = zext i8 %181 to i32
%183 = and i32 %182, 255
%184 = or i32 %175, %183
%185 = trunc i32 %184 to i16
store i16 %185, i16* %7
%186 = load i8*, i8** %3
%187 = load i32, i32* %11
%188 = zext i32 %187 to i64
%189 = getelementptr inbounds i8, i8* %186, i64 %188
%190 = load i8, i8* %189
%191 = zext i8 %190 to i32
%192 = and i32 %191, 255
%193 = shl i32 %192, 8
%194 = load i8*, i8** %3
%195 = load i32, i32* %11
%196 = add i32 %195, 1
%197 = zext i32 %196 to i64
%198 = getelementptr inbounds i8, i8* %194, i64 %197
%199 = load i8, i8* %198
%200 = zext i8 %199 to i32
%201 = and i32 %200, 255
%202 = or i32 %193, %201
%203 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), i32 %202)
%204 = load i8*, i8** %3
%205 = load i32, i32* %11
%206 = add i32 %205, 2
%207 = zext i32 %206 to i64
%208 = getelementptr inbounds i8, i8* %204, i64 %207
%209 = load i8, i8* %208
%210 = zext i8 %209 to i32
%211 = and i32 %210, 2
%212 = ashr i32 %211, 1
%213 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0), i32 %212)
%214 = load i8*, i8** %3
%215 = load i32, i32* %11
%216 = add i32 %215, 2
%217 = zext i32 %216 to i64
%218 = getelementptr inbounds i8, i8* %214, i64 %217
%219 = load i8, i8* %218
%220 = zext i8 %219 to i32
%221 = and i32 %220, 1
%222 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.16, i64 0, i64 0), i32 %221)
%223 = load i8*, i8** %3
%224 = load i32, i32* %11
%225 = add i32 %224, 3
%226 = zext i32 %225 to i64
%227 = getelementptr inbounds i8, i8* %223, i64 %226
%228 = load i8, i8* %227
%229 = zext i8 %228 to i32
%230 = and i32 %229, 224
%231 = ashr i32 %230, 5
%232 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.17, i64 0, i64 0), i32 %231)
%233 = load i8*, i8** %3
%234 = load i32, i32* %11
%235 = add i32 %234, 3
%236 = zext i32 %235 to i64
%237 = getelementptr inbounds i8, i8* %233, i64 %236
%238 = load i8, i8* %237
%239 = zext i8 %238 to i32
%240 = and i32 %239, 16
%241 = ashr i32 %240, 4
%242 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.18, i64 0, i64 0), i32 %241)
%243 = load i16, i16* %7
%244 = zext i16 %243 to i32
%245 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.19, i64 0, i64 0), i32 %244)
%246 = load i32, i32* %11
%247 = add i32 %246, 5
store i32 %247, i32* %11
store i32 0, i32* %10
br label %248
248: ; preds = %289, %165
%249 = load i32, i32* %10
%250 = load i16, i16* %7
%251 = zext i16 %250 to i32
%252 = icmp ult i32 %249, %251
br i1 %252, label %253, label %294
253: ; preds = %248
%254 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.20, i64 0, i64 0))
%255 = load i8*, i8** %3
%256 = load i32, i32* %11
%257 = zext i32 %256 to i64
%258 = getelementptr inbounds i8, i8* %255, i64 %257
%259 = load i8, i8* %258
%260 = zext i8 %259 to i32
switch i32 %260, label %273 [
i32 72, label %261
i32 93, label %267
]
261: ; preds = %253
%262 = load i8*, i8** %3
%263 = load i32, i32* %11
%264 = zext i32 %263 to i64
%265 = getelementptr inbounds i8, i8* %262, i64 %264
%266 = call zeroext i16 @x48_Tag_DescriptorParser(i32 64, i8* %265)
store i16 %266, i16* %4
br label %279
267: ; preds = %253
%268 = load i8*, i8** %3
%269 = load i32, i32* %11
%270 = zext i32 %269 to i64
%271 = getelementptr inbounds i8, i8* %268, i64 %270
%272 = call zeroext i16 @x5D_Tag_DescriptorParser(i32 64, i8* %271)
store i16 %272, i16* %4
br label %279
273: ; preds = %253
%274 = load i8*, i8** %3
%275 = load i32, i32* %11
%276 = zext i32 %275 to i64
%277 = getelementptr inbounds i8, i8* %274, i64 %276
%278 = call zeroext i16 @x00_Tag_DescriptorParser(i32 64, i8* %277)
store i16 %278, i16* %4
br label %279
279: ; preds = %273, %267, %261
%280 = load i16, i16* %4
%281 = zext i16 %280 to i32
%282 = add nsw i32 %281, 2
%283 = trunc i32 %282 to i16
store i16 %283, i16* %4
%284 = load i16, i16* %4
%285 = zext i16 %284 to i32
%286 = load i32, i32* %11
%287 = add i32 %286, %285
store i32 %287, i32* %11
%288 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.21, i64 0, i64 0))
br label %289
289: ; preds = %279
%290 = load i16, i16* %4
%291 = zext i16 %290 to i32
%292 = load i32, i32* %10
%293 = add i32 %292, %291
store i32 %293, i32* %10
br label %248
294: ; preds = %248
%295 = load i16, i16* %7
%296 = zext i16 %295 to i32
%297 = add nsw i32 %296, 5
%298 = trunc i32 %297 to i16
store i16 %298, i16* %5
%299 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.21, i64 0, i64 0))
br label %300
300: ; preds = %294
%301 = load i16, i16* %5
%302 = zext i16 %301 to i32
%303 = load i32, i32* %9
%304 = add i32 %303, %302
store i32 %304, i32* %9
br label %160
305: ; preds = %160
%306 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.21, i64 0, i64 0))
store i32 0, i32* %12
%307 = load i32, i32* %12
store i32 %307, i32* %2
br label %308
308: ; preds = %305, %29, %15
%309 = load i32, i32* %2
ret i32 %309
}

LLVM IR (-O2):
@.str = [30 x i8] c"SDT error: section is NULL !\0A\00"
@.str.1 = [28 x i8] c"SDT table id is error : %x\0A\00"
@.str.2 = [42 x i8] c"****************SDT Info****************\0A\00"
@.str.3 = [21 x i8] c"SDT table id = 0x%x\0A\00"
@.str.4 = [37 x i8] c"SDT section_syntax_indicator = 0x%x\0A\00"
@.str.5 = [27 x i8] c"SDT section_length = 0x%x\0A\00"
@.str.6 = [32 x i8] c"SDT transport_stream_id = 0x%x\0A\00"
@.str.7 = [27 x i8] c"SDT version_number = 0x%x\0A\00"
@.str.8 = [35 x i8] c"SDT current_next_indicator = 0x%x\0A\00"
@.str.9 = [27 x i8] c"SDT section_number = 0x%x\0A\00"
@.str.10 = [32 x i8] c"SDT last_section_number = 0x%x\0A\00"
@.str.11 = [32 x i8] c"SDT original_network_id = 0x%x\0A\00"
@.str.12 = [18 x i8] c"SDT crc = 0x%08x\0A\00"
@.str.13 = [50 x i8] c"****************SDT Service Info****************\0A\00"
@.str.14 = [23 x i8] c"SDT service_id = 0x%x\0A\00"
@.str.15 = [30 x i8] c"SDT EIT_schedule_flag = 0x%x\0A\00"
@.str.16 = [39 x i8] c"SDT EIT_present_following_flag = 0x%x\0A\00"
@.str.17 = [27 x i8] c"SDT running_status = 0x%x\0A\00"
@.str.18 = [25 x i8] c"SDT free_CA_mode = 0x%x\0A\00"
@.str.19 = [36 x i8] c"SDT descriptors_loop_length = 0x%x\0A\00"
@.str.20 = [61 x i8] c"****************SDT Service Descriptor Info****************\0A\00"
@.str.21 = [42 x i8] c"****************************************\0A\00"
define i32 @Parser_SectionSDT(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
br label %177
5: ; preds = %1
%6 = load i8, i8* %0
switch i8 %6, label %7 [
i8 66, label %10
i8 70, label %10
]
7: ; preds = %5
%8 = zext i8 %6 to i32
%9 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %8)
br label %177
10: ; preds = %5, %5
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = and i8 %12, 15
%14 = zext i8 %13 to i16
%15 = shl nuw nsw i16 %14, 8
%16 = getelementptr inbounds i8, i8* %0, i64 2
%17 = load i8, i8* %16
%18 = zext i8 %17 to i16
%19 = or i16 %15, %18
%20 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0))
%21 = load i8, i8* %0
%22 = zext i8 %21 to i32
%23 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i32 %22)
%24 = load i8, i8* %11
%25 = lshr i8 %24, 7
%26 = zext i8 %25 to i32
%27 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i32 %26)
%28 = zext i16 %19 to i32
%29 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds i8, i8* %0, i64 3
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = shl nuw nsw i32 %32, 8
%34 = getelementptr inbounds i8, i8* %0, i64 4
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = or i32 %33, %36
%38 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds i8, i8* %0, i64 5
%40 = load i8, i8* %39
%41 = lshr i8 %40, 1
%42 = and i8 %41, 31
%43 = zext i8 %42 to i32
%44 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i32 %43)
%45 = load i8, i8* %39
%46 = and i8 %45, 1
%47 = zext i8 %46 to i32
%48 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %47)
%49 = getelementptr inbounds i8, i8* %0, i64 6
%50 = load i8, i8* %49
%51 = zext i8 %50 to i32
%52 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0), i32 %51)
%53 = getelementptr inbounds i8, i8* %0, i64 7
%54 = load i8, i8* %53
%55 = zext i8 %54 to i32
%56 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 %55)
%57 = getelementptr inbounds i8, i8* %0, i64 8
%58 = load i8, i8* %57
%59 = zext i8 %58 to i32
%60 = shl nuw nsw i32 %59, 8
%61 = getelementptr inbounds i8, i8* %0, i64 9
%62 = load i8, i8* %61
%63 = zext i8 %62 to i32
%64 = or i32 %60, %63
%65 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0), i32 %64)
%66 = add nsw i32 %28, -1
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8, i8* %0, i64 %67
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = shl nuw i32 %70, 24
%72 = zext i16 %19 to i64
%73 = getelementptr inbounds i8, i8* %0, i64 %72
%74 = load i8, i8* %73
%75 = zext i8 %74 to i32
%76 = shl nuw nsw i32 %75, 16
%77 = or i32 %76, %71
%78 = add nuw nsw i32 %28, 1
%79 = zext i32 %78 to i64
%80 = getelementptr inbounds i8, i8* %0, i64 %79
%81 = load i8, i8* %80
%82 = zext i8 %81 to i32
%83 = shl nuw nsw i32 %82, 8
%84 = or i32 %77, %83
%85 = add nuw nsw i32 %28, 2
%86 = zext i32 %85 to i64
%87 = getelementptr inbounds i8, i8* %0, i64 %86
%88 = load i8, i8* %87
%89 = zext i8 %88 to i32
%90 = or i32 %84, %89
%91 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.12, i64 0, i64 0), i32 %90)
%92 = add nsw i16 %19, -12
%93 = zext i16 %92 to i32
%94 = icmp eq i16 %92, 0
br i1 %94, label %175, label %95
95: ; preds = %10, %169
%96 = phi i32 [ %170, %169 ], [ 11, %10 ]
%97 = phi i32 [ %173, %169 ], [ 0, %10 ]
%98 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.13, i64 0, i64 0))
%99 = add i32 %96, 3
%100 = zext i32 %99 to i64
%101 = getelementptr inbounds i8, i8* %0, i64 %100
%102 = load i8, i8* %101
%103 = and i8 %102, 15
%104 = zext i8 %103 to i32
%105 = shl nuw nsw i32 %104, 8
%106 = add i32 %96, 4
%107 = zext i32 %106 to i64
%108 = getelementptr inbounds i8, i8* %0, i64 %107
%109 = load i8, i8* %108
%110 = zext i8 %109 to i32
%111 = or i32 %105, %110
%112 = zext i32 %96 to i64
%113 = getelementptr inbounds i8, i8* %0, i64 %112
%114 = load i8, i8* %113
%115 = zext i8 %114 to i32
%116 = shl nuw nsw i32 %115, 8
%117 = add i32 %96, 1
%118 = zext i32 %117 to i64
%119 = getelementptr inbounds i8, i8* %0, i64 %118
%120 = load i8, i8* %119
%121 = zext i8 %120 to i32
%122 = or i32 %116, %121
%123 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), i32 %122)
%124 = add i32 %96, 2
%125 = zext i32 %124 to i64
%126 = getelementptr inbounds i8, i8* %0, i64 %125
%127 = load i8, i8* %126
%128 = lshr i8 %127, 1
%129 = and i8 %128, 1
%130 = zext i8 %129 to i32
%131 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.15, i64 0, i64 0), i32 %130)
%132 = load i8, i8* %126
%133 = and i8 %132, 1
%134 = zext i8 %133 to i32
%135 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.16, i64 0, i64 0), i32 %134)
%136 = load i8, i8* %101
%137 = lshr i8 %136, 5
%138 = zext i8 %137 to i32
%139 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.17, i64 0, i64 0), i32 %138)
%140 = load i8, i8* %101
%141 = lshr i8 %140, 4
%142 = and i8 %141, 1
%143 = zext i8 %142 to i32
%144 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.18, i64 0, i64 0), i32 %143)
%145 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.19, i64 0, i64 0), i32 %111)
%146 = add i32 %96, 5
%147 = icmp eq i32 %111, 0
br i1 %147, label %169, label %148
148: ; preds = %95, %161
%149 = phi i32 [ %165, %161 ], [ %146, %95 ]
%150 = phi i32 [ %167, %161 ], [ 0, %95 ]
%151 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.20, i64 0, i64 0))
%152 = zext i32 %149 to i64
%153 = getelementptr inbounds i8, i8* %0, i64 %152
%154 = load i8, i8* %153
switch i8 %154, label %159 [
i8 72, label %155
i8 93, label %157
]
155: ; preds = %148
%156 = tail call zeroext i16 @x48_Tag_DescriptorParser(i32 64, i8* %153)
br label %161
157: ; preds = %148
%158 = tail call zeroext i16 @x5D_Tag_DescriptorParser(i32 64, i8* %153)
br label %161
159: ; preds = %148
%160 = tail call zeroext i16 @x00_Tag_DescriptorParser(i32 64, i8* %153)
br label %161
161: ; preds = %159, %157, %155
%162 = phi i16 [ %160, %159 ], [ %158, %157 ], [ %156, %155 ]
%163 = add i16 %162, 2
%164 = zext i16 %163 to i32
%165 = add i32 %149, %164
%166 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.21, i64 0, i64 0))
%167 = add i32 %150, %164
%168 = icmp ult i32 %167, %111
br i1 %168, label %148, label %169
169: ; preds = %161, %95
%170 = phi i32 [ %146, %95 ], [ %165, %161 ]
%171 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.21, i64 0, i64 0))
%172 = add i32 %97, 5
%173 = add i32 %172, %111
%174 = icmp ult i32 %173, %93
br i1 %174, label %95, label %175
175: ; preds = %169, %10
%176 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 64, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.21, i64 0, i64 0))
br label %177
177: ; preds = %175, %7, %3
%178 = phi i32 [ -1, %3 ], [ -1, %7 ], [ 0, %175 ]
ret i32 %178
}