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


x86 assembly (clang, -O0):
<x5E_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)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1155 <x5E_Tag_DescriptorParser+0x35>
movl   $0xffffffff,-0x4(%rbp)
jmp    134e <x5E_Tag_DescriptorParser+0x22e>
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    0xe8a(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%edx
lea    0xe8b(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0x1,%eax
jle    1332 <x5E_Tag_DescriptorParser+0x212>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
cmp    %ecx,%eax
jae    132d <x5E_Tag_DescriptorParser+0x20d>
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
and    $0xff,%edx
shl    $0x10,%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x3,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
shl    $0x8,%eax
or     %eax,%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x4,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
and    $0xff,%eax
or     %eax,%edx
lea    0xe14(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x2,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%edx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x3,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%ecx
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%esi
add    $0x4,%esi
mov    %esi,%esi
movzbl (%rax,%rsi,1),%r8d
lea    0xdf0(%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    0xdef(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x5,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     1316 <x5E_Tag_DescriptorParser+0x1f6>
mov    -0x8(%rbp),%edi
lea    0xde4(%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    1305 <x5E_Tag_DescriptorParser+0x1e5>
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
lea    0xdb1(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12b8 <x5E_Tag_DescriptorParser+0x198>
mov    -0x8(%rbp),%edi
lea    0xda4(%rip),%rsi
mov    $0x0,%al
call   1030 <Parser_TsPacketLog@plt>
mov    -0x18(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    11ae <x5E_Tag_DescriptorParser+0x8e>
jmp    1332 <x5E_Tag_DescriptorParser+0x212>
mov    -0x8(%rbp),%edi
lea    0xd68(%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):
<x5E_Tag_DescriptorParser>:
test   %rsi,%rsi
je     12ae <x5E_Tag_DescriptorParser+0x18e>
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
movzbl (%rsi),%esi
call   1040 <Parser_DisplayTagInfo@plt>
movzbl 0x1(%rbx),%edx
lea    0xeb4(%rip),%rsi
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x2(%rbx),%edx
lea    0xeba(%rip),%rsi
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
cmpb   $0x2,0x1(%rbx)
jb     128b <x5E_Tag_DescriptorParser+0x16b>
mov    $0x1,%r14d
jmp    11a3 <x5E_Tag_DescriptorParser+0x83>
nopl   0x0(%rax,%rax,1)
mov    %ebp,%edi
lea    0xf2a(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    %r13d,%r15d
movzbl 0x1(%rbx),%eax
mov    %r15d,%r14d
cmp    %eax,%r15d
jae    128b <x5E_Tag_DescriptorParser+0x16b>
lea    0x2(%r14),%r12d
movzbl (%rbx,%r12,1),%eax
shl    $0x10,%eax
lea    0x3(%r14),%r13d
movzbl (%rbx,%r13,1),%ecx
shl    $0x8,%ecx
or     %eax,%ecx
lea    0x4(%r14),%r15d
movzbl (%rbx,%r15,1),%edx
or     %ecx,%edx
mov    %ebp,%edi
lea    0xe5f(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl (%rbx,%r12,1),%edx
movzbl (%rbx,%r13,1),%ecx
movzbl (%rbx,%r15,1),%r8d
mov    %ebp,%edi
lea    0xe5e(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
lea    0x5(%r14),%r12d
movzbl (%rbx,%r12,1),%edx
mov    %ebp,%edi
lea    0xe65(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
cmpb   $0x0,(%rbx,%r12,1)
mov    $0x0,%r13d
je     1190 <x5E_Tag_DescriptorParser+0x70>
xor    %r13d,%r13d
mov    %ebp,%edi
lea    0xe61(%rip),%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
cmpb   $0x0,(%rbx,%r12,1)
je     1180 <x5E_Tag_DescriptorParser+0x60>
mov    %r15,(%rsp)
add    $0x6,%r14d
xor    %r13d,%r13d
lea    0xe50(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    (%r14,%r13,1),%eax
movzbl (%rbx,%rax,1),%edx
mov    %ebp,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
add    $0x1,%r13
movzbl (%rbx,%r12,1),%eax
cmp    %rax,%r13
jb     1260 <x5E_Tag_DescriptorParser+0x140>
mov    (%rsp),%r15
jmp    1180 <x5E_Tag_DescriptorParser+0x60>
lea    0xe12(%rip),%rsi
mov    %ebp,%edi
xor    %eax,%eax
call   1030 <Parser_TsPacketLog@plt>
movzbl 0x1(%rbx),%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 = [22 x i8] c"component_tag = 0x%x\0A\00"
@.str.2 = [30 x i8] c"ISO_639_language_code = 0x%x\0A\00"
@.str.3 = [32 x i8] c"ISO_639_language_code : %c%c%c\0A\00"
@.str.4 = [32 x i8] c"text_description_length = 0x%x\0A\00"
@.str.5 = [19 x i8] c"text_description: \00"
@.str.6 = [3 x i8] c"%c\00"
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [17 x i8] c"******END******\0A\00"
define i32 @x5E_Tag_DescriptorParser(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 0, i32* %6
store i32 0, i32* %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 %159
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 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %23, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %27)
%29 = load i8*, i8** %5
%30 = getelementptr inbounds i8, i8* %29, i64 1
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = icmp sgt i32 %32, 1
br i1 %33, label %34, label %152
34: ; preds = %11
store i32 1, i32* %6
br label %35
35: ; preds = %147, %34
%36 = load i32, i32* %6
%37 = load i8*, i8** %5
%38 = getelementptr inbounds i8, i8* %37, i64 1
%39 = load i8, i8* %38
%40 = zext i8 %39 to i32
%41 = icmp ult i32 %36, %40
br i1 %41, label %42, label %151
42: ; preds = %35
store i32 0, i32* %7
%43 = load i32, i32* %4
%44 = load i8*, i8** %5
%45 = load i32, i32* %6
%46 = add i32 %45, 2
%47 = zext i32 %46 to i64
%48 = getelementptr inbounds i8, i8* %44, i64 %47
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = and i32 %50, 255
%52 = shl i32 %51, 16
%53 = load i8*, i8** %5
%54 = load i32, i32* %6
%55 = add i32 %54, 3
%56 = zext i32 %55 to i64
%57 = getelementptr inbounds i8, i8* %53, i64 %56
%58 = load i8, i8* %57
%59 = zext i8 %58 to i32
%60 = and i32 %59, 255
%61 = shl i32 %60, 8
%62 = or i32 %52, %61
%63 = load i8*, i8** %5
%64 = load i32, i32* %6
%65 = add i32 %64, 4
%66 = zext i32 %65 to i64
%67 = getelementptr inbounds i8, i8* %63, i64 %66
%68 = load i8, i8* %67
%69 = zext i8 %68 to i32
%70 = and i32 %69, 255
%71 = or i32 %62, %70
%72 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %43, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %71)
%73 = load i32, i32* %4
%74 = load i8*, i8** %5
%75 = load i32, i32* %6
%76 = add i32 %75, 2
%77 = zext i32 %76 to i64
%78 = getelementptr inbounds i8, i8* %74, i64 %77
%79 = load i8, i8* %78
%80 = zext i8 %79 to i32
%81 = load i8*, i8** %5
%82 = load i32, i32* %6
%83 = add i32 %82, 3
%84 = zext i32 %83 to i64
%85 = getelementptr inbounds i8, i8* %81, i64 %84
%86 = load i8, i8* %85
%87 = zext i8 %86 to i32
%88 = load i8*, i8** %5
%89 = load i32, i32* %6
%90 = add i32 %89, 4
%91 = zext i32 %90 to i64
%92 = getelementptr inbounds i8, i8* %88, i64 %91
%93 = load i8, i8* %92
%94 = zext i8 %93 to i32
%95 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %73, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %80, i32 %87, i32 %94)
%96 = load i32, i32* %4
%97 = load i8*, i8** %5
%98 = load i32, i32* %6
%99 = add i32 %98, 5
%100 = zext i32 %99 to i64
%101 = getelementptr inbounds i8, i8* %97, i64 %100
%102 = load i8, i8* %101
%103 = zext i8 %102 to i32
%104 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %96, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %103)
%105 = load i8*, i8** %5
%106 = load i32, i32* %6
%107 = add i32 %106, 5
%108 = zext i32 %107 to i64
%109 = getelementptr inbounds i8, i8* %105, i64 %108
%110 = load i8, i8* %109
%111 = zext i8 %110 to i32
%112 = icmp ne i32 0, %111
br i1 %112, label %113, label %144
113: ; preds = %42
%114 = load i32, i32* %4
%115 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %114, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %7
br label %116
116: ; preds = %138, %113
%117 = load i32, i32* %7
%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
%124 = zext i8 %123 to i32
%125 = icmp ult i32 %117, %124
br i1 %125, label %126, label %141
126: ; preds = %116
%127 = load i32, i32* %4
%128 = load i8*, i8** %5
%129 = load i32, i32* %6
%130 = load i32, i32* %7
%131 = add i32 %129, %130
%132 = add i32 %131, 6
%133 = zext i32 %132 to i64
%134 = getelementptr inbounds i8, i8* %128, i64 %133
%135 = load i8, i8* %134
%136 = zext i8 %135 to i32
%137 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %127, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %136)
br label %138
138: ; preds = %126
%139 = load i32, i32* %7
%140 = add i32 %139, 1
store i32 %140, i32* %7
br label %116
141: ; preds = %116
%142 = load i32, i32* %4
%143 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %142, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %144
144: ; preds = %141, %42
%145 = load i32, i32* %7
%146 = add i32 %145, 4
store i32 %146, i32* %7
br label %147
147: ; preds = %144
%148 = load i32, i32* %7
%149 = load i32, i32* %6
%150 = add i32 %149, %148
store i32 %150, i32* %6
br label %35
151: ; preds = %35
br label %152
152: ; preds = %151, %11
%153 = load i32, i32* %4
%154 = call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %153, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%155 = load i8*, i8** %5
%156 = getelementptr inbounds i8, i8* %155, i64 1
%157 = load i8, i8* %156
%158 = zext i8 %157 to i32
store i32 %158, i32* %3
br label %159
159: ; preds = %152, %10
%160 = load i32, i32* %3
ret i32 %160
}

LLVM IR (-O2):
@.str = [26 x i8] c"Descriptor_length = 0x%x\0A\00"
@.str.1 = [22 x i8] c"component_tag = 0x%x\0A\00"
@.str.2 = [30 x i8] c"ISO_639_language_code = 0x%x\0A\00"
@.str.3 = [32 x i8] c"ISO_639_language_code : %c%c%c\0A\00"
@.str.4 = [32 x i8] c"text_description_length = 0x%x\0A\00"
@.str.5 = [19 x i8] c"text_description: \00"
@.str.6 = [3 x i8] c"%c\00"
@.str.7 = [2 x i8] c"\0A\00"
@.str.8 = [17 x i8] c"******END******\0A\00"
define i32 @x5E_Tag_DescriptorParser(i32 %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %88, 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 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %13)
%15 = load i8, i8* %7
%16 = icmp ugt i8 %15, 1
br i1 %16, label %17, label %84
17: ; preds = %4, %78
%18 = phi i32 [ %80, %78 ], [ 1, %4 ]
%19 = add i32 %18, 2
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %1, i64 %20
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = shl nuw nsw i32 %23, 16
%25 = add i32 %18, 3
%26 = zext i32 %25 to i64
%27 = getelementptr inbounds i8, i8* %1, i64 %26
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = shl nuw nsw i32 %29, 8
%31 = or i32 %30, %24
%32 = add i32 %18, 4
%33 = zext i32 %32 to i64
%34 = getelementptr inbounds i8, i8* %1, i64 %33
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = or i32 %31, %36
%38 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %37)
%39 = load i8, i8* %21
%40 = zext i8 %39 to i32
%41 = load i8, i8* %27
%42 = zext i8 %41 to i32
%43 = load i8, i8* %34
%44 = zext i8 %43 to i32
%45 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %40, i32 %42, i32 %44)
%46 = add i32 %18, 5
%47 = zext i32 %46 to i64
%48 = getelementptr inbounds i8, i8* %1, i64 %47
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %50)
%52 = load i8, i8* %48
%53 = icmp eq i8 %52, 0
br i1 %53, label %78, label %54
54: ; preds = %17
%55 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%56 = load i8, i8* %48
%57 = icmp eq i8 %56, 0
br i1 %57, label %75, label %58
58: ; preds = %54
%59 = add i32 %18, 6
br label %60
60: ; preds = %58, %60
%61 = phi i64 [ 0, %58 ], [ %69, %60 ]
%62 = trunc i64 %61 to i32
%63 = add i32 %59, %62
%64 = zext i32 %63 to i64
%65 = getelementptr inbounds i8, i8* %1, i64 %64
%66 = load i8, i8* %65
%67 = zext i8 %66 to i32
%68 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %67)
%69 = add nuw nsw i64 %61, 1
%70 = load i8, i8* %48
%71 = zext i8 %70 to i64
%72 = icmp ult i64 %69, %71
br i1 %72, label %60, label %73
73: ; preds = %60
%74 = trunc i64 %69 to i32
br label %75
75: ; preds = %73, %54
%76 = phi i32 [ 0, %54 ], [ %74, %73 ]
%77 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %78
78: ; preds = %75, %17
%79 = phi i32 [ %76, %75 ], [ 0, %17 ]
%80 = add i32 %32, %79
%81 = load i8, i8* %7
%82 = zext i8 %81 to i32
%83 = icmp ult i32 %80, %82
br i1 %83, label %17, label %84
84: ; preds = %78, %4
%85 = tail call i32 (i32, i8*, ...) @Parser_TsPacketLog(i32 %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
%86 = load i8, i8* %7
%87 = zext i8 %86 to i32
br label %88
88: ; preds = %2, %84
%89 = phi i32 [ %87, %84 ], [ -1, %2 ]
ret i32 %89
}