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

; 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.HandleList = type { %struct.MList, i32, i32, i32, i32 }
%struct.MList = type { i32, ptr }
%struct.MHandle = type { i32, i32, ptr, ptr }
%struct.HandleMornMap = type { i32, ptr, i32, i32, ptr }
%struct.MChainNode = type { ptr, ptr, ptr }
%struct.MObject = type { i32, %union.anon }
%union.anon = type { ptr }
%struct.OverWriteChain = type { ptr, i32, [0 x i8] }

@.str = external hidden unnamed_addr constant [75 x i8], align 1
@__FUNCTION__.mornMapWrite = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @endMornMap(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @_MapListAppend(ptr noundef) #0

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

declare ptr @m_Malloc(i32 noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @_MapNode(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local ptr @mornMapWrite(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i32 %4, ptr %11, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = icmp eq ptr %29, null
  br i1 %30, label %35, label %31

31:                                               ; preds = %28
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = ptrtoint ptr %32 to i64
  %34 = icmp eq i64 %33, -1
  br label %35

35:                                               ; preds = %31, %28
  %36 = phi i1 [ true, %28 ], [ %34, %31 ]
  %37 = zext i1 %36 to i32
  store i32 %37, ptr %12, align 4, !tbaa !9
  %38 = load i32, ptr %12, align 4, !tbaa !9
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %42

40:                                               ; preds = %35
  %41 = load i32, ptr %12, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %41, i32 noundef -1, ptr noundef @.str, i32 noundef 133, ptr noundef @__FUNCTION__.mornMapWrite, ptr noundef @.str.1)
  br label %42

42:                                               ; preds = %40, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %43

43:                                               ; preds = %42
  br label %44

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = icmp eq ptr %45, null
  br i1 %46, label %51, label %47

47:                                               ; preds = %44
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = ptrtoint ptr %48 to i64
  %50 = icmp eq i64 %49, -1
  br label %51

51:                                               ; preds = %47, %44
  %52 = phi i1 [ true, %44 ], [ %50, %47 ]
  %53 = zext i1 %52 to i32
  store i32 %53, ptr %13, align 4, !tbaa !9
  %54 = load i32, ptr %13, align 4, !tbaa !9
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %58

56:                                               ; preds = %51
  %57 = load i32, ptr %13, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %57, i32 noundef -1, ptr noundef @.str, i32 noundef 134, ptr noundef @__FUNCTION__.mornMapWrite, ptr noundef @.str.2)
  br label %58

58:                                               ; preds = %56, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %59

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = icmp eq ptr %61, null
  br i1 %62, label %67, label %63

63:                                               ; preds = %60
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = ptrtoint ptr %64 to i64
  %66 = icmp eq i64 %65, -1
  br i1 %66, label %67, label %70

67:                                               ; preds = %63, %60
  %68 = load i32, ptr %11, align 4, !tbaa !9
  %69 = icmp sle i32 %68, 0
  br label %70

70:                                               ; preds = %67, %63
  %71 = phi i1 [ false, %63 ], [ %69, %67 ]
  %72 = zext i1 %71 to i32
  store i32 %72, ptr %14, align 4, !tbaa !9
  %73 = load i32, ptr %14, align 4, !tbaa !9
  %74 = icmp ne i32 %73, 0
  br i1 %74, label %75, label %77

75:                                               ; preds = %70
  %76 = load i32, ptr %14, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %76, i32 noundef -1, ptr noundef @.str, i32 noundef 135, ptr noundef @__FUNCTION__.mornMapWrite, ptr noundef @.str.3)
  br label %77

77:                                               ; preds = %75, %70
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %78

78:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.HandleList, ptr %79, i64 -1
  store ptr %80, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %81 = load ptr, ptr %17, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.MList, ptr %81, i32 0, i32 0
  %83 = load i32, ptr %82, align 8, !tbaa !11
  %84 = icmp slt i32 %83, 3
  br i1 %84, label %85, label %88

85:                                               ; preds = %78
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = call ptr @GetHandle(ptr noundef %86, i32 noundef 32, i32 noundef 427716643, ptr noundef @endMornMap)
  store ptr %87, ptr %18, align 8, !tbaa !5
  br label %107

88:                                               ; preds = %78
  %89 = load ptr, ptr %17, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.MList, ptr %89, i32 0, i32 1
  %91 = load ptr, ptr %90, align 8, !tbaa !13
  %92 = getelementptr inbounds ptr, ptr %91, i64 2
  %93 = load ptr, ptr %92, align 8, !tbaa !5
  store ptr %93, ptr %18, align 8, !tbaa !5
  br label %94

94:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %95 = load ptr, ptr %18, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.MHandle, ptr %95, i32 0, i32 0
  %97 = load volatile i32, ptr %96, align 8, !tbaa !14
  %98 = icmp ne i32 %97, 427716643
  %99 = zext i1 %98 to i32
  store i32 %99, ptr %19, align 4, !tbaa !9
  %100 = load i32, ptr %19, align 4, !tbaa !9
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %104

102:                                              ; preds = %94
  %103 = load i32, ptr %19, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %103, i32 noundef -1, ptr noundef @.str, i32 noundef 142, ptr noundef @__FUNCTION__.mornMapWrite, ptr noundef @.str.4)
  br label %104

104:                                              ; preds = %102, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105
  br label %107

107:                                              ; preds = %106, %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %108 = load ptr, ptr %18, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.MHandle, ptr %108, i32 0, i32 3
  %110 = load ptr, ptr %109, align 8, !tbaa !16
  store ptr %110, ptr %20, align 8, !tbaa !5
  %111 = load ptr, ptr %18, align 8, !tbaa !5
  %112 = call i32 @mHandleValid(ptr noundef %111)
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %153, label %114

114:                                              ; preds = %107
  %115 = load ptr, ptr %20, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.HandleMornMap, ptr %115, i32 0, i32 1
  %117 = load ptr, ptr %116, align 8, !tbaa !17
  %118 = icmp eq ptr %117, null
  br i1 %118, label %119, label %150

119:                                              ; preds = %114
  %120 = call ptr @m_Malloc(i32 noundef 1032)
  %121 = load ptr, ptr %20, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.HandleMornMap, ptr %121, i32 0, i32 1
  store ptr %120, ptr %122, align 8, !tbaa !17
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = call ptr @mChainNode(ptr noundef %123, ptr noundef null, i32 noundef 24)
  store ptr %124, ptr %15, align 8, !tbaa !5
  %125 = load ptr, ptr %15, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.MChainNode, ptr %125, i32 0, i32 0
  %127 = load ptr, ptr %126, align 8, !tbaa !19
  store ptr %127, ptr %16, align 8, !tbaa !5
  %128 = load ptr, ptr %16, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 4 %128, i8 0, i64 24, i1 false)
  %129 = load ptr, ptr %16, align 8, !tbaa !5
  %130 = getelementptr inbounds i32, ptr %129, i64 0
  store i32 0, ptr %130, align 4, !tbaa !9
  %131 = load ptr, ptr %16, align 8, !tbaa !5
  %132 = getelementptr inbounds i32, ptr %131, i64 1
  store i32 0, ptr %132, align 4, !tbaa !9
  %133 = load ptr, ptr %15, align 8, !tbaa !5
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.MObject, ptr %134, i32 0, i32 1
  store ptr %133, ptr %135, align 8, !tbaa !21
  %136 = load ptr, ptr %15, align 8, !tbaa !5
  %137 = load ptr, ptr %20, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.HandleMornMap, ptr %137, i32 0, i32 1
  %139 = load ptr, ptr %138, align 8, !tbaa !17
  %140 = getelementptr inbounds ptr, ptr %139, i64 0
  store ptr %136, ptr %140, align 8, !tbaa !5
  %141 = load ptr, ptr %15, align 8, !tbaa !5
  %142 = load ptr, ptr %20, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.HandleMornMap, ptr %142, i32 0, i32 1
  %144 = load ptr, ptr %143, align 8, !tbaa !17
  %145 = getelementptr inbounds ptr, ptr %144, i64 1
  store ptr %141, ptr %145, align 8, !tbaa !5
  %146 = load ptr, ptr %20, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.HandleMornMap, ptr %146, i32 0, i32 2
  store i32 1, ptr %147, align 8, !tbaa !22
  %148 = load ptr, ptr %20, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.HandleMornMap, ptr %148, i32 0, i32 0
  store i32 1, ptr %149, align 8, !tbaa !23
  br label %150

150:                                              ; preds = %119, %114
  %151 = load ptr, ptr %18, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.MHandle, ptr %151, i32 0, i32 1
  store volatile i32 1, ptr %152, align 4, !tbaa !24
  br label %153

153:                                              ; preds = %150, %107
  %154 = load i32, ptr %9, align 4, !tbaa !9
  %155 = icmp sle i32 %154, 0
  br i1 %155, label %156, label %160

156:                                              ; preds = %153
  %157 = load ptr, ptr %8, align 8, !tbaa !5
  %158 = call i64 @strlen(ptr noundef %157) #7
  %159 = trunc i64 %158 to i32
  store i32 %159, ptr %9, align 4, !tbaa !9
  br label %160

160:                                              ; preds = %156, %153
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %161 = load i32, ptr %9, align 4, !tbaa !9
  %162 = add nsw i32 %161, 7
  %163 = ashr i32 %162, 3
  %164 = sext i32 %163 to i64
  %165 = mul i64 %164, 2
  %166 = trunc i64 %165 to i32
  store i32 %166, ptr %21, align 4, !tbaa !9
  %167 = load i32, ptr %11, align 4, !tbaa !9
  %168 = icmp sle i32 %167, 0
  br i1 %168, label %169, label %174

169:                                              ; preds = %160
  %170 = load ptr, ptr %10, align 8, !tbaa !5
  %171 = call i64 @strlen(ptr noundef %170) #7
  %172 = add i64 %171, 1
  %173 = trunc i64 %172 to i32
  store i32 %173, ptr %11, align 4, !tbaa !9
  br label %174

174:                                              ; preds = %169, %160
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %175 = load i32, ptr %11, align 4, !tbaa !9
  %176 = add nsw i32 %175, 7
  %177 = ashr i32 %176, 3
  %178 = sext i32 %177 to i64
  %179 = mul i64 %178, 2
  %180 = trunc i64 %179 to i32
  store i32 %180, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %181 = load ptr, ptr %20, align 8, !tbaa !5
  %182 = load ptr, ptr %8, align 8, !tbaa !5
  %183 = load i32, ptr %9, align 4, !tbaa !9
  %184 = call ptr @_MapNode(ptr noundef %181, ptr noundef %182, i32 noundef %183, ptr noundef %23)
  store ptr %184, ptr %24, align 8, !tbaa !5
  %185 = load i32, ptr %23, align 4, !tbaa !9
  %186 = icmp ne i32 %185, -1
  br i1 %186, label %187, label %308

187:                                              ; preds = %174
  %188 = load ptr, ptr %24, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.MChainNode, ptr %188, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8, !tbaa !19
  store ptr %190, ptr %16, align 8, !tbaa !5
  %191 = load ptr, ptr %20, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.HandleMornMap, ptr %191, i32 0, i32 3
  %193 = load i32, ptr %192, align 4, !tbaa !25
  %194 = icmp ne i32 %193, 0
  br i1 %194, label %195, label %280

195:                                              ; preds = %187
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %196 = load ptr, ptr %16, align 8, !tbaa !5
  %197 = getelementptr inbounds i32, ptr %196, i64 2
  %198 = load i32, ptr %21, align 4, !tbaa !9
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds i32, ptr %197, i64 %199
  store ptr %200, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  %201 = load ptr, ptr %16, align 8, !tbaa !5
  %202 = getelementptr inbounds i32, ptr %201, i64 1
  %203 = load i32, ptr %202, align 4, !tbaa !9
  %204 = icmp sgt i32 %203, 0
  br i1 %204, label %205, label %245

205:                                              ; preds = %195
  %206 = load ptr, ptr %20, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.HandleMornMap, ptr %206, i32 0, i32 4
  %208 = load ptr, ptr %207, align 8, !tbaa !26
  %209 = icmp eq ptr %208, null
  br i1 %209, label %210, label %214

210:                                              ; preds = %205
  %211 = call ptr @mMemoryCreate(i32 noundef -1, i32 noundef -1, i32 noundef 0)
  %212 = load ptr, ptr %20, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.HandleMornMap, ptr %212, i32 0, i32 4
  store ptr %211, ptr %213, align 8, !tbaa !26
  br label %214

214:                                              ; preds = %210, %205
  %215 = load ptr, ptr %20, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.HandleMornMap, ptr %215, i32 0, i32 4
  %217 = load ptr, ptr %216, align 8, !tbaa !26
  %218 = load ptr, ptr %16, align 8, !tbaa !5
  %219 = getelementptr inbounds i32, ptr %218, i64 1
  %220 = load i32, ptr %219, align 4, !tbaa !9
  %221 = sext i32 %220 to i64
  %222 = add i64 16, %221
  %223 = trunc i64 %222 to i32
  %224 = call ptr @mMemoryWrite(ptr noundef %217, ptr noundef null, i32 noundef %223)
  store ptr %224, ptr %26, align 8, !tbaa !5
  %225 = load ptr, ptr %16, align 8, !tbaa !5
  %226 = getelementptr inbounds i32, ptr %225, i64 1
  %227 = load i32, ptr %226, align 4, !tbaa !9
  %228 = load ptr, ptr %26, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.OverWriteChain, ptr %228, i32 0, i32 1
  store i32 %227, ptr %229, align 8, !tbaa !27
  %230 = load ptr, ptr %26, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.OverWriteChain, ptr %230, i32 0, i32 2
  %232 = getelementptr inbounds [0 x i8], ptr %231, i64 0, i64 0
  %233 = load ptr, ptr %25, align 8, !tbaa !5
  %234 = load ptr, ptr %16, align 8, !tbaa !5
  %235 = getelementptr inbounds i32, ptr %234, i64 1
  %236 = load i32, ptr %235, align 4, !tbaa !9
  %237 = sext i32 %236 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %232, ptr align 8 %233, i64 %237, i1 false)
  %238 = load ptr, ptr %26, align 8, !tbaa !5
  %239 = load ptr, ptr %26, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.OverWriteChain, ptr %239, i32 0, i32 0
  store ptr %238, ptr %240, align 8, !tbaa !29
  %241 = load ptr, ptr %16, align 8, !tbaa !5
  %242 = getelementptr inbounds i32, ptr %241, i64 1
  store i32 -1, ptr %242, align 4, !tbaa !9
  %243 = load ptr, ptr %26, align 8, !tbaa !5
  %244 = load ptr, ptr %25, align 8, !tbaa !5
  store ptr %243, ptr %244, align 8, !tbaa !5
  br label %245

245:                                              ; preds = %214, %195
  %246 = load ptr, ptr %20, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.HandleMornMap, ptr %246, i32 0, i32 4
  %248 = load ptr, ptr %247, align 8, !tbaa !26
  %249 = load i32, ptr %11, align 4, !tbaa !9
  %250 = sext i32 %249 to i64
  %251 = add i64 16, %250
  %252 = trunc i64 %251 to i32
  %253 = call ptr @mMemoryWrite(ptr noundef %248, ptr noundef null, i32 noundef %252)
  store ptr %253, ptr %26, align 8, !tbaa !5
  %254 = load i32, ptr %11, align 4, !tbaa !9
  %255 = load ptr, ptr %26, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.OverWriteChain, ptr %255, i32 0, i32 1
  store i32 %254, ptr %256, align 8, !tbaa !27
  %257 = load ptr, ptr %10, align 8, !tbaa !5
  %258 = icmp ne ptr %257, null
  br i1 %258, label %259, label %266

259:                                              ; preds = %245
  %260 = load ptr, ptr %26, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.OverWriteChain, ptr %260, i32 0, i32 2
  %262 = getelementptr inbounds [0 x i8], ptr %261, i64 0, i64 0
  %263 = load ptr, ptr %10, align 8, !tbaa !5
  %264 = load i32, ptr %11, align 4, !tbaa !9
  %265 = sext i32 %264 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %262, ptr align 1 %263, i64 %265, i1 false)
  br label %266

266:                                              ; preds = %259, %245
  %267 = load ptr, ptr %25, align 8, !tbaa !5
  %268 = load ptr, ptr %267, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.OverWriteChain, ptr %268, i32 0, i32 0
  %270 = load ptr, ptr %269, align 8, !tbaa !29
  %271 = load ptr, ptr %26, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.OverWriteChain, ptr %271, i32 0, i32 0
  store ptr %270, ptr %272, align 8, !tbaa !29
  %273 = load ptr, ptr %26, align 8, !tbaa !5
  %274 = load ptr, ptr %25, align 8, !tbaa !5
  %275 = load ptr, ptr %274, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.OverWriteChain, ptr %275, i32 0, i32 0
  store ptr %273, ptr %276, align 8, !tbaa !29
  %277 = load ptr, ptr %26, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.OverWriteChain, ptr %277, i32 0, i32 2
  %279 = getelementptr inbounds [0 x i8], ptr %278, i64 0, i64 0
  store ptr %279, ptr %6, align 8
  store i32 1, ptr %27, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %376

280:                                              ; preds = %187
  %281 = load i32, ptr %11, align 4, !tbaa !9
  %282 = load ptr, ptr %16, align 8, !tbaa !5
  %283 = getelementptr inbounds i32, ptr %282, i64 1
  %284 = load i32, ptr %283, align 4, !tbaa !9
  %285 = icmp sle i32 %281, %284
  br i1 %285, label %286, label %307

286:                                              ; preds = %280
  %287 = load ptr, ptr %10, align 8, !tbaa !5
  %288 = icmp ne ptr %287, null
  br i1 %288, label %289, label %298

289:                                              ; preds = %286
  %290 = load ptr, ptr %16, align 8, !tbaa !5
  %291 = getelementptr inbounds i32, ptr %290, i64 2
  %292 = load i32, ptr %21, align 4, !tbaa !9
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds i32, ptr %291, i64 %293
  %295 = load ptr, ptr %10, align 8, !tbaa !5
  %296 = load i32, ptr %11, align 4, !tbaa !9
  %297 = sext i32 %296 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %294, ptr align 1 %295, i64 %297, i1 false)
  br label %298

298:                                              ; preds = %289, %286
  %299 = load i32, ptr %11, align 4, !tbaa !9
  %300 = load ptr, ptr %16, align 8, !tbaa !5
  %301 = getelementptr inbounds i32, ptr %300, i64 1
  store i32 %299, ptr %301, align 4, !tbaa !9
  %302 = load ptr, ptr %16, align 8, !tbaa !5
  %303 = getelementptr inbounds i32, ptr %302, i64 2
  %304 = load i32, ptr %21, align 4, !tbaa !9
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds i32, ptr %303, i64 %305
  store ptr %306, ptr %6, align 8
  store i32 1, ptr %27, align 4
  br label %376

307:                                              ; preds = %280
  br label %308

308:                                              ; preds = %307, %174
  %309 = load ptr, ptr %7, align 8, !tbaa !5
  %310 = load i32, ptr %21, align 4, !tbaa !9
  %311 = add nsw i32 2, %310
  %312 = load i32, ptr %22, align 4, !tbaa !9
  %313 = add nsw i32 %311, %312
  %314 = sext i32 %313 to i64
  %315 = mul i64 %314, 4
  %316 = trunc i64 %315 to i32
  %317 = call ptr @mChainNode(ptr noundef %309, ptr noundef null, i32 noundef %316)
  store ptr %317, ptr %15, align 8, !tbaa !5
  %318 = load ptr, ptr %15, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.MChainNode, ptr %318, i32 0, i32 0
  %320 = load ptr, ptr %319, align 8, !tbaa !19
  store ptr %320, ptr %16, align 8, !tbaa !5
  %321 = load i32, ptr %9, align 4, !tbaa !9
  %322 = load ptr, ptr %16, align 8, !tbaa !5
  %323 = getelementptr inbounds i32, ptr %322, i64 0
  store i32 %321, ptr %323, align 4, !tbaa !9
  %324 = load i32, ptr %11, align 4, !tbaa !9
  %325 = load ptr, ptr %16, align 8, !tbaa !5
  %326 = getelementptr inbounds i32, ptr %325, i64 1
  store i32 %324, ptr %326, align 4, !tbaa !9
  %327 = load ptr, ptr %16, align 8, !tbaa !5
  %328 = getelementptr inbounds i32, ptr %327, i64 2
  %329 = load ptr, ptr %8, align 8, !tbaa !5
  %330 = load i32, ptr %9, align 4, !tbaa !9
  %331 = sext i32 %330 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %328, ptr align 1 %329, i64 %331, i1 false)
  %332 = load ptr, ptr %10, align 8, !tbaa !5
  %333 = icmp ne ptr %332, null
  br i1 %333, label %334, label %343

334:                                              ; preds = %308
  %335 = load ptr, ptr %16, align 8, !tbaa !5
  %336 = getelementptr inbounds i32, ptr %335, i64 2
  %337 = load i32, ptr %21, align 4, !tbaa !9
  %338 = sext i32 %337 to i64
  %339 = getelementptr inbounds i32, ptr %336, i64 %338
  %340 = load ptr, ptr %10, align 8, !tbaa !5
  %341 = load i32, ptr %11, align 4, !tbaa !9
  %342 = sext i32 %341 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %339, ptr align 1 %340, i64 %342, i1 false)
  br label %343

343:                                              ; preds = %334, %308
  %344 = load i32, ptr %23, align 4, !tbaa !9
  %345 = icmp ne i32 %344, -1
  br i1 %345, label %346, label %352

346:                                              ; preds = %343
  %347 = load ptr, ptr %15, align 8, !tbaa !5
  %348 = getelementptr inbounds %struct.MChainNode, ptr %347, i32 0, i32 0
  %349 = load ptr, ptr %348, align 8, !tbaa !19
  %350 = load ptr, ptr %24, align 8, !tbaa !5
  %351 = getelementptr inbounds %struct.MChainNode, ptr %350, i32 0, i32 0
  store ptr %349, ptr %351, align 8, !tbaa !19
  br label %370

352:                                              ; preds = %343
  %353 = load ptr, ptr %20, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct.HandleMornMap, ptr %353, i32 0, i32 0
  %355 = load i32, ptr %354, align 8, !tbaa !23
  %356 = add nsw i32 %355, 1
  store i32 %356, ptr %354, align 8, !tbaa !23
  %357 = load ptr, ptr %15, align 8, !tbaa !5
  %358 = load ptr, ptr %24, align 8, !tbaa !5
  call void @mChainNodeInsert(ptr noundef null, ptr noundef %357, ptr noundef %358)
  %359 = load ptr, ptr %20, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.HandleMornMap, ptr %359, i32 0, i32 0
  %361 = load i32, ptr %360, align 8, !tbaa !23
  %362 = load ptr, ptr %20, align 8, !tbaa !5
  %363 = getelementptr inbounds %struct.HandleMornMap, ptr %362, i32 0, i32 2
  %364 = load i32, ptr %363, align 8, !tbaa !22
  %365 = mul nsw i32 %364, 2
  %366 = icmp sge i32 %361, %365
  br i1 %366, label %367, label %369

367:                                              ; preds = %352
  %368 = load ptr, ptr %20, align 8, !tbaa !5
  call void @_MapListAppend(ptr noundef %368)
  br label %369

369:                                              ; preds = %367, %352
  br label %370

370:                                              ; preds = %369, %346
  %371 = load ptr, ptr %16, align 8, !tbaa !5
  %372 = getelementptr inbounds i32, ptr %371, i64 2
  %373 = load i32, ptr %21, align 4, !tbaa !9
  %374 = sext i32 %373 to i64
  %375 = getelementptr inbounds i32, ptr %372, i64 %374
  store ptr %375, ptr %6, align 8
  store i32 1, ptr %27, align 4
  br label %376

376:                                              ; preds = %370, %298, %266
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  %377 = load ptr, ptr %6, align 8
  ret ptr %377
}

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

declare ptr @GetHandle(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #2

declare i32 @mHandleValid(ptr noundef) #2

declare ptr @mChainNode(ptr noundef, ptr noundef, i32 noundef) #2

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

declare ptr @mMemoryCreate(i32 noundef, i32 noundef, i32 noundef) #2

declare ptr @mMemoryWrite(ptr noundef, ptr noundef, i32 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) #5

declare void @mChainNodeInsert(ptr noundef, ptr noundef, ptr noundef) #2

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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { 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 = !{!12, !10, i64 0}
!12 = !{!"MList", !10, i64 0, !6, i64 8}
!13 = !{!12, !6, i64 8}
!14 = !{!15, !10, i64 0}
!15 = !{!"MHandle", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!16 = !{!15, !6, i64 16}
!17 = !{!18, !6, i64 8}
!18 = !{!"HandleMornMap", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !6, i64 24}
!19 = !{!20, !6, i64 0}
!20 = !{!"MChainNode", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!7, !7, i64 0}
!22 = !{!18, !10, i64 16}
!23 = !{!18, !10, i64 0}
!24 = !{!15, !10, i64 4}
!25 = !{!18, !10, i64 20}
!26 = !{!18, !6, i64 24}
!27 = !{!28, !10, i64 8}
!28 = !{!"OverWriteChain", !6, i64 0, !10, i64 8, !7, i64 12}
!29 = !{!28, !6, i64 0}


; 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 = external hidden unnamed_addr constant [75 x i8], align 1
@__FUNCTION__.mornMapWrite = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @endMornMap(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @_MapListAppend(ptr 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

declare ptr @m_Malloc(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @_MapNode(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local nonnull ptr @mornMapWrite(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4) local_unnamed_addr #0 {
  %6 = alloca i32, align 4
  %magicptr = ptrtoint ptr %0 to i64
  switch i64 %magicptr, label %12 [
    i64 -1, label %7
    i64 0, label %7
  ]

7:                                                ; preds = %5, %5
  %8 = icmp eq ptr %0, null
  %9 = icmp eq ptr %0, inttoptr (i64 -1 to ptr)
  %10 = or i1 %8, %9
  %11 = zext i1 %10 to i32
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %11, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 133, ptr noundef nonnull @__FUNCTION__.mornMapWrite, ptr noundef nonnull @.str.1) #6
  br label %12

12:                                               ; preds = %5, %7
  %magicptr132 = ptrtoint ptr %1 to i64
  switch i64 %magicptr132, label %18 [
    i64 -1, label %13
    i64 0, label %13
  ]

13:                                               ; preds = %12, %12
  %14 = icmp eq ptr %1, null
  %15 = icmp eq ptr %1, inttoptr (i64 -1 to ptr)
  %16 = or i1 %14, %15
  %17 = zext i1 %16 to i32
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %17, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 134, ptr noundef nonnull @__FUNCTION__.mornMapWrite, ptr noundef nonnull @.str.2) #6
  br label %18

18:                                               ; preds = %12, %13
  %magicptr133 = ptrtoint ptr %3 to i64
  switch i64 %magicptr133, label %.thread [
    i64 -1, label %19
    i64 0, label %19
  ]

19:                                               ; preds = %18, %18
  %20 = icmp slt i32 %4, 1
  br i1 %20, label %21, label %.thread

21:                                               ; preds = %19
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 135, ptr noundef nonnull @__FUNCTION__.mornMapWrite, ptr noundef nonnull @.str.3) #6
  br label %.thread

.thread:                                          ; preds = %18, %21, %19
  %22 = getelementptr inbounds i8, ptr %0, i64 -32
  %23 = load i32, ptr %22, align 8, !tbaa !5
  %24 = icmp slt i32 %23, 3
  br i1 %24, label %25, label %27

25:                                               ; preds = %.thread
  %26 = tail call ptr @GetHandle(ptr noundef nonnull %0, i32 noundef 32, i32 noundef 427716643, ptr noundef nonnull @endMornMap) #6
  br label %34

27:                                               ; preds = %.thread
  %28 = getelementptr inbounds i8, ptr %0, i64 -24
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %31 = load ptr, ptr %30, align 8, !tbaa !12
  %32 = load volatile i32, ptr %31, align 8, !tbaa !13
  %.not134 = icmp eq i32 %32, 427716643
  br i1 %.not134, label %34, label %33

33:                                               ; preds = %27
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 142, ptr noundef nonnull @__FUNCTION__.mornMapWrite, ptr noundef nonnull @.str.4) #6
  br label %34

34:                                               ; preds = %27, %33, %25
  %.0120 = phi ptr [ %26, %25 ], [ %31, %33 ], [ %31, %27 ]
  %35 = getelementptr inbounds i8, ptr %.0120, i64 16
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  %37 = tail call i32 @mHandleValid(ptr noundef %.0120) #6
  %.not = icmp eq i32 %37, 0
  br i1 %.not, label %38, label %53

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %36, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !16
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %51

42:                                               ; preds = %38
  %43 = tail call ptr @m_Malloc(i32 noundef 1032) #6
  store ptr %43, ptr %39, align 8, !tbaa !16
  %44 = tail call ptr @mChainNode(ptr noundef nonnull %0, ptr noundef null, i32 noundef 24) #6
  %45 = load ptr, ptr %44, align 8, !tbaa !18
  %46 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(24) %45, i8 0, i64 24, i1 false)
  store ptr %44, ptr %46, align 8, !tbaa !20
  %47 = load ptr, ptr %39, align 8, !tbaa !16
  store ptr %44, ptr %47, align 8, !tbaa !12
  %48 = load ptr, ptr %39, align 8, !tbaa !16
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  store ptr %44, ptr %49, align 8, !tbaa !12
  %50 = getelementptr inbounds i8, ptr %36, i64 16
  store i32 1, ptr %50, align 8, !tbaa !21
  store i32 1, ptr %36, align 8, !tbaa !22
  br label %51

51:                                               ; preds = %42, %38
  %52 = getelementptr inbounds i8, ptr %.0120, i64 4
  store volatile i32 1, ptr %52, align 4, !tbaa !23
  br label %53

53:                                               ; preds = %51, %34
  %54 = icmp slt i32 %2, 1
  br i1 %54, label %55, label %58

55:                                               ; preds = %53
  %56 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #7
  %57 = trunc i64 %56 to i32
  br label %58

58:                                               ; preds = %55, %53
  %.0118 = phi i32 [ %57, %55 ], [ %2, %53 ]
  %59 = add nsw i32 %.0118, 7
  %60 = ashr i32 %59, 2
  %61 = and i32 %60, -2
  %62 = icmp slt i32 %4, 1
  br i1 %62, label %63, label %67

63:                                               ; preds = %58
  %64 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %3) #7
  %65 = trunc i64 %64 to i32
  %66 = add i32 %65, 1
  br label %67

67:                                               ; preds = %63, %58
  %.0119 = phi i32 [ %66, %63 ], [ %4, %58 ]
  %68 = add nsw i32 %.0119, 7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %69 = call ptr @_MapNode(ptr noundef %36, ptr noundef %1, i32 noundef %.0118, ptr noundef nonnull %6)
  %70 = load i32, ptr %6, align 4, !tbaa !24
  %.not124 = icmp eq i32 %70, -1
  br i1 %.not124, label %123, label %71

71:                                               ; preds = %67
  %72 = load ptr, ptr %69, align 8, !tbaa !18
  %73 = getelementptr inbounds i8, ptr %36, i64 20
  %74 = load i32, ptr %73, align 4, !tbaa !25
  %.not125 = icmp eq i32 %74, 0
  br i1 %.not125, label %111, label %75

75:                                               ; preds = %71
  %76 = getelementptr inbounds i8, ptr %72, i64 8
  %77 = sext i32 %61 to i64
  %78 = getelementptr inbounds i32, ptr %76, i64 %77
  %79 = getelementptr inbounds i8, ptr %72, i64 4
  %80 = load i32, ptr %79, align 4, !tbaa !24
  %81 = icmp sgt i32 %80, 0
  br i1 %81, label %82, label %97

82:                                               ; preds = %75
  %83 = getelementptr inbounds i8, ptr %36, i64 24
  %84 = load ptr, ptr %83, align 8, !tbaa !26
  %85 = icmp eq ptr %84, null
  br i1 %85, label %86, label %88

86:                                               ; preds = %82
  %87 = call ptr @mMemoryCreate(i32 noundef -1, i32 noundef -1, i32 noundef 0) #6
  store ptr %87, ptr %83, align 8, !tbaa !26
  %.pre = load i32, ptr %79, align 4, !tbaa !24
  br label %88

88:                                               ; preds = %86, %82
  %89 = phi i32 [ %.pre, %86 ], [ %80, %82 ]
  %90 = phi ptr [ %87, %86 ], [ %84, %82 ]
  %91 = add i32 %89, 16
  %92 = call ptr @mMemoryWrite(ptr noundef %90, ptr noundef null, i32 noundef %91) #6
  %93 = load i32, ptr %79, align 4, !tbaa !24
  %94 = getelementptr inbounds i8, ptr %92, i64 8
  store i32 %93, ptr %94, align 8, !tbaa !27
  %95 = getelementptr inbounds i8, ptr %92, i64 12
  %96 = sext i32 %93 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %95, ptr nonnull align 8 %78, i64 %96, i1 false)
  store ptr %92, ptr %92, align 8, !tbaa !29
  store i32 -1, ptr %79, align 4, !tbaa !24
  store ptr %92, ptr %78, align 8, !tbaa !12
  br label %97

97:                                               ; preds = %88, %75
  %98 = getelementptr inbounds i8, ptr %36, i64 24
  %99 = load ptr, ptr %98, align 8, !tbaa !26
  %100 = add i32 %.0119, 16
  %101 = call ptr @mMemoryWrite(ptr noundef %99, ptr noundef null, i32 noundef %100) #6
  %102 = getelementptr inbounds i8, ptr %101, i64 8
  store i32 %.0119, ptr %102, align 8, !tbaa !27
  %.not131 = icmp eq ptr %3, null
  br i1 %.not131, label %106, label %103

103:                                              ; preds = %97
  %104 = sext i32 %.0119 to i64
  %105 = getelementptr inbounds i8, ptr %101, i64 12
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %105, ptr nonnull align 1 %3, i64 %104, i1 false)
  br label %106

106:                                              ; preds = %103, %97
  %107 = load ptr, ptr %78, align 8, !tbaa !12
  %108 = load ptr, ptr %107, align 8, !tbaa !29
  store ptr %108, ptr %101, align 8, !tbaa !29
  %109 = load ptr, ptr %78, align 8, !tbaa !12
  store ptr %101, ptr %109, align 8, !tbaa !29
  %110 = getelementptr inbounds i8, ptr %101, i64 12
  br label %151

111:                                              ; preds = %71
  %112 = getelementptr inbounds i8, ptr %72, i64 4
  %113 = load i32, ptr %112, align 4, !tbaa !24
  %.not126 = icmp sgt i32 %.0119, %113
  br i1 %.not126, label %123, label %114

114:                                              ; preds = %111
  %.not130 = icmp eq ptr %3, null
  br i1 %.not130, label %._crit_edge, label %115

._crit_edge:                                      ; preds = %114
  %.pre135 = sext i32 %61 to i64
  br label %120

115:                                              ; preds = %114
  %116 = getelementptr inbounds i8, ptr %72, i64 8
  %117 = sext i32 %61 to i64
  %118 = getelementptr inbounds i32, ptr %116, i64 %117
  %119 = sext i32 %.0119 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %118, ptr nonnull align 1 %3, i64 %119, i1 false)
  br label %120

120:                                              ; preds = %._crit_edge, %115
  %.pre-phi = phi i64 [ %.pre135, %._crit_edge ], [ %117, %115 ]
  store i32 %.0119, ptr %112, align 4, !tbaa !24
  %121 = getelementptr inbounds i8, ptr %72, i64 8
  %122 = getelementptr inbounds i32, ptr %121, i64 %.pre-phi
  br label %151

123:                                              ; preds = %111, %67
  %124 = shl nsw i32 %61, 2
  %125 = add i32 %124, 8
  %.mask = and i32 %68, -8
  %126 = add i32 %125, %.mask
  %127 = call ptr @mChainNode(ptr noundef nonnull %0, ptr noundef null, i32 noundef %126) #6
  %128 = load ptr, ptr %127, align 8, !tbaa !18
  store i32 %.0118, ptr %128, align 4, !tbaa !24
  %129 = getelementptr inbounds i8, ptr %128, i64 4
  store i32 %.0119, ptr %129, align 4, !tbaa !24
  %130 = getelementptr inbounds i8, ptr %128, i64 8
  %131 = sext i32 %.0118 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %130, ptr align 1 %1, i64 %131, i1 false)
  %.not127 = icmp eq ptr %3, null
  br i1 %.not127, label %136, label %132

132:                                              ; preds = %123
  %133 = sext i32 %61 to i64
  %134 = getelementptr inbounds i32, ptr %130, i64 %133
  %135 = sext i32 %.0119 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %134, ptr nonnull align 1 %3, i64 %135, i1 false)
  br label %136

136:                                              ; preds = %132, %123
  %137 = load i32, ptr %6, align 4, !tbaa !24
  %.not128 = icmp eq i32 %137, -1
  br i1 %.not128, label %140, label %138

138:                                              ; preds = %136
  %139 = load ptr, ptr %127, align 8, !tbaa !18
  store ptr %139, ptr %69, align 8, !tbaa !18
  br label %148

140:                                              ; preds = %136
  %141 = load i32, ptr %36, align 8, !tbaa !22
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %36, align 8, !tbaa !22
  call void @mChainNodeInsert(ptr noundef null, ptr noundef nonnull %127, ptr noundef %69) #6
  %143 = load i32, ptr %36, align 8, !tbaa !22
  %144 = getelementptr inbounds i8, ptr %36, i64 16
  %145 = load i32, ptr %144, align 8, !tbaa !21
  %146 = shl nsw i32 %145, 1
  %.not129 = icmp slt i32 %143, %146
  br i1 %.not129, label %148, label %147

147:                                              ; preds = %140
  call void @_MapListAppend(ptr noundef nonnull %36)
  br label %148

148:                                              ; preds = %140, %147, %138
  %149 = sext i32 %61 to i64
  %150 = getelementptr inbounds i32, ptr %130, i64 %149
  br label %151

151:                                              ; preds = %148, %120, %106
  %.0 = phi ptr [ %110, %106 ], [ %122, %120 ], [ %150, %148 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  ret ptr %.0
}

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

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

declare i32 @mHandleValid(ptr noundef) local_unnamed_addr #2

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

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

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

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

declare ptr @mMemoryWrite(ptr noundef, ptr noundef, i32 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) #5

declare void @mChainNodeInsert(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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: write) }
attributes #4 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { 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, !7, i64 0}
!6 = !{!"MList", !7, i64 0, !10, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!10, !10, i64 0}
!13 = !{!14, !7, i64 0}
!14 = !{!"MHandle", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16}
!15 = !{!14, !10, i64 16}
!16 = !{!17, !10, i64 8}
!17 = !{!"HandleMornMap", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !10, i64 24}
!18 = !{!19, !10, i64 0}
!19 = !{!"MChainNode", !10, i64 0, !10, i64 8, !10, i64 16}
!20 = !{!8, !8, i64 0}
!21 = !{!17, !7, i64 16}
!22 = !{!17, !7, i64 0}
!23 = !{!14, !7, i64 4}
!24 = !{!7, !7, i64 0}
!25 = !{!17, !7, i64 20}
!26 = !{!17, !10, i64 24}
!27 = !{!28, !7, i64 8}
!28 = !{!"OverWriteChain", !10, i64 0, !7, i64 8, !8, i64 12}
!29 = !{!28, !10, i64 0}


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