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

; 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::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 }
%"struct.android::ResXMLTree_header" = type { %"struct.android::ResChunk_header" }
%"struct.android::ResChunk_header" = type { i16, i16, i32 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [43 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7android13ResStringPool5setToEPKvmb(ptr noundef nonnull align 8 dereferenceable(132), ptr noundef, i64 noundef, i1 noundef zeroext) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7android13ResStringPool6uninitEv(ptr noundef nonnull align 8 dereferenceable(132)) #1 align 2

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN7androidL14validate_chunkEPKNS_15ResChunk_headerEmPKhPKc(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7android13ResStringPool8getErrorEv(ptr noundef nonnull align 8 dereferenceable(132)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7android12ResXMLParser7restartEv(ptr noundef nonnull align 8 dereferenceable(36)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7android12ResXMLParser8nextNodeEv(ptr noundef nonnull align 8 dereferenceable(36)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7android10ResXMLTree12validateNodeEPKNS_15ResXMLTree_nodeE(ptr noundef nonnull align 8 dereferenceable(268), ptr noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7android10ResXMLTree6uninitEv(ptr noundef nonnull align 8 dereferenceable(268)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7android10ResXMLTree5setToEPKvmb(ptr noundef nonnull align 8 dereferenceable(268) %0, ptr noundef %1, i64 noundef %2, i1 noundef zeroext %3) #0 align 2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i16, align 2
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  %16 = zext i1 %3 to i8
  store i8 %16, ptr %9, align 1, !tbaa !11
  %17 = load ptr, ptr %6, align 8
  call void @_ZN7android10ResXMLTree6uninitEv(ptr noundef nonnull align 8 dereferenceable(268) %17)
  %18 = getelementptr inbounds %"class.android::ResXMLParser", ptr %17, i32 0, i32 1
  store i32 0, ptr %18, align 8, !tbaa !13
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %24

21:                                               ; preds = %4
  %22 = load i64, ptr %8, align 8, !tbaa !9
  %23 = icmp ne i64 %22, 0
  br i1 %23, label %26, label %24

24:                                               ; preds = %21, %4
  %25 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 3
  store i32 -2147483647, ptr %25, align 8, !tbaa !17
  store i32 -2147483647, ptr %5, align 4
  br label %251

26:                                               ; preds = %21
  %27 = load i8, ptr %9, align 1, !tbaa !11, !range !25, !noundef !26
  %28 = trunc i8 %27 to i1
  br i1 %28, label %29, label %45

29:                                               ; preds = %26
  %30 = load i64, ptr %8, align 8, !tbaa !9
  %31 = call noalias ptr @malloc(i64 noundef %30) #6
  %32 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 5
  store ptr %31, ptr %32, align 8, !tbaa !27
  %33 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 5
  %34 = load ptr, ptr %33, align 8, !tbaa !27
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %38

36:                                               ; preds = %29
  %37 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 3
  store i32 -12, ptr %37, align 8, !tbaa !17
  store i32 -12, ptr %5, align 4
  br label %251

38:                                               ; preds = %29
  %39 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 5
  %40 = load ptr, ptr %39, align 8, !tbaa !27
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = load i64, ptr %8, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %40, ptr align 1 %41, i64 %42, i1 false)
  %43 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 5
  %44 = load ptr, ptr %43, align 8, !tbaa !27
  store ptr %44, ptr %7, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %38, %26
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 6
  store ptr %46, ptr %47, align 8, !tbaa !28
  %48 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 6
  %49 = load ptr, ptr %48, align 8, !tbaa !28
  %50 = getelementptr inbounds %"struct.android::ResXMLTree_header", ptr %49, i32 0, i32 0
  %51 = getelementptr inbounds %"struct.android::ResChunk_header", ptr %50, i32 0, i32 2
  %52 = load i32, ptr %51, align 4, !tbaa !29
  %53 = zext i32 %52 to i64
  %54 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 7
  store i64 %53, ptr %54, align 8, !tbaa !33
  %55 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 6
  %56 = load ptr, ptr %55, align 8, !tbaa !28
  %57 = getelementptr inbounds %"struct.android::ResXMLTree_header", ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds %"struct.android::ResChunk_header", ptr %57, i32 0, i32 1
  %59 = load i16, ptr %58, align 2, !tbaa !34
  %60 = zext i16 %59 to i64
  %61 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 7
  %62 = load i64, ptr %61, align 8, !tbaa !33
  %63 = icmp ugt i64 %60, %62
  br i1 %63, label %69, label %64

64:                                               ; preds = %45
  %65 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 7
  %66 = load i64, ptr %65, align 8, !tbaa !33
  %67 = load i64, ptr %8, align 8, !tbaa !9
  %68 = icmp ugt i64 %66, %67
  br i1 %68, label %69, label %94

69:                                               ; preds = %64, %45
  br label %70

70:                                               ; preds = %69
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef @.str) #7
  %73 = load ptr, ptr @stderr, align 8, !tbaa !5
  %74 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 6
  %75 = load ptr, ptr %74, align 8, !tbaa !28
  %76 = getelementptr inbounds %"struct.android::ResXMLTree_header", ptr %75, i32 0, i32 0
  %77 = getelementptr inbounds %"struct.android::ResChunk_header", ptr %76, i32 0, i32 1
  %78 = load i16, ptr %77, align 2, !tbaa !34
  %79 = zext i16 %78 to i32
  %80 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 6
  %81 = load ptr, ptr %80, align 8, !tbaa !28
  %82 = getelementptr inbounds %"struct.android::ResXMLTree_header", ptr %81, i32 0, i32 0
  %83 = getelementptr inbounds %"struct.android::ResChunk_header", ptr %82, i32 0, i32 2
  %84 = load i32, ptr %83, align 4, !tbaa !29
  %85 = load i64, ptr %8, align 8, !tbaa !9
  %86 = trunc i64 %85 to i32
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %73, ptr noundef @.str.28, i32 noundef %79, i32 noundef %84, i32 noundef %86) #7
  %88 = load ptr, ptr @stderr, align 8, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef @.str.2) #7
  br label %90

90:                                               ; preds = %70
  %91 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 3
  store i32 -2147483647, ptr %91, align 8, !tbaa !17
  call void @_ZN7android12ResXMLParser7restartEv(ptr noundef nonnull align 8 dereferenceable(36) %17)
  %92 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 3
  %93 = load i32, ptr %92, align 8, !tbaa !17
  store i32 %93, ptr %5, align 4
  br label %251

94:                                               ; preds = %64
  %95 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 6
  %96 = load ptr, ptr %95, align 8, !tbaa !28
  %97 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 7
  %98 = load i64, ptr %97, align 8, !tbaa !33
  %99 = getelementptr inbounds i8, ptr %96, i64 %98
  %100 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 8
  store ptr %99, ptr %100, align 8, !tbaa !35
  %101 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 9
  call void @_ZN7android13ResStringPool6uninitEv(ptr noundef nonnull align 8 dereferenceable(132) %101)
  %102 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 12
  store ptr null, ptr %102, align 8, !tbaa !36
  %103 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 10
  store ptr null, ptr %103, align 8, !tbaa !37
  %104 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 11
  store i64 0, ptr %104, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %105 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 6
  %106 = load ptr, ptr %105, align 8, !tbaa !28
  %107 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 6
  %108 = load ptr, ptr %107, align 8, !tbaa !28
  %109 = getelementptr inbounds %"struct.android::ResXMLTree_header", ptr %108, i32 0, i32 0
  %110 = getelementptr inbounds %"struct.android::ResChunk_header", ptr %109, i32 0, i32 1
  %111 = load i16, ptr %110, align 2, !tbaa !34
  %112 = zext i16 %111 to i32
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i8, ptr %106, i64 %113
  store ptr %114, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %115 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %115, ptr %11, align 8, !tbaa !5
  br label %116

116:                                              ; preds = %227, %94
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 8
  %119 = load ptr, ptr %118, align 8, !tbaa !35
  %120 = getelementptr inbounds i8, ptr %119, i64 -8
  %121 = icmp ult ptr %117, %120
  br i1 %121, label %122, label %133

122:                                              ; preds = %116
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 8
  %125 = load ptr, ptr %124, align 8, !tbaa !35
  %126 = load ptr, ptr %10, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.android::ResChunk_header", ptr %126, i32 0, i32 2
  %128 = load i32, ptr %127, align 4, !tbaa !39
  %129 = zext i32 %128 to i64
  %130 = sub i64 0, %129
  %131 = getelementptr inbounds i8, ptr %125, i64 %130
  %132 = icmp ult ptr %123, %131
  br label %133

133:                                              ; preds = %122, %116
  %134 = phi i1 [ false, %116 ], [ %132, %122 ]
  br i1 %134, label %135, label %228

135:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 8
  %138 = load ptr, ptr %137, align 8, !tbaa !35
  %139 = call noundef i32 @_ZN7androidL14validate_chunkEPKNS_15ResChunk_headerEmPKhPKc(ptr noundef %136, i64 noundef 8, ptr noundef %138, ptr noundef @.str.29)
  store i32 %139, ptr %12, align 4, !tbaa !40
  %140 = load i32, ptr %12, align 4, !tbaa !40
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %145

142:                                              ; preds = %135
  %143 = load i32, ptr %12, align 4, !tbaa !40
  %144 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 3
  store i32 %143, ptr %144, align 8, !tbaa !17
  store i32 6, ptr %15, align 4
  br label %225

145:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #7
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.android::ResChunk_header", ptr %146, i32 0, i32 0
  %148 = load i16, ptr %147, align 4, !tbaa !41
  store i16 %148, ptr %13, align 2, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %149 = load ptr, ptr %10, align 8, !tbaa !5
  %150 = getelementptr inbounds %"struct.android::ResChunk_header", ptr %149, i32 0, i32 2
  %151 = load i32, ptr %150, align 4, !tbaa !39
  %152 = zext i32 %151 to i64
  store i64 %152, ptr %14, align 8, !tbaa !9
  %153 = load i16, ptr %13, align 2, !tbaa !42
  %154 = zext i16 %153 to i32
  %155 = icmp eq i32 %154, 1
  br i1 %155, label %156, label %161

156:                                              ; preds = %145
  %157 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 9
  %158 = load ptr, ptr %10, align 8, !tbaa !5
  %159 = load i64, ptr %14, align 8, !tbaa !9
  %160 = call noundef i32 @_ZN7android13ResStringPool5setToEPKvmb(ptr noundef nonnull align 8 dereferenceable(132) %157, ptr noundef %158, i64 noundef %159, i1 noundef zeroext false)
  br label %219

161:                                              ; preds = %145
  %162 = load i16, ptr %13, align 2, !tbaa !42
  %163 = zext i16 %162 to i32
  %164 = icmp eq i32 %163, 384
  br i1 %164, label %165, label %185

165:                                              ; preds = %161
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  %167 = load ptr, ptr %10, align 8, !tbaa !5
  %168 = getelementptr inbounds %"struct.android::ResChunk_header", ptr %167, i32 0, i32 1
  %169 = load i16, ptr %168, align 2, !tbaa !43
  %170 = zext i16 %169 to i32
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds i8, ptr %166, i64 %171
  %173 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 10
  store ptr %172, ptr %173, align 8, !tbaa !37
  %174 = load ptr, ptr %10, align 8, !tbaa !5
  %175 = getelementptr inbounds %"struct.android::ResChunk_header", ptr %174, i32 0, i32 2
  %176 = load i32, ptr %175, align 4, !tbaa !39
  %177 = load ptr, ptr %10, align 8, !tbaa !5
  %178 = getelementptr inbounds %"struct.android::ResChunk_header", ptr %177, i32 0, i32 1
  %179 = load i16, ptr %178, align 2, !tbaa !43
  %180 = zext i16 %179 to i32
  %181 = sub i32 %176, %180
  %182 = zext i32 %181 to i64
  %183 = udiv i64 %182, 4
  %184 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 11
  store i64 %183, ptr %184, align 8, !tbaa !38
  br label %218

185:                                              ; preds = %161
  %186 = load i16, ptr %13, align 2, !tbaa !42
  %187 = zext i16 %186 to i32
  %188 = icmp sge i32 %187, 256
  br i1 %188, label %189, label %216

189:                                              ; preds = %185
  %190 = load i16, ptr %13, align 2, !tbaa !42
  %191 = zext i16 %190 to i32
  %192 = icmp sle i32 %191, 383
  br i1 %192, label %193, label %216

193:                                              ; preds = %189
  %194 = load ptr, ptr %10, align 8, !tbaa !5
  %195 = call noundef i32 @_ZNK7android10ResXMLTree12validateNodeEPKNS_15ResXMLTree_nodeE(ptr noundef nonnull align 8 dereferenceable(268) %17, ptr noundef %194)
  %196 = icmp ne i32 %195, 0
  br i1 %196, label %197, label %199

197:                                              ; preds = %193
  %198 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 3
  store i32 -2147483647, ptr %198, align 8, !tbaa !17
  store i32 6, ptr %15, align 4
  br label %224

199:                                              ; preds = %193
  %200 = load ptr, ptr %11, align 8, !tbaa !5
  %201 = getelementptr inbounds %"class.android::ResXMLParser", ptr %17, i32 0, i32 3
  store ptr %200, ptr %201, align 8, !tbaa !44
  %202 = call noundef i32 @_ZN7android12ResXMLParser8nextNodeEv(ptr noundef nonnull align 8 dereferenceable(36) %17)
  %203 = icmp eq i32 %202, -1
  br i1 %203, label %204, label %206

204:                                              ; preds = %199
  %205 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 3
  store i32 -2147483647, ptr %205, align 8, !tbaa !17
  store i32 6, ptr %15, align 4
  br label %224

206:                                              ; preds = %199
  %207 = getelementptr inbounds %"class.android::ResXMLParser", ptr %17, i32 0, i32 3
  %208 = load ptr, ptr %207, align 8, !tbaa !44
  %209 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 12
  store ptr %208, ptr %209, align 8, !tbaa !36
  %210 = getelementptr inbounds %"class.android::ResXMLParser", ptr %17, i32 0, i32 4
  %211 = load ptr, ptr %210, align 8, !tbaa !45
  %212 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 13
  store ptr %211, ptr %212, align 8, !tbaa !46
  %213 = getelementptr inbounds %"class.android::ResXMLParser", ptr %17, i32 0, i32 1
  %214 = load i32, ptr %213, align 8, !tbaa !13
  %215 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 14
  store i32 %214, ptr %215, align 8, !tbaa !47
  store i32 5, ptr %15, align 4
  br label %224

216:                                              ; preds = %189, %185
  br label %217

217:                                              ; preds = %216
  br label %218

218:                                              ; preds = %217, %165
  br label %219

219:                                              ; preds = %218, %156
  %220 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %220, ptr %11, align 8, !tbaa !5
  %221 = load ptr, ptr %10, align 8, !tbaa !5
  %222 = load i64, ptr %14, align 8, !tbaa !9
  %223 = getelementptr inbounds i8, ptr %221, i64 %222
  store ptr %223, ptr %10, align 8, !tbaa !5
  store i32 0, ptr %15, align 4
  br label %224

224:                                              ; preds = %219, %206, %204, %197
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #7
  br label %225

225:                                              ; preds = %224, %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  %226 = load i32, ptr %15, align 4
  switch i32 %226, label %250 [
    i32 0, label %227
    i32 5, label %228
    i32 6, label %247
  ]

227:                                              ; preds = %225
  br label %116, !llvm.loop !48

228:                                              ; preds = %225, %133
  %229 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 12
  %230 = load ptr, ptr %229, align 8, !tbaa !36
  %231 = icmp eq ptr %230, null
  br i1 %231, label %232, label %243

232:                                              ; preds = %228
  br label %233

233:                                              ; preds = %232
  %234 = load ptr, ptr @stderr, align 8, !tbaa !5
  %235 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %234, ptr noundef @.str) #7
  %236 = load ptr, ptr @stderr, align 8, !tbaa !5
  %237 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %236, ptr noundef @.str.30) #7
  %238 = load ptr, ptr @stderr, align 8, !tbaa !5
  %239 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %238, ptr noundef @.str.2) #7
  br label %240

240:                                              ; preds = %233
  br label %241

241:                                              ; preds = %240
  %242 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 3
  store i32 -2147483647, ptr %242, align 8, !tbaa !17
  br label %247

243:                                              ; preds = %228
  %244 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 9
  %245 = call noundef i32 @_ZNK7android13ResStringPool8getErrorEv(ptr noundef nonnull align 8 dereferenceable(132) %244)
  %246 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 3
  store i32 %245, ptr %246, align 8, !tbaa !17
  br label %247

247:                                              ; preds = %243, %241, %225
  call void @_ZN7android12ResXMLParser7restartEv(ptr noundef nonnull align 8 dereferenceable(36) %17)
  %248 = getelementptr inbounds %"class.android::ResXMLTree", ptr %17, i32 0, i32 3
  %249 = load i32, ptr %248, align 8, !tbaa !17
  store i32 %249, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %250

250:                                              ; preds = %247, %225
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %251

251:                                              ; preds = %250, %90, %36, %24
  %252 = load i32, ptr %5, align 4
  ret i32 %252
}

attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind allocsize(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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { 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, !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, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !15, i64 8}
!14 = !{!"_ZTSN7android12ResXMLParserE", !6, i64 0, !15, i64 8, !6, i64 16, !6, i64 24, !16, i64 32}
!15 = !{!"_ZTSN7android12ResXMLParser12event_code_tE", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !16, i64 56}
!18 = !{!"_ZTSN7android10ResXMLTreeE", !14, i64 0, !19, i64 40, !16, i64 56, !6, i64 64, !6, i64 72, !10, i64 80, !6, i64 88, !22, i64 96, !6, i64 232, !10, i64 240, !6, i64 248, !6, i64 256, !15, i64 264}
!19 = !{!"_ZTSSt10shared_ptrIKN7android15DynamicRefTableEE", !20, i64 0}
!20 = !{!"_ZTSSt12__shared_ptrIKN7android15DynamicRefTableELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !21, i64 8}
!21 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!22 = !{!"_ZTSN7android13ResStringPoolE", !16, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !23, i64 40, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !16, i64 112, !6, i64 120, !16, i64 128}
!23 = !{!"_ZTSSt5mutex", !24, i64 0}
!24 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!18, !6, i64 64}
!28 = !{!18, !6, i64 72}
!29 = !{!30, !16, i64 4}
!30 = !{!"_ZTSN7android17ResXMLTree_headerE", !31, i64 0}
!31 = !{!"_ZTSN7android15ResChunk_headerE", !32, i64 0, !32, i64 2, !16, i64 4}
!32 = !{!"short", !7, i64 0}
!33 = !{!18, !10, i64 80}
!34 = !{!30, !32, i64 2}
!35 = !{!18, !6, i64 88}
!36 = !{!18, !6, i64 248}
!37 = !{!18, !6, i64 232}
!38 = !{!18, !10, i64 240}
!39 = !{!31, !16, i64 4}
!40 = !{!16, !16, i64 0}
!41 = !{!31, !32, i64 0}
!42 = !{!32, !32, i64 0}
!43 = !{!31, !32, i64 2}
!44 = !{!14, !6, i64 16}
!45 = !{!14, !6, i64 24}
!46 = !{!18, !6, i64 256}
!47 = !{!18, !15, i64 264}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.mustprogress"}


; 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"

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [76 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [43 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7android13ResStringPool5setToEPKvmb(ptr noundef nonnull align 8 dereferenceable(132), ptr noundef, i64 noundef, i1 noundef zeroext) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7android13ResStringPool6uninitEv(ptr noundef nonnull align 8 dereferenceable(132)) local_unnamed_addr #1 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZN7androidL14validate_chunkEPKNS_15ResChunk_headerEmPKhPKc(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7android13ResStringPool8getErrorEv(ptr noundef nonnull align 8 dereferenceable(132)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7android12ResXMLParser7restartEv(ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7android12ResXMLParser8nextNodeEv(ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK7android10ResXMLTree12validateNodeEPKNS_15ResXMLTree_nodeE(ptr noundef nonnull align 8 dereferenceable(268), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7android10ResXMLTree6uninitEv(ptr noundef nonnull align 8 dereferenceable(268)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7android10ResXMLTree5setToEPKvmb(ptr noundef nonnull align 8 dereferenceable(268) %0, ptr noundef %1, i64 noundef %2, i1 noundef zeroext %3) local_unnamed_addr #0 align 2 {
  tail call void @_ZN7android10ResXMLTree6uninitEv(ptr noundef nonnull align 8 dereferenceable(268) %0)
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 0, ptr %5, align 8, !tbaa !5
  %6 = icmp ne ptr %1, null
  %7 = icmp ne i64 %2, 0
  %or.cond = and i1 %6, %7
  br i1 %or.cond, label %10, label %8

8:                                                ; preds = %4
  %9 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 -2147483647, ptr %9, align 8, !tbaa !12
  br label %116

10:                                               ; preds = %4
  br i1 %3, label %11, label %18

11:                                               ; preds = %10
  %12 = tail call noalias ptr @malloc(i64 noundef %2) #6
  %13 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %12, ptr %13, align 8, !tbaa !21
  %14 = icmp eq ptr %12, null
  br i1 %14, label %15, label %17

15:                                               ; preds = %11
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 -12, ptr %16, align 8, !tbaa !12
  br label %116

17:                                               ; preds = %11
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %12, ptr nonnull align 1 %1, i64 %2, i1 false)
  br label %18

18:                                               ; preds = %17, %10
  %.041 = phi ptr [ %12, %17 ], [ %1, %10 ]
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr %.041, ptr %19, align 8, !tbaa !22
  %20 = getelementptr inbounds i8, ptr %.041, i64 4
  %21 = load i32, ptr %20, align 4, !tbaa !23
  %22 = zext i32 %21 to i64
  %23 = getelementptr inbounds i8, ptr %0, i64 80
  store i64 %22, ptr %23, align 8, !tbaa !27
  %24 = getelementptr inbounds i8, ptr %.041, i64 2
  %25 = load i16, ptr %24, align 2, !tbaa !28
  %26 = zext i16 %25 to i32
  %27 = icmp ult i32 %21, %26
  %28 = icmp ugt i64 %22, %2
  %or.cond54 = or i1 %28, %27
  br i1 %or.cond54, label %29, label %45

29:                                               ; preds = %18
  %30 = load ptr, ptr @stderr, align 8, !tbaa !29
  %31 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str) #7
  %32 = load ptr, ptr @stderr, align 8, !tbaa !29
  %33 = load ptr, ptr %19, align 8, !tbaa !22
  %34 = getelementptr inbounds i8, ptr %33, i64 2
  %35 = load i16, ptr %34, align 2, !tbaa !28
  %36 = zext i16 %35 to i32
  %37 = getelementptr inbounds i8, ptr %33, i64 4
  %38 = load i32, ptr %37, align 4, !tbaa !23
  %39 = trunc i64 %2 to i32
  %40 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %32, ptr noundef nonnull @.str.28, i32 noundef %36, i32 noundef %38, i32 noundef %39) #7
  %41 = load ptr, ptr @stderr, align 8, !tbaa !29
  %42 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str.2) #7
  %43 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 -2147483647, ptr %43, align 8, !tbaa !12
  tail call void @_ZN7android12ResXMLParser7restartEv(ptr noundef nonnull align 8 dereferenceable(36) %0)
  %44 = load i32, ptr %43, align 8, !tbaa !12
  br label %116

45:                                               ; preds = %18
  %46 = getelementptr inbounds i8, ptr %.041, i64 %22
  %47 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr %46, ptr %47, align 8, !tbaa !30
  %48 = getelementptr inbounds i8, ptr %0, i64 96
  tail call void @_ZN7android13ResStringPool6uninitEv(ptr noundef nonnull align 8 dereferenceable(132) %48)
  %49 = getelementptr inbounds i8, ptr %0, i64 248
  %50 = getelementptr inbounds i8, ptr %0, i64 232
  %51 = getelementptr inbounds i8, ptr %0, i64 240
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %50, i8 0, i64 24, i1 false)
  %52 = load ptr, ptr %19, align 8, !tbaa !22
  %53 = getelementptr inbounds i8, ptr %52, i64 2
  %54 = load i16, ptr %53, align 2, !tbaa !28
  %55 = zext i16 %54 to i64
  %56 = getelementptr inbounds i8, ptr %52, i64 %55
  %57 = load ptr, ptr %47, align 8, !tbaa !30
  %58 = getelementptr inbounds i8, ptr %57, i64 -8
  %59 = icmp ult ptr %56, %58
  br i1 %59, label %.lr.ph, label %.critedge.thread

.lr.ph:                                           ; preds = %45, %98
  %60 = phi ptr [ %100, %98 ], [ %57, %45 ]
  %.04268 = phi ptr [ %99, %98 ], [ %56, %45 ]
  %.04467 = phi ptr [ %.04268, %98 ], [ %56, %45 ]
  %61 = getelementptr inbounds i8, ptr %.04268, i64 4
  %62 = load i32, ptr %61, align 4, !tbaa !31
  %63 = zext i32 %62 to i64
  %64 = sub nsw i64 0, %63
  %65 = getelementptr inbounds i8, ptr %60, i64 %64
  %66 = icmp ult ptr %.04268, %65
  br i1 %66, label %67, label %.critedge.loopexit

67:                                               ; preds = %.lr.ph
  %68 = tail call noundef i32 @_ZN7androidL14validate_chunkEPKNS_15ResChunk_headerEmPKhPKc(ptr noundef nonnull %.04268, i64 noundef 8, ptr noundef %60, ptr noundef nonnull @.str.29)
  %.not = icmp eq i32 %68, 0
  br i1 %.not, label %69, label %.thread

69:                                               ; preds = %67
  %70 = load i16, ptr %.04268, align 4, !tbaa !32
  %71 = load i32, ptr %61, align 4, !tbaa !31
  %72 = zext i32 %71 to i64
  switch i16 %70, label %84 [
    i16 1, label %73
    i16 384, label %75
  ]

73:                                               ; preds = %69
  %74 = tail call noundef i32 @_ZN7android13ResStringPool5setToEPKvmb(ptr noundef nonnull align 8 dereferenceable(132) %48, ptr noundef nonnull %.04268, i64 noundef %72, i1 noundef zeroext false)
  br label %98

75:                                               ; preds = %69
  %76 = getelementptr inbounds i8, ptr %.04268, i64 2
  %77 = load i16, ptr %76, align 2, !tbaa !33
  %78 = zext i16 %77 to i64
  %79 = getelementptr inbounds i8, ptr %.04268, i64 %78
  store ptr %79, ptr %50, align 8, !tbaa !34
  %80 = zext i16 %77 to i32
  %81 = sub i32 %71, %80
  %82 = lshr i32 %81, 2
  %83 = zext nneg i32 %82 to i64
  store i64 %83, ptr %51, align 8, !tbaa !35
  br label %98

84:                                               ; preds = %69
  %85 = and i16 %70, -128
  %or.cond4 = icmp eq i16 %85, 256
  br i1 %or.cond4, label %86, label %98

86:                                               ; preds = %84
  %87 = tail call noundef i32 @_ZNK7android10ResXMLTree12validateNodeEPKNS_15ResXMLTree_nodeE(ptr noundef nonnull align 8 dereferenceable(268) %0, ptr noundef nonnull %.04268)
  %.not53 = icmp eq i32 %87, 0
  br i1 %.not53, label %88, label %.thread

88:                                               ; preds = %86
  %89 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %.04467, ptr %89, align 8, !tbaa !36
  %90 = tail call noundef i32 @_ZN7android12ResXMLParser8nextNodeEv(ptr noundef nonnull align 8 dereferenceable(36) %0)
  %91 = icmp eq i32 %90, -1
  br i1 %91, label %.thread, label %.thread58

.thread58:                                        ; preds = %88
  %92 = load ptr, ptr %89, align 8, !tbaa !36
  store ptr %92, ptr %49, align 8, !tbaa !37
  %93 = getelementptr inbounds i8, ptr %0, i64 24
  %94 = load ptr, ptr %93, align 8, !tbaa !38
  %95 = getelementptr inbounds i8, ptr %0, i64 256
  store ptr %94, ptr %95, align 8, !tbaa !39
  %96 = load i32, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %0, i64 264
  store i32 %96, ptr %97, align 8, !tbaa !40
  br label %.critedge

98:                                               ; preds = %73, %84, %75
  %99 = getelementptr inbounds i8, ptr %.04268, i64 %72
  %100 = load ptr, ptr %47, align 8, !tbaa !30
  %101 = getelementptr inbounds i8, ptr %100, i64 -8
  %102 = icmp ult ptr %99, %101
  br i1 %102, label %.lr.ph, label %.critedge.loopexit

.critedge.loopexit:                               ; preds = %98, %.lr.ph
  %.pre = load ptr, ptr %49, align 8, !tbaa !37
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %.thread58
  %103 = phi ptr [ %.pre, %.critedge.loopexit ], [ %92, %.thread58 ]
  %104 = icmp eq ptr %103, null
  br i1 %104, label %.critedge.thread, label %111

.critedge.thread:                                 ; preds = %45, %.critedge
  %105 = load ptr, ptr @stderr, align 8, !tbaa !29
  %106 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef nonnull @.str) #7
  %107 = load ptr, ptr @stderr, align 8, !tbaa !29
  %108 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef nonnull @.str.30) #7
  %109 = load ptr, ptr @stderr, align 8, !tbaa !29
  %110 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef nonnull @.str.2) #7
  br label %.thread

111:                                              ; preds = %.critedge
  %112 = tail call noundef i32 @_ZNK7android13ResStringPool8getErrorEv(ptr noundef nonnull align 8 dereferenceable(132) %48)
  br label %.thread

.thread:                                          ; preds = %67, %88, %86, %111, %.critedge.thread
  %.sink = phi i32 [ %112, %111 ], [ -2147483647, %.critedge.thread ], [ -2147483647, %86 ], [ -2147483647, %88 ], [ %68, %67 ]
  %113 = getelementptr inbounds i8, ptr %0, i64 56
  store i32 %.sink, ptr %113, align 8, !tbaa !12
  tail call void @_ZN7android12ResXMLParser7restartEv(ptr noundef nonnull align 8 dereferenceable(36) %0)
  %114 = getelementptr inbounds i8, ptr %0, i64 56
  %115 = load i32, ptr %114, align 8, !tbaa !12
  br label %116

116:                                              ; preds = %.thread, %29, %15, %8
  %.140 = phi i32 [ -12, %15 ], [ %44, %29 ], [ -2147483647, %8 ], [ %115, %.thread ]
  ret i32 %.140
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

attributes #0 = { 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 #1 = { 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 #2 = { nofree 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 #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind allocsize(0) }
attributes #7 = { cold 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 = !{!13, !11, i64 56}
!13 = !{!"_ZTSN7android10ResXMLTreeE", !6, i64 0, !14, i64 40, !11, i64 56, !7, i64 64, !7, i64 72, !17, i64 80, !7, i64 88, !18, i64 96, !7, i64 232, !17, i64 240, !7, i64 248, !7, i64 256, !10, i64 264}
!14 = !{!"_ZTSSt10shared_ptrIKN7android15DynamicRefTableEE", !15, i64 0}
!15 = !{!"_ZTSSt12__shared_ptrIKN7android15DynamicRefTableELN9__gnu_cxx12_Lock_policyE2EE", !7, i64 0, !16, i64 8}
!16 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !7, i64 0}
!17 = !{!"long", !8, i64 0}
!18 = !{!"_ZTSN7android13ResStringPoolE", !11, i64 8, !7, i64 16, !7, i64 24, !17, i64 32, !19, i64 40, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !11, i64 112, !7, i64 120, !11, i64 128}
!19 = !{!"_ZTSSt5mutex", !20, i64 0}
!20 = !{!"_ZTSSt12__mutex_base", !8, i64 0}
!21 = !{!13, !7, i64 64}
!22 = !{!13, !7, i64 72}
!23 = !{!24, !11, i64 4}
!24 = !{!"_ZTSN7android17ResXMLTree_headerE", !25, i64 0}
!25 = !{!"_ZTSN7android15ResChunk_headerE", !26, i64 0, !26, i64 2, !11, i64 4}
!26 = !{!"short", !8, i64 0}
!27 = !{!13, !17, i64 80}
!28 = !{!24, !26, i64 2}
!29 = !{!7, !7, i64 0}
!30 = !{!13, !7, i64 88}
!31 = !{!25, !11, i64 4}
!32 = !{!25, !26, i64 0}
!33 = !{!25, !26, i64 2}
!34 = !{!13, !7, i64 232}
!35 = !{!13, !17, i64 240}
!36 = !{!6, !7, i64 16}
!37 = !{!13, !7, i64 248}
!38 = !{!6, !7, i64 24}
!39 = !{!13, !7, i64 256}
!40 = !{!13, !10, i64 264}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass