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

; 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.std::lock_guard" = 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::ResStringPool_header" = type { %"struct.android::ResChunk_header", i32, i32, i32, i32, i32 }
%"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.16 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [61 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK7android13ResStringPool8stringAtEmPm(ptr noundef nonnull align 8 dereferenceable(132) %0, i64 noundef %1, ptr noundef %2) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca %"class.std::lock_guard", align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  %21 = load ptr, ptr %5, align 8
  %22 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 1
  %23 = load i32, ptr %22, align 8, !tbaa !11
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %344

25:                                               ; preds = %3
  %26 = load i64, ptr %6, align 8, !tbaa !9
  %27 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 4
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = getelementptr inbounds %"struct.android::ResStringPool_header", ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 4, !tbaa !17
  %31 = zext i32 %30 to i64
  %32 = icmp ult i64 %26, %31
  br i1 %32, label %33, label %344

33:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  %34 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 4
  %35 = load ptr, ptr %34, align 8, !tbaa !16
  %36 = getelementptr inbounds %"struct.android::ResStringPool_header", ptr %35, i32 0, i32 3
  %37 = load i32, ptr %36, align 4, !tbaa !21
  %38 = and i32 %37, 256
  %39 = icmp ne i32 %38, 0
  %40 = zext i1 %39 to i8
  store i8 %40, ptr %8, align 1, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %41 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 7
  %42 = load ptr, ptr %41, align 8, !tbaa !24
  %43 = load i64, ptr %6, align 8, !tbaa !9
  %44 = getelementptr inbounds i32, ptr %42, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !25
  %46 = zext i32 %45 to i64
  %47 = load i8, ptr %8, align 1, !tbaa !22, !range !26, !noundef !27
  %48 = trunc i8 %47 to i1
  %49 = zext i1 %48 to i64
  %50 = select i1 %48, i64 1, i64 2
  %51 = udiv i64 %46, %50
  %52 = trunc i64 %51 to i32
  store i32 %52, ptr %9, align 4, !tbaa !25
  %53 = load i32, ptr %9, align 4, !tbaa !25
  %54 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 11
  %55 = load i32, ptr %54, align 8, !tbaa !28
  %56 = sub i32 %55, 1
  %57 = icmp ult i32 %53, %56
  br i1 %57, label %58, label %319

58:                                               ; preds = %33
  %59 = load i8, ptr %8, align 1, !tbaa !22, !range !26, !noundef !27
  %60 = trunc i8 %59 to i1
  br i1 %60, label %133, label %61

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %62 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 9
  %63 = load ptr, ptr %62, align 8, !tbaa !29
  store ptr %63, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = load i32, ptr %9, align 4, !tbaa !25
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds i16, ptr %64, i64 %66
  store ptr %67, ptr %11, align 8, !tbaa !5
  %68 = call noundef i64 @_ZN7androidL12decodeLengthEPPKt(ptr noundef %11)
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 %68, ptr %69, align 8, !tbaa !9
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = load i64, ptr %71, align 8, !tbaa !9
  %73 = getelementptr inbounds i16, ptr %70, i64 %72
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = ptrtoint ptr %73 to i64
  %76 = ptrtoint ptr %74 to i64
  %77 = sub i64 %75, %76
  %78 = sdiv exact i64 %77, 2
  %79 = trunc i64 %78 to i32
  %80 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 11
  %81 = load i32, ptr %80, align 8, !tbaa !28
  %82 = icmp ult i32 %79, %81
  br i1 %82, label %83, label %105

83:                                               ; preds = %61
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = load i64, ptr %85, align 8, !tbaa !9
  %87 = getelementptr inbounds i16, ptr %84, i64 %86
  %88 = load i16, ptr %87, align 2, !tbaa !30
  %89 = zext i16 %88 to i32
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %103

91:                                               ; preds = %83
  br label %92

92:                                               ; preds = %91
  %93 = load ptr, ptr @stderr, align 8, !tbaa !5
  %94 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef @.str) #7
  %95 = load ptr, ptr @stderr, align 8, !tbaa !5
  %96 = load i64, ptr %6, align 8, !tbaa !9
  %97 = trunc i64 %96 to i32
  %98 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef @.str.16, i32 noundef %97) #7
  %99 = load ptr, ptr @stderr, align 8, !tbaa !5
  %100 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %99, ptr noundef @.str.2) #7
  br label %101

101:                                              ; preds = %92
  br label %102

102:                                              ; preds = %101
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %130

103:                                              ; preds = %83
  %104 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %104, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %130

105:                                              ; preds = %61
  br label %106

106:                                              ; preds = %105
  %107 = load ptr, ptr @stderr, align 8, !tbaa !5
  %108 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef @.str) #7
  %109 = load ptr, ptr @stderr, align 8, !tbaa !5
  %110 = load i64, ptr %6, align 8, !tbaa !9
  %111 = trunc i64 %110 to i32
  %112 = load ptr, ptr %11, align 8, !tbaa !5
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = load i64, ptr %113, align 8, !tbaa !9
  %115 = getelementptr inbounds i16, ptr %112, i64 %114
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  %117 = ptrtoint ptr %115 to i64
  %118 = ptrtoint ptr %116 to i64
  %119 = sub i64 %117, %118
  %120 = sdiv exact i64 %119, 2
  %121 = trunc i64 %120 to i32
  %122 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 11
  %123 = load i32, ptr %122, align 8, !tbaa !28
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef @.str.17, i32 noundef %111, i32 noundef %121, i32 noundef %123) #7
  %125 = load ptr, ptr @stderr, align 8, !tbaa !5
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %125, ptr noundef @.str.2) #7
  br label %127

127:                                              ; preds = %106
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128
  store i32 0, ptr %12, align 4
  br label %130

130:                                              ; preds = %129, %103, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %131 = load i32, ptr %12, align 4
  switch i32 %131, label %341 [
    i32 0, label %132
  ]

132:                                              ; preds = %130
  br label %318

133:                                              ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %134 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 9
  %135 = load ptr, ptr %134, align 8, !tbaa !29
  store ptr %135, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %136 = load ptr, ptr %13, align 8, !tbaa !5
  %137 = load i32, ptr %9, align 4, !tbaa !25
  %138 = zext i32 %137 to i64
  %139 = getelementptr inbounds i8, ptr %136, i64 %138
  store ptr %139, ptr %14, align 8, !tbaa !5
  %140 = call noundef i64 @_ZN7androidL12decodeLengthEPPKh(ptr noundef %14)
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 %140, ptr %141, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %142 = call noundef i64 @_ZN7androidL12decodeLengthEPPKh(ptr noundef %14)
  store i64 %142, ptr %15, align 8, !tbaa !9
  %143 = load ptr, ptr %14, align 8, !tbaa !5
  %144 = load i64, ptr %15, align 8, !tbaa !9
  %145 = getelementptr inbounds i8, ptr %143, i64 %144
  %146 = load ptr, ptr %13, align 8, !tbaa !5
  %147 = ptrtoint ptr %145 to i64
  %148 = ptrtoint ptr %146 to i64
  %149 = sub i64 %147, %148
  %150 = trunc i64 %149 to i32
  %151 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 11
  %152 = load i32, ptr %151, align 8, !tbaa !28
  %153 = icmp ult i32 %150, %152
  br i1 %153, label %154, label %293

154:                                              ; preds = %133
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %155 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 6
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(40) %155)
  %156 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 10
  %157 = load ptr, ptr %156, align 8, !tbaa !31
  %158 = icmp ne ptr %157, null
  br i1 %158, label %159, label %172

159:                                              ; preds = %154
  %160 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 10
  %161 = load ptr, ptr %160, align 8, !tbaa !31
  %162 = load i64, ptr %6, align 8, !tbaa !9
  %163 = getelementptr inbounds ptr, ptr %161, i64 %162
  %164 = load ptr, ptr %163, align 8, !tbaa !5
  %165 = icmp ne ptr %164, null
  br i1 %165, label %166, label %172

166:                                              ; preds = %159
  %167 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 10
  %168 = load ptr, ptr %167, align 8, !tbaa !31
  %169 = load i64, ptr %6, align 8, !tbaa !9
  %170 = getelementptr inbounds ptr, ptr %168, i64 %169
  %171 = load ptr, ptr %170, align 8, !tbaa !5
  store ptr %171, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %291

172:                                              ; preds = %159, %154
  %173 = load i64, ptr %6, align 8, !tbaa !9
  %174 = load ptr, ptr %14, align 8, !tbaa !5
  %175 = load i64, ptr %15, align 8, !tbaa !9
  %176 = invoke noundef ptr @_ZNK7android13ResStringPool14stringDecodeAtEmPKhmPm(ptr noundef nonnull align 8 dereferenceable(132) %21, i64 noundef %173, ptr noundef %174, i64 noundef %175, ptr noundef %15)
          to label %177 unwind label %180

177:                                              ; preds = %172
  %178 = icmp eq ptr %176, null
  br i1 %178, label %179, label %184

179:                                              ; preds = %177
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %291

180:                                              ; preds = %172
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %17, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %18, align 4
  br label %292

184:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %185 = load ptr, ptr %14, align 8, !tbaa !5
  %186 = load i64, ptr %15, align 8, !tbaa !9
  %187 = invoke i64 @utf8_to_utf16_length(ptr noundef %185, i64 noundef %186, i1 noundef zeroext false)
          to label %188 unwind label %211

188:                                              ; preds = %184
  store i64 %187, ptr %19, align 8, !tbaa !9
  %189 = load i64, ptr %19, align 8, !tbaa !9
  %190 = icmp slt i64 %189, 0
  br i1 %190, label %197, label %191

191:                                              ; preds = %188
  %192 = load i64, ptr %19, align 8, !tbaa !9
  %193 = and i64 %192, 32767
  %194 = load ptr, ptr %7, align 8, !tbaa !5
  %195 = load i64, ptr %194, align 8, !tbaa !9
  %196 = icmp ne i64 %193, %195
  br i1 %196, label %197, label %215

197:                                              ; preds = %191, %188
  br label %198

198:                                              ; preds = %197
  %199 = load ptr, ptr @stderr, align 8, !tbaa !5
  %200 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %199, ptr noundef @.str) #7
  %201 = load ptr, ptr @stderr, align 8, !tbaa !5
  %202 = load i64, ptr %6, align 8, !tbaa !9
  %203 = load i64, ptr %19, align 8, !tbaa !9
  %204 = load ptr, ptr %7, align 8, !tbaa !5
  %205 = load i64, ptr %204, align 8, !tbaa !9
  %206 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %201, ptr noundef @.str.18, i64 noundef %202, i64 noundef %203, i64 noundef %205) #7
  %207 = load ptr, ptr @stderr, align 8, !tbaa !5
  %208 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %207, ptr noundef @.str.2) #7
  br label %209

209:                                              ; preds = %198
  br label %210

210:                                              ; preds = %209
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %289

211:                                              ; preds = %184
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %17, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %18, align 4
  br label %290

215:                                              ; preds = %191
  %216 = load i64, ptr %19, align 8, !tbaa !9
  %217 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 %216, ptr %217, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %218 = load ptr, ptr %7, align 8, !tbaa !5
  %219 = load i64, ptr %218, align 8, !tbaa !9
  %220 = add i64 %219, 1
  %221 = call noalias ptr @calloc(i64 noundef %220, i64 noundef 2) #8
  store ptr %221, ptr %20, align 8, !tbaa !5
  %222 = load ptr, ptr %20, align 8, !tbaa !5
  %223 = icmp ne ptr %222, null
  br i1 %223, label %236, label %224

224:                                              ; preds = %215
  br label %225

225:                                              ; preds = %224
  %226 = load ptr, ptr @stderr, align 8, !tbaa !5
  %227 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %226, ptr noundef @.str) #7
  %228 = load ptr, ptr @stderr, align 8, !tbaa !5
  %229 = load i64, ptr %6, align 8, !tbaa !9
  %230 = trunc i64 %229 to i32
  %231 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %228, ptr noundef @.str.19, i32 noundef %230) #7
  %232 = load ptr, ptr @stderr, align 8, !tbaa !5
  %233 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %232, ptr noundef @.str.2) #7
  br label %234

234:                                              ; preds = %225
  br label %235

235:                                              ; preds = %234
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %288

236:                                              ; preds = %215
  %237 = load ptr, ptr %14, align 8, !tbaa !5
  %238 = load i64, ptr %15, align 8, !tbaa !9
  %239 = load ptr, ptr %20, align 8, !tbaa !5
  %240 = load ptr, ptr %7, align 8, !tbaa !5
  %241 = load i64, ptr %240, align 8, !tbaa !9
  %242 = add i64 %241, 1
  %243 = invoke ptr @utf8_to_utf16(ptr noundef %237, i64 noundef %238, ptr noundef %239, i64 noundef %242)
          to label %244 unwind label %276

244:                                              ; preds = %236
  %245 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 10
  %246 = load ptr, ptr %245, align 8, !tbaa !31
  %247 = icmp eq ptr %246, null
  br i1 %247, label %248, label %281

248:                                              ; preds = %244
  %249 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 4
  %250 = load ptr, ptr %249, align 8, !tbaa !16
  %251 = getelementptr inbounds %"struct.android::ResStringPool_header", ptr %250, i32 0, i32 1
  %252 = load i32, ptr %251, align 4, !tbaa !17
  %253 = zext i32 %252 to i64
  %254 = call noalias ptr @calloc(i64 noundef %253, i64 noundef 8) #8
  %255 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 10
  store ptr %254, ptr %255, align 8, !tbaa !31
  %256 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 10
  %257 = load ptr, ptr %256, align 8, !tbaa !31
  %258 = icmp eq ptr %257, null
  br i1 %258, label %259, label %280

259:                                              ; preds = %248
  br label %260

260:                                              ; preds = %259
  %261 = load ptr, ptr @stderr, align 8, !tbaa !5
  %262 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %261, ptr noundef @.str) #7
  %263 = load ptr, ptr @stderr, align 8, !tbaa !5
  %264 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 4
  %265 = load ptr, ptr %264, align 8, !tbaa !16
  %266 = getelementptr inbounds %"struct.android::ResStringPool_header", ptr %265, i32 0, i32 1
  %267 = load i32, ptr %266, align 4, !tbaa !17
  %268 = zext i32 %267 to i64
  %269 = mul i64 %268, 8
  %270 = trunc i64 %269 to i32
  %271 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %263, ptr noundef @.str.20, i32 noundef %270) #7
  %272 = load ptr, ptr @stderr, align 8, !tbaa !5
  %273 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %272, ptr noundef @.str.2) #7
  br label %274

274:                                              ; preds = %260
  br label %275

275:                                              ; preds = %274
  store ptr null, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %288

276:                                              ; preds = %236
  %277 = landingpad { ptr, i32 }
          cleanup
  %278 = extractvalue { ptr, i32 } %277, 0
  store ptr %278, ptr %17, align 8
  %279 = extractvalue { ptr, i32 } %277, 1
  store i32 %279, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %290

280:                                              ; preds = %248
  br label %281

281:                                              ; preds = %280, %244
  %282 = load ptr, ptr %20, align 8, !tbaa !5
  %283 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 10
  %284 = load ptr, ptr %283, align 8, !tbaa !31
  %285 = load i64, ptr %6, align 8, !tbaa !9
  %286 = getelementptr inbounds ptr, ptr %284, i64 %285
  store ptr %282, ptr %286, align 8, !tbaa !5
  %287 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %287, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %288

288:                                              ; preds = %281, %275, %235
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  br label %289

289:                                              ; preds = %288, %210
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %291

290:                                              ; preds = %276, %211
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %292

291:                                              ; preds = %289, %179, %166
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %315

292:                                              ; preds = %290, %180
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  br label %347

293:                                              ; preds = %133
  br label %294

294:                                              ; preds = %293
  %295 = load ptr, ptr @stderr, align 8, !tbaa !5
  %296 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %295, ptr noundef @.str) #7
  %297 = load ptr, ptr @stderr, align 8, !tbaa !5
  %298 = load i64, ptr %6, align 8, !tbaa !9
  %299 = load ptr, ptr %14, align 8, !tbaa !5
  %300 = load i64, ptr %15, align 8, !tbaa !9
  %301 = getelementptr inbounds i8, ptr %299, i64 %300
  %302 = load ptr, ptr %13, align 8, !tbaa !5
  %303 = ptrtoint ptr %301 to i64
  %304 = ptrtoint ptr %302 to i64
  %305 = sub i64 %303, %304
  %306 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 11
  %307 = load i32, ptr %306, align 8, !tbaa !28
  %308 = zext i32 %307 to i64
  %309 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %297, ptr noundef @.str.21, i64 noundef %298, i64 noundef %305, i64 noundef %308) #7
  %310 = load ptr, ptr @stderr, align 8, !tbaa !5
  %311 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %310, ptr noundef @.str.2) #7
  br label %312

312:                                              ; preds = %294
  br label %313

313:                                              ; preds = %312
  br label %314

314:                                              ; preds = %313
  store i32 0, ptr %12, align 4
  br label %315

315:                                              ; preds = %314, %291
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  %316 = load i32, ptr %12, align 4
  switch i32 %316, label %341 [
    i32 0, label %317
  ]

317:                                              ; preds = %315
  br label %318

318:                                              ; preds = %317, %132
  br label %340

319:                                              ; preds = %33
  br label %320

320:                                              ; preds = %319
  %321 = load ptr, ptr @stderr, align 8, !tbaa !5
  %322 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %321, ptr noundef @.str) #7
  %323 = load ptr, ptr @stderr, align 8, !tbaa !5
  %324 = load i64, ptr %6, align 8, !tbaa !9
  %325 = trunc i64 %324 to i32
  %326 = load i32, ptr %9, align 4, !tbaa !25
  %327 = zext i32 %326 to i64
  %328 = mul i64 %327, 2
  %329 = trunc i64 %328 to i32
  %330 = getelementptr inbounds %"class.android::ResStringPool", ptr %21, i32 0, i32 11
  %331 = load i32, ptr %330, align 8, !tbaa !28
  %332 = zext i32 %331 to i64
  %333 = mul i64 %332, 2
  %334 = trunc i64 %333 to i32
  %335 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %323, ptr noundef @.str.22, i32 noundef %325, i32 noundef %329, i32 noundef %334) #7
  %336 = load ptr, ptr @stderr, align 8, !tbaa !5
  %337 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %336, ptr noundef @.str.2) #7
  br label %338

338:                                              ; preds = %320
  br label %339

339:                                              ; preds = %338
  br label %340

340:                                              ; preds = %339, %318
  store i32 0, ptr %12, align 4
  br label %341

341:                                              ; preds = %340, %315, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  %342 = load i32, ptr %12, align 4
  switch i32 %342, label %352 [
    i32 0, label %343
    i32 1, label %345
  ]

343:                                              ; preds = %341
  br label %344

344:                                              ; preds = %343, %25, %3
  store ptr null, ptr %4, align 8
  br label %345

345:                                              ; preds = %344, %341
  %346 = load ptr, ptr %4, align 8
  ret ptr %346

347:                                              ; preds = %292
  %348 = load ptr, ptr %17, align 8
  %349 = load i32, ptr %18, align 4
  %350 = insertvalue { ptr, i32 } poison, ptr %348, 0
  %351 = insertvalue { ptr, i32 } %350, i32 %349, 1
  resume { ptr, i32 } %351

352:                                              ; preds = %341
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN7androidL12decodeLengthEPPKt(ptr noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN7androidL12decodeLengthEPPKh(ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

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

declare i64 @utf8_to_utf16_length(ptr noundef, i64 noundef, i1 noundef zeroext) #6

declare ptr @utf8_to_utf16(ptr noundef, i64 noundef, ptr noundef, i64 noundef) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5 align 2

attributes #0 = { nounwind allocsize(0,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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 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 = { 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 #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 = { "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 = { nounwind }
attributes #8 = { nounwind allocsize(0,1) }

!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 = !{!"_ZTSN7android13ResStringPoolE", !13, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !14, i64 40, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !13, i64 112, !6, i64 120, !13, i64 128}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTSSt5mutex", !15, i64 0}
!15 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!16 = !{!12, !6, i64 24}
!17 = !{!18, !13, i64 8}
!18 = !{!"_ZTSN7android20ResStringPool_headerE", !19, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24}
!19 = !{!"_ZTSN7android15ResChunk_headerE", !20, i64 0, !20, i64 2, !13, i64 4}
!20 = !{!"short", !7, i64 0}
!21 = !{!18, !13, i64 16}
!22 = !{!23, !23, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{!12, !6, i64 80}
!25 = !{!13, !13, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!12, !13, i64 112}
!29 = !{!12, !6, i64 96}
!30 = !{!20, !20, i64 0}
!31 = !{!12, !6, i64 104}


; 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.std::lock_guard" = type { ptr }

@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.16 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [63 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [61 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [66 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [61 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZNK7android13ResStringPool8stringAtEmPm(ptr noundef nonnull align 8 dereferenceable(132) %0, i64 noundef %1, ptr nocapture noundef %2) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::lock_guard", align 8
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  %9 = load i32, ptr %8, align 8, !tbaa !5
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %11, label %.thread76

11:                                               ; preds = %3
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  %13 = load ptr, ptr %12, align 8, !tbaa !14
  %14 = getelementptr inbounds i8, ptr %13, i64 8
  %15 = load i32, ptr %14, align 4, !tbaa !15
  %16 = zext i32 %15 to i64
  %17 = icmp ugt i64 %16, %1
  br i1 %17, label %18, label %.thread76

18:                                               ; preds = %11
  %19 = getelementptr inbounds i8, ptr %13, i64 16
  %20 = load i32, ptr %19, align 4, !tbaa !19
  %21 = and i32 %20, 256
  %22 = getelementptr inbounds i8, ptr %0, i64 80
  %23 = load ptr, ptr %22, align 8, !tbaa !20
  %24 = getelementptr inbounds i32, ptr %23, i64 %1
  %25 = load i32, ptr %24, align 4, !tbaa !21
  %.lobit = lshr exact i32 %21, 8
  %26 = xor i32 %.lobit, 1
  %27 = lshr i32 %25, %26
  %28 = getelementptr inbounds i8, ptr %0, i64 112
  %29 = load i32, ptr %28, align 8, !tbaa !22
  %30 = add i32 %29, -1
  %31 = icmp ult i32 %27, %30
  br i1 %31, label %32, label %169

32:                                               ; preds = %18
  %.not = icmp eq i32 %21, 0
  %33 = getelementptr inbounds i8, ptr %0, i64 96
  %34 = load ptr, ptr %33, align 8, !tbaa !23
  %35 = zext i32 %27 to i64
  br i1 %.not, label %36, label %73

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %37 = getelementptr inbounds i16, ptr %34, i64 %35
  store ptr %37, ptr %4, align 8, !tbaa !24
  %38 = call noundef i64 @_ZN7androidL12decodeLengthEPPKt(ptr noundef nonnull %4)
  store i64 %38, ptr %2, align 8, !tbaa !25
  %39 = load ptr, ptr %4, align 8, !tbaa !24
  %40 = getelementptr inbounds i16, ptr %39, i64 %38
  %41 = ptrtoint ptr %40 to i64
  %42 = ptrtoint ptr %34 to i64
  %43 = sub i64 %41, %42
  %44 = lshr exact i64 %43, 1
  %45 = trunc i64 %44 to i32
  %46 = load i32, ptr %28, align 8, !tbaa !22
  %.not65 = icmp ugt i32 %46, %45
  br i1 %.not65, label %47, label %57

47:                                               ; preds = %36
  %48 = load i16, ptr %40, align 2, !tbaa !26
  %.not64 = icmp eq i16 %48, 0
  br i1 %.not64, label %.thread, label %49

49:                                               ; preds = %47
  %50 = load ptr, ptr @stderr, align 8, !tbaa !24
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef nonnull @.str) #8
  %52 = load ptr, ptr @stderr, align 8, !tbaa !24
  %53 = trunc nuw i64 %1 to i32
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull @.str.16, i32 noundef %53) #8
  %55 = load ptr, ptr @stderr, align 8, !tbaa !24
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef nonnull @.str.2) #8
  br label %.thread

.thread:                                          ; preds = %47, %49
  %.0.ph = phi ptr [ %39, %47 ], [ null, %49 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %.thread76

57:                                               ; preds = %36
  %58 = load ptr, ptr @stderr, align 8, !tbaa !24
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef nonnull @.str) #8
  %60 = load ptr, ptr @stderr, align 8, !tbaa !24
  %61 = trunc nuw i64 %1 to i32
  %62 = load ptr, ptr %4, align 8, !tbaa !24
  %63 = load i64, ptr %2, align 8, !tbaa !25
  %64 = getelementptr inbounds i16, ptr %62, i64 %63
  %65 = ptrtoint ptr %64 to i64
  %66 = sub i64 %65, %42
  %67 = lshr exact i64 %66, 1
  %68 = trunc i64 %67 to i32
  %69 = load i32, ptr %28, align 8, !tbaa !22
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef nonnull @.str.17, i32 noundef %61, i32 noundef %68, i32 noundef %69) #8
  %71 = load ptr, ptr @stderr, align 8, !tbaa !24
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str.2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %.thread76

73:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %74 = getelementptr inbounds i8, ptr %34, i64 %35
  store ptr %74, ptr %5, align 8, !tbaa !24
  %75 = call noundef i64 @_ZN7androidL12decodeLengthEPPKh(ptr noundef nonnull %5)
  store i64 %75, ptr %2, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %76 = call noundef i64 @_ZN7androidL12decodeLengthEPPKh(ptr noundef nonnull %5)
  store i64 %76, ptr %6, align 8, !tbaa !25
  %77 = load ptr, ptr %5, align 8, !tbaa !24
  %78 = getelementptr inbounds i8, ptr %77, i64 %76
  %79 = ptrtoint ptr %78 to i64
  %80 = ptrtoint ptr %34 to i64
  %81 = sub i64 %79, %80
  %82 = trunc i64 %81 to i32
  %83 = load i32, ptr %28, align 8, !tbaa !22
  %.not71 = icmp ugt i32 %83, %82
  br i1 %.not71, label %84, label %156

84:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %85 = getelementptr inbounds i8, ptr %0, i64 40
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(40) %85)
  %86 = getelementptr inbounds i8, ptr %0, i64 104
  %87 = load ptr, ptr %86, align 8, !tbaa !27
  %.not66 = icmp eq ptr %87, null
  br i1 %.not66, label %91, label %88

88:                                               ; preds = %84
  %89 = getelementptr inbounds ptr, ptr %87, i64 %1
  %90 = load ptr, ptr %89, align 8, !tbaa !24
  %.not67 = icmp eq ptr %90, null
  br i1 %.not67, label %91, label %.thread73

91:                                               ; preds = %88, %84
  %92 = load ptr, ptr %5, align 8, !tbaa !24
  %93 = call noundef ptr @_ZNK7android13ResStringPool14stringDecodeAtEmPKhmPm(ptr noundef nonnull align 8 dereferenceable(132) %0, i64 noundef %1, ptr noundef %92, i64 noundef %76, ptr noundef nonnull %6)
  %94 = icmp eq ptr %93, null
  br i1 %94, label %.thread73, label %95

95:                                               ; preds = %91
  %96 = load ptr, ptr %5, align 8, !tbaa !24
  %97 = load i64, ptr %6, align 8, !tbaa !25
  %98 = invoke i64 @utf8_to_utf16_length(ptr noundef %96, i64 noundef %97, i1 noundef zeroext false)
          to label %99 unwind label %112

99:                                               ; preds = %95
  %100 = icmp slt i64 %98, 0
  br i1 %100, label %104, label %101

101:                                              ; preds = %99
  %102 = and i64 %98, 32767
  %103 = load i64, ptr %2, align 8, !tbaa !25
  %.not68 = icmp eq i64 %102, %103
  br i1 %.not68, label %114, label %104

104:                                              ; preds = %99, %101
  %105 = load ptr, ptr @stderr, align 8, !tbaa !24
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef nonnull @.str) #8
  %107 = load ptr, ptr @stderr, align 8, !tbaa !24
  %108 = load i64, ptr %2, align 8, !tbaa !25
  %109 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %107, ptr noundef nonnull @.str.18, i64 noundef %1, i64 noundef %98, i64 noundef %108) #8
  %110 = load ptr, ptr @stderr, align 8, !tbaa !24
  %111 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %110, ptr noundef nonnull @.str.2) #8
  br label %.thread73

112:                                              ; preds = %95
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %155

114:                                              ; preds = %101
  store i64 %98, ptr %2, align 8, !tbaa !25
  %115 = add nuw i64 %98, 1
  %116 = call noalias ptr @calloc(i64 noundef %115, i64 noundef 2) #9
  %.not69 = icmp eq ptr %116, null
  br i1 %.not69, label %117, label %125

117:                                              ; preds = %114
  %118 = load ptr, ptr @stderr, align 8, !tbaa !24
  %119 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef nonnull @.str) #8
  %120 = load ptr, ptr @stderr, align 8, !tbaa !24
  %121 = trunc nuw i64 %1 to i32
  %122 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %120, ptr noundef nonnull @.str.19, i32 noundef %121) #8
  %123 = load ptr, ptr @stderr, align 8, !tbaa !24
  %124 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %123, ptr noundef nonnull @.str.2) #8
  br label %.thread73

125:                                              ; preds = %114
  %126 = load ptr, ptr %5, align 8, !tbaa !24
  %127 = load i64, ptr %6, align 8, !tbaa !25
  %128 = invoke ptr @utf8_to_utf16(ptr noundef %126, i64 noundef %127, ptr noundef nonnull %116, i64 noundef %115)
          to label %129 unwind label %150

129:                                              ; preds = %125
  %130 = load ptr, ptr %86, align 8, !tbaa !27
  %131 = icmp eq ptr %130, null
  br i1 %131, label %132, label %152

132:                                              ; preds = %129
  %133 = load ptr, ptr %12, align 8, !tbaa !14
  %134 = getelementptr inbounds i8, ptr %133, i64 8
  %135 = load i32, ptr %134, align 4, !tbaa !15
  %136 = zext i32 %135 to i64
  %137 = call noalias ptr @calloc(i64 noundef %136, i64 noundef 8) #9
  store ptr %137, ptr %86, align 8, !tbaa !27
  %138 = icmp eq ptr %137, null
  br i1 %138, label %139, label %152

139:                                              ; preds = %132
  %140 = load ptr, ptr @stderr, align 8, !tbaa !24
  %141 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %140, ptr noundef nonnull @.str) #8
  %142 = load ptr, ptr @stderr, align 8, !tbaa !24
  %143 = load ptr, ptr %12, align 8, !tbaa !14
  %144 = getelementptr inbounds i8, ptr %143, i64 8
  %145 = load i32, ptr %144, align 4, !tbaa !15
  %146 = shl i32 %145, 3
  %147 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %142, ptr noundef nonnull @.str.20, i32 noundef %146) #8
  %148 = load ptr, ptr @stderr, align 8, !tbaa !24
  %149 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %148, ptr noundef nonnull @.str.2) #8
  br label %.thread73

150:                                              ; preds = %125
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %155

152:                                              ; preds = %132, %129
  %153 = phi ptr [ %137, %132 ], [ %130, %129 ]
  %154 = getelementptr inbounds ptr, ptr %153, i64 %1
  store ptr %116, ptr %154, align 8, !tbaa !24
  br label %.thread73

155:                                              ; preds = %150, %112
  %.pn = phi { ptr, i32 } [ %151, %150 ], [ %113, %112 ]
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn

.thread73:                                        ; preds = %88, %91, %117, %139, %152, %104
  %.3 = phi ptr [ %90, %88 ], [ null, %91 ], [ null, %104 ], [ null, %139 ], [ %116, %152 ], [ null, %117 ]
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %.thread76

156:                                              ; preds = %73
  %157 = load ptr, ptr @stderr, align 8, !tbaa !24
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %157, ptr noundef nonnull @.str) #8
  %159 = load ptr, ptr @stderr, align 8, !tbaa !24
  %160 = load ptr, ptr %5, align 8, !tbaa !24
  %161 = getelementptr inbounds i8, ptr %160, i64 %76
  %162 = ptrtoint ptr %161 to i64
  %163 = sub i64 %162, %80
  %164 = load i32, ptr %28, align 8, !tbaa !22
  %165 = zext i32 %164 to i64
  %166 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %159, ptr noundef nonnull @.str.21, i64 noundef %1, i64 noundef %163, i64 noundef %165) #8
  %167 = load ptr, ptr @stderr, align 8, !tbaa !24
  %168 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %167, ptr noundef nonnull @.str.2) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %.thread76

169:                                              ; preds = %18
  %170 = load ptr, ptr @stderr, align 8, !tbaa !24
  %171 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %170, ptr noundef nonnull @.str) #8
  %172 = load ptr, ptr @stderr, align 8, !tbaa !24
  %173 = trunc nuw i64 %1 to i32
  %174 = shl i32 %27, 1
  %175 = load i32, ptr %28, align 8, !tbaa !22
  %176 = shl i32 %175, 1
  %177 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %172, ptr noundef nonnull @.str.22, i32 noundef %173, i32 noundef %174, i32 noundef %176) #8
  %178 = load ptr, ptr @stderr, align 8, !tbaa !24
  %179 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %178, ptr noundef nonnull @.str.2) #8
  br label %.thread76

.thread76:                                        ; preds = %169, %57, %156, %3, %11, %.thread, %.thread73
  %.7 = phi ptr [ %.0.ph, %.thread ], [ %.3, %.thread73 ], [ null, %11 ], [ null, %3 ], [ null, %156 ], [ null, %57 ], [ null, %169 ]
  ret ptr %.7
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN7androidL12decodeLengthEPPKt(ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN7androidL12decodeLengthEPPKh(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

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

declare i64 @utf8_to_utf16_length(ptr noundef, i64 noundef, i1 noundef zeroext) local_unnamed_addr #6

declare ptr @utf8_to_utf16(ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #5 align 2

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 #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 = { "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 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { nounwind allocsize(0,1) }

!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, !7, i64 8}
!6 = !{!"_ZTSN7android13ResStringPoolE", !7, i64 8, !10, i64 16, !10, i64 24, !11, i64 32, !12, i64 40, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !7, i64 112, !10, i64 120, !7, i64 128}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"_ZTSSt5mutex", !13, i64 0}
!13 = !{!"_ZTSSt12__mutex_base", !8, i64 0}
!14 = !{!6, !10, i64 24}
!15 = !{!16, !7, i64 8}
!16 = !{!"_ZTSN7android20ResStringPool_headerE", !17, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24}
!17 = !{!"_ZTSN7android15ResChunk_headerE", !18, i64 0, !18, i64 2, !7, i64 4}
!18 = !{!"short", !8, i64 0}
!19 = !{!16, !7, i64 16}
!20 = !{!6, !10, i64 80}
!21 = !{!7, !7, i64 0}
!22 = !{!6, !7, i64 112}
!23 = !{!6, !10, i64 96}
!24 = !{!10, !10, i64 0}
!25 = !{!11, !11, i64 0}
!26 = !{!18, !18, i64 0}
!27 = !{!6, !10, i64 104}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass