; 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.OverWriteChain = type { ptr, i32, [0 x i8] }

@.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__.mornMapRead = external hidden unnamed_addr constant [12 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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: nounwind uwtable
define dso_local ptr @mornMapRead(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) #1 {
  %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 i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = 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 ptr %4, ptr %11, align 8, !tbaa !5
  br label %27

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

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

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

39:                                               ; preds = %34
  %40 = load i32, ptr %12, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %40, i32 noundef -1, ptr noundef @.str, i32 noundef 215, ptr noundef @__FUNCTION__.mornMapRead, ptr noundef @.str.1)
  br label %41

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

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

49:                                               ; preds = %42
  store ptr null, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %187

50:                                               ; preds = %42
  br label %51

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

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

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

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

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

66:                                               ; preds = %65
  br label %67

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

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

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

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

88:                                               ; preds = %80
  %89 = load i32, ptr %17, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %89, i32 noundef -1, ptr noundef @.str, i32 noundef 223, ptr noundef @__FUNCTION__.mornMapRead, ptr noundef @.str.4)
  br label %90

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

91:                                               ; preds = %90
  br label %92

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

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

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

108:                                              ; preds = %101
  store ptr null, ptr %6, align 8
  store i32 1, ptr %14, align 4
  br label %185

109:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %110 = load i32, ptr %9, align 4, !tbaa !9
  %111 = add nsw i32 %110, 7
  %112 = ashr i32 %111, 3
  %113 = sext i32 %112 to i64
  %114 = mul i64 %113, 2
  %115 = trunc i64 %114 to i32
  store i32 %115, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %116 = load ptr, ptr %20, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.MChainNode, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %117, align 8, !tbaa !18
  store ptr %118, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %119 = load ptr, ptr %22, align 8, !tbaa !5
  %120 = getelementptr inbounds i32, ptr %119, i64 2
  %121 = load i32, ptr %21, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds i32, ptr %120, i64 %122
  store ptr %123, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %124 = load ptr, ptr %22, align 8, !tbaa !5
  %125 = getelementptr inbounds i32, ptr %124, i64 1
  %126 = load i32, ptr %125, align 4, !tbaa !9
  store i32 %126, ptr %24, align 4, !tbaa !9
  %127 = load i32, ptr %24, align 4, !tbaa !9
  %128 = icmp slt i32 %127, 0
  br i1 %128, label %129, label %144

129:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %130 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %130, ptr %25, align 8, !tbaa !5
  %131 = load ptr, ptr %25, align 8, !tbaa !5
  %132 = load ptr, ptr %131, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.OverWriteChain, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !20
  %135 = load ptr, ptr %25, align 8, !tbaa !5
  store ptr %134, ptr %135, align 8, !tbaa !5
  %136 = load ptr, ptr %25, align 8, !tbaa !5
  %137 = load ptr, ptr %136, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.OverWriteChain, ptr %137, i32 0, i32 2
  %139 = getelementptr inbounds [0 x i8], ptr %138, i64 0, i64 0
  store ptr %139, ptr %23, align 8, !tbaa !5
  %140 = load ptr, ptr %25, align 8, !tbaa !5
  %141 = load ptr, ptr %140, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.OverWriteChain, ptr %141, i32 0, i32 1
  %143 = load i32, ptr %142, align 8, !tbaa !22
  store i32 %143, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  br label %144

144:                                              ; preds = %129, %109
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = icmp eq ptr %145, null
  br i1 %146, label %171, label %147

147:                                              ; preds = %144
  %148 = load ptr, ptr %11, align 8, !tbaa !5
  %149 = ptrtoint ptr %148 to i64
  %150 = icmp eq i64 %149, -1
  br i1 %150, label %171, label %151

151:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %152 = load i32, ptr %24, align 4, !tbaa !9
  store i32 %152, ptr %26, align 4, !tbaa !9
  %153 = load ptr, ptr %11, align 8, !tbaa !5
  %154 = load i32, ptr %153, align 4, !tbaa !9
  %155 = icmp sgt i32 %154, 0
  br i1 %155, label %156, label %168

156:                                              ; preds = %151
  %157 = load ptr, ptr %11, align 8, !tbaa !5
  %158 = load i32, ptr %157, align 4, !tbaa !9
  %159 = load i32, ptr %24, align 4, !tbaa !9
  %160 = icmp slt i32 %158, %159
  br i1 %160, label %161, label %164

161:                                              ; preds = %156
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  %163 = load i32, ptr %162, align 4, !tbaa !9
  br label %166

164:                                              ; preds = %156
  %165 = load i32, ptr %24, align 4, !tbaa !9
  br label %166

166:                                              ; preds = %164, %161
  %167 = phi i32 [ %163, %161 ], [ %165, %164 ]
  store i32 %167, ptr %24, align 4, !tbaa !9
  br label %168

168:                                              ; preds = %166, %151
  %169 = load i32, ptr %26, align 4, !tbaa !9
  %170 = load ptr, ptr %11, align 8, !tbaa !5
  store i32 %169, ptr %170, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  br label %171

171:                                              ; preds = %168, %147, %144
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = icmp eq ptr %172, null
  br i1 %173, label %183, label %174

174:                                              ; preds = %171
  %175 = load ptr, ptr %10, align 8, !tbaa !5
  %176 = ptrtoint ptr %175 to i64
  %177 = icmp eq i64 %176, -1
  br i1 %177, label %183, label %178

178:                                              ; preds = %174
  %179 = load ptr, ptr %10, align 8, !tbaa !5
  %180 = load ptr, ptr %23, align 8, !tbaa !5
  %181 = load i32, ptr %24, align 4, !tbaa !9
  %182 = sext i32 %181 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %179, ptr align 1 %180, i64 %182, i1 false)
  br label %183

183:                                              ; preds = %178, %174, %171
  %184 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %184, ptr %6, align 8
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %185

185:                                              ; preds = %183, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %186

186:                                              ; preds = %185, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %187

187:                                              ; preds = %186, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  %188 = load ptr, ptr %6, align 8
  ret ptr %188
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!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 0}
!21 = !{!"OverWriteChain", !6, i64 0, !10, i64 8, !7, i64 12}
!22 = !{!21, !10, 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.4 = external hidden unnamed_addr constant [12 x i8], align 1
@__FUNCTION__.mornMapRead = external hidden unnamed_addr constant [12 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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @mornMapRead(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %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 215, ptr noundef nonnull @__FUNCTION__.mornMapRead, 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
  %magicptr63 = ptrtoint ptr %1 to i64
  switch i64 %magicptr63, 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 219, ptr noundef nonnull @__FUNCTION__.mornMapRead, 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
  %.053 = 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
  %.not = icmp eq i32 %32, 427716643
  br i1 %.not, 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 223, ptr noundef nonnull @__FUNCTION__.mornMapRead, 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 @_MapNode(ptr noundef %36, ptr noundef %1, i32 noundef %.053, 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 = add nsw i32 %.053, 7
  %46 = ashr i32 %45, 2
  %47 = and i32 %46, -2
  %48 = load ptr, ptr %41, align 8, !tbaa !18
  %49 = getelementptr inbounds i8, ptr %48, i64 8
  %50 = sext i32 %47 to i64
  %51 = getelementptr inbounds i32, ptr %49, i64 %50
  %52 = getelementptr inbounds i8, ptr %48, i64 4
  %53 = load i32, ptr %52, align 4, !tbaa !17
  %54 = icmp slt i32 %53, 0
  br i1 %54, label %55, label %61

55:                                               ; preds = %44
  %56 = load ptr, ptr %51, align 8, !tbaa !12
  %57 = load ptr, ptr %56, align 8, !tbaa !20
  store ptr %57, ptr %51, align 8, !tbaa !12
  %58 = getelementptr inbounds i8, ptr %57, i64 12
  %59 = getelementptr inbounds i8, ptr %57, i64 8
  %60 = load i32, ptr %59, align 8, !tbaa !22
  br label %61

61:                                               ; preds = %55, %44
  %.057 = phi ptr [ %58, %55 ], [ %51, %44 ]
  %.054 = phi i32 [ %60, %55 ], [ %53, %44 ]
  %magicptr64 = ptrtoint ptr %4 to i64
  switch i64 %magicptr64, label %62 [
    i64 -1, label %65
    i64 0, label %65
  ]

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

65:                                               ; preds = %61, %61, %62
  %.256 = phi i32 [ %.054, %61 ], [ %.155, %62 ], [ %.054, %61 ]
  %magicptr65 = ptrtoint ptr %3 to i64
  switch i64 %magicptr65, label %66 [
    i64 -1, label %68
    i64 0, label %68
  ]

66:                                               ; preds = %65
  %67 = sext i32 %.256 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %3, ptr nonnull align 1 %.057, i64 %67, i1 false)
  br label %68

68:                                               ; preds = %66, %65, %65, %40
  %.0 = phi ptr [ null, %40 ], [ %.057, %65 ], [ %.057, %65 ], [ %.057, %66 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  br label %69

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

; 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 = { 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 #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 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 0}
!21 = !{!"OverWriteChain", !10, i64 0, !7, i64 8, !8, i64 12}
!22 = !{!21, !7, i64 8}


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