; 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.MChainNode = type { ptr, ptr, 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.4 = external hidden unnamed_addr constant [12 x i8], align 1
@__FUNCTION__.mBimapRead = external hidden unnamed_addr constant [11 x i8], align 1

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

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

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

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

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

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

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

29:                                               ; preds = %26
  %30 = load ptr, ptr %7, 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 %12, align 4, !tbaa !9
  %36 = load i32, ptr %12, align 4, !tbaa !9
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %40

38:                                               ; preds = %33
  %39 = load i32, ptr %12, 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 744, ptr noundef @__FUNCTION__.mBimapRead, ptr noundef @.str.1)
  br label %40

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

41:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.HandleList, ptr %42, i64 -1
  store ptr %43, ptr %13, align 8, !tbaa !5
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.MList, ptr %44, i32 0, i32 0
  %46 = load i32, ptr %45, align 8, !tbaa !11
  %47 = icmp slt i32 %46, 3
  br i1 %47, label %48, label %49

48:                                               ; preds = %41
  store ptr null, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %220

49:                                               ; preds = %41
  br label %50

50:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = icmp eq ptr %51, null
  br i1 %52, label %57, label %53

53:                                               ; preds = %50
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = ptrtoint ptr %54 to i64
  %56 = icmp eq i64 %55, -1
  br label %57

57:                                               ; preds = %53, %50
  %58 = phi i1 [ true, %50 ], [ %56, %53 ]
  %59 = zext i1 %58 to i32
  store i32 %59, ptr %15, align 4, !tbaa !9
  %60 = load i32, ptr %15, align 4, !tbaa !9
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %64

62:                                               ; preds = %57
  %63 = load i32, ptr %15, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %63, i32 noundef -1, ptr noundef @.str, i32 noundef 748, ptr noundef @__FUNCTION__.mBimapRead, ptr noundef @.str.2)
  br label %64

64:                                               ; preds = %62, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  %67 = load i32, ptr %9, align 4, !tbaa !9
  %68 = icmp sle i32 %67, 0
  br i1 %68, label %69, label %73

69:                                               ; preds = %66
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = call i64 @strlen(ptr noundef %70) #6
  %72 = trunc i64 %71 to i32
  store i32 %72, ptr %9, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %69, %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.MList, ptr %74, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !13
  %77 = getelementptr inbounds ptr, ptr %76, i64 2
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  store ptr %78, ptr %16, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %80 = load ptr, ptr %16, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.MHandle, ptr %80, i32 0, i32 0
  %82 = load volatile i32, ptr %81, align 8, !tbaa !14
  %83 = icmp ne i32 %82, 427716643
  %84 = zext i1 %83 to i32
  store i32 %84, ptr %17, align 4, !tbaa !9
  %85 = load i32, ptr %17, align 4, !tbaa !9
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %89

87:                                               ; preds = %79
  %88 = load i32, ptr %17, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %88, i32 noundef -1, ptr noundef @.str, i32 noundef 752, ptr noundef @__FUNCTION__.mBimapRead, ptr noundef @.str.4)
  br label %89

89:                                               ; preds = %87, %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %92 = load ptr, ptr %16, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.MHandle, ptr %92, i32 0, i32 3
  %94 = load ptr, ptr %93, align 8, !tbaa !16
  store ptr %94, ptr %18, align 8, !tbaa !5
  %95 = load ptr, ptr %16, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.MHandle, ptr %95, i32 0, i32 1
  %97 = load volatile i32, ptr %96, align 4, !tbaa !17
  %98 = icmp eq i32 %97, 0
  br i1 %98, label %99, label %100

99:                                               ; preds = %91
  store ptr null, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %219

100:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %101 = load ptr, ptr %18, align 8, !tbaa !5
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = load i32, ptr %9, align 4, !tbaa !9
  %104 = call ptr @_BimapNode(ptr noundef %101, ptr noundef %102, i32 noundef %103, ptr noundef %19)
  store ptr %104, ptr %20, align 8, !tbaa !5
  %105 = load i32, ptr %19, align 4, !tbaa !9
  %106 = icmp eq i32 %105, -1
  br i1 %106, label %107, label %108

107:                                              ; preds = %100
  store ptr null, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %218

108:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %109 = load ptr, ptr %20, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.MChainNode, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !18
  store ptr %111, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %112 = load ptr, ptr %21, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.BimapNode, ptr %112, i32 0, i32 1
  %114 = load ptr, ptr %113, align 8, !tbaa !20
  %115 = getelementptr inbounds i32, ptr %114, i64 0
  %116 = load i32, ptr %115, align 4, !tbaa !9
  store i32 %116, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %117 = load ptr, ptr %21, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.BimapNode, ptr %117, i32 0, i32 1
  %119 = load ptr, ptr %118, align 8, !tbaa !20
  %120 = getelementptr inbounds i32, ptr %119, i64 1
  %121 = load i32, ptr %120, align 4, !tbaa !9
  store i32 %121, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %122 = load ptr, ptr %21, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.BimapNode, ptr %122, i32 0, i32 1
  %124 = load ptr, ptr %123, align 8, !tbaa !20
  %125 = getelementptr inbounds i32, ptr %124, i64 2
  store ptr %125, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %126 = load ptr, ptr %24, align 8, !tbaa !5
  %127 = load i32, ptr %22, align 4, !tbaa !9
  %128 = add nsw i32 %127, 7
  %129 = ashr i32 %128, 3
  %130 = shl i32 %129, 3
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds i8, ptr %126, i64 %131
  store ptr %132, ptr %25, align 8, !tbaa !5
  %133 = load ptr, ptr %21, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.BimapNode, ptr %133, i32 0, i32 0
  %135 = load i32, ptr %134, align 8, !tbaa !22
  %136 = icmp ne i32 %135, 0
  br i1 %136, label %137, label %177

137:                                              ; preds = %108
  %138 = load ptr, ptr %11, align 8, !tbaa !5
  %139 = icmp eq ptr %138, null
  br i1 %139, label %163, label %140

140:                                              ; preds = %137
  %141 = load ptr, ptr %11, align 8, !tbaa !5
  %142 = ptrtoint ptr %141 to i64
  %143 = icmp eq i64 %142, -1
  br i1 %143, label %163, label %144

144:                                              ; preds = %140
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = load i32, ptr %145, align 4, !tbaa !9
  %147 = icmp sgt i32 %146, 0
  br i1 %147, label %148, label %160

148:                                              ; preds = %144
  %149 = load ptr, ptr %11, align 8, !tbaa !5
  %150 = load i32, ptr %149, align 4, !tbaa !9
  %151 = load i32, ptr %23, align 4, !tbaa !9
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %153, label %156

153:                                              ; preds = %148
  %154 = load ptr, ptr %11, align 8, !tbaa !5
  %155 = load i32, ptr %154, align 4, !tbaa !9
  br label %158

156:                                              ; preds = %148
  %157 = load i32, ptr %23, align 4, !tbaa !9
  br label %158

158:                                              ; preds = %156, %153
  %159 = phi i32 [ %155, %153 ], [ %157, %156 ]
  store i32 %159, ptr %23, align 4, !tbaa !9
  br label %160

160:                                              ; preds = %158, %144
  %161 = load i32, ptr %23, align 4, !tbaa !9
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %161, ptr %162, align 4, !tbaa !9
  br label %163

163:                                              ; preds = %160, %140, %137
  %164 = load ptr, ptr %10, align 8, !tbaa !5
  %165 = icmp eq ptr %164, null
  br i1 %165, label %175, label %166

166:                                              ; preds = %163
  %167 = load ptr, ptr %10, align 8, !tbaa !5
  %168 = ptrtoint ptr %167 to i64
  %169 = icmp eq i64 %168, -1
  br i1 %169, label %175, label %170

170:                                              ; preds = %166
  %171 = load ptr, ptr %10, align 8, !tbaa !5
  %172 = load ptr, ptr %25, align 8, !tbaa !5
  %173 = load i32, ptr %23, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %171, ptr align 1 %172, i64 %174, i1 false)
  br label %175

175:                                              ; preds = %170, %166, %163
  %176 = load ptr, ptr %25, align 8, !tbaa !5
  store ptr %176, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %217

177:                                              ; preds = %108
  %178 = load ptr, ptr %11, align 8, !tbaa !5
  %179 = icmp eq ptr %178, null
  br i1 %179, label %203, label %180

180:                                              ; preds = %177
  %181 = load ptr, ptr %11, align 8, !tbaa !5
  %182 = ptrtoint ptr %181 to i64
  %183 = icmp eq i64 %182, -1
  br i1 %183, label %203, label %184

184:                                              ; preds = %180
  %185 = load ptr, ptr %11, align 8, !tbaa !5
  %186 = load i32, ptr %185, align 4, !tbaa !9
  %187 = icmp sgt i32 %186, 0
  br i1 %187, label %188, label %200

188:                                              ; preds = %184
  %189 = load ptr, ptr %11, align 8, !tbaa !5
  %190 = load i32, ptr %189, align 4, !tbaa !9
  %191 = load i32, ptr %22, align 4, !tbaa !9
  %192 = icmp slt i32 %190, %191
  br i1 %192, label %193, label %196

193:                                              ; preds = %188
  %194 = load ptr, ptr %11, align 8, !tbaa !5
  %195 = load i32, ptr %194, align 4, !tbaa !9
  br label %198

196:                                              ; preds = %188
  %197 = load i32, ptr %22, align 4, !tbaa !9
  br label %198

198:                                              ; preds = %196, %193
  %199 = phi i32 [ %195, %193 ], [ %197, %196 ]
  store i32 %199, ptr %22, align 4, !tbaa !9
  br label %200

200:                                              ; preds = %198, %184
  %201 = load i32, ptr %22, align 4, !tbaa !9
  %202 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %201, ptr %202, align 4, !tbaa !9
  br label %203

203:                                              ; preds = %200, %180, %177
  %204 = load ptr, ptr %10, align 8, !tbaa !5
  %205 = icmp eq ptr %204, null
  br i1 %205, label %215, label %206

206:                                              ; preds = %203
  %207 = load ptr, ptr %10, align 8, !tbaa !5
  %208 = ptrtoint ptr %207 to i64
  %209 = icmp eq i64 %208, -1
  br i1 %209, label %215, label %210

210:                                              ; preds = %206
  %211 = load ptr, ptr %10, align 8, !tbaa !5
  %212 = load ptr, ptr %24, align 8, !tbaa !5
  %213 = load i32, ptr %22, align 4, !tbaa !9
  %214 = sext i32 %213 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %211, ptr align 1 %212, i64 %214, i1 false)
  br label %215

215:                                              ; preds = %210, %206, %203
  %216 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %216, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %217

217:                                              ; preds = %215, %175
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %218

218:                                              ; preds = %217, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %219

219:                                              ; preds = %218, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %220

220:                                              ; preds = %219, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  %221 = load ptr, ptr %6, align 8
  ret ptr %221
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!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 = !{!15, !10, i64 4}
!18 = !{!19, !6, i64 0}
!19 = !{!"MChainNode", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!21, !6, i64 8}
!21 = !{!"BimapNode", !10, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!21, !10, 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
@.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.4 = external hidden unnamed_addr constant [12 x i8], align 1
@__FUNCTION__.mBimapRead = external hidden unnamed_addr constant [11 x i8], align 1

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

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture 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
declare dso_local ptr @_BimapNode(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local ptr @mBimapRead(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #4 {
  %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 744, ptr noundef nonnull @__FUNCTION__.mBimapRead, ptr noundef nonnull @.str.1) #6
  br label %12

12:                                               ; preds = %5, %7
  %13 = getelementptr inbounds i8, ptr %0, i64 -32
  %14 = load i32, ptr %13, align 8, !tbaa !5
  %15 = icmp slt i32 %14, 3
  br i1 %15, label %69, label %16

16:                                               ; preds = %12
  %magicptr83 = ptrtoint ptr %1 to i64
  switch i64 %magicptr83, label %22 [
    i64 -1, label %17
    i64 0, label %17
  ]

17:                                               ; preds = %16, %16
  %18 = icmp eq ptr %1, null
  %19 = icmp eq ptr %1, inttoptr (i64 -1 to ptr)
  %20 = or i1 %18, %19
  %21 = zext i1 %20 to i32
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %21, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 748, ptr noundef nonnull @__FUNCTION__.mBimapRead, ptr noundef nonnull @.str.2) #6
  br label %22

22:                                               ; preds = %16, %17
  %23 = icmp slt i32 %2, 1
  br i1 %23, label %24, label %27

24:                                               ; preds = %22
  %25 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #7
  %26 = trunc i64 %25 to i32
  br label %27

27:                                               ; preds = %24, %22
  %.069 = phi i32 [ %26, %24 ], [ %2, %22 ]
  %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
  %.not89 = icmp eq i32 %32, 427716643
  br i1 %.not89, 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 752, ptr noundef nonnull @__FUNCTION__.mBimapRead, ptr noundef nonnull @.str.4) #6
  br label %34

34:                                               ; preds = %33, %27
  %35 = getelementptr inbounds i8, ptr %31, i64 16
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  %37 = getelementptr inbounds i8, ptr %31, i64 4
  %38 = load volatile i32, ptr %37, align 4, !tbaa !16
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %69, label %40

40:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  %41 = call ptr @_BimapNode(ptr noundef %36, ptr noundef %1, i32 noundef %.069, ptr noundef nonnull %6)
  %42 = load i32, ptr %6, align 4, !tbaa !17
  %43 = icmp eq i32 %42, -1
  br i1 %43, label %68, label %44

44:                                               ; preds = %40
  %45 = load ptr, ptr %41, align 8, !tbaa !18
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  %47 = load ptr, ptr %46, align 8, !tbaa !20
  %48 = load i32, ptr %47, align 4, !tbaa !17
  %49 = getelementptr inbounds i8, ptr %47, i64 4
  %50 = load i32, ptr %49, align 4, !tbaa !17
  %51 = getelementptr inbounds i8, ptr %47, i64 8
  %52 = add nsw i32 %48, 7
  %53 = and i32 %52, -8
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds i8, ptr %51, i64 %54
  %56 = load i32, ptr %45, align 8, !tbaa !22
  %.not = icmp eq i32 %56, 0
  %magicptr86 = ptrtoint ptr %4 to i64
  br i1 %.not, label %62, label %57

57:                                               ; preds = %44
  switch i64 %magicptr86, label %58 [
    i64 -1, label %61
    i64 0, label %61
  ]

58:                                               ; preds = %57
  %59 = load i32, ptr %4, align 4, !tbaa !17
  %60 = icmp sgt i32 %59, 0
  %. = call i32 @llvm.smin.i32(i32 %59, i32 %50)
  %.070 = select i1 %60, i32 %., i32 %50
  store i32 %.070, ptr %4, align 4, !tbaa !17
  br label %61

61:                                               ; preds = %57, %57, %58
  %.171 = phi i32 [ %50, %57 ], [ %.070, %58 ], [ %50, %57 ]
  %magicptr85 = ptrtoint ptr %3 to i64
  switch i64 %magicptr85, label %.sink.split [
    i64 -1, label %68
    i64 0, label %68
  ]

62:                                               ; preds = %44
  switch i64 %magicptr86, label %63 [
    i64 -1, label %66
    i64 0, label %66
  ]

63:                                               ; preds = %62
  %64 = load i32, ptr %4, align 4, !tbaa !17
  %65 = icmp sgt i32 %64, 0
  %.87 = call i32 @llvm.smin.i32(i32 %64, i32 %48)
  %.072 = select i1 %65, i32 %.87, i32 %48
  store i32 %.072, ptr %4, align 4, !tbaa !17
  br label %66

66:                                               ; preds = %62, %62, %63
  %.173 = phi i32 [ %48, %62 ], [ %.072, %63 ], [ %48, %62 ]
  %magicptr88 = ptrtoint ptr %3 to i64
  switch i64 %magicptr88, label %.sink.split [
    i64 -1, label %68
    i64 0, label %68
  ]

.sink.split:                                      ; preds = %66, %61
  %.171.sink = phi i32 [ %.171, %61 ], [ %.173, %66 ]
  %.sink = phi ptr [ %55, %61 ], [ %51, %66 ]
  %67 = sext i32 %.171.sink to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %3, ptr nonnull align 1 %.sink, i64 %67, i1 false)
  br label %68

68:                                               ; preds = %.sink.split, %61, %61, %66, %66, %40
  %.1 = phi ptr [ null, %40 ], [ %55, %61 ], [ %55, %61 ], [ %51, %66 ], [ %51, %66 ], [ %.sink, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br label %69

69:                                               ; preds = %68, %34, %12
  %.3 = phi ptr [ null, %12 ], [ %.1, %68 ], [ null, %34 ]
  ret ptr %.3
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!14, !7, i64 4}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !10, i64 0}
!19 = !{!"MChainNode", !10, i64 0, !10, i64 8, !10, i64 16}
!20 = !{!21, !10, i64 8}
!21 = !{!"BimapNode", !7, i64 0, !10, i64 8, !10, i64 16}
!22 = !{!21, !7, i64 0}


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