; LLVM IR from jingweizhanghuai/Morn :: src/util (morn_dictionary)

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

%struct.HandleDictionary = type { ptr, ptr, i32 }
%struct.DicNode = type { ptr, i32, i32, [0 x i8] }
%struct.OverWriteChain = type { ptr, i32, [0 x i8] }

@.str.3 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@__FUNCTION__.m_DictionaryWrite = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @DictionaryInit() #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 willreturn memory(read)
declare i64 @strlen(ptr noundef) #2

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #3

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

; 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) #4

; Function Attrs: nounwind uwtable
define dso_local ptr @m_DictionaryWrite(ptr noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %25 = call ptr @DictionaryInit()
  store ptr %25, ptr %10, align 8, !tbaa !5
  %26 = load i32, ptr %9, align 4, !tbaa !9
  %27 = icmp slt i32 %26, 0
  br i1 %27, label %28, label %33

28:                                               ; preds = %4
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = call i64 @strlen(ptr noundef %29) #6
  %31 = add i64 %30, 1
  %32 = trunc i64 %31 to i32
  store i32 %32, ptr %9, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %28, %4
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = icmp slt i32 %34, 0
  br i1 %35, label %36, label %40

36:                                               ; preds = %33
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = call i64 @strlen(ptr noundef %37) #6
  %39 = trunc i64 %38 to i32
  store i32 %39, ptr %7, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %36, %33
  br label %41

41:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = icmp sgt i32 %42, 32768
  %44 = zext i1 %43 to i32
  store i32 %44, ptr %11, align 4, !tbaa !9
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %47, label %49

47:                                               ; preds = %41
  %48 = load i32, ptr %11, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %48, i32 noundef -1, ptr noundef @.str.3, i32 noundef 112, ptr noundef @__FUNCTION__.m_DictionaryWrite, ptr noundef @.str.4)
  br label %49

49:                                               ; preds = %47, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %50

50:                                               ; preds = %49
  br label %51

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %52, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %53 = load i32, ptr %7, align 4, !tbaa !9
  %54 = sub nsw i32 %53, 1
  store i32 %54, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %55 = load i32, ptr %14, align 4, !tbaa !9
  %56 = ashr i32 %55, 1
  store i32 %56, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %57 = load i32, ptr %15, align 4, !tbaa !9
  %58 = ashr i32 %57, 1
  store i32 %58, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %59 = load i32, ptr %15, align 4, !tbaa !9
  %60 = load i32, ptr %16, align 4, !tbaa !9
  %61 = add nsw i32 %59, %60
  store i32 %61, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = load i32, ptr %13, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i8, ptr %62, i64 %64
  %66 = load i8, ptr %65, align 1, !tbaa !11
  %67 = sext i8 %66 to i32
  %68 = shl i32 %67, 16
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = load i32, ptr %16, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i8, ptr %69, i64 %71
  %73 = load i8, ptr %72, align 1, !tbaa !11
  %74 = sext i8 %73 to i32
  %75 = shl i32 %74, 12
  %76 = add nsw i32 %68, %75
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = load i32, ptr %15, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds i8, ptr %77, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !11
  %82 = sext i8 %81 to i32
  %83 = shl i32 %82, 8
  %84 = add nsw i32 %76, %83
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = load i32, ptr %17, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds i8, ptr %85, i64 %87
  %89 = load i8, ptr %88, align 1, !tbaa !11
  %90 = sext i8 %89 to i32
  %91 = shl i32 %90, 4
  %92 = add nsw i32 %84, %91
  %93 = load ptr, ptr %12, align 8, !tbaa !5
  %94 = load i32, ptr %14, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds i8, ptr %93, i64 %95
  %97 = load i8, ptr %96, align 1, !tbaa !11
  %98 = sext i8 %97 to i32
  %99 = add nsw i32 %92, %98
  %100 = and i32 %99, 16777215
  store i32 %100, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %101 = load i32, ptr %7, align 4, !tbaa !9
  %102 = add nsw i32 %101, 7
  %103 = ashr i32 %102, 3
  %104 = shl i32 %103, 3
  store i32 %104, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.HandleDictionary, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !12
  %108 = load i32, ptr %18, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds ptr, ptr %107, i64 %109
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  store ptr %111, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  store ptr null, ptr %21, align 8, !tbaa !5
  br label %112

112:                                              ; preds = %262, %51
  %113 = load ptr, ptr %20, align 8, !tbaa !5
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %267

115:                                              ; preds = %112
  %116 = load ptr, ptr %20, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.DicNode, ptr %116, i32 0, i32 1
  %118 = load i32, ptr %117, align 8, !tbaa !14
  %119 = load i32, ptr %7, align 4, !tbaa !9
  %120 = icmp eq i32 %118, %119
  br i1 %120, label %121, label %262

121:                                              ; preds = %115
  %122 = load ptr, ptr %20, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.DicNode, ptr %122, i32 0, i32 3
  %124 = getelementptr inbounds [0 x i8], ptr %123, i64 0, i64 0
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = load i32, ptr %7, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = call i32 @memcmp(ptr noundef %124, ptr noundef %125, i64 noundef %127) #6
  %129 = icmp eq i32 %128, 0
  br i1 %129, label %130, label %261

130:                                              ; preds = %121
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.HandleDictionary, ptr %131, i32 0, i32 2
  %133 = load i32, ptr %132, align 8, !tbaa !16
  %134 = icmp eq i32 %133, 0
  br i1 %134, label %135, label %212

135:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %136 = load ptr, ptr %20, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.DicNode, ptr %136, i32 0, i32 3
  %138 = getelementptr inbounds [0 x i8], ptr %137, i64 0, i64 0
  %139 = load i32, ptr %19, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds i8, ptr %138, i64 %140
  store ptr %141, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %142 = load ptr, ptr %20, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.DicNode, ptr %142, i32 0, i32 2
  %144 = load i32, ptr %143, align 4, !tbaa !17
  %145 = icmp sgt i32 %144, 0
  br i1 %145, label %146, label %177

146:                                              ; preds = %135
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.HandleDictionary, ptr %147, i32 0, i32 1
  %149 = load ptr, ptr %148, align 8, !tbaa !18
  %150 = load ptr, ptr %20, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.DicNode, ptr %150, i32 0, i32 2
  %152 = load i32, ptr %151, align 4, !tbaa !17
  %153 = sext i32 %152 to i64
  %154 = add i64 16, %153
  %155 = trunc i64 %154 to i32
  %156 = call ptr @mMemoryWrite(ptr noundef %149, ptr noundef null, i32 noundef %155)
  store ptr %156, ptr %23, align 8, !tbaa !5
  %157 = load ptr, ptr %20, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.DicNode, ptr %157, i32 0, i32 2
  %159 = load i32, ptr %158, align 4, !tbaa !17
  %160 = load ptr, ptr %23, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.OverWriteChain, ptr %160, i32 0, i32 1
  store i32 %159, ptr %161, align 8, !tbaa !19
  %162 = load ptr, ptr %23, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.OverWriteChain, ptr %162, i32 0, i32 2
  %164 = getelementptr inbounds [0 x i8], ptr %163, i64 0, i64 0
  %165 = load ptr, ptr %22, align 8, !tbaa !5
  %166 = load ptr, ptr %20, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.DicNode, ptr %166, i32 0, i32 2
  %168 = load i32, ptr %167, align 4, !tbaa !17
  %169 = sext i32 %168 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %164, ptr align 8 %165, i64 %169, i1 false)
  %170 = load ptr, ptr %23, align 8, !tbaa !5
  %171 = load ptr, ptr %23, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.OverWriteChain, ptr %171, i32 0, i32 0
  store ptr %170, ptr %172, align 8, !tbaa !21
  %173 = load ptr, ptr %20, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.DicNode, ptr %173, i32 0, i32 2
  store i32 -1, ptr %174, align 4, !tbaa !17
  %175 = load ptr, ptr %23, align 8, !tbaa !5
  %176 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %175, ptr %176, align 8, !tbaa !5
  br label %177

177:                                              ; preds = %146, %135
  %178 = load ptr, ptr %10, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.HandleDictionary, ptr %178, i32 0, i32 1
  %180 = load ptr, ptr %179, align 8, !tbaa !18
  %181 = load i32, ptr %9, align 4, !tbaa !9
  %182 = sext i32 %181 to i64
  %183 = add i64 16, %182
  %184 = trunc i64 %183 to i32
  %185 = call ptr @mMemoryWrite(ptr noundef %180, ptr noundef null, i32 noundef %184)
  store ptr %185, ptr %23, align 8, !tbaa !5
  %186 = load i32, ptr %9, align 4, !tbaa !9
  %187 = load ptr, ptr %23, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.OverWriteChain, ptr %187, i32 0, i32 1
  store i32 %186, ptr %188, align 8, !tbaa !19
  %189 = load ptr, ptr %8, align 8, !tbaa !5
  %190 = icmp ne ptr %189, null
  br i1 %190, label %191, label %198

191:                                              ; preds = %177
  %192 = load ptr, ptr %23, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.OverWriteChain, ptr %192, i32 0, i32 2
  %194 = getelementptr inbounds [0 x i8], ptr %193, i64 0, i64 0
  %195 = load ptr, ptr %8, align 8, !tbaa !5
  %196 = load i32, ptr %9, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %194, ptr align 1 %195, i64 %197, i1 false)
  br label %198

198:                                              ; preds = %191, %177
  %199 = load ptr, ptr %22, align 8, !tbaa !5
  %200 = load ptr, ptr %199, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.OverWriteChain, ptr %200, i32 0, i32 0
  %202 = load ptr, ptr %201, align 8, !tbaa !21
  %203 = load ptr, ptr %23, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.OverWriteChain, ptr %203, i32 0, i32 0
  store ptr %202, ptr %204, align 8, !tbaa !21
  %205 = load ptr, ptr %23, align 8, !tbaa !5
  %206 = load ptr, ptr %22, align 8, !tbaa !5
  %207 = load ptr, ptr %206, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.OverWriteChain, ptr %207, i32 0, i32 0
  store ptr %205, ptr %208, align 8, !tbaa !21
  %209 = load ptr, ptr %23, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.OverWriteChain, ptr %209, i32 0, i32 2
  %211 = getelementptr inbounds [0 x i8], ptr %210, i64 0, i64 0
  store ptr %211, ptr %5, align 8
  store i32 1, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  br label %328

212:                                              ; preds = %130
  %213 = load ptr, ptr %20, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.DicNode, ptr %213, i32 0, i32 2
  %215 = load i32, ptr %214, align 4, !tbaa !17
  %216 = load i32, ptr %9, align 4, !tbaa !9
  %217 = icmp sge i32 %215, %216
  br i1 %217, label %218, label %241

218:                                              ; preds = %212
  %219 = load ptr, ptr %8, align 8, !tbaa !5
  %220 = icmp ne ptr %219, null
  br i1 %220, label %221, label %231

221:                                              ; preds = %218
  %222 = load ptr, ptr %20, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.DicNode, ptr %222, i32 0, i32 3
  %224 = getelementptr inbounds [0 x i8], ptr %223, i64 0, i64 0
  %225 = load i32, ptr %19, align 4, !tbaa !9
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds i8, ptr %224, i64 %226
  %228 = load ptr, ptr %8, align 8, !tbaa !5
  %229 = load i32, ptr %9, align 4, !tbaa !9
  %230 = sext i32 %229 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %227, ptr align 1 %228, i64 %230, i1 false)
  br label %231

231:                                              ; preds = %221, %218
  %232 = load i32, ptr %9, align 4, !tbaa !9
  %233 = load ptr, ptr %20, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.DicNode, ptr %233, i32 0, i32 2
  store i32 %232, ptr %234, align 4, !tbaa !17
  %235 = load ptr, ptr %20, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.DicNode, ptr %235, i32 0, i32 3
  %237 = getelementptr inbounds [0 x i8], ptr %236, i64 0, i64 0
  %238 = load i32, ptr %19, align 4, !tbaa !9
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds i8, ptr %237, i64 %239
  store ptr %240, ptr %5, align 8
  store i32 1, ptr %24, align 4
  br label %328

241:                                              ; preds = %212
  %242 = load ptr, ptr %21, align 8, !tbaa !5
  %243 = icmp eq ptr %242, null
  br i1 %243, label %244, label %254

244:                                              ; preds = %241
  %245 = load ptr, ptr %20, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.DicNode, ptr %245, i32 0, i32 0
  %247 = load ptr, ptr %246, align 8, !tbaa !22
  %248 = load ptr, ptr %10, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.HandleDictionary, ptr %248, i32 0, i32 0
  %250 = load ptr, ptr %249, align 8, !tbaa !12
  %251 = load i32, ptr %18, align 4, !tbaa !9
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds ptr, ptr %250, i64 %252
  store ptr %247, ptr %253, align 8, !tbaa !5
  br label %260

254:                                              ; preds = %241
  %255 = load ptr, ptr %20, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.DicNode, ptr %255, i32 0, i32 0
  %257 = load ptr, ptr %256, align 8, !tbaa !22
  %258 = load ptr, ptr %21, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.DicNode, ptr %258, i32 0, i32 0
  store ptr %257, ptr %259, align 8, !tbaa !22
  br label %260

260:                                              ; preds = %254, %244
  br label %267

261:                                              ; preds = %121
  br label %262

262:                                              ; preds = %261, %115
  %263 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %263, ptr %21, align 8, !tbaa !5
  %264 = load ptr, ptr %20, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.DicNode, ptr %264, i32 0, i32 0
  %266 = load ptr, ptr %265, align 8, !tbaa !22
  store ptr %266, ptr %20, align 8, !tbaa !5
  br label %112, !llvm.loop !23

267:                                              ; preds = %260, %112
  %268 = load ptr, ptr %10, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.HandleDictionary, ptr %268, i32 0, i32 1
  %270 = load ptr, ptr %269, align 8, !tbaa !18
  %271 = load i32, ptr %19, align 4, !tbaa !9
  %272 = sext i32 %271 to i64
  %273 = add i64 16, %272
  %274 = load i32, ptr %9, align 4, !tbaa !9
  %275 = icmp sgt i32 8, %274
  br i1 %275, label %276, label %277

276:                                              ; preds = %267
  br label %279

277:                                              ; preds = %267
  %278 = load i32, ptr %9, align 4, !tbaa !9
  br label %279

279:                                              ; preds = %277, %276
  %280 = phi i32 [ 8, %276 ], [ %278, %277 ]
  %281 = sext i32 %280 to i64
  %282 = add i64 %273, %281
  %283 = trunc i64 %282 to i32
  %284 = call ptr @mMemoryWrite(ptr noundef %270, ptr noundef null, i32 noundef %283)
  store ptr %284, ptr %20, align 8, !tbaa !5
  %285 = load i32, ptr %7, align 4, !tbaa !9
  %286 = load ptr, ptr %20, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.DicNode, ptr %286, i32 0, i32 1
  store i32 %285, ptr %287, align 8, !tbaa !14
  %288 = load i32, ptr %9, align 4, !tbaa !9
  %289 = load ptr, ptr %20, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.DicNode, ptr %289, i32 0, i32 2
  store i32 %288, ptr %290, align 4, !tbaa !17
  %291 = load ptr, ptr %20, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.DicNode, ptr %291, i32 0, i32 3
  %293 = getelementptr inbounds [0 x i8], ptr %292, i64 0, i64 0
  %294 = load ptr, ptr %6, align 8, !tbaa !5
  %295 = load i32, ptr %7, align 4, !tbaa !9
  %296 = sext i32 %295 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %293, ptr align 1 %294, i64 %296, i1 false)
  %297 = load ptr, ptr %20, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.DicNode, ptr %297, i32 0, i32 3
  %299 = getelementptr inbounds [0 x i8], ptr %298, i64 0, i64 0
  %300 = load i32, ptr %19, align 4, !tbaa !9
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds i8, ptr %299, i64 %301
  %303 = load ptr, ptr %8, align 8, !tbaa !5
  %304 = load i32, ptr %9, align 4, !tbaa !9
  %305 = sext i32 %304 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %302, ptr align 1 %303, i64 %305, i1 false)
  %306 = load ptr, ptr %10, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.HandleDictionary, ptr %306, i32 0, i32 0
  %308 = load ptr, ptr %307, align 8, !tbaa !12
  %309 = load i32, ptr %18, align 4, !tbaa !9
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds ptr, ptr %308, i64 %310
  %312 = load ptr, ptr %311, align 8, !tbaa !5
  %313 = load ptr, ptr %20, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.DicNode, ptr %313, i32 0, i32 0
  store ptr %312, ptr %314, align 8, !tbaa !22
  %315 = load ptr, ptr %20, align 8, !tbaa !5
  %316 = load ptr, ptr %10, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.HandleDictionary, ptr %316, i32 0, i32 0
  %318 = load ptr, ptr %317, align 8, !tbaa !12
  %319 = load i32, ptr %18, align 4, !tbaa !9
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds ptr, ptr %318, i64 %320
  store ptr %315, ptr %321, align 8, !tbaa !5
  %322 = load ptr, ptr %20, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.DicNode, ptr %322, i32 0, i32 3
  %324 = getelementptr inbounds [0 x i8], ptr %323, i64 0, i64 0
  %325 = load i32, ptr %19, align 4, !tbaa !9
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds i8, ptr %324, i64 %326
  store ptr %327, ptr %5, align 8
  store i32 1, ptr %24, align 4
  br label %328

328:                                              ; preds = %279, %231, %198
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %329 = load ptr, ptr %5, align 8
  ret ptr %329
}

declare ptr @mMemoryWrite(ptr noundef, ptr noundef, i32 noundef) #3

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 0}
!13 = !{!"HandleDictionary", !6, i64 0, !6, i64 8, !10, i64 16}
!14 = !{!15, !10, i64 8}
!15 = !{!"DicNode", !6, i64 0, !10, i64 8, !10, i64 12, !7, i64 16}
!16 = !{!13, !10, i64 16}
!17 = !{!15, !10, i64 12}
!18 = !{!13, !6, i64 8}
!19 = !{!20, !10, i64 8}
!20 = !{!"OverWriteChain", !6, i64 0, !10, i64 8, !7, i64 12}
!21 = !{!20, !6, i64 0}
!22 = !{!15, !6, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"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"

@.str.3 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@__FUNCTION__.m_DictionaryWrite = external hidden unnamed_addr constant [18 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local ptr @DictionaryInit() local_unnamed_addr #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #1

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) local_unnamed_addr #2

; 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) #3

; Function Attrs: nounwind uwtable
define dso_local nonnull ptr @m_DictionaryWrite(ptr nocapture noundef readonly %0, i32 noundef %1, ptr noundef readonly %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = tail call ptr @DictionaryInit()
  %6 = icmp slt i32 %3, 0
  br i1 %6, label %7, label %11

7:                                                ; preds = %4
  %8 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #6
  %9 = trunc i64 %8 to i32
  %10 = add i32 %9, 1
  br label %11

11:                                               ; preds = %7, %4
  %.0106 = phi i32 [ %10, %7 ], [ %3, %4 ]
  %12 = icmp slt i32 %1, 0
  br i1 %12, label %13, label %16

13:                                               ; preds = %11
  %14 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %0) #6
  %15 = trunc i64 %14 to i32
  br label %16

16:                                               ; preds = %11, %13
  %.0105 = phi i32 [ %15, %13 ], [ %1, %11 ]
  %17 = icmp sgt i32 %.0105, 32768
  br i1 %17, label %18, label %19

18:                                               ; preds = %16
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.3, i32 noundef 112, ptr noundef nonnull @__FUNCTION__.m_DictionaryWrite, ptr noundef nonnull @.str.4) #7
  br label %19

19:                                               ; preds = %18, %16
  %20 = add nsw i32 %.0105, -1
  %21 = ashr i32 %20, 1
  %22 = ashr i32 %20, 2
  %23 = add nsw i32 %21, %22
  %24 = load i8, ptr %0, align 1, !tbaa !5
  %25 = sext i8 %24 to i64
  %26 = shl nsw i64 %25, 16
  %27 = sext i32 %22 to i64
  %28 = getelementptr inbounds i8, ptr %0, i64 %27
  %29 = load i8, ptr %28, align 1, !tbaa !5
  %30 = sext i8 %29 to i64
  %31 = shl nsw i64 %30, 12
  %32 = add nsw i64 %31, %26
  %33 = sext i32 %21 to i64
  %34 = getelementptr inbounds i8, ptr %0, i64 %33
  %35 = load i8, ptr %34, align 1, !tbaa !5
  %36 = sext i8 %35 to i64
  %37 = shl nsw i64 %36, 8
  %38 = add nsw i64 %32, %37
  %39 = sext i32 %23 to i64
  %40 = getelementptr inbounds i8, ptr %0, i64 %39
  %41 = load i8, ptr %40, align 1, !tbaa !5
  %42 = sext i8 %41 to i64
  %43 = shl nsw i64 %42, 4
  %44 = add nsw i64 %38, %43
  %45 = sext i32 %20 to i64
  %46 = getelementptr inbounds i8, ptr %0, i64 %45
  %47 = load i8, ptr %46, align 1, !tbaa !5
  %48 = sext i8 %47 to i64
  %49 = add nsw i64 %44, %48
  %50 = and i64 %49, 16777215
  %51 = add nsw i32 %.0105, 7
  %52 = and i32 %51, -8
  %53 = load ptr, ptr %5, align 8, !tbaa !8
  %54 = getelementptr inbounds ptr, ptr %53, i64 %50
  %.0104116 = load ptr, ptr %54, align 8, !tbaa !12
  %.not117 = icmp eq ptr %.0104116, null
  %.pre = sext i32 %.0105 to i64
  br i1 %.not117, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %19, %103
  %.0104119 = phi ptr [ %.0104, %103 ], [ %.0104116, %19 ]
  %.0103118 = phi ptr [ %.0104119, %103 ], [ null, %19 ]
  %55 = getelementptr inbounds i8, ptr %.0104119, i64 8
  %56 = load i32, ptr %55, align 8, !tbaa !13
  %57 = icmp eq i32 %56, %.0105
  br i1 %57, label %58, label %103

58:                                               ; preds = %.lr.ph
  %59 = getelementptr inbounds i8, ptr %.0104119, i64 16
  %bcmp = tail call i32 @bcmp(ptr nonnull %59, ptr nonnull %0, i64 %.pre)
  %60 = icmp eq i32 %bcmp, 0
  br i1 %60, label %61, label %103

61:                                               ; preds = %58
  %62 = getelementptr inbounds i8, ptr %5, i64 16
  %63 = load i32, ptr %62, align 8, !tbaa !15
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %93

65:                                               ; preds = %61
  %66 = sext i32 %52 to i64
  %67 = getelementptr inbounds i8, ptr %59, i64 %66
  %68 = getelementptr inbounds i8, ptr %.0104119, i64 12
  %69 = load i32, ptr %68, align 4, !tbaa !16
  %70 = icmp sgt i32 %69, 0
  br i1 %70, label %71, label %79

71:                                               ; preds = %65
  %72 = getelementptr inbounds i8, ptr %5, i64 8
  %73 = load ptr, ptr %72, align 8, !tbaa !17
  %narrow = add nuw i32 %69, 16
  %74 = tail call ptr @mMemoryWrite(ptr noundef %73, ptr noundef null, i32 noundef %narrow) #7
  %75 = load i32, ptr %68, align 4, !tbaa !16
  %76 = getelementptr inbounds i8, ptr %74, i64 8
  store i32 %75, ptr %76, align 8, !tbaa !18
  %77 = getelementptr inbounds i8, ptr %74, i64 12
  %78 = sext i32 %75 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %77, ptr nonnull align 8 %67, i64 %78, i1 false)
  store ptr %74, ptr %74, align 8, !tbaa !20
  store i32 -1, ptr %68, align 4, !tbaa !16
  store ptr %74, ptr %67, align 8, !tbaa !12
  br label %79

79:                                               ; preds = %71, %65
  %80 = getelementptr inbounds i8, ptr %5, i64 8
  %81 = load ptr, ptr %80, align 8, !tbaa !17
  %82 = add i32 %.0106, 16
  %83 = tail call ptr @mMemoryWrite(ptr noundef %81, ptr noundef null, i32 noundef %82) #7
  %84 = getelementptr inbounds i8, ptr %83, i64 8
  store i32 %.0106, ptr %84, align 8, !tbaa !18
  %.not113 = icmp eq ptr %2, null
  br i1 %.not113, label %88, label %85

85:                                               ; preds = %79
  %86 = sext i32 %.0106 to i64
  %87 = getelementptr inbounds i8, ptr %83, i64 12
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %87, ptr nonnull align 1 %2, i64 %86, i1 false)
  br label %88

88:                                               ; preds = %85, %79
  %89 = load ptr, ptr %67, align 8, !tbaa !12
  %90 = load ptr, ptr %89, align 8, !tbaa !20
  store ptr %90, ptr %83, align 8, !tbaa !20
  %91 = load ptr, ptr %67, align 8, !tbaa !12
  store ptr %83, ptr %91, align 8, !tbaa !20
  %92 = getelementptr inbounds i8, ptr %83, i64 12
  br label %119

93:                                               ; preds = %61
  %94 = getelementptr inbounds i8, ptr %.0104119, i64 12
  %95 = load i32, ptr %94, align 4, !tbaa !16
  %.not111 = icmp slt i32 %95, %.0106
  br i1 %.not111, label %.loopexit.sink.split, label %96

96:                                               ; preds = %93
  %.not112 = icmp eq ptr %2, null
  %.pre122 = sext i32 %52 to i64
  br i1 %.not112, label %._crit_edge, label %97

97:                                               ; preds = %96
  %98 = getelementptr inbounds i8, ptr %59, i64 %.pre122
  %99 = sext i32 %.0106 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %98, ptr nonnull align 1 %2, i64 %99, i1 false)
  br label %._crit_edge

._crit_edge:                                      ; preds = %96, %97
  store i32 %.0106, ptr %94, align 4, !tbaa !16
  %100 = getelementptr inbounds i8, ptr %59, i64 %.pre122
  br label %119

.loopexit.sink.split:                             ; preds = %93
  %101 = icmp eq ptr %.0103118, null
  %102 = load ptr, ptr %.0104119, align 8, !tbaa !21
  %..0103118.lcssa = select i1 %101, ptr %54, ptr %.0103118
  store ptr %102, ptr %..0103118.lcssa, align 8, !tbaa !12
  br label %.loopexit

103:                                              ; preds = %58, %.lr.ph
  %.0104 = load ptr, ptr %.0104119, align 8, !tbaa !12
  %.not = icmp eq ptr %.0104, null
  br i1 %.not, label %.loopexit, label %.lr.ph, !llvm.loop !22

.loopexit:                                        ; preds = %103, %.loopexit.sink.split, %19
  %104 = getelementptr inbounds i8, ptr %5, i64 8
  %105 = load ptr, ptr %104, align 8, !tbaa !17
  %106 = sext i32 %52 to i64
  %107 = tail call i32 @llvm.smax.i32(i32 %.0106, i32 8)
  %108 = add nuw i32 %107, 16
  %109 = add i32 %108, %52
  %110 = tail call ptr @mMemoryWrite(ptr noundef %105, ptr noundef null, i32 noundef %109) #7
  %111 = getelementptr inbounds i8, ptr %110, i64 8
  store i32 %.0105, ptr %111, align 8, !tbaa !13
  %112 = getelementptr inbounds i8, ptr %110, i64 12
  store i32 %.0106, ptr %112, align 4, !tbaa !16
  %113 = getelementptr inbounds i8, ptr %110, i64 16
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %113, ptr nonnull align 1 %0, i64 %.pre, i1 false)
  %114 = getelementptr inbounds i8, ptr %113, i64 %106
  %115 = sext i32 %.0106 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %114, ptr align 1 %2, i64 %115, i1 false)
  %116 = load ptr, ptr %5, align 8, !tbaa !8
  %117 = getelementptr inbounds ptr, ptr %116, i64 %50
  %118 = load ptr, ptr %117, align 8, !tbaa !12
  store ptr %118, ptr %110, align 8, !tbaa !21
  store ptr %110, ptr %117, align 8, !tbaa !12
  br label %119

119:                                              ; preds = %.loopexit, %._crit_edge, %88
  %.0 = phi ptr [ %92, %88 ], [ %100, %._crit_edge ], [ %114, %.loopexit ]
  ret ptr %.0
}

declare ptr @mMemoryWrite(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #5

attributes #0 = { 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 #1 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nofree nounwind willreturn memory(argmem: read) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind willreturn memory(read) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !10, i64 0}
!9 = !{!"HandleDictionary", !10, i64 0, !10, i64 8, !11, i64 16}
!10 = !{!"any pointer", !6, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!10, !10, i64 0}
!13 = !{!14, !11, i64 8}
!14 = !{!"DicNode", !10, i64 0, !11, i64 8, !11, i64 12, !6, i64 16}
!15 = !{!9, !11, i64 16}
!16 = !{!14, !11, i64 12}
!17 = !{!9, !10, i64 8}
!18 = !{!19, !11, i64 8}
!19 = !{!"OverWriteChain", !10, i64 0, !11, i64 8, !6, i64 12}
!20 = !{!19, !10, i64 0}
!21 = !{!14, !10, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


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