; LLVM IR from facebook/redex :: libresource/ResourceTypes.ll (ZNK7android12ResXMLParser16indexOfAttributeEPKDsmS2_m)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.android::String8" = type { ptr }
%"class.android::ResXMLParser" = type <{ ptr, i32, [4 x i8], ptr, ptr, i32, [4 x i8] }>
%"class.android::ResXMLTree" = type <{ %"class.android::ResXMLParser.base", [4 x i8], %"class.std::shared_ptr", i32, [4 x i8], ptr, ptr, i64, ptr, %"class.android::ResStringPool", ptr, i64, ptr, ptr, i32, [4 x i8] }>
%"class.android::ResXMLParser.base" = type <{ ptr, i32, [4 x i8], ptr, ptr, i32 }>
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.android::ResStringPool" = type <{ ptr, i32, [4 x i8], ptr, ptr, i64, %"class.std::mutex", ptr, ptr, ptr, ptr, i32, [4 x i8], ptr, i32, [4 x i8] }>
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #1

declare void @_ZN7android7String8C1EPKDsm(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i64 noundef) unnamed_addr #2

declare void @_ZN7android7String8C1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7android7String86stringEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: nounwind
declare void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7android13ResStringPool6isUTF8Ev(ptr noundef nonnull align 8 dereferenceable(132)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7android12ResXMLParser17getAttributeCountEv(ptr noundef nonnull align 8 dereferenceable(36)) #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7android12ResXMLParser21getAttributeNamespaceEmPm(ptr noundef nonnull align 8 dereferenceable(36), i64 noundef, ptr noundef) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7android12ResXMLParser22getAttributeNamespace8EmPm(ptr noundef nonnull align 8 dereferenceable(36), i64 noundef, ptr noundef) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7android12ResXMLParser16getAttributeNameEmPm(ptr noundef nonnull align 8 dereferenceable(36), i64 noundef, ptr noundef) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7android12ResXMLParser17getAttributeName8EmPm(ptr noundef nonnull align 8 dereferenceable(36), i64 noundef, ptr noundef) #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZNK7android12ResXMLParser16indexOfAttributeEPKDsmS2_m(ptr noundef nonnull align 8 dereferenceable(36) %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4) #6 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %"class.android::String8", align 8
  %14 = alloca %"class.android::String8", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.android::String8", align 8
  %18 = alloca %"class.android::String8", align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i64 %2, ptr %9, align 8, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i64 %4, ptr %11, align 8, !tbaa !9
  %30 = load ptr, ptr %7, align 8
  %31 = getelementptr inbounds %"class.android::ResXMLParser", ptr %30, i32 0, i32 1
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %33 = icmp eq i32 %32, 258
  br i1 %33, label %34, label %225

34:                                               ; preds = %5
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %38

37:                                               ; preds = %34
  store i64 -2, ptr %6, align 8
  br label %226

38:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %39 = call noundef i64 @_ZNK7android12ResXMLParser17getAttributeCountEv(ptr noundef nonnull align 8 dereferenceable(36) %30)
  store i64 %39, ptr %12, align 8, !tbaa !9
  %40 = getelementptr inbounds %"class.android::ResXMLParser", ptr %30, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !15
  %42 = getelementptr inbounds %"class.android::ResXMLTree", ptr %41, i32 0, i32 9
  %43 = call noundef zeroext i1 @_ZNK7android13ResStringPool6isUTF8Ev(ptr noundef nonnull align 8 dereferenceable(132) %42)
  br i1 %43, label %44, label %159

44:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  call void @_ZN7android7String8C1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  invoke void @_ZN7android7String8C1Ev(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %45 unwind label %54

45:                                               ; preds = %44
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %67

48:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = load i64, ptr %9, align 8, !tbaa !9
  invoke void @_ZN7android7String8C1EPKDsm(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef %49, i64 noundef %50)
          to label %51 unwind label %58

51:                                               ; preds = %48
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7android7String8aSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %17)
          to label %53 unwind label %62

53:                                               ; preds = %51
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %67

54:                                               ; preds = %44
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %15, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %16, align 4
  br label %158

58:                                               ; preds = %48
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %15, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %16, align 4
  br label %66

62:                                               ; preds = %51
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %15, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %16, align 4
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  br label %66

66:                                               ; preds = %62, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %157

67:                                               ; preds = %53, %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = load i64, ptr %11, align 8, !tbaa !9
  invoke void @_ZN7android7String8C1EPKDsm(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef %68, i64 noundef %69)
          to label %70 unwind label %78

70:                                               ; preds = %67
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7android7String8aSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %72 unwind label %82

72:                                               ; preds = %70
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  store i64 0, ptr %19, align 8, !tbaa !9
  br label %73

73:                                               ; preds = %147, %72
  %74 = load i64, ptr %19, align 8, !tbaa !9
  %75 = load i64, ptr %12, align 8, !tbaa !9
  %76 = icmp ult i64 %74, %75
  br i1 %76, label %87, label %77

77:                                               ; preds = %73
  store i32 2, ptr %20, align 4
  br label %151

78:                                               ; preds = %67
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %15, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %16, align 4
  br label %86

82:                                               ; preds = %70
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %15, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %16, align 4
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  br label %86

86:                                               ; preds = %82, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %157

87:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  store i64 0, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  store i64 0, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %88 = load i64, ptr %19, align 8, !tbaa !9
  %89 = invoke noundef ptr @_ZNK7android12ResXMLParser22getAttributeNamespace8EmPm(ptr noundef nonnull align 8 dereferenceable(36) %30, i64 noundef %88, ptr noundef %21)
          to label %90 unwind label %119

90:                                               ; preds = %87
  store ptr %89, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %91 = load i64, ptr %19, align 8, !tbaa !9
  %92 = invoke noundef ptr @_ZNK7android12ResXMLParser17getAttributeName8EmPm(ptr noundef nonnull align 8 dereferenceable(36) %30, i64 noundef %91, ptr noundef %22)
          to label %93 unwind label %123

93:                                               ; preds = %90
  store ptr %92, ptr %24, align 8, !tbaa !5
  %94 = load ptr, ptr %24, align 8, !tbaa !5
  %95 = icmp ne ptr %94, null
  br i1 %95, label %96, label %143

96:                                               ; preds = %93
  %97 = load i64, ptr %21, align 8, !tbaa !9
  %98 = load i64, ptr %9, align 8, !tbaa !9
  %99 = icmp eq i64 %97, %98
  br i1 %99, label %100, label %143

100:                                              ; preds = %96
  %101 = load i64, ptr %22, align 8, !tbaa !9
  %102 = load i64, ptr %11, align 8, !tbaa !9
  %103 = icmp eq i64 %101, %102
  br i1 %103, label %104, label %143

104:                                              ; preds = %100
  %105 = invoke noundef ptr @_ZNK7android7String86stringEv(ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %106 unwind label %123

106:                                              ; preds = %104
  %107 = load ptr, ptr %24, align 8, !tbaa !5
  %108 = load i64, ptr %11, align 8, !tbaa !9
  %109 = call i32 @memcmp(ptr noundef %105, ptr noundef %107, i64 noundef %108) #9
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %111, label %143

111:                                              ; preds = %106
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = icmp eq ptr %112, null
  br i1 %113, label %114, label %128

114:                                              ; preds = %111
  %115 = load ptr, ptr %23, align 8, !tbaa !5
  %116 = icmp eq ptr %115, null
  br i1 %116, label %117, label %127

117:                                              ; preds = %114
  %118 = load i64, ptr %19, align 8, !tbaa !9
  store i64 %118, ptr %6, align 8
  store i32 1, ptr %20, align 4
  br label %144

119:                                              ; preds = %87
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %15, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %16, align 4
  br label %150

123:                                              ; preds = %131, %104, %90
  %124 = landingpad { ptr, i32 }
          cleanup
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %15, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br label %150

127:                                              ; preds = %114
  br label %142

128:                                              ; preds = %111
  %129 = load ptr, ptr %23, align 8, !tbaa !5
  %130 = icmp ne ptr %129, null
  br i1 %130, label %131, label %141

131:                                              ; preds = %128
  %132 = invoke noundef ptr @_ZNK7android7String86stringEv(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %133 unwind label %123

133:                                              ; preds = %131
  %134 = load ptr, ptr %23, align 8, !tbaa !5
  %135 = load i64, ptr %9, align 8, !tbaa !9
  %136 = call i32 @memcmp(ptr noundef %132, ptr noundef %134, i64 noundef %135) #9
  %137 = icmp eq i32 %136, 0
  br i1 %137, label %138, label %140

138:                                              ; preds = %133
  %139 = load i64, ptr %19, align 8, !tbaa !9
  store i64 %139, ptr %6, align 8
  store i32 1, ptr %20, align 4
  br label %144

140:                                              ; preds = %133
  br label %141

141:                                              ; preds = %140, %128
  br label %142

142:                                              ; preds = %141, %127
  br label %143

143:                                              ; preds = %142, %106, %100, %96, %93
  store i32 0, ptr %20, align 4
  br label %144

144:                                              ; preds = %143, %138, %117
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  %145 = load i32, ptr %20, align 4
  switch i32 %145, label %151 [
    i32 0, label %146
  ]

146:                                              ; preds = %144
  br label %147

147:                                              ; preds = %146
  %148 = load i64, ptr %19, align 8, !tbaa !9
  %149 = add i64 %148, 1
  store i64 %149, ptr %19, align 8, !tbaa !9
  br label %73, !llvm.loop !16

150:                                              ; preds = %123, %119
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %157

151:                                              ; preds = %144, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  %152 = load i32, ptr %20, align 4
  switch i32 %152, label %154 [
    i32 2, label %153
  ]

153:                                              ; preds = %151
  store i32 0, ptr %20, align 4
  br label %154

154:                                              ; preds = %153, %151
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  %155 = load i32, ptr %20, align 4
  switch i32 %155, label %222 [
    i32 0, label %156
  ]

156:                                              ; preds = %154
  br label %221

157:                                              ; preds = %150, %86, %66
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  br label %158

158:                                              ; preds = %157, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %228

159:                                              ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  store i64 0, ptr %25, align 8, !tbaa !9
  br label %160

160:                                              ; preds = %215, %159
  %161 = load i64, ptr %25, align 8, !tbaa !9
  %162 = load i64, ptr %12, align 8, !tbaa !9
  %163 = icmp ult i64 %161, %162
  br i1 %163, label %165, label %164

164:                                              ; preds = %160
  store i32 5, ptr %20, align 4
  br label %218

165:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  store i64 0, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  store i64 0, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %166 = load i64, ptr %25, align 8, !tbaa !9
  %167 = call noundef ptr @_ZNK7android12ResXMLParser21getAttributeNamespaceEmPm(ptr noundef nonnull align 8 dereferenceable(36) %30, i64 noundef %166, ptr noundef %26)
  store ptr %167, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %168 = load i64, ptr %25, align 8, !tbaa !9
  %169 = call noundef ptr @_ZNK7android12ResXMLParser16getAttributeNameEmPm(ptr noundef nonnull align 8 dereferenceable(36) %30, i64 noundef %168, ptr noundef %27)
  store ptr %169, ptr %29, align 8, !tbaa !5
  %170 = load ptr, ptr %29, align 8, !tbaa !5
  %171 = icmp ne ptr %170, null
  br i1 %171, label %172, label %211

172:                                              ; preds = %165
  %173 = load i64, ptr %26, align 8, !tbaa !9
  %174 = load i64, ptr %9, align 8, !tbaa !9
  %175 = icmp eq i64 %173, %174
  br i1 %175, label %176, label %211

176:                                              ; preds = %172
  %177 = load i64, ptr %27, align 8, !tbaa !9
  %178 = load i64, ptr %11, align 8, !tbaa !9
  %179 = icmp eq i64 %177, %178
  br i1 %179, label %180, label %211

180:                                              ; preds = %176
  %181 = load ptr, ptr %10, align 8, !tbaa !5
  %182 = load ptr, ptr %29, align 8, !tbaa !5
  %183 = load i64, ptr %11, align 8, !tbaa !9
  %184 = mul i64 %183, 2
  %185 = call i32 @memcmp(ptr noundef %181, ptr noundef %182, i64 noundef %184) #9
  %186 = icmp eq i32 %185, 0
  br i1 %186, label %187, label %211

187:                                              ; preds = %180
  %188 = load ptr, ptr %8, align 8, !tbaa !5
  %189 = icmp eq ptr %188, null
  br i1 %189, label %190, label %196

190:                                              ; preds = %187
  %191 = load ptr, ptr %28, align 8, !tbaa !5
  %192 = icmp eq ptr %191, null
  br i1 %192, label %193, label %195

193:                                              ; preds = %190
  %194 = load i64, ptr %25, align 8, !tbaa !9
  store i64 %194, ptr %6, align 8
  store i32 1, ptr %20, align 4
  br label %212

195:                                              ; preds = %190
  br label %210

196:                                              ; preds = %187
  %197 = load ptr, ptr %28, align 8, !tbaa !5
  %198 = icmp ne ptr %197, null
  br i1 %198, label %199, label %209

199:                                              ; preds = %196
  %200 = load ptr, ptr %8, align 8, !tbaa !5
  %201 = load ptr, ptr %28, align 8, !tbaa !5
  %202 = load i64, ptr %9, align 8, !tbaa !9
  %203 = mul i64 %202, 2
  %204 = call i32 @memcmp(ptr noundef %200, ptr noundef %201, i64 noundef %203) #9
  %205 = icmp eq i32 %204, 0
  br i1 %205, label %206, label %208

206:                                              ; preds = %199
  %207 = load i64, ptr %25, align 8, !tbaa !9
  store i64 %207, ptr %6, align 8
  store i32 1, ptr %20, align 4
  br label %212

208:                                              ; preds = %199
  br label %209

209:                                              ; preds = %208, %196
  br label %210

210:                                              ; preds = %209, %195
  br label %211

211:                                              ; preds = %210, %180, %176, %172, %165
  store i32 0, ptr %20, align 4
  br label %212

212:                                              ; preds = %211, %206, %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  %213 = load i32, ptr %20, align 4
  switch i32 %213, label %218 [
    i32 0, label %214
  ]

214:                                              ; preds = %212
  br label %215

215:                                              ; preds = %214
  %216 = load i64, ptr %25, align 8, !tbaa !9
  %217 = add i64 %216, 1
  store i64 %217, ptr %25, align 8, !tbaa !9
  br label %160, !llvm.loop !18

218:                                              ; preds = %212, %164
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  %219 = load i32, ptr %20, align 4
  switch i32 %219, label %222 [
    i32 5, label %220
  ]

220:                                              ; preds = %218
  br label %221

221:                                              ; preds = %220, %156
  store i32 0, ptr %20, align 4
  br label %222

222:                                              ; preds = %221, %218, %154
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  %223 = load i32, ptr %20, align 4
  switch i32 %223, label %233 [
    i32 0, label %224
    i32 1, label %226
  ]

224:                                              ; preds = %222
  br label %225

225:                                              ; preds = %224, %5
  store i64 -2, ptr %6, align 8
  br label %226

226:                                              ; preds = %225, %222, %37
  %227 = load i64, ptr %6, align 8
  ret i64 %227

228:                                              ; preds = %158
  %229 = load ptr, ptr %15, align 8
  %230 = load i32, ptr %16, align 4
  %231 = insertvalue { ptr, i32 } poison, ptr %229, 0
  %232 = insertvalue { ptr, i32 } %231, i32 %230, 1
  resume { ptr, i32 } %232

233:                                              ; preds = %222
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN7android7String8aSERKS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #7 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTSN7android12ResXMLParserE", !6, i64 0, !13, i64 8, !6, i64 16, !6, i64 24, !14, i64 32}
!13 = !{!"_ZTSN7android12ResXMLParser12event_code_tE", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!12, !6, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.android::String8" = type { ptr }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare void @_ZN7android7String8C1EPKDsm(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef, i64 noundef) unnamed_addr #1

declare void @_ZN7android7String8C1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7android7String86stringEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: nounwind
declare void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK7android13ResStringPool6isUTF8Ev(ptr noundef nonnull align 8 dereferenceable(132)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK7android12ResXMLParser17getAttributeCountEv(ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7android12ResXMLParser21getAttributeNamespaceEmPm(ptr noundef nonnull align 8 dereferenceable(36), i64 noundef, ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7android12ResXMLParser22getAttributeNamespace8EmPm(ptr noundef nonnull align 8 dereferenceable(36), i64 noundef, ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7android12ResXMLParser16getAttributeNameEmPm(ptr noundef nonnull align 8 dereferenceable(36), i64 noundef, ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK7android12ResXMLParser17getAttributeName8EmPm(ptr noundef nonnull align 8 dereferenceable(36), i64 noundef, ptr noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZNK7android12ResXMLParser16indexOfAttributeEPKDsmS2_m(ptr noundef nonnull align 8 dereferenceable(36) %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.android::String8", align 8
  %7 = alloca %"class.android::String8", align 8
  %8 = alloca %"class.android::String8", align 8
  %9 = alloca %"class.android::String8", align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !5
  %16 = icmp ne i32 %15, 258
  %17 = icmp eq ptr %3, null
  %or.cond147 = or i1 %16, %17
  br i1 %or.cond147, label %.thread116, label %18

18:                                               ; preds = %5
  %19 = tail call noundef i64 @_ZNK7android12ResXMLParser17getAttributeCountEv(ptr noundef nonnull align 8 dereferenceable(36) %0)
  %20 = load ptr, ptr %0, align 8, !tbaa !12
  %21 = getelementptr inbounds i8, ptr %20, i64 96
  %22 = tail call noundef zeroext i1 @_ZNK7android13ResStringPool6isUTF8Ev(ptr noundef nonnull align 8 dereferenceable(132) %21)
  br i1 %22, label %37, label %.preheader

.preheader:                                       ; preds = %18
  %.not85129.not = icmp eq i64 %19, 0
  br i1 %.not85129.not, label %.thread116, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %23 = shl i64 %4, 1
  %24 = icmp eq ptr %1, null
  %25 = shl i64 %2, 1
  br i1 %24, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %35
  %.060130.us = phi i64 [ %36, %35 ], [ 0, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  store i64 0, ptr %12, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  store i64 0, ptr %13, align 8, !tbaa !13
  %26 = call noundef ptr @_ZNK7android12ResXMLParser21getAttributeNamespaceEmPm(ptr noundef nonnull align 8 dereferenceable(36) %0, i64 noundef %.060130.us, ptr noundef nonnull %12)
  %27 = call noundef ptr @_ZNK7android12ResXMLParser16getAttributeNameEmPm(ptr noundef nonnull align 8 dereferenceable(36) %0, i64 noundef %.060130.us, ptr noundef nonnull %13)
  %.not.us = icmp ne ptr %27, null
  %28 = load i64, ptr %12, align 8
  %29 = icmp eq i64 %28, %2
  %or.cond103.us = select i1 %.not.us, i1 %29, i1 false
  %30 = load i64, ptr %13, align 8
  %31 = icmp eq i64 %30, %4
  %or.cond105.us = select i1 %or.cond103.us, i1 %31, i1 false
  br i1 %or.cond105.us, label %32, label %35

32:                                               ; preds = %.lr.ph.split.us
  %bcmp.us = call i32 @bcmp(ptr nonnull %3, ptr nonnull %27, i64 %23)
  %33 = icmp eq i32 %bcmp.us, 0
  %34 = icmp eq ptr %26, null
  %or.cond143 = and i1 %33, %34
  br i1 %or.cond143, label %.thread120, label %35

35:                                               ; preds = %32, %.lr.ph.split.us
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  %36 = add nuw i64 %.060130.us, 1
  %exitcond160.not = icmp eq i64 %36, %19
  br i1 %exitcond160.not, label %.thread116, label %.lr.ph.split.us, !llvm.loop !15

37:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @_ZN7android7String8C1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  invoke void @_ZN7android7String8C1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %38 unwind label %43

38:                                               ; preds = %37
  %.not86 = icmp eq ptr %1, null
  br i1 %.not86, label %50, label %39

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  invoke void @_ZN7android7String8C1EPKDsm(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull %1, i64 noundef %2)
          to label %40 unwind label %45

40:                                               ; preds = %39
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7android7String8aSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %42 unwind label %47

42:                                               ; preds = %40
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %50

43:                                               ; preds = %37
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %95

45:                                               ; preds = %39
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %49

47:                                               ; preds = %40
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br label %49

49:                                               ; preds = %47, %45
  %.pn = phi { ptr, i32 } [ %48, %47 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br label %94

50:                                               ; preds = %42, %38
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  invoke void @_ZN7android7String8C1EPKDsm(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull %3, i64 noundef %4)
          to label %51 unwind label %70

51:                                               ; preds = %50
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7android7String8aSERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %53 unwind label %72

53:                                               ; preds = %51
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  %.not98.not132.not = icmp eq i64 %19, 0
  br i1 %.not98.not132.not, label %.thread116.critedge, label %.lr.ph134

.lr.ph134:                                        ; preds = %53
  br i1 %.not86, label %.lr.ph134.split.us, label %.lr.ph134.split

.lr.ph134.split.us:                               ; preds = %.lr.ph134, %66
  %.066133.us = phi i64 [ %67, %66 ], [ 0, %.lr.ph134 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  store i64 0, ptr %10, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  store i64 0, ptr %11, align 8, !tbaa !13
  %54 = invoke noundef ptr @_ZNK7android12ResXMLParser22getAttributeNamespace8EmPm(ptr noundef nonnull align 8 dereferenceable(36) %0, i64 noundef %.066133.us, ptr noundef nonnull %10)
          to label %55 unwind label %.split.us

55:                                               ; preds = %.lr.ph134.split.us
  %56 = invoke noundef ptr @_ZNK7android12ResXMLParser17getAttributeName8EmPm(ptr noundef nonnull align 8 dereferenceable(36) %0, i64 noundef %.066133.us, ptr noundef nonnull %11)
          to label %57 unwind label %.split137.us

57:                                               ; preds = %55
  %.not94.us = icmp ne ptr %56, null
  %58 = load i64, ptr %10, align 8
  %59 = icmp eq i64 %58, %2
  %or.cond.us = select i1 %.not94.us, i1 %59, i1 false
  %60 = load i64, ptr %11, align 8
  %61 = icmp eq i64 %60, %4
  %or.cond101.us = select i1 %or.cond.us, i1 %61, i1 false
  br i1 %or.cond101.us, label %62, label %66

62:                                               ; preds = %57
  %63 = call noundef ptr @_ZNK7android7String86stringEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %bcmp95.us = call i32 @bcmp(ptr %63, ptr nonnull %56, i64 %4)
  %64 = icmp eq i32 %bcmp95.us, 0
  %65 = icmp eq ptr %54, null
  %or.cond144 = and i1 %64, %65
  br i1 %or.cond144, label %.thread, label %66

66:                                               ; preds = %62, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  %67 = add nuw i64 %.066133.us, 1
  %exitcond162.not = icmp eq i64 %67, %19
  br i1 %exitcond162.not, label %.thread116.critedge, label %.lr.ph134.split.us, !llvm.loop !17

.split.us:                                        ; preds = %.lr.ph134.split.us
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %93

.split137.us:                                     ; preds = %55
  %69 = landingpad { ptr, i32 }
          cleanup
  br label %93

70:                                               ; preds = %50
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %74

72:                                               ; preds = %51
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  br label %74

74:                                               ; preds = %72, %70
  %.pn88 = phi { ptr, i32 } [ %73, %72 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %94

.lr.ph134.split:                                  ; preds = %.lr.ph134, %91
  %.066133 = phi i64 [ %92, %91 ], [ 0, %.lr.ph134 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  store i64 0, ptr %10, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  store i64 0, ptr %11, align 8, !tbaa !13
  %75 = invoke noundef ptr @_ZNK7android12ResXMLParser22getAttributeNamespace8EmPm(ptr noundef nonnull align 8 dereferenceable(36) %0, i64 noundef %.066133, ptr noundef nonnull %10)
          to label %76 unwind label %.split

76:                                               ; preds = %.lr.ph134.split
  %77 = invoke noundef ptr @_ZNK7android12ResXMLParser17getAttributeName8EmPm(ptr noundef nonnull align 8 dereferenceable(36) %0, i64 noundef %.066133, ptr noundef nonnull %11)
          to label %78 unwind label %.split137

78:                                               ; preds = %76
  %.not94 = icmp ne ptr %77, null
  %79 = load i64, ptr %10, align 8
  %80 = icmp eq i64 %79, %2
  %or.cond = select i1 %.not94, i1 %80, i1 false
  %81 = load i64, ptr %11, align 8
  %82 = icmp eq i64 %81, %4
  %or.cond101 = select i1 %or.cond, i1 %82, i1 false
  br i1 %or.cond101, label %83, label %91

83:                                               ; preds = %78
  %84 = call noundef ptr @_ZNK7android7String86stringEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %bcmp95 = call i32 @bcmp(ptr %84, ptr nonnull %77, i64 %4)
  %85 = icmp ne i32 %bcmp95, 0
  %.not96 = icmp eq ptr %75, null
  %or.cond145 = or i1 %85, %.not96
  br i1 %or.cond145, label %91, label %88

.split:                                           ; preds = %.lr.ph134.split
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %93

.split137:                                        ; preds = %76
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %93

88:                                               ; preds = %83
  %89 = call noundef ptr @_ZNK7android7String86stringEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %bcmp97 = call i32 @bcmp(ptr %89, ptr nonnull %75, i64 %2)
  %90 = icmp eq i32 %bcmp97, 0
  br i1 %90, label %.thread, label %91

.thread:                                          ; preds = %88, %62
  %.us-phi139 = phi i64 [ %.066133.us, %62 ], [ %.066133, %88 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %.thread116

91:                                               ; preds = %88, %83, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  %92 = add nuw i64 %.066133, 1
  %exitcond161.not = icmp eq i64 %92, %19
  br i1 %exitcond161.not, label %.thread116.critedge, label %.lr.ph134.split, !llvm.loop !17

93:                                               ; preds = %.split137, %.split137.us, %.split, %.split.us
  %.pn90 = phi { ptr, i32 } [ %86, %.split ], [ %68, %.split.us ], [ %87, %.split137 ], [ %69, %.split137.us ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %94

94:                                               ; preds = %93, %74, %49
  %.pn90.pn = phi { ptr, i32 } [ %.pn90, %93 ], [ %.pn88, %74 ], [ %.pn, %49 ]
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  br label %95

95:                                               ; preds = %94, %43
  %.pn90.pn.pn = phi { ptr, i32 } [ %.pn90.pn, %94 ], [ %44, %43 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  resume { ptr, i32 } %.pn90.pn.pn

.lr.ph.split:                                     ; preds = %.lr.ph, %106
  %.060130 = phi i64 [ %107, %106 ], [ 0, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #8
  store i64 0, ptr %12, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  store i64 0, ptr %13, align 8, !tbaa !13
  %96 = call noundef ptr @_ZNK7android12ResXMLParser21getAttributeNamespaceEmPm(ptr noundef nonnull align 8 dereferenceable(36) %0, i64 noundef %.060130, ptr noundef nonnull %12)
  %97 = call noundef ptr @_ZNK7android12ResXMLParser16getAttributeNameEmPm(ptr noundef nonnull align 8 dereferenceable(36) %0, i64 noundef %.060130, ptr noundef nonnull %13)
  %.not = icmp ne ptr %97, null
  %98 = load i64, ptr %12, align 8
  %99 = icmp eq i64 %98, %2
  %or.cond103 = select i1 %.not, i1 %99, i1 false
  %100 = load i64, ptr %13, align 8
  %101 = icmp eq i64 %100, %4
  %or.cond105 = select i1 %or.cond103, i1 %101, i1 false
  br i1 %or.cond105, label %102, label %106

102:                                              ; preds = %.lr.ph.split
  %bcmp = call i32 @bcmp(ptr nonnull %3, ptr nonnull %97, i64 %23)
  %103 = icmp ne i32 %bcmp, 0
  %.not83 = icmp eq ptr %96, null
  %or.cond146 = or i1 %103, %.not83
  br i1 %or.cond146, label %106, label %104

104:                                              ; preds = %102
  %bcmp84 = call i32 @bcmp(ptr nonnull %1, ptr nonnull %96, i64 %25)
  %105 = icmp eq i32 %bcmp84, 0
  br i1 %105, label %.thread120, label %106

.thread120:                                       ; preds = %104, %32
  %.us-phi = phi i64 [ %.060130.us, %32 ], [ %.060130, %104 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  br label %.thread116

106:                                              ; preds = %104, %102, %.lr.ph.split
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #8
  %107 = add nuw i64 %.060130, 1
  %exitcond.not = icmp eq i64 %107, %19
  br i1 %exitcond.not, label %.thread116, label %.lr.ph.split, !llvm.loop !15

.thread116.critedge:                              ; preds = %91, %66, %53
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  call void @_ZN7android7String8D1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  br label %.thread116

.thread116:                                       ; preds = %106, %35, %5, %.thread116.critedge, %.preheader, %.thread, %.thread120
  %.8 = phi i64 [ %.us-phi, %.thread120 ], [ %.us-phi139, %.thread ], [ -2, %.preheader ], [ -2, %.thread116.critedge ], [ -2, %5 ], [ -2, %35 ], [ -2, %106 ]
  ret i64 %.8
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN7android7String8aSERKS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6 align 2

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nofree nounwind willreturn memory(argmem: read) }
attributes #8 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 8}
!6 = !{!"_ZTSN7android12ResXMLParserE", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !11, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN7android12ResXMLParser12event_code_tE", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!6, !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass