#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_DisplayTagInfo(unsigned int, unsigned char);
int /*<<< orphan*/ Parser_TsPacketLog(unsigned int, char *, ...);
int x51_Tag_DescriptorParser(unsigned int type, unsigned char *buff) {
  unsigned int i = 0, j = 0;
  unsigned char tmp = 0;
  if (NULL == buff) {
    return -1;
  }
  Parser_DisplayTagInfo(type, buff[0]);
  Parser_TsPacketLog(type, "Descriptor_length = 0x%x\n", buff[1]);
  Parser_TsPacketLog(type, "mosaic_entry_point = 0x%x\n",
                     ((buff[2] & 0x80) >> 7));
  Parser_TsPacketLog(type, "number_of_horizontal_elementary_cells = 0x%x\n",
                     ((buff[2] & 0x70) >> 4));
  Parser_TsPacketLog(type, "number_of_vertical_elementary_cells = 0x%x\n",
                     (buff[2] & 0x07));
  if (buff[1] > 1) {
    for (i = 0; i < buff[1]; i += 2) {
      Parser_TsPacketLog(type, "logical_cell_id = 0x%x\n",
                         ((buff[i + 3] & 0xFB) >> 2));
      Parser_TsPacketLog(type, "logical_cell_presentation_info = 0x%x\n",
                         buff[i + 4] & 0x07);
      Parser_TsPacketLog(type, "elementary_cell_field_length = 0x%x\n",
                         buff[i + 5]);
      for (j = 0; j < buff[i + 5]; j++) {
        Parser_TsPacketLog(type, "elementary_cell_id = 0x%x\n",
                           buff[i + j + 6] & 0x3F);
      }
      tmp = buff[i + 5];
      Parser_TsPacketLog(type, "cell_linkage_info = 0x%x\n", buff[i + tmp + 6]);
      if (0x01 == buff[i + tmp + 6]) {
        Parser_TsPacketLog(type, "bouquet_id = 0x%x\n",
                           ((buff[i + tmp + 7] & 0xFF) << 8) |
                               (buff[i + tmp + 8] & 0xFF));
      } else if ((0x02 == buff[i + tmp + 6]) || (0x03 == buff[i + tmp + 6])) {
        Parser_TsPacketLog(type, "original_network_id = 0x%x\n",
                           ((buff[i + tmp + 7] & 0xFF) << 8) |
                               (buff[i + tmp + 8] & 0xFF));
        Parser_TsPacketLog(type, "transport_stream_id = 0x%x\n",
                           ((buff[i + tmp + 9] & 0xFF) << 8) |
                               (buff[i + tmp + 10] & 0xFF));
        Parser_TsPacketLog(type, "service_id = 0x%x\n",
                           ((buff[i + tmp + 11] & 0xFF) << 8) |
                               (buff[i + tmp + 12] & 0xFF));
      } else if (0x04 == buff[i + tmp + 6]) {
        Parser_TsPacketLog(type, "original_network_id = 0x%x\n",
                           ((buff[i + tmp + 7] & 0xFF) << 8) |
                               (buff[i + tmp + 8] & 0xFF));
        Parser_TsPacketLog(type, "transport_stream_id = 0x%x\n",
                           ((buff[i + tmp + 9] & 0xFF) << 8) |
                               (buff[i + tmp + 10] & 0xFF));
        Parser_TsPacketLog(type, "service_id = 0x%x\n",
                           ((buff[i + tmp + 11] & 0xFF) << 8) |
                               (buff[i + tmp + 12] & 0xFF));
        Parser_TsPacketLog(type, "event_id = 0x%x\n",
                           ((buff[i + tmp + 13] & 0xFF) << 8) |
                               (buff[i + tmp + 14] & 0xFF));
      }
    }
  }
  Parser_TsPacketLog(type, "******END******\n");
  return buff[1];
}


x86 assembly (clang, -O0):
<x51_Tag_DescriptorParser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movb   $0x0,-0x19(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1159 <x51_Tag_DescriptorParser+0x39>
movl   $0xffffffff,-0x4(%rbp)
jmp    1644 <x51_Tag_DescriptorParser+0x524>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl (%rax),%esi
call   1040 <Parser_DisplayTagInfo@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%edx
lea    0xe86(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%edx
and    $0x80,%edx
sar    $0x7,%edx
lea    0xe7e(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%edx
and    $0x70,%edx
sar    $0x4,%edx
lea    0xe7a(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%edx
and    $0x7,%edx
lea    0xe8c(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0x1,%eax
jle    1628 <x51_Tag_DescriptorParser+0x508>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
cmp    %ecx,%eax
jae    1623 <x51_Tag_DescriptorParser+0x503>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x3,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xfb,%edx
sar    $0x2,%edx
lea    0xe63(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x4,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0x7,%edx
lea    0xe57(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x5,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
lea    0xe5d(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%edx
add    $0x5,%edx
mov    %edx,%edx
movzbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jae    12cf <x51_Tag_DescriptorParser+0x1af>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
add    $0x6,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0x3f,%edx
lea    0xe39(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    127f <x51_Tag_DescriptorParser+0x15f>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x5,%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,1),%al
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0x6,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
lea    0xe0d(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0x6,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
jne    137d <x51_Tag_DescriptorParser+0x25d>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0x7,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%esi
add    %esi,%ecx
add    $0x8,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xdb7(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
jmp    1610 <x51_Tag_DescriptorParser+0x4f0>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0x6,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%ecx
mov    $0x2,%eax
cmp    %ecx,%eax
je     13c3 <x51_Tag_DescriptorParser+0x2a3>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0x6,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%ecx
mov    $0x3,%eax
cmp    %ecx,%eax
jne    14af <x51_Tag_DescriptorParser+0x38f>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0x7,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%esi
add    %esi,%ecx
add    $0x8,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xd32(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0x9,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%esi
add    %esi,%ecx
add    $0xa,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xd01(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0xb,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%esi
add    %esi,%ecx
add    $0xc,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xcd0(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
jmp    160b <x51_Tag_DescriptorParser+0x4eb>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0x6,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%ecx
mov    $0x4,%eax
cmp    %ecx,%eax
jne    1606 <x51_Tag_DescriptorParser+0x4e6>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0x7,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%esi
add    %esi,%ecx
add    $0x8,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xc23(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0x9,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%esi
add    %esi,%ecx
add    $0xa,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xbf2(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0xb,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%esi
add    %esi,%ecx
add    $0xc,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xbc1(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0xd,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%esi
add    %esi,%ecx
add    $0xe,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xb87(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
jmp    160b <x51_Tag_DescriptorParser+0x4eb>
jmp    1610 <x51_Tag_DescriptorParser+0x4f0>
jmp    1615 <x51_Tag_DescriptorParser+0x4f5>
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
jmp    11f6 <x51_Tag_DescriptorParser+0xd6>
jmp    1628 <x51_Tag_DescriptorParser+0x508>
mov    -0x8(%rbp),%edi
lea    0xb65(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x51_Tag_DescriptorParser>:
test   %rsi,%rsi
je     141e <x51_Tag_DescriptorParser+0x2fe>
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r13
mov    %edi,%r15d
movzbl (%rsi),%esi
call   1040 <Parser_DisplayTagInfo@plt>
movzbl 0x1(%r13),%edx
lea    0xeaf(%rip),%rsi
mov    %r15d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x2(%r13),%edx
shr    $0x7,%edx
lea    0xeb0(%rip),%rsi
mov    %r15d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x2(%r13),%edx
shr    $0x4,%edx
and    $0x7,%edx
lea    0xeaf(%rip),%rsi
mov    %r15d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x2(%r13),%edx
and    $0x7,%edx
lea    0xec4(%rip),%rsi
mov    %r15d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
cmpb   $0x2,0x1(%r13)
jb     13f9 <x51_Tag_DescriptorParser+0x2d9>
lea    0x6(%r13),%r12
xor    %ebx,%ebx
jmp    128e <x51_Tag_DescriptorParser+0x16e>
nop
movl   $0xc,(%rsp)
movl   $0xb,0xc(%rsp)
mov    $0xa,%edx
mov    %rdx,0x20(%rsp)
mov    $0x9,%ebp
lea    0xf56(%rip),%rsi
lea    0xf6b(%rip),%rdx
mov    %rdx,0x10(%rsp)
lea    0xf7b(%rip),%rdx
mov    %rdx,0x18(%rsp)
add    %r14d,%ecx
movzbl 0x0(%r13,%rcx,1),%ecx
shl    $0x8,%ecx
add    %r14d,%eax
movzbl 0x0(%r13,%rax,1),%edx
or     %ecx,%edx
mov    %r15d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    %r14d,%ebp
movzbl 0x0(%r13,%rbp,1),%eax
shl    $0x8,%eax
mov    0x20(%rsp),%rcx
add    %r14d,%ecx
movzbl 0x0(%r13,%rcx,1),%edx
or     %eax,%edx
mov    %r15d,%edi
mov    0x10(%rsp),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
mov    0xc(%rsp),%eax
mov    %eax,%ecx
mov    (%rsp),%eax
mov    0x18(%rsp),%rsi
add    %r14d,%ecx
movzbl 0x0(%r13,%rcx,1),%ecx
shl    $0x8,%ecx
add    %r14d,%eax
movzbl 0x0(%r13,%rax,1),%edx
or     %ecx,%edx
mov    %r15d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    $0x2,%rbx
movzbl 0x1(%r13),%eax
add    $0x2,%r12
cmp    %rax,%rbx
jae    13f9 <x51_Tag_DescriptorParser+0x2d9>
movzbl 0x3(%rbx,%r13,1),%edx
shr    $0x2,%edx
and    $0x3e,%edx
xor    %ebp,%ebp
mov    %r15d,%edi
lea    0xde9(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x4(%rbx,%r13,1),%edx
and    $0x7,%edx
mov    %r15d,%edi
lea    0xde7(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x5(%rbx,%r13,1),%edx
mov    %r15d,%edi
lea    0xdf7(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
cmpb   $0x0,0x5(%rbx,%r13,1)
je     132e <x51_Tag_DescriptorParser+0x20e>
xor    %r14d,%r14d
mov    %rbx,(%rsp)
mov    %r15d,%ebx
lea    0xdfc(%rip),%r15
nopw   0x0(%rax,%rax,1)
movzbl (%r12,%r14,1),%edx
and    $0x3f,%edx
mov    %ebx,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    $0x1,%r14
mov    (%rsp),%rax
movzbl 0x5(%r13,%rax,1),%ebp
cmp    %rbp,%r14
jb     1300 <x51_Tag_DescriptorParser+0x1e0>
mov    %ebx,%r15d
mov    (%rsp),%rbx
movzbl %bpl,%eax
lea    (%rbx,%rax,1),%r14d
lea    (%rbx,%rax,1),%ebp
add    $0x6,%ebp
movzbl 0x0(%r13,%rbp,1),%edx
mov    %r15d,%edi
lea    0xdc2(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
mov    0x0(%r13,%rbp,1),%dl
mov    $0x8,%eax
mov    $0x7,%ecx
lea    -0x2(%rdx),%esi
cmp    $0x2,%sil
jb     11c0 <x51_Tag_DescriptorParser+0xa0>
lea    0xdb2(%rip),%rsi
cmp    $0x1,%dl
je     1257 <x51_Tag_DescriptorParser+0x137>
cmp    $0x4,%dl
jne    1278 <x51_Tag_DescriptorParser+0x158>
lea    0x7(%r14),%eax
movzbl 0x0(%r13,%rax,1),%eax
shl    $0x8,%eax
lea    0x8(%r14),%ecx
movzbl 0x0(%r13,%rcx,1),%edx
or     %eax,%edx
mov    %r15d,%edi
lea    0xd90(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movl   $0xe,(%rsp)
movl   $0xd,0xc(%rsp)
mov    $0xc,%eax
mov    %rax,0x20(%rsp)
mov    $0xb,%ebp
mov    $0xa,%eax
mov    $0x9,%ecx
lea    0xd76(%rip),%rsi
lea    0xd8b(%rip),%rdx
mov    %rdx,0x10(%rsp)
lea    0xd92(%rip),%rdx
jmp    11f8 <x51_Tag_DescriptorParser+0xd8>
lea    0xd97(%rip),%rsi
mov    %r15d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x1(%r13),%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Descriptor_length = 0x%x\0A\00"
@.str.1 = [27 x i8] c"mosaic_entry_point = 0x%x\0A\00"
@.str.2 = [46 x i8] c"number_of_horizontal_elementary_cells = 0x%x\0A\00"
@.str.3 = [44 x i8] c"number_of_vertical_elementary_cells = 0x%x\0A\00"
@.str.4 = [24 x i8] c"logical_cell_id = 0x%x\0A\00"
@.str.5 = [39 x i8] c"logical_cell_presentation_info = 0x%x\0A\00"
@.str.6 = [37 x i8] c"elementary_cell_field_length = 0x%x\0A\00"
@.str.7 = [27 x i8] c"elementary_cell_id = 0x%x\0A\00"
@.str.8 = [26 x i8] c"cell_linkage_info = 0x%x\0A\00"
@.str.9 = [19 x i8] c"bouquet_id = 0x%x\0A\00"
@.str.10 = [28 x i8] c"original_network_id = 0x%x\0A\00"
@.str.11 = [28 x i8] c"transport_stream_id = 0x%x\0A\00"
@.str.12 = [19 x i8] c"service_id = 0x%x\0A\00"
@.str.13 = [17 x i8] c"event_id = 0x%x\0A\00"
@.str.14 = [17 x i8] c"******END******\0A\00"
define i32 @x51_Tag_DescriptorParser(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i8 0, i8* %8
%9 = load i8*, i8** %5
%10 = icmp eq i8* null, %9
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %408
12: ; preds = %2
%13 = load i32, i32* %4
%14 = load i8*, i8** %5
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = call i32 @Parser_DisplayTagInfo(i32 %13, i8 zeroext %16)
%18 = load i32, i32* %4
%19 = load i8*, i8** %5
%20 = getelementptr inbounds i8, i8* %19, i64 1
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %18, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = load i32, i32* %4
%25 = load i8*, i8** %5
%26 = getelementptr inbounds i8, i8* %25, i64 2
%27 = load i8, i8* %26
%28 = zext i8 %27 to i32
%29 = and i32 %28, 128
%30 = ashr i32 %29, 7
%31 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %24, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %30)
%32 = load i32, i32* %4
%33 = load i8*, i8** %5
%34 = getelementptr inbounds i8, i8* %33, i64 2
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = and i32 %36, 112
%38 = ashr i32 %37, 4
%39 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %32, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i32 %38)
%40 = load i32, i32* %4
%41 = load i8*, i8** %5
%42 = getelementptr inbounds i8, i8* %41, i64 2
%43 = load i8, i8* %42
%44 = zext i8 %43 to i32
%45 = and i32 %44, 7
%46 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %40, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %45)
%47 = load i8*, i8** %5
%48 = getelementptr inbounds i8, i8* %47, i64 1
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = icmp sgt i32 %50, 1
br i1 %51, label %52, label %401
52: ; preds = %12
store i32 0, i32* %6
br label %53
53: ; preds = %397, %52
%54 = load i32, i32* %6
%55 = load i8*, i8** %5
%56 = getelementptr inbounds i8, i8* %55, i64 1
%57 = load i8, i8* %56
%58 = zext i8 %57 to i32
%59 = icmp ult i32 %54, %58
br i1 %59, label %60, label %400
60: ; preds = %53
%61 = load i32, i32* %4
%62 = load i8*, i8** %5
%63 = load i32, i32* %6
%64 = add i32 %63, 3
%65 = zext i32 %64 to i64
%66 = getelementptr inbounds i8, i8* %62, i64 %65
%67 = load i8, i8* %66
%68 = zext i8 %67 to i32
%69 = and i32 %68, 251
%70 = ashr i32 %69, 2
%71 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %61, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %70)
%72 = load i32, i32* %4
%73 = load i8*, i8** %5
%74 = load i32, i32* %6
%75 = add i32 %74, 4
%76 = zext i32 %75 to i64
%77 = getelementptr inbounds i8, i8* %73, i64 %76
%78 = load i8, i8* %77
%79 = zext i8 %78 to i32
%80 = and i32 %79, 7
%81 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %72, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %80)
%82 = load i32, i32* %4
%83 = load i8*, i8** %5
%84 = load i32, i32* %6
%85 = add i32 %84, 5
%86 = zext i32 %85 to i64
%87 = getelementptr inbounds i8, i8* %83, i64 %86
%88 = load i8, i8* %87
%89 = zext i8 %88 to i32
%90 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %82, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i32 %89)
store i32 0, i32* %7
br label %91
91: ; preds = %114, %60
%92 = load i32, i32* %7
%93 = load i8*, i8** %5
%94 = load i32, i32* %6
%95 = add i32 %94, 5
%96 = zext i32 %95 to i64
%97 = getelementptr inbounds i8, i8* %93, i64 %96
%98 = load i8, i8* %97
%99 = zext i8 %98 to i32
%100 = icmp ult i32 %92, %99
br i1 %100, label %101, label %117
101: ; preds = %91
%102 = load i32, i32* %4
%103 = load i8*, i8** %5
%104 = load i32, i32* %6
%105 = load i32, i32* %7
%106 = add i32 %104, %105
%107 = add i32 %106, 6
%108 = zext i32 %107 to i64
%109 = getelementptr inbounds i8, i8* %103, i64 %108
%110 = load i8, i8* %109
%111 = zext i8 %110 to i32
%112 = and i32 %111, 63
%113 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %102, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i32 %112)
br label %114
114: ; preds = %101
%115 = load i32, i32* %7
%116 = add i32 %115, 1
store i32 %116, i32* %7
br label %91
117: ; preds = %91
%118 = load i8*, i8** %5
%119 = load i32, i32* %6
%120 = add i32 %119, 5
%121 = zext i32 %120 to i64
%122 = getelementptr inbounds i8, i8* %118, i64 %121
%123 = load i8, i8* %122
store i8 %123, i8* %8
%124 = load i32, i32* %4
%125 = load i8*, i8** %5
%126 = load i32, i32* %6
%127 = load i8, i8* %8
%128 = zext i8 %127 to i32
%129 = add i32 %126, %128
%130 = add i32 %129, 6
%131 = zext i32 %130 to i64
%132 = getelementptr inbounds i8, i8* %125, i64 %131
%133 = load i8, i8* %132
%134 = zext i8 %133 to i32
%135 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %124, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0), i32 %134)
%136 = load i8*, i8** %5
%137 = load i32, i32* %6
%138 = load i8, i8* %8
%139 = zext i8 %138 to i32
%140 = add i32 %137, %139
%141 = add i32 %140, 6
%142 = zext i32 %141 to i64
%143 = getelementptr inbounds i8, i8* %136, i64 %142
%144 = load i8, i8* %143
%145 = zext i8 %144 to i32
%146 = icmp eq i32 1, %145
br i1 %146, label %147, label %174
147: ; preds = %117
%148 = load i32, i32* %4
%149 = load i8*, i8** %5
%150 = load i32, i32* %6
%151 = load i8, i8* %8
%152 = zext i8 %151 to i32
%153 = add i32 %150, %152
%154 = add i32 %153, 7
%155 = zext i32 %154 to i64
%156 = getelementptr inbounds i8, i8* %149, i64 %155
%157 = load i8, i8* %156
%158 = zext i8 %157 to i32
%159 = and i32 %158, 255
%160 = shl i32 %159, 8
%161 = load i8*, i8** %5
%162 = load i32, i32* %6
%163 = load i8, i8* %8
%164 = zext i8 %163 to i32
%165 = add i32 %162, %164
%166 = add i32 %165, 8
%167 = zext i32 %166 to i64
%168 = getelementptr inbounds i8, i8* %161, i64 %167
%169 = load i8, i8* %168
%170 = zext i8 %169 to i32
%171 = and i32 %170, 255
%172 = or i32 %160, %171
%173 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %148, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i32 %172)
br label %396
174: ; preds = %117
%175 = load i8*, i8** %5
%176 = load i32, i32* %6
%177 = load i8, i8* %8
%178 = zext i8 %177 to i32
%179 = add i32 %176, %178
%180 = add i32 %179, 6
%181 = zext i32 %180 to i64
%182 = getelementptr inbounds i8, i8* %175, i64 %181
%183 = load i8, i8* %182
%184 = zext i8 %183 to i32
%185 = icmp eq i32 2, %184
br i1 %185, label %198, label %186
186: ; preds = %174
%187 = load i8*, i8** %5
%188 = load i32, i32* %6
%189 = load i8, i8* %8
%190 = zext i8 %189 to i32
%191 = add i32 %188, %190
%192 = add i32 %191, 6
%193 = zext i32 %192 to i64
%194 = getelementptr inbounds i8, i8* %187, i64 %193
%195 = load i8, i8* %194
%196 = zext i8 %195 to i32
%197 = icmp eq i32 3, %196
br i1 %197, label %198, label %277
198: ; preds = %186, %174
%199 = load i32, i32* %4
%200 = load i8*, i8** %5
%201 = load i32, i32* %6
%202 = load i8, i8* %8
%203 = zext i8 %202 to i32
%204 = add i32 %201, %203
%205 = add i32 %204, 7
%206 = zext i32 %205 to i64
%207 = getelementptr inbounds i8, i8* %200, i64 %206
%208 = load i8, i8* %207
%209 = zext i8 %208 to i32
%210 = and i32 %209, 255
%211 = shl i32 %210, 8
%212 = load i8*, i8** %5
%213 = load i32, i32* %6
%214 = load i8, i8* %8
%215 = zext i8 %214 to i32
%216 = add i32 %213, %215
%217 = add i32 %216, 8
%218 = zext i32 %217 to i64
%219 = getelementptr inbounds i8, i8* %212, i64 %218
%220 = load i8, i8* %219
%221 = zext i8 %220 to i32
%222 = and i32 %221, 255
%223 = or i32 %211, %222
%224 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %199, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), i32 %223)
%225 = load i32, i32* %4
%226 = load i8*, i8** %5
%227 = load i32, i32* %6
%228 = load i8, i8* %8
%229 = zext i8 %228 to i32
%230 = add i32 %227, %229
%231 = add i32 %230, 9
%232 = zext i32 %231 to i64
%233 = getelementptr inbounds i8, i8* %226, i64 %232
%234 = load i8, i8* %233
%235 = zext i8 %234 to i32
%236 = and i32 %235, 255
%237 = shl i32 %236, 8
%238 = load i8*, i8** %5
%239 = load i32, i32* %6
%240 = load i8, i8* %8
%241 = zext i8 %240 to i32
%242 = add i32 %239, %241
%243 = add i32 %242, 10
%244 = zext i32 %243 to i64
%245 = getelementptr inbounds i8, i8* %238, i64 %244
%246 = load i8, i8* %245
%247 = zext i8 %246 to i32
%248 = and i32 %247, 255
%249 = or i32 %237, %248
%250 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %225, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i32 %249)
%251 = load i32, i32* %4
%252 = load i8*, i8** %5
%253 = load i32, i32* %6
%254 = load i8, i8* %8
%255 = zext i8 %254 to i32
%256 = add i32 %253, %255
%257 = add i32 %256, 11
%258 = zext i32 %257 to i64
%259 = getelementptr inbounds i8, i8* %252, i64 %258
%260 = load i8, i8* %259
%261 = zext i8 %260 to i32
%262 = and i32 %261, 255
%263 = shl i32 %262, 8
%264 = load i8*, i8** %5
%265 = load i32, i32* %6
%266 = load i8, i8* %8
%267 = zext i8 %266 to i32
%268 = add i32 %265, %267
%269 = add i32 %268, 12
%270 = zext i32 %269 to i64
%271 = getelementptr inbounds i8, i8* %264, i64 %270
%272 = load i8, i8* %271
%273 = zext i8 %272 to i32
%274 = and i32 %273, 255
%275 = or i32 %263, %274
%276 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %251, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i32 %275)
br label %395
277: ; preds = %186
%278 = load i8*, i8** %5
%279 = load i32, i32* %6
%280 = load i8, i8* %8
%281 = zext i8 %280 to i32
%282 = add i32 %279, %281
%283 = add i32 %282, 6
%284 = zext i32 %283 to i64
%285 = getelementptr inbounds i8, i8* %278, i64 %284
%286 = load i8, i8* %285
%287 = zext i8 %286 to i32
%288 = icmp eq i32 4, %287
br i1 %288, label %289, label %394
289: ; preds = %277
%290 = load i32, i32* %4
%291 = load i8*, i8** %5
%292 = load i32, i32* %6
%293 = load i8, i8* %8
%294 = zext i8 %293 to i32
%295 = add i32 %292, %294
%296 = add i32 %295, 7
%297 = zext i32 %296 to i64
%298 = getelementptr inbounds i8, i8* %291, i64 %297
%299 = load i8, i8* %298
%300 = zext i8 %299 to i32
%301 = and i32 %300, 255
%302 = shl i32 %301, 8
%303 = load i8*, i8** %5
%304 = load i32, i32* %6
%305 = load i8, i8* %8
%306 = zext i8 %305 to i32
%307 = add i32 %304, %306
%308 = add i32 %307, 8
%309 = zext i32 %308 to i64
%310 = getelementptr inbounds i8, i8* %303, i64 %309
%311 = load i8, i8* %310
%312 = zext i8 %311 to i32
%313 = and i32 %312, 255
%314 = or i32 %302, %313
%315 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %290, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), i32 %314)
%316 = load i32, i32* %4
%317 = load i8*, i8** %5
%318 = load i32, i32* %6
%319 = load i8, i8* %8
%320 = zext i8 %319 to i32
%321 = add i32 %318, %320
%322 = add i32 %321, 9
%323 = zext i32 %322 to i64
%324 = getelementptr inbounds i8, i8* %317, i64 %323
%325 = load i8, i8* %324
%326 = zext i8 %325 to i32
%327 = and i32 %326, 255
%328 = shl i32 %327, 8
%329 = load i8*, i8** %5
%330 = load i32, i32* %6
%331 = load i8, i8* %8
%332 = zext i8 %331 to i32
%333 = add i32 %330, %332
%334 = add i32 %333, 10
%335 = zext i32 %334 to i64
%336 = getelementptr inbounds i8, i8* %329, i64 %335
%337 = load i8, i8* %336
%338 = zext i8 %337 to i32
%339 = and i32 %338, 255
%340 = or i32 %328, %339
%341 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %316, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), i32 %340)
%342 = load i32, i32* %4
%343 = load i8*, i8** %5
%344 = load i32, i32* %6
%345 = load i8, i8* %8
%346 = zext i8 %345 to i32
%347 = add i32 %344, %346
%348 = add i32 %347, 11
%349 = zext i32 %348 to i64
%350 = getelementptr inbounds i8, i8* %343, i64 %349
%351 = load i8, i8* %350
%352 = zext i8 %351 to i32
%353 = and i32 %352, 255
%354 = shl i32 %353, 8
%355 = load i8*, i8** %5
%356 = load i32, i32* %6
%357 = load i8, i8* %8
%358 = zext i8 %357 to i32
%359 = add i32 %356, %358
%360 = add i32 %359, 12
%361 = zext i32 %360 to i64
%362 = getelementptr inbounds i8, i8* %355, i64 %361
%363 = load i8, i8* %362
%364 = zext i8 %363 to i32
%365 = and i32 %364, 255
%366 = or i32 %354, %365
%367 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %342, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), i32 %366)
%368 = load i32, i32* %4
%369 = load i8*, i8** %5
%370 = load i32, i32* %6
%371 = load i8, i8* %8
%372 = zext i8 %371 to i32
%373 = add i32 %370, %372
%374 = add i32 %373, 13
%375 = zext i32 %374 to i64
%376 = getelementptr inbounds i8, i8* %369, i64 %375
%377 = load i8, i8* %376
%378 = zext i8 %377 to i32
%379 = and i32 %378, 255
%380 = shl i32 %379, 8
%381 = load i8*, i8** %5
%382 = load i32, i32* %6
%383 = load i8, i8* %8
%384 = zext i8 %383 to i32
%385 = add i32 %382, %384
%386 = add i32 %385, 14
%387 = zext i32 %386 to i64
%388 = getelementptr inbounds i8, i8* %381, i64 %387
%389 = load i8, i8* %388
%390 = zext i8 %389 to i32
%391 = and i32 %390, 255
%392 = or i32 %380, %391
%393 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %368, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), i32 %392)
br label %394
394: ; preds = %289, %277
br label %395
395: ; preds = %394, %198
br label %396
396: ; preds = %395, %147
br label %397
397: ; preds = %396
%398 = load i32, i32* %6
%399 = add i32 %398, 2
store i32 %399, i32* %6
br label %53
400: ; preds = %53
br label %401
401: ; preds = %400, %12
%402 = load i32, i32* %4
%403 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %402, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
%404 = load i8*, i8** %5
%405 = getelementptr inbounds i8, i8* %404, i64 1
%406 = load i8, i8* %405
%407 = zext i8 %406 to i32
store i32 %407, i32* %3
br label %408
408: ; preds = %401, %11
%409 = load i32, i32* %3
ret i32 %409
}

LLVM IR (-O2):
@.str = [26 x i8] c"Descriptor_length = 0x%x\0A\00"
@.str.1 = [27 x i8] c"mosaic_entry_point = 0x%x\0A\00"
@.str.2 = [46 x i8] c"number_of_horizontal_elementary_cells = 0x%x\0A\00"
@.str.3 = [44 x i8] c"number_of_vertical_elementary_cells = 0x%x\0A\00"
@.str.4 = [24 x i8] c"logical_cell_id = 0x%x\0A\00"
@.str.5 = [39 x i8] c"logical_cell_presentation_info = 0x%x\0A\00"
@.str.6 = [37 x i8] c"elementary_cell_field_length = 0x%x\0A\00"
@.str.7 = [27 x i8] c"elementary_cell_id = 0x%x\0A\00"
@.str.8 = [26 x i8] c"cell_linkage_info = 0x%x\0A\00"
@.str.9 = [19 x i8] c"bouquet_id = 0x%x\0A\00"
@.str.10 = [28 x i8] c"original_network_id = 0x%x\0A\00"
@.str.11 = [28 x i8] c"transport_stream_id = 0x%x\0A\00"
@.str.12 = [19 x i8] c"service_id = 0x%x\0A\00"
@.str.13 = [17 x i8] c"event_id = 0x%x\0A\00"
@.str.14 = [17 x i8] c"******END******\0A\00"
define i32 @x51_Tag_DescriptorParser(i32 %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %151, label %4
4: ; preds = %2
%5 = load i8, i8* %1
%6 = tail call i32 @Parser_DisplayTagInfo(i32 %0, i8 zeroext %5)
%7 = getelementptr inbounds i8, i8* %1, i64 1
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds i8, i8* %1, i64 2
%12 = load i8, i8* %11
%13 = lshr i8 %12, 7
%14 = zext i8 %13 to i32
%15 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = load i8, i8* %11
%17 = lshr i8 %16, 4
%18 = and i8 %17, 7
%19 = zext i8 %18 to i32
%20 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i32 %19)
%21 = load i8, i8* %11
%22 = and i8 %21, 7
%23 = zext i8 %22 to i32
%24 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.3, i64 0, i64 0), i32 %23)
%25 = load i8, i8* %7
%26 = icmp ugt i8 %25, 1
br i1 %26, label %27, label %147
27: ; preds = %4, %142
%28 = phi i64 [ %143, %142 ], [ 0, %4 ]
%29 = add nuw nsw i64 %28, 3
%30 = getelementptr inbounds i8, i8* %1, i64 %29
%31 = load i8, i8* %30
%32 = lshr i8 %31, 2
%33 = and i8 %32, 62
%34 = zext i8 %33 to i32
%35 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %34)
%36 = add nuw nsw i64 %28, 4
%37 = getelementptr inbounds i8, i8* %1, i64 %36
%38 = load i8, i8* %37
%39 = and i8 %38, 7
%40 = zext i8 %39 to i32
%41 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.5, i64 0, i64 0), i32 %40)
%42 = add nuw nsw i64 %28, 5
%43 = getelementptr inbounds i8, i8* %1, i64 %42
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.6, i64 0, i64 0), i32 %45)
%47 = load i8, i8* %43
%48 = icmp eq i8 %47, 0
br i1 %48, label %63, label %49
49: ; preds = %27
%50 = add nuw nsw i64 %28, 6
br label %51
51: ; preds = %49, %51
%52 = phi i64 [ 0, %49 ], [ %59, %51 ]
%53 = add nuw nsw i64 %50, %52
%54 = getelementptr inbounds i8, i8* %1, i64 %53
%55 = load i8, i8* %54
%56 = and i8 %55, 63
%57 = zext i8 %56 to i32
%58 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i32 %57)
%59 = add nuw nsw i64 %52, 1
%60 = load i8, i8* %43
%61 = zext i8 %60 to i64
%62 = icmp ult i64 %59, %61
br i1 %62, label %51, label %63
63: ; preds = %51, %27
%64 = phi i8 [ 0, %27 ], [ %60, %51 ]
%65 = zext i8 %64 to i32
%66 = trunc i64 %28 to i32
%67 = add i32 %66, %65
%68 = add i32 %67, 6
%69 = zext i32 %68 to i64
%70 = getelementptr inbounds i8, i8* %1, i64 %69
%71 = load i8, i8* %70
%72 = zext i8 %71 to i32
%73 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0), i32 %72)
%74 = load i8, i8* %70
switch i8 %74, label %142 [
i8 1, label %125
i8 2, label %89
i8 3, label %89
i8 4, label %75
]
75: ; preds = %63
%76 = add i32 %67, 7
%77 = zext i32 %76 to i64
%78 = getelementptr inbounds i8, i8* %1, i64 %77
%79 = load i8, i8* %78
%80 = zext i8 %79 to i32
%81 = shl nuw nsw i32 %80, 8
%82 = add i32 %67, 8
%83 = zext i32 %82 to i64
%84 = getelementptr inbounds i8, i8* %1, i64 %83
%85 = load i8, i8* %84
%86 = zext i8 %85 to i32
%87 = or i32 %81, %86
%88 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), i32 %87)
br label %89
89: ; preds = %63, %63, %75
%90 = phi i32 [ 9, %75 ], [ 7, %63 ], [ 7, %63 ]
%91 = phi i32 [ 10, %75 ], [ 8, %63 ], [ 8, %63 ]
%92 = phi i8* [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), %75 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), %63 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.10, i64 0, i64 0), %63 ]
%93 = phi i32 [ 11, %75 ], [ 9, %63 ], [ 9, %63 ]
%94 = phi i32 [ 12, %75 ], [ 10, %63 ], [ 10, %63 ]
%95 = phi i8* [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), %75 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), %63 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.11, i64 0, i64 0), %63 ]
%96 = phi i32 [ 13, %75 ], [ 11, %63 ], [ 11, %63 ]
%97 = phi i32 [ 14, %75 ], [ 12, %63 ], [ 12, %63 ]
%98 = phi i8* [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.13, i64 0, i64 0), %75 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), %63 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0), %63 ]
%99 = add i32 %67, %90
%100 = zext i32 %99 to i64
%101 = getelementptr inbounds i8, i8* %1, i64 %100
%102 = load i8, i8* %101
%103 = zext i8 %102 to i32
%104 = shl nuw nsw i32 %103, 8
%105 = add i32 %67, %91
%106 = zext i32 %105 to i64
%107 = getelementptr inbounds i8, i8* %1, i64 %106
%108 = load i8, i8* %107
%109 = zext i8 %108 to i32
%110 = or i32 %104, %109
%111 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* %92, i32 %110)
%112 = add i32 %67, %93
%113 = zext i32 %112 to i64
%114 = getelementptr inbounds i8, i8* %1, i64 %113
%115 = load i8, i8* %114
%116 = zext i8 %115 to i32
%117 = shl nuw nsw i32 %116, 8
%118 = add i32 %67, %94
%119 = zext i32 %118 to i64
%120 = getelementptr inbounds i8, i8* %1, i64 %119
%121 = load i8, i8* %120
%122 = zext i8 %121 to i32
%123 = or i32 %117, %122
%124 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* %95, i32 %123)
br label %125
125: ; preds = %89, %63
%126 = phi i32 [ 7, %63 ], [ %96, %89 ]
%127 = phi i32 [ 8, %63 ], [ %97, %89 ]
%128 = phi i8* [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), %63 ], [ %98, %89 ]
%129 = add i32 %67, %126
%130 = zext i32 %129 to i64
%131 = getelementptr inbounds i8, i8* %1, i64 %130
%132 = load i8, i8* %131
%133 = zext i8 %132 to i32
%134 = shl nuw nsw i32 %133, 8
%135 = add i32 %67, %127
%136 = zext i32 %135 to i64
%137 = getelementptr inbounds i8, i8* %1, i64 %136
%138 = load i8, i8* %137
%139 = zext i8 %138 to i32
%140 = or i32 %134, %139
%141 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* %128, i32 %140)
br label %142
142: ; preds = %125, %63
%143 = add nuw nsw i64 %28, 2
%144 = load i8, i8* %7
%145 = zext i8 %144 to i64
%146 = icmp ult i64 %143, %145
br i1 %146, label %27, label %147
147: ; preds = %142, %4
%148 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
%149 = load i8, i8* %7
%150 = zext i8 %149 to i32
br label %151
151: ; preds = %2, %147
%152 = phi i32 [ %150, %147 ], [ -1, %2 ]
ret i32 %152
}