#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 x64_Tag_DescriptorParser(unsigned int type, unsigned char *buff) {
  unsigned int i = 0;
  unsigned char selector_length = 0;
  if (NULL == buff) {
    return -1;
  }
  Parser_DisplayTagInfo(type, buff[0]);
  Parser_TsPacketLog(type, "Descriptor_length = 0x%x\n", buff[1]);
  Parser_TsPacketLog(type, "data_broadcast_id = 0x%x\n",
                     (buff[2] << 8) | buff[3]);
  Parser_TsPacketLog(type, "component_tag = 0x%x\n", buff[4]);
  selector_length = buff[5];
  Parser_TsPacketLog(type, "selector_length = 0x%x\n", selector_length);
  if (0 != selector_length) {
    Parser_TsPacketLog(type, "selector_data:");
    for (i = 0; i < selector_length; i++) {
      Parser_TsPacketLog(type, " %02x", buff[i + 6]);
    }
    Parser_TsPacketLog(type, "\n");
  }
  Parser_TsPacketLog(type, "ISO_639_language_code = 0x%x\n",
                     ((buff[selector_length + 6] & 0xFF) << 16) |
                         ((buff[selector_length + 7] & 0xFF) << 8) |
                         (buff[selector_length + 8] & 0xFF));
  Parser_TsPacketLog(type, "ISO_639_language_code : %c%c%c\n",
                     buff[selector_length + 6], buff[selector_length + 7],
                     buff[selector_length + 8]);
  Parser_TsPacketLog(type, "text_length = 0x%x\n", buff[selector_length + 9]);
  if (0 != buff[selector_length + 9]) {
    Parser_TsPacketLog(type, "text_char: ");
    for (i = 0; i < buff[selector_length + 9]; i++) {
      Parser_TsPacketLog(type, "%c", buff[selector_length + 10 + i]);
    }
    Parser_TsPacketLog(type, "\n");
  }
  Parser_TsPacketLog(type, "******END******\n");
  return buff[1];
}


x86 assembly (clang, -O0):
<x64_Tag_DescriptorParser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movb   $0x0,-0x15(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1152 <x64_Tag_DescriptorParser+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    13ca <x64_Tag_DescriptorParser+0x2aa>
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    0xe8d(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%edx
shl    $0x8,%edx
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
or     %eax,%edx
lea    0xe81(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x4(%rax),%edx
lea    0xe82(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
mov    0x5(%rax),%al
mov    %al,-0x15(%rbp)
mov    -0x8(%rbp),%edi
movzbl -0x15(%rbp),%edx
lea    0xe79(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movzbl -0x15(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     124d <x64_Tag_DescriptorParser+0x12d>
mov    -0x8(%rbp),%edi
lea    0xe72(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movzbl -0x15(%rbp),%ecx
cmp    %ecx,%eax
jae    123c <x64_Tag_DescriptorParser+0x11c>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x6,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
lea    0xe4a(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11fe <x64_Tag_DescriptorParser+0xde>
mov    -0x8(%rbp),%edi
lea    0xea1(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl -0x15(%rbp),%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
and    $0xff,%edx
shl    $0x10,%edx
mov    -0x10(%rbp),%rax
movzbl -0x15(%rbp),%ecx
add    $0x7,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
shl    $0x8,%eax
or     %eax,%edx
mov    -0x10(%rbp),%rax
movzbl -0x15(%rbp),%ecx
add    $0x8,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xdd0(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl -0x15(%rbp),%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
mov    -0x10(%rbp),%rax
movzbl -0x15(%rbp),%ecx
add    $0x7,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%ecx
mov    -0x10(%rbp),%rax
movzbl -0x15(%rbp),%esi
add    $0x8,%esi
movslq %esi,%rsi
movzbl (%rax,%rsi,1),%r8d
lea    0xda6(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl -0x15(%rbp),%ecx
add    $0x9,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
lea    0xda3(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
movzbl -0x15(%rbp),%ecx
add    $0x9,%ecx
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     13ae <x64_Tag_DescriptorParser+0x28e>
mov    -0x8(%rbp),%edi
lea    0xd8a(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movzbl -0x15(%rbp),%edx
add    $0x9,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jae    139d <x64_Tag_DescriptorParser+0x27d>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl -0x15(%rbp),%ecx
add    $0xa,%ecx
add    -0x14(%rbp),%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
lea    0xd4d(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    134d <x64_Tag_DescriptorParser+0x22d>
mov    -0x8(%rbp),%edi
lea    0xd40(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
lea    0xd20(%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):
<x64_Tag_DescriptorParser>:
test   %rsi,%rsi
je     12f7 <x64_Tag_DescriptorParser+0x1d7>
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r13
mov    %edi,%r12d
movzbl (%rsi),%esi
call   1040 <Parser_DisplayTagInfo@plt>
movzbl 0x1(%r13),%edx
lea    0xeb2(%rip),%rsi
mov    %r12d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzwl 0x2(%r13),%edx
shl    $0x10,%edx
bswap  %edx
lea    0xeb1(%rip),%rsi
mov    %r12d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x4(%r13),%edx
lea    0xeb5(%rip),%rsi
mov    %r12d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x5(%r13),%r14d
lea    0xeb5(%rip),%rsi
mov    %r12d,%edi
mov    %r14d,%edx
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
test   %r14d,%r14d
je     11fd <x64_Tag_DescriptorParser+0xdd>
lea    0xeb4(%rip),%rsi
mov    %r12d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
mov    %r14d,%ebx
lea    0xeaf(%rip),%r15
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl 0x6(%r13,%rbp,1),%edx
mov    %r12d,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    11d0 <x64_Tag_DescriptorParser+0xb0>
lea    0xef4(%rip),%rsi
mov    %r12d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x6(%r14,%r13,1),%eax
shl    $0x10,%eax
movzbl 0x7(%r14,%r13,1),%ecx
shl    $0x8,%ecx
or     %eax,%ecx
movzbl 0x8(%r14,%r13,1),%edx
or     %ecx,%edx
lea    0xe57(%rip),%rsi
mov    %r12d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x6(%r14,%r13,1),%edx
movzbl 0x7(%r14,%r13,1),%ecx
movzbl 0x8(%r14,%r13,1),%r8d
lea    0xe52(%rip),%rsi
mov    %r12d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x9(%r14,%r13,1),%edx
lea    0xe5b(%rip),%rsi
mov    %r12d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
cmpb   $0x0,0x9(%r14,%r13,1)
je     12d2 <x64_Tag_DescriptorParser+0x1b2>
lea    0xe56(%rip),%rsi
mov    %r12d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
cmpb   $0x0,0x9(%r13,%r14,1)
je     12c1 <x64_Tag_DescriptorParser+0x1a1>
lea    (%r14,%r13,1),%rbp
add    $0xa,%rbp
lea    0xe41(%rip),%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movzbl 0x0(%rbp,%rbx,1),%edx
mov    %r12d,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    $0x1,%rbx
movzbl 0x9(%r13,%r14,1),%eax
cmp    %rax,%rbx
jb     12a0 <x64_Tag_DescriptorParser+0x180>
lea    0xe1f(%rip),%rsi
mov    %r12d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
lea    0xdff(%rip),%rsi
mov    %r12d,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x1(%r13),%eax
add    $0x8,%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 = [26 x i8] c"data_broadcast_id = 0x%x\0A\00"
@.str.2 = [22 x i8] c"component_tag = 0x%x\0A\00"
@.str.3 = [24 x i8] c"selector_length = 0x%x\0A\00"
@.str.4 = [15 x i8] c"selector_data:\00"
@.str.5 = [6 x i8] c" %02x\00"
@.str.6 = [2 x i8] c"\0A\00"
@.str.7 = [30 x i8] c"ISO_639_language_code = 0x%x\0A\00"
@.str.8 = [32 x i8] c"ISO_639_language_code : %c%c%c\0A\00"
@.str.9 = [20 x i8] c"text_length = 0x%x\0A\00"
@.str.10 = [12 x i8] c"text_char: \00"
@.str.11 = [3 x i8] c"%c\00"
@.str.12 = [17 x i8] c"******END******\0A\00"
define i32 @x64_Tag_DescriptorParser(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 0, i32* %6
store i8 0, i8* %7
%8 = load i8*, i8** %5
%9 = icmp eq i8* null, %8
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 -1, i32* %3
br label %194
11: ; preds = %2
%12 = load i32, i32* %4
%13 = load i8*, i8** %5
%14 = getelementptr inbounds i8, i8* %13, i64 0
%15 = load i8, i8* %14
%16 = call i32 @Parser_DisplayTagInfo(i32 %12, i8 zeroext %15)
%17 = load i32, i32* %4
%18 = load i8*, i8** %5
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %17, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %21)
%23 = load i32, i32* %4
%24 = load i8*, i8** %5
%25 = getelementptr inbounds i8, i8* %24, i64 2
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = shl i32 %27, 8
%29 = load i8*, i8** %5
%30 = getelementptr inbounds i8, i8* %29, i64 3
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = or i32 %28, %32
%34 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %23, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %33)
%35 = load i32, i32* %4
%36 = load i8*, i8** %5
%37 = getelementptr inbounds i8, i8* %36, i64 4
%38 = load i8, i8* %37
%39 = zext i8 %38 to i32
%40 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %35, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %39)
%41 = load i8*, i8** %5
%42 = getelementptr inbounds i8, i8* %41, i64 5
%43 = load i8, i8* %42
store i8 %43, i8* %7
%44 = load i32, i32* %4
%45 = load i8, i8* %7
%46 = zext i8 %45 to i32
%47 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %44, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %46)
%48 = load i8, i8* %7
%49 = zext i8 %48 to i32
%50 = icmp ne i32 0, %49
br i1 %50, label %51, label %75
51: ; preds = %11
%52 = load i32, i32* %4
%53 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %52, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %6
br label %54
54: ; preds = %69, %51
%55 = load i32, i32* %6
%56 = load i8, i8* %7
%57 = zext i8 %56 to i32
%58 = icmp ult i32 %55, %57
br i1 %58, label %59, label %72
59: ; preds = %54
%60 = load i32, i32* %4
%61 = load i8*, i8** %5
%62 = load i32, i32* %6
%63 = add i32 %62, 6
%64 = zext i32 %63 to i64
%65 = getelementptr inbounds i8, i8* %61, i64 %64
%66 = load i8, i8* %65
%67 = zext i8 %66 to i32
%68 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %60, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %67)
br label %69
69: ; preds = %59
%70 = load i32, i32* %6
%71 = add i32 %70, 1
store i32 %71, i32* %6
br label %54
72: ; preds = %54
%73 = load i32, i32* %4
%74 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %73, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %75
75: ; preds = %72, %11
%76 = load i32, i32* %4
%77 = load i8*, i8** %5
%78 = load i8, i8* %7
%79 = zext i8 %78 to i32
%80 = add nsw i32 %79, 6
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8, i8* %77, i64 %81
%83 = load i8, i8* %82
%84 = zext i8 %83 to i32
%85 = and i32 %84, 255
%86 = shl i32 %85, 16
%87 = load i8*, i8** %5
%88 = load i8, i8* %7
%89 = zext i8 %88 to i32
%90 = add nsw i32 %89, 7
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i8, i8* %87, i64 %91
%93 = load i8, i8* %92
%94 = zext i8 %93 to i32
%95 = and i32 %94, 255
%96 = shl i32 %95, 8
%97 = or i32 %86, %96
%98 = load i8*, i8** %5
%99 = load i8, i8* %7
%100 = zext i8 %99 to i32
%101 = add nsw i32 %100, 8
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds i8, i8* %98, i64 %102
%104 = load i8, i8* %103
%105 = zext i8 %104 to i32
%106 = and i32 %105, 255
%107 = or i32 %97, %106
%108 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %76, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 %107)
%109 = load i32, i32* %4
%110 = load i8*, i8** %5
%111 = load i8, i8* %7
%112 = zext i8 %111 to i32
%113 = add nsw i32 %112, 6
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds i8, i8* %110, i64 %114
%116 = load i8, i8* %115
%117 = zext i8 %116 to i32
%118 = load i8*, i8** %5
%119 = load i8, i8* %7
%120 = zext i8 %119 to i32
%121 = add nsw i32 %120, 7
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds i8, i8* %118, i64 %122
%124 = load i8, i8* %123
%125 = zext i8 %124 to i32
%126 = load i8*, i8** %5
%127 = load i8, i8* %7
%128 = zext i8 %127 to i32
%129 = add nsw i32 %128, 8
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i8, i8* %126, i64 %130
%132 = load i8, i8* %131
%133 = zext i8 %132 to i32
%134 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %109, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), i32 %117, i32 %125, i32 %133)
%135 = load i32, i32* %4
%136 = load i8*, i8** %5
%137 = load i8, i8* %7
%138 = zext i8 %137 to i32
%139 = add nsw i32 %138, 9
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds i8, i8* %136, i64 %140
%142 = load i8, i8* %141
%143 = zext i8 %142 to i32
%144 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %135, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i32 %143)
%145 = load i8*, i8** %5
%146 = load i8, i8* %7
%147 = zext i8 %146 to i32
%148 = add nsw i32 %147, 9
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds i8, i8* %145, i64 %149
%151 = load i8, i8* %150
%152 = zext i8 %151 to i32
%153 = icmp ne i32 0, %152
br i1 %153, label %154, label %187
154: ; preds = %75
%155 = load i32, i32* %4
%156 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %155, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %6
br label %157
157: ; preds = %181, %154
%158 = load i32, i32* %6
%159 = load i8*, i8** %5
%160 = load i8, i8* %7
%161 = zext i8 %160 to i32
%162 = add nsw i32 %161, 9
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds i8, i8* %159, i64 %163
%165 = load i8, i8* %164
%166 = zext i8 %165 to i32
%167 = icmp ult i32 %158, %166
br i1 %167, label %168, label %184
168: ; preds = %157
%169 = load i32, i32* %4
%170 = load i8*, i8** %5
%171 = load i8, i8* %7
%172 = zext i8 %171 to i32
%173 = add nsw i32 %172, 10
%174 = load i32, i32* %6
%175 = add i32 %173, %174
%176 = zext i32 %175 to i64
%177 = getelementptr inbounds i8, i8* %170, i64 %176
%178 = load i8, i8* %177
%179 = zext i8 %178 to i32
%180 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %169, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32 %179)
br label %181
181: ; preds = %168
%182 = load i32, i32* %6
%183 = add i32 %182, 1
store i32 %183, i32* %6
br label %157
184: ; preds = %157
%185 = load i32, i32* %4
%186 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %185, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %187
187: ; preds = %184, %75
%188 = load i32, i32* %4
%189 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %188, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%190 = load i8*, i8** %5
%191 = getelementptr inbounds i8, i8* %190, i64 1
%192 = load i8, i8* %191
%193 = zext i8 %192 to i32
store i32 %193, i32* %3
br label %194
194: ; preds = %187, %10
%195 = load i32, i32* %3
ret i32 %195
}

LLVM IR (-O2):
@.str = [26 x i8] c"Descriptor_length = 0x%x\0A\00"
@.str.1 = [26 x i8] c"data_broadcast_id = 0x%x\0A\00"
@.str.2 = [22 x i8] c"component_tag = 0x%x\0A\00"
@.str.3 = [24 x i8] c"selector_length = 0x%x\0A\00"
@.str.4 = [15 x i8] c"selector_data:\00"
@.str.5 = [6 x i8] c" %02x\00"
@.str.6 = [2 x i8] c"\0A\00"
@.str.7 = [30 x i8] c"ISO_639_language_code = 0x%x\0A\00"
@.str.8 = [32 x i8] c"ISO_639_language_code : %c%c%c\0A\00"
@.str.9 = [20 x i8] c"text_length = 0x%x\0A\00"
@.str.10 = [12 x i8] c"text_char: \00"
@.str.11 = [3 x i8] c"%c\00"
@.str.12 = [17 x i8] c"******END******\0A\00"
define i32 @x64_Tag_DescriptorParser(i32 %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %103, 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 ([26 x i8], [26 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 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds i8, i8* %1, i64 5
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %26)
%28 = icmp eq i8 %25, 0
br i1 %28, label %43, label %29
29: ; preds = %4
%30 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%31 = zext i8 %25 to i64
br label %32
32: ; preds = %29, %32
%33 = phi i64 [ 0, %29 ], [ %39, %32 ]
%34 = add nuw nsw i64 %33, 6
%35 = getelementptr inbounds i8, i8* %1, i64 %34
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %37)
%39 = add nuw nsw i64 %33, 1
%40 = icmp eq i64 %39, %31
br i1 %40, label %41, label %32
41: ; preds = %32
%42 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %43
43: ; preds = %41, %4
%44 = add nuw nsw i32 %26, 6
%45 = zext i32 %44 to i64
%46 = getelementptr inbounds i8, i8* %1, i64 %45
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = shl nuw nsw i32 %48, 16
%50 = add nuw nsw i32 %26, 7
%51 = zext i32 %50 to i64
%52 = getelementptr inbounds i8, i8* %1, i64 %51
%53 = load i8, i8* %52
%54 = zext i8 %53 to i32
%55 = shl nuw nsw i32 %54, 8
%56 = or i32 %55, %49
%57 = add nuw nsw i32 %26, 8
%58 = zext i32 %57 to i64
%59 = getelementptr inbounds i8, i8* %1, i64 %58
%60 = load i8, i8* %59
%61 = zext i8 %60 to i32
%62 = or i32 %56, %61
%63 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i32 %62)
%64 = load i8, i8* %46
%65 = zext i8 %64 to i32
%66 = load i8, i8* %52
%67 = zext i8 %66 to i32
%68 = load i8, i8* %59
%69 = zext i8 %68 to i32
%70 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), i32 %65, i32 %67, i32 %69)
%71 = add nuw nsw i32 %26, 9
%72 = zext i32 %71 to i64
%73 = getelementptr inbounds i8, i8* %1, i64 %72
%74 = load i8, i8* %73
%75 = zext i8 %74 to i32
%76 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.9, i64 0, i64 0), i32 %75)
%77 = load i8, i8* %73
%78 = icmp eq i8 %77, 0
br i1 %78, label %99, label %79
79: ; preds = %43
%80 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0))
%81 = load i8, i8* %73
%82 = icmp eq i8 %81, 0
br i1 %82, label %97, label %83
83: ; preds = %79
%84 = add nuw nsw i32 %26, 10
%85 = zext i32 %84 to i64
br label %86
86: ; preds = %83, %86
%87 = phi i64 [ 0, %83 ], [ %93, %86 ]
%88 = add nuw nsw i64 %87, %85
%89 = getelementptr inbounds i8, i8* %1, i64 %88
%90 = load i8, i8* %89
%91 = zext i8 %90 to i32
%92 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32 %91)
%93 = add nuw nsw i64 %87, 1
%94 = load i8, i8* %73
%95 = zext i8 %94 to i64
%96 = icmp ult i64 %93, %95
br i1 %96, label %86, label %97
97: ; preds = %86, %79
%98 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %99
99: ; preds = %97, %43
%100 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
%101 = load i8, i8* %7
%102 = zext i8 %101 to i32
br label %103
103: ; preds = %2, %99
%104 = phi i32 [ %102, %99 ], [ -1, %2 ]
ret i32 %104
}