#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 x4A_Tag_DescriptorParser(unsigned int type, unsigned char *buff) {
  unsigned int i = 0;
  unsigned int offset = 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, "transport_stream_id = 0x%x\n",
                     ((buff[2] & 0xFF) << 8) | (buff[3] & 0xFF));
  Parser_TsPacketLog(type, "original_network_id = 0x%x\n",
                     ((buff[4] & 0xFF) << 8) | (buff[5] & 0xFF));
  Parser_TsPacketLog(type, "service_id = 0x%x\n",
                     ((buff[6] & 0xFF) << 8) | (buff[7] & 0xFF));
  Parser_TsPacketLog(type, "linkage_type = 0x%x\n", buff[8]);
  offset = 7;
  if (0x08 == buff[8]) {
    Parser_TsPacketLog(type, "hand-over_type = 0x%x\n", (buff[9] & 0xF0) >> 4);
    Parser_TsPacketLog(type, "origin_type = 0x%x\n", buff[9] & 0x01);
    offset += 1;
    if ((buff[9] & 0xF0) <= 0x30) {
      Parser_TsPacketLog(type, "network_id = 0x%x\n",
                         ((buff[10] & 0xFF) << 8) | (buff[11] & 0xFF));
      offset += 2;
    }
    if (0 == (buff[9] & 0x01)) {
      if ((buff[9] & 0xF0) <= 0x30) {
        Parser_TsPacketLog(type, "initial_service_id = 0x%x\n",
                           ((buff[12] & 0xFF) << 8) | (buff[13] & 0xFF));
      } else {
        Parser_TsPacketLog(type, "initial_service_id = 0x%x\n",
                           ((buff[10] & 0xFF) << 8) | (buff[11] & 0xFF));
      }
      offset += 2;
    }
  } else if (0x0D == buff[8]) {
    Parser_TsPacketLog(type, "target_event_id = 0x%x\n",
                       ((buff[9] & 0xFF) << 8) | (buff[10] & 0xFF));
    Parser_TsPacketLog(type, "target_listed = 0x%x\n", (buff[11] & 0x80) >> 7);
    Parser_TsPacketLog(type, "event_simulcast = 0x%x\n",
                       (buff[11] & 0x40) >> 6);
    offset += 3;
  } else if ((buff[8] >= 0x0E) && (buff[8] <= 0x1F)) {
    Parser_TsPacketLog(type, "loop_length = 0x%x\n", buff[9]);
    offset += 1;
    if (0 != buff[9]) {
      for (i = 0; i < buff[9]; i += tmp) {
        Parser_TsPacketLog(type, "target_event_id = 0x%x\n",
                           ((buff[i + 10] & 0xFF) << 8) |
                               (buff[i + 11] & 0xFF));
        Parser_TsPacketLog(type, "target_listed = 0x%x\n",
                           (buff[i + 12] & 0x80) >> 7);
        Parser_TsPacketLog(type, "event_simulcast = 0x%x\n",
                           (buff[i + 12] & 0x40) >> 6);
        Parser_TsPacketLog(type, "link_type = 0x%x\n",
                           (buff[i + 12] & 0x30) >> 4);
        Parser_TsPacketLog(type, "target_id_type = 0x%x\n",
                           (buff[i + 12] & 0x0C) >> 2);
        Parser_TsPacketLog(type, "original_network_id_flag = 0x%x\n",
                           (buff[i + 12] & 0x02) >> 1);
        Parser_TsPacketLog(type, "service_id_flag = 0x%x\n",
                           buff[i + 12] & 0x01);
        if (0x0C == (buff[i + 12] & 0x0C)) {
          Parser_TsPacketLog(type, "user_defined_id = 0x%x\n",
                             ((buff[i + 13] & 0xFF) << 8) |
                                 (buff[i + 14] & 0xFF));
          tmp = 5;
          offset += 5;
        } else {
          tmp = 3;
          offset += 3;
          if (0x04 == (buff[i + 12] & 0x0C)) {
            Parser_TsPacketLog(type, "target_transport_stream_id = 0x%x\n",
                               ((buff[i + 13] & 0xFF) << 8) |
                                   (buff[i + 14] & 0xFF));
            tmp += 2;
            offset += 2;
          }
          if (0x02 == (buff[i + 12] & 0x02)) {
            Parser_TsPacketLog(type, "target_original_network_id = 0x%x\n",
                               ((buff[i + tmp + 10] & 0xFF) << 8) |
                                   (buff[i + tmp + 11] & 0xFF));
            tmp += 2;
            offset += 2;
          }
          if (0x01 == (buff[i + 12] & 0x01)) {
            Parser_TsPacketLog(type, "target_service_id = 0x%x\n",
                               ((buff[i + tmp + 10] & 0xFF) << 8) |
                                   (buff[i + tmp + 11] & 0xFF));
            tmp += 2;
            offset += 2;
          }
        }
      }
    }
  }
  if (offset < buff[1]) {
    tmp = buff[1] - offset;
    Parser_TsPacketLog(type, "private_data:");
    for (i = 0; i < tmp; i++) {
      Parser_TsPacketLog(type, " 0x%02x", buff[i + offset + 2]);
    }
    Parser_TsPacketLog(type, "\n");
  }
  return buff[1];
}


x86 assembly (clang, -O0):
<x4A_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 <x4A_Tag_DescriptorParser+0x39>
movl   $0xffffffff,-0x4(%rbp)
jmp    1867 <x4A_Tag_DescriptorParser+0x747>
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    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xfa5(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x4(%rax),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
movzbl 0x5(%rax),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xf97(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x6(%rax),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
movzbl 0x7(%rax),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xe55(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x8(%rax),%edx
lea    0xdf4(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movl   $0x7,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x8(%rax),%ecx
mov    $0x8,%eax
cmp    %ecx,%eax
jne    1380 <x4A_Tag_DescriptorParser+0x260>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x9(%rax),%edx
and    $0xf0,%edx
sar    $0x4,%edx
lea    0xdcb(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x9(%rax),%edx
and    $0x1,%edx
lea    0xdc6(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x9(%rax),%eax
and    $0xf0,%eax
cmp    $0x30,%eax
jg     12e0 <x4A_Tag_DescriptorParser+0x1c0>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0xa(%rax),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
movzbl 0xb(%rax),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xeac(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x18(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x9(%rax),%ecx
and    $0x1,%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    137b <x4A_Tag_DescriptorParser+0x25b>
mov    -0x10(%rbp),%rax
movzbl 0x9(%rax),%eax
and    $0xf0,%eax
cmp    $0x30,%eax
jg     1341 <x4A_Tag_DescriptorParser+0x221>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0xc(%rax),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
movzbl 0xd(%rax),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xd25(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
jmp    1372 <x4A_Tag_DescriptorParser+0x252>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0xa(%rax),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
movzbl 0xb(%rax),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xcef(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x18(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
jmp    17d1 <x4A_Tag_DescriptorParser+0x6b1>
mov    -0x10(%rbp),%rax
movzbl 0x8(%rax),%ecx
mov    $0xd,%eax
cmp    %ecx,%eax
jne    1415 <x4A_Tag_DescriptorParser+0x2f5>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x9(%rax),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
movzbl 0xa(%rax),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xcb6(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0xb(%rax),%edx
and    $0x80,%edx
sar    $0x7,%edx
lea    0xcac(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0xb(%rax),%edx
and    $0x40,%edx
sar    $0x6,%edx
lea    0xca3(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x18(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x18(%rbp)
jmp    17cc <x4A_Tag_DescriptorParser+0x6ac>
mov    -0x10(%rbp),%rax
movzbl 0x8(%rax),%eax
cmp    $0xe,%eax
jl     17c7 <x4A_Tag_DescriptorParser+0x6a7>
mov    -0x10(%rbp),%rax
movzbl 0x8(%rax),%eax
cmp    $0x1f,%eax
jg     17c7 <x4A_Tag_DescriptorParser+0x6a7>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x9(%rax),%edx
lea    0xc72(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x9(%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     17c2 <x4A_Tag_DescriptorParser+0x6a2>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x9(%rcx),%ecx
cmp    %ecx,%eax
jae    17bd <x4A_Tag_DescriptorParser+0x69d>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0xa,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xff,%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0xb,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xbb6(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0xc,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0x80,%edx
sar    $0x7,%edx
lea    0xba4(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0xc,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0x40,%edx
sar    $0x6,%edx
lea    0xb93(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0xc,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0x30,%edx
sar    $0x4,%edx
lea    0xb98(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0xc,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xc,%edx
sar    $0x2,%edx
lea    0xb83(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0xc,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0x2,%edx
sar    $0x1,%edx
lea    0xb73(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0xc,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0x1,%edx
lea    0xb70(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0xc,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%ecx
and    $0xc,%ecx
mov    $0xc,%eax
cmp    %ecx,%eax
jne    1623 <x4A_Tag_DescriptorParser+0x503>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%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
add    $0xe,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xb27(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movb   $0x5,-0x19(%rbp)
mov    -0x18(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x18(%rbp)
jmp    17a9 <x4A_Tag_DescriptorParser+0x689>
movb   $0x3,-0x19(%rbp)
mov    -0x18(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0xc,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%ecx
and    $0xc,%ecx
mov    $0x4,%eax
cmp    %ecx,%eax
jne    16a4 <x4A_Tag_DescriptorParser+0x584>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%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
add    $0xe,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xabf(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movzbl -0x19(%rbp),%eax
add    $0x2,%eax
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0xc,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%ecx
and    $0x2,%ecx
mov    $0x2,%eax
cmp    %ecx,%eax
jne    1724 <x4A_Tag_DescriptorParser+0x604>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0xa,%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    $0xb,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xa62(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movzbl -0x19(%rbp),%eax
add    $0x2,%eax
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0xc,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%ecx
and    $0x1,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
jne    17a4 <x4A_Tag_DescriptorParser+0x684>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movzbl -0x19(%rbp),%edx
add    %edx,%ecx
add    $0xa,%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    $0xb,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xa05(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movzbl -0x19(%rbp),%eax
add    $0x2,%eax
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
jmp    17a9 <x4A_Tag_DescriptorParser+0x689>
jmp    17ae <x4A_Tag_DescriptorParser+0x68e>
movzbl -0x19(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1472 <x4A_Tag_DescriptorParser+0x352>
jmp    17c2 <x4A_Tag_DescriptorParser+0x6a2>
jmp    17c7 <x4A_Tag_DescriptorParser+0x6a7>
jmp    17cc <x4A_Tag_DescriptorParser+0x6ac>
jmp    17d1 <x4A_Tag_DescriptorParser+0x6b1>
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
cmp    %ecx,%eax
jae    185c <x4A_Tag_DescriptorParser+0x73c>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
sub    -0x18(%rbp),%eax
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%edi
lea    0x9ad(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movzbl -0x19(%rbp),%ecx
cmp    %ecx,%eax
jae    184b <x4A_Tag_DescriptorParser+0x72b>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
add    $0x2,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
lea    0x981(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    180a <x4A_Tag_DescriptorParser+0x6ea>
mov    -0x8(%rbp),%edi
lea    0x84c(%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):
<x4A_Tag_DescriptorParser>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %rsi,%rsi
je     126d <x4A_Tag_DescriptorParser+0x14d>
mov    %rsi,%rbx
mov    %edi,%r13d
movzbl (%rsi),%esi
call   1040 <Parser_DisplayTagInfo@plt>
movzbl 0x1(%rbx),%edx
lea    0xeb3(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzwl 0x2(%rbx),%edx
shl    $0x10,%edx
bswap  %edx
lea    0xfe9(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzwl 0x4(%rbx),%edx
shl    $0x10,%edx
bswap  %edx
lea    0xff2(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzwl 0x6(%rbx),%edx
shl    $0x10,%edx
bswap  %edx
lea    0xec7(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x8(%rbx),%edx
lea    0xe6a(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
mov    0x8(%rbx),%al
cmp    $0xd,%al
je     1277 <x4A_Tag_DescriptorParser+0x157>
cmp    $0x8,%al
jne    12cf <x4A_Tag_DescriptorParser+0x1af>
movzbl 0x9(%rbx),%edx
shr    $0x4,%edx
lea    0xe54(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x9(%rbx),%edx
and    $0x1,%edx
lea    0xe53(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
mov    0x9(%rbx),%al
mov    %eax,%ecx
and    $0xf0,%cl
mov    $0x8,%r14d
cmp    $0x30,%cl
ja     1233 <x4A_Tag_DescriptorParser+0x113>
movzwl 0xa(%rbx),%edx
shl    $0x10,%edx
bswap  %edx
lea    0xf5c(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
mov    0x9(%rbx),%al
mov    $0xa,%r14d
test   $0x1,%al
jne    1503 <x4A_Tag_DescriptorParser+0x3e3>
movzbl %al,%eax
and    $0xfffffff0,%eax
xor    %ecx,%ecx
cmp    $0x31,%eax
setb   %cl
movzwl 0xa(%rbx,%rcx,2),%edx
shl    $0x10,%edx
bswap  %edx
lea    0xe00(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    $0x2,%r14d
jmp    1503 <x4A_Tag_DescriptorParser+0x3e3>
mov    $0xffffffff,%ebp
jmp    1573 <x4A_Tag_DescriptorParser+0x453>
movzwl 0x9(%rbx),%edx
shl    $0x10,%edx
bswap  %edx
lea    0xdee(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0xb(%rbx),%edx
shr    $0x7,%edx
lea    0xdee(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0xb(%rbx),%edx
shr    $0x6,%edx
and    $0x1,%edx
lea    0xde9(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
mov    $0xa,%r14d
jmp    1503 <x4A_Tag_DescriptorParser+0x3e3>
add    $0xf2,%al
mov    $0x7,%r14d
cmp    $0x11,%al
ja     1503 <x4A_Tag_DescriptorParser+0x3e3>
movzbl 0x9(%rbx),%edx
lea    0xdd1(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
cmpb   $0x0,0x9(%rbx)
je     14fd <x4A_Tag_DescriptorParser+0x3dd>
mov    $0x8,%r14d
xor    %ebp,%ebp
jmp    134d <x4A_Tag_DescriptorParser+0x22d>
nopl   0x0(%rax,%rax,1)
lea    0xd(%rbp),%eax
movzbl (%rbx,%rax,1),%eax
shl    $0x8,%eax
lea    0xe(%rbp),%ecx
movzbl (%rbx,%rcx,1),%edx
or     %eax,%edx
mov    %r13d,%edi
lea    0xe04(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    $0x5,%r14d
mov    $0x5,%r12b
movzbl %r12b,%eax
add    %eax,%ebp
movzbl 0x9(%rbx),%eax
cmp    %eax,%ebp
jae    1503 <x4A_Tag_DescriptorParser+0x3e3>
lea    0xa(%rbp),%eax
movzbl (%rbx,%rax,1),%eax
shl    $0x8,%eax
lea    0xb(%rbp),%ecx
movzbl (%rbx,%rcx,1),%edx
or     %eax,%edx
mov    %r13d,%edi
lea    0xd0b(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
lea    0xc(%rbp),%r15d
movzbl (%rbx,%r15,1),%edx
shr    $0x7,%edx
mov    %r13d,%edi
lea    0xd06(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl (%rbx,%r15,1),%edx
shr    $0x6,%edx
and    $0x1,%edx
mov    %r13d,%edi
lea    0xd00(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl (%rbx,%r15,1),%edx
shr    $0x4,%edx
and    $0x3,%edx
mov    %r13d,%edi
lea    0xd10(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl (%rbx,%r15,1),%edx
shr    $0x2,%edx
and    $0x3,%edx
mov    %r13d,%edi
lea    0xd06(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl (%rbx,%r15,1),%edx
shr    %edx
and    $0x1,%edx
mov    %r13d,%edi
lea    0xd02(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl (%rbx,%r15,1),%edx
and    $0x1,%edx
mov    %r13d,%edi
lea    0xd0a(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl (%rbx,%r15,1),%eax
mov    %eax,%ecx
and    $0xc,%cl
cmp    $0xc,%cl
je     1310 <x4A_Tag_DescriptorParser+0x1f0>
cmp    $0x4,%cl
jne    1470 <x4A_Tag_DescriptorParser+0x350>
lea    0xd(%rbp),%eax
movzbl (%rbx,%rax,1),%eax
shl    $0x8,%eax
lea    0xe(%rbp),%ecx
movzbl (%rbx,%rcx,1),%edx
or     %eax,%edx
mov    %r13d,%edi
lea    0xcfe(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    $0x5,%r14d
movzbl (%rbx,%r15,1),%eax
mov    $0x5,%r12b
test   $0x2,%al
jne    147b <x4A_Tag_DescriptorParser+0x35b>
jmp    14b8 <x4A_Tag_DescriptorParser+0x398>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x3,%r14d
mov    $0x3,%r12b
test   $0x2,%al
je     14b8 <x4A_Tag_DescriptorParser+0x398>
movzbl %r12b,%r12d
lea    (%r12,%rbp,1),%eax
add    $0xa,%eax
movzbl (%rbx,%rax,1),%eax
shl    $0x8,%eax
lea    (%r12,%rbp,1),%ecx
add    $0xb,%ecx
movzbl (%rbx,%rcx,1),%edx
or     %eax,%edx
mov    %r13d,%edi
lea    0xcc8(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    $0x2,%r12b
add    $0x2,%r14d
movzbl (%rbx,%r15,1),%eax
test   $0x1,%al
je     133b <x4A_Tag_DescriptorParser+0x21b>
movzbl %r12b,%r12d
lea    (%r12,%rbp,1),%eax
add    $0xa,%eax
movzbl (%rbx,%rax,1),%eax
shl    $0x8,%eax
lea    (%r12,%rbp,1),%ecx
add    $0xb,%ecx
movzbl (%rbx,%rcx,1),%edx
or     %eax,%edx
mov    %r13d,%edi
lea    0xca6(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    $0x2,%r12b
add    $0x2,%r14d
jmp    133b <x4A_Tag_DescriptorParser+0x21b>
mov    $0x8,%r14d
movzbl 0x1(%rbx),%ebp
cmp    %ebp,%r14d
jae    1573 <x4A_Tag_DescriptorParser+0x453>
lea    0xc96(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
sub    %r14b,%bpl
je     155e <x4A_Tag_DescriptorParser+0x43e>
add    $0x2,%r14d
movzbl %bpl,%ebp
lea    0xc86(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14d,%eax
movzbl (%rbx,%rax,1),%edx
mov    %r13d,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    $0x1,%r14d
add    $0xffffffffffffffff,%rbp
jne    1540 <x4A_Tag_DescriptorParser+0x420>
lea    0xb3c(%rip),%rsi
mov    %r13d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x1(%rbx),%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Descriptor_length = 0x%x\0A\00"
@.str.1 = [28 x i8] c"transport_stream_id = 0x%x\0A\00"
@.str.2 = [28 x i8] c"original_network_id = 0x%x\0A\00"
@.str.3 = [19 x i8] c"service_id = 0x%x\0A\00"
@.str.4 = [21 x i8] c"linkage_type = 0x%x\0A\00"
@.str.5 = [23 x i8] c"hand-over_type = 0x%x\0A\00"
@.str.6 = [20 x i8] c"origin_type = 0x%x\0A\00"
@.str.7 = [19 x i8] c"network_id = 0x%x\0A\00"
@.str.8 = [27 x i8] c"initial_service_id = 0x%x\0A\00"
@.str.9 = [24 x i8] c"target_event_id = 0x%x\0A\00"
@.str.10 = [22 x i8] c"target_listed = 0x%x\0A\00"
@.str.11 = [24 x i8] c"event_simulcast = 0x%x\0A\00"
@.str.12 = [20 x i8] c"loop_length = 0x%x\0A\00"
@.str.13 = [18 x i8] c"link_type = 0x%x\0A\00"
@.str.14 = [23 x i8] c"target_id_type = 0x%x\0A\00"
@.str.15 = [33 x i8] c"original_network_id_flag = 0x%x\0A\00"
@.str.16 = [24 x i8] c"service_id_flag = 0x%x\0A\00"
@.str.17 = [24 x i8] c"user_defined_id = 0x%x\0A\00"
@.str.18 = [35 x i8] c"target_transport_stream_id = 0x%x\0A\00"
@.str.19 = [35 x i8] c"target_original_network_id = 0x%x\0A\00"
@.str.20 = [26 x i8] c"target_service_id = 0x%x\0A\00"
@.str.21 = [14 x i8] c"private_data:\00"
@.str.22 = [8 x i8] c" 0x%02x\00"
@.str.23 = [2 x i8] c"\0A\00"
define i32 @x4A_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 %538
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, 255
%30 = shl i32 %29, 8
%31 = load i8*, i8** %5
%32 = getelementptr inbounds i8, i8* %31, i64 3
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = and i32 %34, 255
%36 = or i32 %30, %35
%37 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %24, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %36)
%38 = load i32, i32* %4
%39 = load i8*, i8** %5
%40 = getelementptr inbounds i8, i8* %39, i64 4
%41 = load i8, i8* %40
%42 = zext i8 %41 to i32
%43 = and i32 %42, 255
%44 = shl i32 %43, 8
%45 = load i8*, i8** %5
%46 = getelementptr inbounds i8, i8* %45, i64 5
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = and i32 %48, 255
%50 = or i32 %44, %49
%51 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %38, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %50)
%52 = load i32, i32* %4
%53 = load i8*, i8** %5
%54 = getelementptr inbounds i8, i8* %53, i64 6
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = and i32 %56, 255
%58 = shl i32 %57, 8
%59 = load i8*, i8** %5
%60 = getelementptr inbounds i8, i8* %59, i64 7
%61 = load i8, i8* %60
%62 = zext i8 %61 to i32
%63 = and i32 %62, 255
%64 = or i32 %58, %63
%65 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %52, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %64)
%66 = load i32, i32* %4
%67 = load i8*, i8** %5
%68 = getelementptr inbounds i8, i8* %67, i64 8
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %66, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %70)
store i32 7, i32* %7
%72 = load i8*, i8** %5
%73 = getelementptr inbounds i8, i8* %72, i64 8
%74 = load i8, i8* %73
%75 = zext i8 %74 to i32
%76 = icmp eq i32 8, %75
br i1 %76, label %77, label %166
77: ; preds = %12
%78 = load i32, i32* %4
%79 = load i8*, i8** %5
%80 = getelementptr inbounds i8, i8* %79, i64 9
%81 = load i8, i8* %80
%82 = zext i8 %81 to i32
%83 = and i32 %82, 240
%84 = ashr i32 %83, 4
%85 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %78, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %84)
%86 = load i32, i32* %4
%87 = load i8*, i8** %5
%88 = getelementptr inbounds i8, i8* %87, i64 9
%89 = load i8, i8* %88
%90 = zext i8 %89 to i32
%91 = and i32 %90, 1
%92 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %86, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %91)
%93 = load i32, i32* %7
%94 = add i32 %93, 1
store i32 %94, i32* %7
%95 = load i8*, i8** %5
%96 = getelementptr inbounds i8, i8* %95, i64 9
%97 = load i8, i8* %96
%98 = zext i8 %97 to i32
%99 = and i32 %98, 240
%100 = icmp sle i32 %99, 48
br i1 %100, label %101, label %118
101: ; preds = %77
%102 = load i32, i32* %4
%103 = load i8*, i8** %5
%104 = getelementptr inbounds i8, i8* %103, i64 10
%105 = load i8, i8* %104
%106 = zext i8 %105 to i32
%107 = and i32 %106, 255
%108 = shl i32 %107, 8
%109 = load i8*, i8** %5
%110 = getelementptr inbounds i8, i8* %109, i64 11
%111 = load i8, i8* %110
%112 = zext i8 %111 to i32
%113 = and i32 %112, 255
%114 = or i32 %108, %113
%115 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %102, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 %114)
%116 = load i32, i32* %7
%117 = add i32 %116, 2
store i32 %117, i32* %7
br label %118
118: ; preds = %101, %77
%119 = load i8*, i8** %5
%120 = getelementptr inbounds i8, i8* %119, i64 9
%121 = load i8, i8* %120
%122 = zext i8 %121 to i32
%123 = and i32 %122, 1
%124 = icmp eq i32 0, %123
br i1 %124, label %125, label %165
125: ; preds = %118
%126 = load i8*, i8** %5
%127 = getelementptr inbounds i8, i8* %126, i64 9
%128 = load i8, i8* %127
%129 = zext i8 %128 to i32
%130 = and i32 %129, 240
%131 = icmp sle i32 %130, 48
br i1 %131, label %132, label %147
132: ; preds = %125
%133 = load i32, i32* %4
%134 = load i8*, i8** %5
%135 = getelementptr inbounds i8, i8* %134, i64 12
%136 = load i8, i8* %135
%137 = zext i8 %136 to i32
%138 = and i32 %137, 255
%139 = shl i32 %138, 8
%140 = load i8*, i8** %5
%141 = getelementptr inbounds i8, i8* %140, i64 13
%142 = load i8, i8* %141
%143 = zext i8 %142 to i32
%144 = and i32 %143, 255
%145 = or i32 %139, %144
%146 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %133, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i32 %145)
br label %162
147: ; preds = %125
%148 = load i32, i32* %4
%149 = load i8*, i8** %5
%150 = getelementptr inbounds i8, i8* %149, i64 10
%151 = load i8, i8* %150
%152 = zext i8 %151 to i32
%153 = and i32 %152, 255
%154 = shl i32 %153, 8
%155 = load i8*, i8** %5
%156 = getelementptr inbounds i8, i8* %155, i64 11
%157 = load i8, i8* %156
%158 = zext i8 %157 to i32
%159 = and i32 %158, 255
%160 = or i32 %154, %159
%161 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %148, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i32 %160)
br label %162
162: ; preds = %147, %132
%163 = load i32, i32* %7
%164 = add i32 %163, 2
store i32 %164, i32* %7
br label %165
165: ; preds = %162, %118
br label %493
166: ; preds = %12
%167 = load i8*, i8** %5
%168 = getelementptr inbounds i8, i8* %167, i64 8
%169 = load i8, i8* %168
%170 = zext i8 %169 to i32
%171 = icmp eq i32 13, %170
br i1 %171, label %172, label %205
172: ; preds = %166
%173 = load i32, i32* %4
%174 = load i8*, i8** %5
%175 = getelementptr inbounds i8, i8* %174, i64 9
%176 = load i8, i8* %175
%177 = zext i8 %176 to i32
%178 = and i32 %177, 255
%179 = shl i32 %178, 8
%180 = load i8*, i8** %5
%181 = getelementptr inbounds i8, i8* %180, i64 10
%182 = load i8, i8* %181
%183 = zext i8 %182 to i32
%184 = and i32 %183, 255
%185 = or i32 %179, %184
%186 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %173, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), i32 %185)
%187 = load i32, i32* %4
%188 = load i8*, i8** %5
%189 = getelementptr inbounds i8, i8* %188, i64 11
%190 = load i8, i8* %189
%191 = zext i8 %190 to i32
%192 = and i32 %191, 128
%193 = ashr i32 %192, 7
%194 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %187, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i32 %193)
%195 = load i32, i32* %4
%196 = load i8*, i8** %5
%197 = getelementptr inbounds i8, i8* %196, i64 11
%198 = load i8, i8* %197
%199 = zext i8 %198 to i32
%200 = and i32 %199, 64
%201 = ashr i32 %200, 6
%202 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %195, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), i32 %201)
%203 = load i32, i32* %7
%204 = add i32 %203, 3
store i32 %204, i32* %7
br label %492
205: ; preds = %166
%206 = load i8*, i8** %5
%207 = getelementptr inbounds i8, i8* %206, i64 8
%208 = load i8, i8* %207
%209 = zext i8 %208 to i32
%210 = icmp sge i32 %209, 14
br i1 %210, label %211, label %491
211: ; preds = %205
%212 = load i8*, i8** %5
%213 = getelementptr inbounds i8, i8* %212, i64 8
%214 = load i8, i8* %213
%215 = zext i8 %214 to i32
%216 = icmp sle i32 %215, 31
br i1 %216, label %217, label %491
217: ; preds = %211
%218 = load i32, i32* %4
%219 = load i8*, i8** %5
%220 = getelementptr inbounds i8, i8* %219, i64 9
%221 = load i8, i8* %220
%222 = zext i8 %221 to i32
%223 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %218, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 %222)
%224 = load i32, i32* %7
%225 = add i32 %224, 1
store i32 %225, i32* %7
%226 = load i8*, i8** %5
%227 = getelementptr inbounds i8, i8* %226, i64 9
%228 = load i8, i8* %227
%229 = zext i8 %228 to i32
%230 = icmp ne i32 0, %229
br i1 %230, label %231, label %490
231: ; preds = %217
store i32 0, i32* %6
br label %232
232: ; preds = %484, %231
%233 = load i32, i32* %6
%234 = load i8*, i8** %5
%235 = getelementptr inbounds i8, i8* %234, i64 9
%236 = load i8, i8* %235
%237 = zext i8 %236 to i32
%238 = icmp ult i32 %233, %237
br i1 %238, label %239, label %489
239: ; preds = %232
%240 = load i32, i32* %4
%241 = load i8*, i8** %5
%242 = load i32, i32* %6
%243 = add i32 %242, 10
%244 = zext i32 %243 to i64
%245 = getelementptr inbounds i8, i8* %241, i64 %244
%246 = load i8, i8* %245
%247 = zext i8 %246 to i32
%248 = and i32 %247, 255
%249 = shl i32 %248, 8
%250 = load i8*, i8** %5
%251 = load i32, i32* %6
%252 = add i32 %251, 11
%253 = zext i32 %252 to i64
%254 = getelementptr inbounds i8, i8* %250, i64 %253
%255 = load i8, i8* %254
%256 = zext i8 %255 to i32
%257 = and i32 %256, 255
%258 = or i32 %249, %257
%259 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %240, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), i32 %258)
%260 = load i32, i32* %4
%261 = load i8*, i8** %5
%262 = load i32, i32* %6
%263 = add i32 %262, 12
%264 = zext i32 %263 to i64
%265 = getelementptr inbounds i8, i8* %261, i64 %264
%266 = load i8, i8* %265
%267 = zext i8 %266 to i32
%268 = and i32 %267, 128
%269 = ashr i32 %268, 7
%270 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %260, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i32 %269)
%271 = load i32, i32* %4
%272 = load i8*, i8** %5
%273 = load i32, i32* %6
%274 = add i32 %273, 12
%275 = zext i32 %274 to i64
%276 = getelementptr inbounds i8, i8* %272, i64 %275
%277 = load i8, i8* %276
%278 = zext i8 %277 to i32
%279 = and i32 %278, 64
%280 = ashr i32 %279, 6
%281 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %271, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), i32 %280)
%282 = load i32, i32* %4
%283 = load i8*, i8** %5
%284 = load i32, i32* %6
%285 = add i32 %284, 12
%286 = zext i32 %285 to i64
%287 = getelementptr inbounds i8, i8* %283, i64 %286
%288 = load i8, i8* %287
%289 = zext i8 %288 to i32
%290 = and i32 %289, 48
%291 = ashr i32 %290, 4
%292 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %282, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %291)
%293 = load i32, i32* %4
%294 = load i8*, i8** %5
%295 = load i32, i32* %6
%296 = add i32 %295, 12
%297 = zext i32 %296 to i64
%298 = getelementptr inbounds i8, i8* %294, i64 %297
%299 = load i8, i8* %298
%300 = zext i8 %299 to i32
%301 = and i32 %300, 12
%302 = ashr i32 %301, 2
%303 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %293, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), i32 %302)
%304 = load i32, i32* %4
%305 = load i8*, i8** %5
%306 = load i32, i32* %6
%307 = add i32 %306, 12
%308 = zext i32 %307 to i64
%309 = getelementptr inbounds i8, i8* %305, i64 %308
%310 = load i8, i8* %309
%311 = zext i8 %310 to i32
%312 = and i32 %311, 2
%313 = ashr i32 %312, 1
%314 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %304, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.15, i64 0, i64 0), i32 %313)
%315 = load i32, i32* %4
%316 = load i8*, i8** %5
%317 = load i32, i32* %6
%318 = add i32 %317, 12
%319 = zext i32 %318 to i64
%320 = getelementptr inbounds i8, i8* %316, i64 %319
%321 = load i8, i8* %320
%322 = zext i8 %321 to i32
%323 = and i32 %322, 1
%324 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %315, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0), i32 %323)
%325 = load i8*, i8** %5
%326 = load i32, i32* %6
%327 = add i32 %326, 12
%328 = zext i32 %327 to i64
%329 = getelementptr inbounds i8, i8* %325, i64 %328
%330 = load i8, i8* %329
%331 = zext i8 %330 to i32
%332 = and i32 %331, 12
%333 = icmp eq i32 12, %332
br i1 %333, label %334, label %357
334: ; preds = %239
%335 = load i32, i32* %4
%336 = load i8*, i8** %5
%337 = load i32, i32* %6
%338 = add i32 %337, 13
%339 = zext i32 %338 to i64
%340 = getelementptr inbounds i8, i8* %336, i64 %339
%341 = load i8, i8* %340
%342 = zext i8 %341 to i32
%343 = and i32 %342, 255
%344 = shl i32 %343, 8
%345 = load i8*, i8** %5
%346 = load i32, i32* %6
%347 = add i32 %346, 14
%348 = zext i32 %347 to i64
%349 = getelementptr inbounds i8, i8* %345, i64 %348
%350 = load i8, i8* %349
%351 = zext i8 %350 to i32
%352 = and i32 %351, 255
%353 = or i32 %344, %352
%354 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %335, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0), i32 %353)
store i8 5, i8* %8
%355 = load i32, i32* %7
%356 = add i32 %355, 5
store i32 %356, i32* %7
br label %483
357: ; preds = %239
store i8 3, i8* %8
%358 = load i32, i32* %7
%359 = add i32 %358, 3
store i32 %359, i32* %7
%360 = load i8*, i8** %5
%361 = load i32, i32* %6
%362 = add i32 %361, 12
%363 = zext i32 %362 to i64
%364 = getelementptr inbounds i8, i8* %360, i64 %363
%365 = load i8, i8* %364
%366 = zext i8 %365 to i32
%367 = and i32 %366, 12
%368 = icmp eq i32 4, %367
br i1 %368, label %369, label %396
369: ; preds = %357
%370 = load i32, i32* %4
%371 = load i8*, i8** %5
%372 = load i32, i32* %6
%373 = add i32 %372, 13
%374 = zext i32 %373 to i64
%375 = getelementptr inbounds i8, i8* %371, i64 %374
%376 = load i8, i8* %375
%377 = zext i8 %376 to i32
%378 = and i32 %377, 255
%379 = shl i32 %378, 8
%380 = load i8*, i8** %5
%381 = load i32, i32* %6
%382 = add i32 %381, 14
%383 = zext i32 %382 to i64
%384 = getelementptr inbounds i8, i8* %380, i64 %383
%385 = load i8, i8* %384
%386 = zext i8 %385 to i32
%387 = and i32 %386, 255
%388 = or i32 %379, %387
%389 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %370, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.18, i64 0, i64 0), i32 %388)
%390 = load i8, i8* %8
%391 = zext i8 %390 to i32
%392 = add nsw i32 %391, 2
%393 = trunc i32 %392 to i8
store i8 %393, i8* %8
%394 = load i32, i32* %7
%395 = add i32 %394, 2
store i32 %395, i32* %7
br label %396
396: ; preds = %369, %357
%397 = load i8*, i8** %5
%398 = load i32, i32* %6
%399 = add i32 %398, 12
%400 = zext i32 %399 to i64
%401 = getelementptr inbounds i8, i8* %397, i64 %400
%402 = load i8, i8* %401
%403 = zext i8 %402 to i32
%404 = and i32 %403, 2
%405 = icmp eq i32 2, %404
br i1 %405, label %406, label %439
406: ; preds = %396
%407 = load i32, i32* %4
%408 = load i8*, i8** %5
%409 = load i32, i32* %6
%410 = load i8, i8* %8
%411 = zext i8 %410 to i32
%412 = add i32 %409, %411
%413 = add i32 %412, 10
%414 = zext i32 %413 to i64
%415 = getelementptr inbounds i8, i8* %408, i64 %414
%416 = load i8, i8* %415
%417 = zext i8 %416 to i32
%418 = and i32 %417, 255
%419 = shl i32 %418, 8
%420 = load i8*, i8** %5
%421 = load i32, i32* %6
%422 = load i8, i8* %8
%423 = zext i8 %422 to i32
%424 = add i32 %421, %423
%425 = add i32 %424, 11
%426 = zext i32 %425 to i64
%427 = getelementptr inbounds i8, i8* %420, i64 %426
%428 = load i8, i8* %427
%429 = zext i8 %428 to i32
%430 = and i32 %429, 255
%431 = or i32 %419, %430
%432 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %407, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.19, i64 0, i64 0), i32 %431)
%433 = load i8, i8* %8
%434 = zext i8 %433 to i32
%435 = add nsw i32 %434, 2
%436 = trunc i32 %435 to i8
store i8 %436, i8* %8
%437 = load i32, i32* %7
%438 = add i32 %437, 2
store i32 %438, i32* %7
br label %439
439: ; preds = %406, %396
%440 = load i8*, i8** %5
%441 = load i32, i32* %6
%442 = add i32 %441, 12
%443 = zext i32 %442 to i64
%444 = getelementptr inbounds i8, i8* %440, i64 %443
%445 = load i8, i8* %444
%446 = zext i8 %445 to i32
%447 = and i32 %446, 1
%448 = icmp eq i32 1, %447
br i1 %448, label %449, label %482
449: ; preds = %439
%450 = load i32, i32* %4
%451 = load i8*, i8** %5
%452 = load i32, i32* %6
%453 = load i8, i8* %8
%454 = zext i8 %453 to i32
%455 = add i32 %452, %454
%456 = add i32 %455, 10
%457 = zext i32 %456 to i64
%458 = getelementptr inbounds i8, i8* %451, i64 %457
%459 = load i8, i8* %458
%460 = zext i8 %459 to i32
%461 = and i32 %460, 255
%462 = shl i32 %461, 8
%463 = load i8*, i8** %5
%464 = load i32, i32* %6
%465 = load i8, i8* %8
%466 = zext i8 %465 to i32
%467 = add i32 %464, %466
%468 = add i32 %467, 11
%469 = zext i32 %468 to i64
%470 = getelementptr inbounds i8, i8* %463, i64 %469
%471 = load i8, i8* %470
%472 = zext i8 %471 to i32
%473 = and i32 %472, 255
%474 = or i32 %462, %473
%475 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %450, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.20, i64 0, i64 0), i32 %474)
%476 = load i8, i8* %8
%477 = zext i8 %476 to i32
%478 = add nsw i32 %477, 2
%479 = trunc i32 %478 to i8
store i8 %479, i8* %8
%480 = load i32, i32* %7
%481 = add i32 %480, 2
store i32 %481, i32* %7
br label %482
482: ; preds = %449, %439
br label %483
483: ; preds = %482, %334
br label %484
484: ; preds = %483
%485 = load i8, i8* %8
%486 = zext i8 %485 to i32
%487 = load i32, i32* %6
%488 = add i32 %487, %486
store i32 %488, i32* %6
br label %232
489: ; preds = %232
br label %490
490: ; preds = %489, %217
br label %491
491: ; preds = %490, %211, %205
br label %492
492: ; preds = %491, %172
br label %493
493: ; preds = %492, %165
%494 = load i32, i32* %7
%495 = load i8*, i8** %5
%496 = getelementptr inbounds i8, i8* %495, i64 1
%497 = load i8, i8* %496
%498 = zext i8 %497 to i32
%499 = icmp ult i32 %494, %498
br i1 %499, label %500, label %533
500: ; preds = %493
%501 = load i8*, i8** %5
%502 = getelementptr inbounds i8, i8* %501, i64 1
%503 = load i8, i8* %502
%504 = zext i8 %503 to i32
%505 = load i32, i32* %7
%506 = sub i32 %504, %505
%507 = trunc i32 %506 to i8
store i8 %507, i8* %8
%508 = load i32, i32* %4
%509 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %508, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.21, i64 0, i64 0))
store i32 0, i32* %6
br label %510
510: ; preds = %527, %500
%511 = load i32, i32* %6
%512 = load i8, i8* %8
%513 = zext i8 %512 to i32
%514 = icmp ult i32 %511, %513
br i1 %514, label %515, label %530
515: ; preds = %510
%516 = load i32, i32* %4
%517 = load i8*, i8** %5
%518 = load i32, i32* %6
%519 = load i32, i32* %7
%520 = add i32 %518, %519
%521 = add i32 %520, 2
%522 = zext i32 %521 to i64
%523 = getelementptr inbounds i8, i8* %517, i64 %522
%524 = load i8, i8* %523
%525 = zext i8 %524 to i32
%526 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %516, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.22, i64 0, i64 0), i32 %525)
br label %527
527: ; preds = %515
%528 = load i32, i32* %6
%529 = add i32 %528, 1
store i32 %529, i32* %6
br label %510
530: ; preds = %510
%531 = load i32, i32* %4
%532 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %531, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
br label %533
533: ; preds = %530, %493
%534 = load i8*, i8** %5
%535 = getelementptr inbounds i8, i8* %534, i64 1
%536 = load i8, i8* %535
%537 = zext i8 %536 to i32
store i32 %537, i32* %3
br label %538
538: ; preds = %533, %11
%539 = load i32, i32* %3
ret i32 %539
}

LLVM IR (-O2):
@.str = [26 x i8] c"Descriptor_length = 0x%x\0A\00"
@.str.1 = [28 x i8] c"transport_stream_id = 0x%x\0A\00"
@.str.2 = [28 x i8] c"original_network_id = 0x%x\0A\00"
@.str.3 = [19 x i8] c"service_id = 0x%x\0A\00"
@.str.4 = [21 x i8] c"linkage_type = 0x%x\0A\00"
@.str.5 = [23 x i8] c"hand-over_type = 0x%x\0A\00"
@.str.6 = [20 x i8] c"origin_type = 0x%x\0A\00"
@.str.7 = [19 x i8] c"network_id = 0x%x\0A\00"
@.str.8 = [27 x i8] c"initial_service_id = 0x%x\0A\00"
@.str.9 = [24 x i8] c"target_event_id = 0x%x\0A\00"
@.str.10 = [22 x i8] c"target_listed = 0x%x\0A\00"
@.str.11 = [24 x i8] c"event_simulcast = 0x%x\0A\00"
@.str.12 = [20 x i8] c"loop_length = 0x%x\0A\00"
@.str.13 = [18 x i8] c"link_type = 0x%x\0A\00"
@.str.14 = [23 x i8] c"target_id_type = 0x%x\0A\00"
@.str.15 = [33 x i8] c"original_network_id_flag = 0x%x\0A\00"
@.str.16 = [24 x i8] c"service_id_flag = 0x%x\0A\00"
@.str.17 = [24 x i8] c"user_defined_id = 0x%x\0A\00"
@.str.18 = [35 x i8] c"target_transport_stream_id = 0x%x\0A\00"
@.str.19 = [35 x i8] c"target_original_network_id = 0x%x\0A\00"
@.str.20 = [26 x i8] c"target_service_id = 0x%x\0A\00"
@.str.21 = [14 x i8] c"private_data:\00"
@.str.22 = [8 x i8] c" 0x%02x\00"
@.str.23 = [2 x i8] c"\0A\00"
define i32 @x4A_Tag_DescriptorParser(i32 %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %287, 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 = zext i8 %12 to i32
%14 = shl nuw nsw i32 %13, 8
%15 = getelementptr inbounds i8, i8* %1, i64 3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = or i32 %14, %17
%19 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %18)
%20 = getelementptr inbounds i8, i8* %1, i64 4
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = shl nuw nsw i32 %22, 8
%24 = getelementptr inbounds i8, i8* %1, i64 5
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = or i32 %23, %26
%28 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %27)
%29 = getelementptr inbounds i8, i8* %1, i64 6
%30 = load i8, i8* %29
%31 = zext i8 %30 to i32
%32 = shl nuw nsw i32 %31, 8
%33 = getelementptr inbounds i8, i8* %1, i64 7
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = or i32 %32, %35
%37 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %36)
%38 = getelementptr inbounds i8, i8* %1, i64 8
%39 = load i8, i8* %38
%40 = zext i8 %39 to i32
%41 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i32 %40)
%42 = load i8, i8* %38
switch i8 %42, label %108 [
i8 8, label %43
i8 13, label %88
]
43: ; preds = %4
%44 = getelementptr inbounds i8, i8* %1, i64 9
%45 = load i8, i8* %44
%46 = lshr i8 %45, 4
%47 = zext i8 %46 to i32
%48 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 %47)
%49 = load i8, i8* %44
%50 = and i8 %49, 1
%51 = zext i8 %50 to i32
%52 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i32 %51)
%53 = load i8, i8* %44
%54 = and i8 %53, -16
%55 = icmp ult i8 %54, 49
br i1 %55, label %56, label %67
56: ; preds = %43
%57 = getelementptr inbounds i8, i8* %1, i64 10
%58 = load i8, i8* %57
%59 = zext i8 %58 to i32
%60 = shl nuw nsw i32 %59, 8
%61 = getelementptr inbounds i8, i8* %1, i64 11
%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 %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 %64)
%66 = load i8, i8* %44
br label %67
67: ; preds = %56, %43
%68 = phi i8 [ %66, %56 ], [ %53, %43 ]
%69 = phi i32 [ 10, %56 ], [ 8, %43 ]
%70 = zext i8 %68 to i32
%71 = and i32 %70, 1
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %259
73: ; preds = %67
%74 = and i32 %70, 240
%75 = icmp ult i32 %74, 49
%76 = select i1 %75, i64 12, i64 10
%77 = select i1 %75, i64 13, i64 11
%78 = getelementptr inbounds i8, i8* %1, i64 %76
%79 = load i8, i8* %78
%80 = zext i8 %79 to i32
%81 = shl nuw nsw i32 %80, 8
%82 = getelementptr inbounds i8, i8* %1, i64 %77
%83 = load i8, i8* %82
%84 = zext i8 %83 to i32
%85 = or i32 %81, %84
%86 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i32 %85)
%87 = add nuw nsw i32 %69, 2
br label %259
88: ; preds = %4
%89 = getelementptr inbounds i8, i8* %1, i64 9
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = shl nuw nsw i32 %91, 8
%93 = getelementptr inbounds i8, i8* %1, i64 10
%94 = load i8, i8* %93
%95 = zext i8 %94 to i32
%96 = or i32 %92, %95
%97 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), i32 %96)
%98 = getelementptr inbounds i8, i8* %1, i64 11
%99 = load i8, i8* %98
%100 = lshr i8 %99, 7
%101 = zext i8 %100 to i32
%102 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i32 %101)
%103 = load i8, i8* %98
%104 = lshr i8 %103, 6
%105 = and i8 %104, 1
%106 = zext i8 %105 to i32
%107 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), i32 %106)
br label %259
108: ; preds = %4
%109 = add i8 %42, -14
%110 = icmp ult i8 %109, 18
br i1 %110, label %111, label %259
111: ; preds = %108
%112 = getelementptr inbounds i8, i8* %1, i64 9
%113 = load i8, i8* %112
%114 = zext i8 %113 to i32
%115 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 %114)
%116 = load i8, i8* %112
%117 = icmp eq i8 %116, 0
br i1 %117, label %259, label %118
118: ; preds = %111, %251
%119 = phi i32 [ %252, %251 ], [ 8, %111 ]
%120 = phi i32 [ %255, %251 ], [ 0, %111 ]
%121 = add i32 %120, 10
%122 = zext i32 %121 to i64
%123 = getelementptr inbounds i8, i8* %1, i64 %122
%124 = load i8, i8* %123
%125 = zext i8 %124 to i32
%126 = shl nuw nsw i32 %125, 8
%127 = add i32 %120, 11
%128 = zext i32 %127 to i64
%129 = getelementptr inbounds i8, i8* %1, i64 %128
%130 = load i8, i8* %129
%131 = zext i8 %130 to i32
%132 = or i32 %126, %131
%133 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), i32 %132)
%134 = add i32 %120, 12
%135 = zext i32 %134 to i64
%136 = getelementptr inbounds i8, i8* %1, i64 %135
%137 = load i8, i8* %136
%138 = lshr i8 %137, 7
%139 = zext i8 %138 to i32
%140 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i32 %139)
%141 = load i8, i8* %136
%142 = lshr i8 %141, 6
%143 = and i8 %142, 1
%144 = zext i8 %143 to i32
%145 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), i32 %144)
%146 = load i8, i8* %136
%147 = lshr i8 %146, 4
%148 = and i8 %147, 3
%149 = zext i8 %148 to i32
%150 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i32 %149)
%151 = load i8, i8* %136
%152 = lshr i8 %151, 2
%153 = and i8 %152, 3
%154 = zext i8 %153 to i32
%155 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.14, i64 0, i64 0), i32 %154)
%156 = load i8, i8* %136
%157 = lshr i8 %156, 1
%158 = and i8 %157, 1
%159 = zext i8 %158 to i32
%160 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.15, i64 0, i64 0), i32 %159)
%161 = load i8, i8* %136
%162 = and i8 %161, 1
%163 = zext i8 %162 to i32
%164 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.16, i64 0, i64 0), i32 %163)
%165 = load i8, i8* %136
%166 = and i8 %165, 12
%167 = icmp eq i8 %166, 12
br i1 %167, label %168, label %183
168: ; preds = %118
%169 = add i32 %120, 13
%170 = zext i32 %169 to i64
%171 = getelementptr inbounds i8, i8* %1, i64 %170
%172 = load i8, i8* %171
%173 = zext i8 %172 to i32
%174 = shl nuw nsw i32 %173, 8
%175 = add i32 %120, 14
%176 = zext i32 %175 to i64
%177 = getelementptr inbounds i8, i8* %1, i64 %176
%178 = load i8, i8* %177
%179 = zext i8 %178 to i32
%180 = or i32 %174, %179
%181 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.17, i64 0, i64 0), i32 %180)
%182 = add i32 %119, 5
br label %251
183: ; preds = %118
%184 = add i32 %119, 3
%185 = icmp eq i8 %166, 4
br i1 %185, label %186, label %202
186: ; preds = %183
%187 = add i32 %120, 13
%188 = zext i32 %187 to i64
%189 = getelementptr inbounds i8, i8* %1, i64 %188
%190 = load i8, i8* %189
%191 = zext i8 %190 to i32
%192 = shl nuw nsw i32 %191, 8
%193 = add i32 %120, 14
%194 = zext i32 %193 to i64
%195 = getelementptr inbounds i8, i8* %1, i64 %194
%196 = load i8, i8* %195
%197 = zext i8 %196 to i32
%198 = or i32 %192, %197
%199 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.18, i64 0, i64 0), i32 %198)
%200 = add i32 %119, 5
%201 = load i8, i8* %136
br label %202
202: ; preds = %186, %183
%203 = phi i8 [ %201, %186 ], [ %165, %183 ]
%204 = phi i32 [ %200, %186 ], [ %184, %183 ]
%205 = phi i8 [ 5, %186 ], [ 3, %183 ]
%206 = and i8 %203, 2
%207 = icmp eq i8 %206, 0
br i1 %207, label %227, label %208
208: ; preds = %202
%209 = zext i8 %205 to i32
%210 = add i32 %120, %209
%211 = add i32 %210, 10
%212 = zext i32 %211 to i64
%213 = getelementptr inbounds i8, i8* %1, i64 %212
%214 = load i8, i8* %213
%215 = zext i8 %214 to i32
%216 = shl nuw nsw i32 %215, 8
%217 = add i32 %210, 11
%218 = zext i32 %217 to i64
%219 = getelementptr inbounds i8, i8* %1, i64 %218
%220 = load i8, i8* %219
%221 = zext i8 %220 to i32
%222 = or i32 %216, %221
%223 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.19, i64 0, i64 0), i32 %222)
%224 = add nuw nsw i8 %205, 2
%225 = add i32 %204, 2
%226 = load i8, i8* %136
br label %227
227: ; preds = %208, %202
%228 = phi i8 [ %226, %208 ], [ %203, %202 ]
%229 = phi i32 [ %225, %208 ], [ %204, %202 ]
%230 = phi i8 [ %224, %208 ], [ %205, %202 ]
%231 = and i8 %228, 1
%232 = icmp eq i8 %231, 0
br i1 %232, label %251, label %233
233: ; preds = %227
%234 = zext i8 %230 to i32
%235 = add i32 %120, %234
%236 = add i32 %235, 10
%237 = zext i32 %236 to i64
%238 = getelementptr inbounds i8, i8* %1, i64 %237
%239 = load i8, i8* %238
%240 = zext i8 %239 to i32
%241 = shl nuw nsw i32 %240, 8
%242 = add i32 %235, 11
%243 = zext i32 %242 to i64
%244 = getelementptr inbounds i8, i8* %1, i64 %243
%245 = load i8, i8* %244
%246 = zext i8 %245 to i32
%247 = or i32 %241, %246
%248 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.20, i64 0, i64 0), i32 %247)
%249 = add nuw nsw i8 %230, 2
%250 = add i32 %229, 2
br label %251
251: ; preds = %168, %233, %227
%252 = phi i32 [ %182, %168 ], [ %250, %233 ], [ %229, %227 ]
%253 = phi i8 [ 5, %168 ], [ %249, %233 ], [ %230, %227 ]
%254 = zext i8 %253 to i32
%255 = add i32 %120, %254
%256 = load i8, i8* %112
%257 = zext i8 %256 to i32
%258 = icmp ult i32 %255, %257
br i1 %258, label %118, label %259
259: ; preds = %251, %88, %111, %108, %67, %73
%260 = phi i32 [ %87, %73 ], [ %69, %67 ], [ 10, %88 ], [ 8, %111 ], [ 7, %108 ], [ %252, %251 ]
%261 = load i8, i8* %7
%262 = zext i8 %261 to i32
%263 = icmp ult i32 %260, %262
br i1 %263, label %264, label %287
264: ; preds = %259
%265 = trunc i32 %260 to i8
%266 = sub i8 %261, %265
%267 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.21, i64 0, i64 0))
%268 = icmp eq i8 %266, 0
br i1 %268, label %283, label %269
269: ; preds = %264
%270 = add i32 %260, 2
%271 = zext i8 %266 to i64
br label %272
272: ; preds = %269, %272
%273 = phi i64 [ 0, %269 ], [ %281, %272 ]
%274 = trunc i64 %273 to i32
%275 = add i32 %270, %274
%276 = zext i32 %275 to i64
%277 = getelementptr inbounds i8, i8* %1, i64 %276
%278 = load i8, i8* %277
%279 = zext i8 %278 to i32
%280 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.22, i64 0, i64 0), i32 %279)
%281 = add nuw nsw i64 %273, 1
%282 = icmp eq i64 %281, %271
br i1 %282, label %283, label %272
283: ; preds = %272, %264
%284 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
%285 = load i8, i8* %7
%286 = zext i8 %285 to i32
br label %287
287: ; preds = %259, %283, %2
%288 = phi i32 [ -1, %2 ], [ %286, %283 ], [ %262, %259 ]
ret i32 %288
}