; 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.HandleBimap = type { i32, ptr, i32, ptr }
%struct.MChainNode = type { ptr, ptr, ptr }
%struct.MObject = type { i32, %union.anon }
%union.anon = type { ptr }
%struct.BimapNode = type { i32, ptr, ptr }

@.str = external hidden unnamed_addr constant [75 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__.mBimapWrite = 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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @mBimapWrite(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 i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = icmp eq ptr %27, null
  br i1 %28, label %33, label %29

29:                                               ; preds = %26
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = ptrtoint ptr %30 to i64
  %32 = icmp eq i64 %31, -1
  br label %33

33:                                               ; preds = %29, %26
  %34 = phi i1 [ true, %26 ], [ %32, %29 ]
  %35 = zext i1 %34 to i32
  store i32 %35, ptr %11, align 4, !tbaa !9
  %36 = load i32, ptr %11, align 4, !tbaa !9
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %40

38:                                               ; preds = %33
  %39 = load i32, ptr %11, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %39, i32 noundef -1, ptr noundef @.str, i32 noundef 683, ptr noundef @__FUNCTION__.mBimapWrite, ptr noundef @.str.1)
  br label %40

40:                                               ; preds = %38, %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %41

41:                                               ; preds = %40
  br label %42

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

45:                                               ; preds = %42
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = ptrtoint ptr %46 to i64
  %48 = icmp eq i64 %47, -1
  br label %49

49:                                               ; preds = %45, %42
  %50 = phi i1 [ true, %42 ], [ %48, %45 ]
  %51 = zext i1 %50 to i32
  store i32 %51, ptr %12, align 4, !tbaa !9
  %52 = load i32, ptr %12, align 4, !tbaa !9
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %56

54:                                               ; preds = %49
  %55 = load i32, ptr %12, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %55, i32 noundef -1, ptr noundef @.str, i32 noundef 684, ptr noundef @__FUNCTION__.mBimapWrite, ptr noundef @.str.2)
  br label %56

56:                                               ; preds = %54, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %57

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = icmp eq ptr %59, null
  br i1 %60, label %65, label %61

61:                                               ; preds = %58
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = ptrtoint ptr %62 to i64
  %64 = icmp eq i64 %63, -1
  br i1 %64, label %65, label %68

65:                                               ; preds = %61, %58
  %66 = load i32, ptr %10, align 4, !tbaa !9
  %67 = icmp sle i32 %66, 0
  br label %68

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

73:                                               ; preds = %68
  %74 = load i32, ptr %13, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %74, i32 noundef -1, ptr noundef @.str, i32 noundef 685, ptr noundef @__FUNCTION__.mBimapWrite, ptr noundef @.str.3)
  br label %75

75:                                               ; preds = %73, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %76

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

83:                                               ; preds = %76
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = call ptr @GetHandle(ptr noundef %84, i32 noundef 32, i32 noundef 427716643, ptr noundef @endMornMap)
  store ptr %85, ptr %16, align 8, !tbaa !5
  br label %105

86:                                               ; preds = %76
  %87 = load ptr, ptr %15, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.MList, ptr %87, i32 0, i32 1
  %89 = load ptr, ptr %88, align 8, !tbaa !13
  %90 = getelementptr inbounds ptr, ptr %89, i64 2
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  store ptr %91, ptr %16, align 8, !tbaa !5
  br label %92

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

100:                                              ; preds = %92
  %101 = load i32, ptr %17, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %101, i32 noundef -1, ptr noundef @.str, i32 noundef 691, ptr noundef @__FUNCTION__.mBimapWrite, ptr noundef @.str.4)
  br label %102

102:                                              ; preds = %100, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %103

103:                                              ; preds = %102
  br label %104

104:                                              ; preds = %103
  br label %105

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

112:                                              ; preds = %105
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.HandleList, ptr %113, i64 -1
  %115 = getelementptr inbounds %struct.HandleList, ptr %114, i32 0, i32 4
  store i32 599210234, ptr %115, align 4, !tbaa !17
  %116 = load ptr, ptr %18, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.HandleBimap, ptr %116, i32 0, i32 1
  %118 = load ptr, ptr %117, align 8, !tbaa !19
  %119 = icmp eq ptr %118, null
  br i1 %119, label %120, label %151

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

151:                                              ; preds = %120, %112
  %152 = load ptr, ptr %18, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.HandleBimap, ptr %152, i32 0, i32 3
  %154 = load ptr, ptr %153, align 8, !tbaa !26
  %155 = icmp eq ptr %154, null
  br i1 %155, label %156, label %160

156:                                              ; preds = %151
  %157 = call ptr @mMemoryCreate(i32 noundef -1, i32 noundef -1, i32 noundef 0)
  %158 = load ptr, ptr %18, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.HandleBimap, ptr %158, i32 0, i32 3
  store ptr %157, ptr %159, align 8, !tbaa !26
  br label %160

160:                                              ; preds = %156, %151
  %161 = load ptr, ptr %16, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.MHandle, ptr %161, i32 0, i32 1
  store volatile i32 1, ptr %162, align 4, !tbaa !27
  br label %163

163:                                              ; preds = %160, %105
  %164 = load i32, ptr %8, align 4, !tbaa !9
  %165 = icmp sle i32 %164, 0
  br i1 %165, label %166, label %170

166:                                              ; preds = %163
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = call i64 @strlen(ptr noundef %167) #7
  %169 = trunc i64 %168 to i32
  store i32 %169, ptr %8, align 4, !tbaa !9
  br label %170

170:                                              ; preds = %166, %163
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %171 = load i32, ptr %8, align 4, !tbaa !9
  %172 = add nsw i32 %171, 7
  %173 = ashr i32 %172, 3
  %174 = sext i32 %173 to i64
  %175 = mul i64 %174, 2
  %176 = trunc i64 %175 to i32
  store i32 %176, ptr %20, align 4, !tbaa !9
  %177 = load i32, ptr %10, align 4, !tbaa !9
  %178 = icmp sle i32 %177, 0
  br i1 %178, label %179, label %184

179:                                              ; preds = %170
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  %181 = call i64 @strlen(ptr noundef %180) #7
  %182 = add i64 %181, 1
  %183 = trunc i64 %182 to i32
  store i32 %183, ptr %10, align 4, !tbaa !9
  br label %184

184:                                              ; preds = %179, %170
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %185 = load i32, ptr %10, align 4, !tbaa !9
  %186 = add nsw i32 %185, 7
  %187 = ashr i32 %186, 3
  %188 = sext i32 %187 to i64
  %189 = mul i64 %188, 2
  %190 = trunc i64 %189 to i32
  store i32 %190, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %191 = load ptr, ptr %18, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.HandleBimap, ptr %191, i32 0, i32 3
  %193 = load ptr, ptr %192, align 8, !tbaa !26
  %194 = load i32, ptr %20, align 4, !tbaa !9
  %195 = add nsw i32 2, %194
  %196 = load i32, ptr %21, align 4, !tbaa !9
  %197 = add nsw i32 %195, %196
  %198 = sext i32 %197 to i64
  %199 = mul i64 %198, 4
  %200 = trunc i64 %199 to i32
  %201 = call ptr @mMemoryWrite(ptr noundef %193, ptr noundef null, i32 noundef %200)
  store ptr %201, ptr %22, align 8, !tbaa !5
  %202 = load i32, ptr %8, align 4, !tbaa !9
  %203 = load ptr, ptr %22, align 8, !tbaa !5
  %204 = getelementptr inbounds i32, ptr %203, i64 0
  store i32 %202, ptr %204, align 4, !tbaa !9
  %205 = load i32, ptr %10, align 4, !tbaa !9
  %206 = load ptr, ptr %22, align 8, !tbaa !5
  %207 = getelementptr inbounds i32, ptr %206, i64 1
  store i32 %205, ptr %207, align 4, !tbaa !9
  %208 = load ptr, ptr %22, align 8, !tbaa !5
  %209 = getelementptr inbounds i32, ptr %208, i64 2
  %210 = load ptr, ptr %7, align 8, !tbaa !5
  %211 = load i32, ptr %8, align 4, !tbaa !9
  %212 = sext i32 %211 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %209, ptr align 1 %210, i64 %212, i1 false)
  %213 = load ptr, ptr %22, align 8, !tbaa !5
  %214 = getelementptr inbounds i32, ptr %213, i64 2
  %215 = load i32, ptr %20, align 4, !tbaa !9
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds i32, ptr %214, i64 %216
  %218 = load ptr, ptr %9, align 8, !tbaa !5
  %219 = load i32, ptr %10, align 4, !tbaa !9
  %220 = sext i32 %219 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %217, ptr align 1 %218, i64 %220, i1 false)
  %221 = load ptr, ptr %6, align 8, !tbaa !5
  %222 = load ptr, ptr %7, align 8, !tbaa !5
  %223 = load i32, ptr %8, align 4, !tbaa !9
  call void @mBimapNodeDelete(ptr noundef %221, ptr noundef %222, i32 noundef %223)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  %224 = load ptr, ptr %6, align 8, !tbaa !5
  %225 = call ptr @mChainNode(ptr noundef %224, ptr noundef null, i32 noundef 24)
  store ptr %225, ptr %14, align 8, !tbaa !5
  %226 = load ptr, ptr %14, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.MChainNode, ptr %226, i32 0, i32 0
  %228 = load ptr, ptr %227, align 8, !tbaa !21
  store ptr %228, ptr %25, align 8, !tbaa !5
  %229 = load ptr, ptr %25, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.BimapNode, ptr %229, i32 0, i32 0
  store i32 1, ptr %230, align 8, !tbaa !28
  %231 = load ptr, ptr %22, align 8, !tbaa !5
  %232 = load ptr, ptr %25, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.BimapNode, ptr %232, i32 0, i32 1
  store ptr %231, ptr %233, align 8, !tbaa !30
  %234 = load ptr, ptr %18, align 8, !tbaa !5
  %235 = load ptr, ptr %7, align 8, !tbaa !5
  %236 = load i32, ptr %8, align 4, !tbaa !9
  %237 = call ptr @_BimapNode(ptr noundef %234, ptr noundef %235, i32 noundef %236, ptr noundef %23)
  store ptr %237, ptr %24, align 8, !tbaa !5
  %238 = load ptr, ptr %18, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.HandleBimap, ptr %238, i32 0, i32 0
  %240 = load i32, ptr %239, align 8, !tbaa !25
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %239, align 8, !tbaa !25
  %242 = load ptr, ptr %14, align 8, !tbaa !5
  %243 = load ptr, ptr %24, align 8, !tbaa !5
  call void @mChainNodeInsert(ptr noundef null, ptr noundef %242, ptr noundef %243)
  %244 = load ptr, ptr %6, align 8, !tbaa !5
  %245 = call ptr @mChainNode(ptr noundef %244, ptr noundef null, i32 noundef 24)
  store ptr %245, ptr %14, align 8, !tbaa !5
  %246 = load ptr, ptr %14, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.MChainNode, ptr %246, i32 0, i32 0
  %248 = load ptr, ptr %247, align 8, !tbaa !21
  store ptr %248, ptr %25, align 8, !tbaa !5
  %249 = load ptr, ptr %25, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.BimapNode, ptr %249, i32 0, i32 0
  store i32 0, ptr %250, align 8, !tbaa !28
  %251 = load ptr, ptr %22, align 8, !tbaa !5
  %252 = load ptr, ptr %25, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.BimapNode, ptr %252, i32 0, i32 1
  store ptr %251, ptr %253, align 8, !tbaa !30
  %254 = load ptr, ptr %18, align 8, !tbaa !5
  %255 = load ptr, ptr %9, align 8, !tbaa !5
  %256 = load i32, ptr %10, align 4, !tbaa !9
  %257 = call ptr @_BimapNode(ptr noundef %254, ptr noundef %255, i32 noundef %256, ptr noundef %23)
  store ptr %257, ptr %24, align 8, !tbaa !5
  %258 = load ptr, ptr %18, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.HandleBimap, ptr %258, i32 0, i32 0
  %260 = load i32, ptr %259, align 8, !tbaa !25
  %261 = add nsw i32 %260, 1
  store i32 %261, ptr %259, align 8, !tbaa !25
  %262 = load ptr, ptr %14, align 8, !tbaa !5
  %263 = load ptr, ptr %24, align 8, !tbaa !5
  call void @mChainNodeInsert(ptr noundef null, ptr noundef %262, ptr noundef %263)
  %264 = load ptr, ptr %18, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.HandleBimap, ptr %264, i32 0, i32 0
  %266 = load i32, ptr %265, align 8, !tbaa !25
  %267 = load ptr, ptr %18, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.HandleBimap, ptr %267, i32 0, i32 2
  %269 = load i32, ptr %268, align 8, !tbaa !24
  %270 = mul nsw i32 %269, 2
  %271 = icmp sge i32 %266, %270
  br i1 %271, label %272, label %274

272:                                              ; preds = %184
  %273 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_MapListAppend(ptr noundef %273)
  br label %274

274:                                              ; preds = %272, %184
  %275 = load ptr, ptr %22, align 8, !tbaa !5
  %276 = getelementptr inbounds i32, ptr %275, i64 2
  %277 = load i32, ptr %20, align 4, !tbaa !9
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds i32, ptr %276, i64 %278
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  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 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  ret ptr %279
}

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, !10, i64 28}
!18 = !{!"HandleList", !12, i64 0, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!19 = !{!20, !6, i64 8}
!20 = !{!"HandleBimap", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24}
!21 = !{!22, !6, i64 0}
!22 = !{!"MChainNode", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!7, !7, i64 0}
!24 = !{!20, !10, i64 16}
!25 = !{!20, !10, i64 0}
!26 = !{!20, !6, i64 24}
!27 = !{!15, !10, i64 4}
!28 = !{!29, !10, i64 0}
!29 = !{!"BimapNode", !10, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!29, !6, i64 8}


; 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
@.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__.mBimapWrite = 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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local nonnull ptr @mBimapWrite(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 683, ptr noundef nonnull @__FUNCTION__.mBimapWrite, ptr noundef nonnull @.str.1) #6
  br label %12

12:                                               ; preds = %5, %7
  %magicptr97 = ptrtoint ptr %1 to i64
  switch i64 %magicptr97, 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 684, ptr noundef nonnull @__FUNCTION__.mBimapWrite, ptr noundef nonnull @.str.2) #6
  br label %18

18:                                               ; preds = %12, %13
  %magicptr98 = ptrtoint ptr %3 to i64
  switch i64 %magicptr98, 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 685, ptr noundef nonnull @__FUNCTION__.mBimapWrite, 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
  %.not99 = icmp eq i32 %32, 427716643
  br i1 %.not99, 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 691, ptr noundef nonnull @__FUNCTION__.mBimapWrite, ptr noundef nonnull @.str.4) #6
  br label %34

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

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %0, i64 -4
  store i32 599210234, ptr %39, align 4, !tbaa !16
  %40 = getelementptr inbounds i8, ptr %36, i64 8
  %41 = load ptr, ptr %40, align 8, !tbaa !18
  %42 = icmp eq ptr %41, null
  br i1 %42, label %43, label %52

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

52:                                               ; preds = %43, %38
  %53 = getelementptr inbounds i8, ptr %36, i64 24
  %54 = load ptr, ptr %53, align 8, !tbaa !25
  %55 = icmp eq ptr %54, null
  br i1 %55, label %56, label %58

56:                                               ; preds = %52
  %57 = tail call ptr @mMemoryCreate(i32 noundef -1, i32 noundef -1, i32 noundef 0) #6
  store ptr %57, ptr %53, align 8, !tbaa !25
  br label %58

58:                                               ; preds = %56, %52
  %59 = getelementptr inbounds i8, ptr %.093, i64 4
  store volatile i32 1, ptr %59, align 4, !tbaa !26
  br label %60

60:                                               ; preds = %58, %34
  %61 = icmp slt i32 %2, 1
  br i1 %61, label %62, label %65

62:                                               ; preds = %60
  %63 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #7
  %64 = trunc i64 %63 to i32
  br label %65

65:                                               ; preds = %62, %60
  %.0 = phi i32 [ %64, %62 ], [ %2, %60 ]
  %66 = add nsw i32 %.0, 7
  %67 = ashr i32 %66, 2
  %68 = and i32 %67, -2
  %69 = icmp slt i32 %4, 1
  br i1 %69, label %70, label %74

70:                                               ; preds = %65
  %71 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %3) #7
  %72 = trunc i64 %71 to i32
  %73 = add i32 %72, 1
  br label %74

74:                                               ; preds = %70, %65
  %.092 = phi i32 [ %73, %70 ], [ %4, %65 ]
  %75 = add nsw i32 %.092, 7
  %76 = getelementptr inbounds i8, ptr %36, i64 24
  %77 = load ptr, ptr %76, align 8, !tbaa !25
  %78 = shl nsw i32 %68, 2
  %79 = add i32 %78, 8
  %.mask = and i32 %75, -8
  %80 = add i32 %79, %.mask
  %81 = tail call ptr @mMemoryWrite(ptr noundef %77, ptr noundef null, i32 noundef %80) #6
  store i32 %.0, ptr %81, align 4, !tbaa !27
  %82 = getelementptr inbounds i8, ptr %81, i64 4
  store i32 %.092, ptr %82, align 4, !tbaa !27
  %83 = getelementptr inbounds i8, ptr %81, i64 8
  %84 = sext i32 %.0 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %83, ptr align 1 %1, i64 %84, i1 false)
  %85 = sext i32 %68 to i64
  %86 = getelementptr inbounds i32, ptr %83, i64 %85
  %87 = sext i32 %.092 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %86, ptr align 1 %3, i64 %87, i1 false)
  tail call void @mBimapNodeDelete(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %.0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %88 = tail call ptr @mChainNode(ptr noundef nonnull %0, ptr noundef null, i32 noundef 24) #6
  %89 = load ptr, ptr %88, align 8, !tbaa !20
  store i32 1, ptr %89, align 8, !tbaa !28
  %90 = getelementptr inbounds i8, ptr %89, i64 8
  store ptr %81, ptr %90, align 8, !tbaa !30
  %91 = call ptr @_BimapNode(ptr noundef %36, ptr noundef %1, i32 noundef %.0, ptr noundef nonnull %6)
  %92 = load i32, ptr %36, align 8, !tbaa !24
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %36, align 8, !tbaa !24
  call void @mChainNodeInsert(ptr noundef null, ptr noundef nonnull %88, ptr noundef %91) #6
  %94 = call ptr @mChainNode(ptr noundef nonnull %0, ptr noundef null, i32 noundef 24) #6
  %95 = load ptr, ptr %94, align 8, !tbaa !20
  store i32 0, ptr %95, align 8, !tbaa !28
  %96 = getelementptr inbounds i8, ptr %95, i64 8
  store ptr %81, ptr %96, align 8, !tbaa !30
  %97 = call ptr @_BimapNode(ptr noundef nonnull %36, ptr noundef %3, i32 noundef %.092, ptr noundef nonnull %6)
  %98 = load i32, ptr %36, align 8, !tbaa !24
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %36, align 8, !tbaa !24
  call void @mChainNodeInsert(ptr noundef null, ptr noundef nonnull %94, ptr noundef %97) #6
  %100 = load i32, ptr %36, align 8, !tbaa !24
  %101 = getelementptr inbounds i8, ptr %36, i64 16
  %102 = load i32, ptr %101, align 8, !tbaa !23
  %103 = shl nsw i32 %102, 1
  %.not96 = icmp slt i32 %100, %103
  br i1 %.not96, label %105, label %104

104:                                              ; preds = %74
  call void @_MapListAppend(ptr noundef nonnull %36)
  br label %105

105:                                              ; preds = %104, %74
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  ret ptr %86
}

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, !7, i64 28}
!17 = !{!"HandleList", !6, i64 0, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28}
!18 = !{!19, !10, i64 8}
!19 = !{!"HandleBimap", !7, i64 0, !10, i64 8, !7, i64 16, !10, i64 24}
!20 = !{!21, !10, i64 0}
!21 = !{!"MChainNode", !10, i64 0, !10, i64 8, !10, i64 16}
!22 = !{!8, !8, i64 0}
!23 = !{!19, !7, i64 16}
!24 = !{!19, !7, i64 0}
!25 = !{!19, !10, i64 24}
!26 = !{!14, !7, i64 4}
!27 = !{!7, !7, i64 0}
!28 = !{!29, !7, i64 0}
!29 = !{!"BimapNode", !7, i64 0, !10, i64 8, !10, i64 16}
!30 = !{!29, !10, i64 8}


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