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

; 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.MObject = type { i32, %union.anon }
%union.anon = type { ptr }
%struct.MHandle = type { i32, i32, ptr, ptr }
%struct.HandleLRU = type { i32, i32, ptr, ptr, ptr, ptr }
%struct.HandleList = type { %struct.MList, i32, i32, i32, i32 }
%struct.MList = type { i32, ptr }
%struct.MChainNode = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [75 x i8], align 1
@__FUNCTION__.mLRU = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local ptr @mLRU(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  br label %12

12:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = icmp eq ptr %13, null
  br i1 %14, label %19, label %15

15:                                               ; preds = %12
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = ptrtoint ptr %16 to i64
  %18 = icmp eq i64 %17, -1
  br label %19

19:                                               ; preds = %15, %12
  %20 = phi i1 [ true, %12 ], [ %18, %15 ]
  %21 = zext i1 %20 to i32
  store i32 %21, ptr %5, align 4, !tbaa !9
  %22 = load i32, ptr %5, align 4, !tbaa !9
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %26

24:                                               ; preds = %19
  %25 = load i32, ptr %5, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %25, i32 noundef -1, ptr noundef @.str, i32 noundef 16, ptr noundef @__FUNCTION__.mLRU, ptr noundef @.str.1)
  br label %26

26:                                               ; preds = %24, %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %27

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.MObject, ptr %28, i32 0, i32 1
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = icmp eq ptr %30, null
  br i1 %31, label %32, label %76

32:                                               ; preds = %27
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = call ptr @GetHandle(ptr noundef %33, i32 noundef 40, i32 noundef 1091851670, ptr noundef @endLRU)
  store ptr %34, ptr %6, align 8, !tbaa !5
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.MHandle, ptr %35, i32 0, i32 3
  %37 = load ptr, ptr %36, align 8, !tbaa !12
  store ptr %37, ptr %7, align 8, !tbaa !5
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.MHandle, ptr %38, i32 0, i32 1
  %40 = load volatile i32, ptr %39, align 4, !tbaa !14
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %75

42:                                               ; preds = %32
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.HandleLRU, ptr %43, i32 0, i32 0
  store i32 256, ptr %44, align 8, !tbaa !15
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.HandleLRU, ptr %46, i32 0, i32 0
  call void @m_PropertyVariate(ptr noundef %45, ptr noundef @.str.2, ptr noundef %47, i32 noundef 4)
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.HandleLRU, ptr %49, i32 0, i32 2
  call void @m_PropertyVariate(ptr noundef %48, ptr noundef @.str.3, ptr noundef %50, i32 noundef 8)
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.HandleLRU, ptr %52, i32 0, i32 3
  call void @m_PropertyVariate(ptr noundef %51, ptr noundef @.str.4, ptr noundef %53, i32 noundef 8)
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.HandleLRU, ptr %55, i32 0, i32 2
  call void @m_PropertyVariate(ptr noundef %54, ptr noundef @.str.5, ptr noundef %56, i32 noundef 8)
  %57 = load ptr, ptr %3, align 8, !tbaa !5
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.HandleLRU, ptr %58, i32 0, i32 3
  call void @m_PropertyVariate(ptr noundef %57, ptr noundef @.str.6, ptr noundef %59, i32 noundef 8)
  br label %60

60:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.HandleLRU, ptr %61, i32 0, i32 2
  %63 = load ptr, ptr %62, align 8, !tbaa !17
  %64 = icmp eq ptr %63, null
  %65 = zext i1 %64 to i32
  store i32 %65, ptr %8, align 4, !tbaa !9
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %70

68:                                               ; preds = %60
  %69 = load i32, ptr %8, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %69, i32 noundef -1, ptr noundef @.str, i32 noundef 30, ptr noundef @__FUNCTION__.mLRU, ptr noundef @.str.7)
  br label %70

70:                                               ; preds = %68, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %71

71:                                               ; preds = %70
  br label %72

72:                                               ; preds = %71
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.MHandle, ptr %73, i32 0, i32 1
  store volatile i32 1, ptr %74, align 4, !tbaa !14
  br label %75

75:                                               ; preds = %72, %32
  br label %100

76:                                               ; preds = %27
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.HandleList, ptr %77, i64 -1
  %79 = getelementptr inbounds %struct.HandleList, ptr %78, i32 0, i32 0
  %80 = getelementptr inbounds %struct.MList, ptr %79, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !18
  %82 = getelementptr inbounds ptr, ptr %81, i64 2
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  store ptr %83, ptr %6, align 8, !tbaa !5
  br label %84

84:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.MHandle, ptr %85, i32 0, i32 0
  %87 = load volatile i32, ptr %86, align 8, !tbaa !21
  %88 = icmp ne i32 %87, 1091851670
  %89 = zext i1 %88 to i32
  store i32 %89, ptr %9, align 4, !tbaa !9
  %90 = load i32, ptr %9, align 4, !tbaa !9
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %94

92:                                               ; preds = %84
  %93 = load i32, ptr %9, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %93, i32 noundef -1, ptr noundef @.str, i32 noundef 37, ptr noundef @__FUNCTION__.mLRU, ptr noundef @.str.8)
  br label %94

94:                                               ; preds = %92, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.MHandle, ptr %97, i32 0, i32 3
  %99 = load ptr, ptr %98, align 8, !tbaa !12
  store ptr %99, ptr %7, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %96, %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.HandleLRU, ptr %101, i32 0, i32 2
  %103 = load ptr, ptr %102, align 8, !tbaa !17
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = load ptr, ptr %7, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.HandleLRU, ptr %105, i32 0, i32 3
  %107 = load ptr, ptr %106, align 8, !tbaa !22
  %108 = call ptr %103(ptr noundef %104, ptr noundef %107)
  store ptr %108, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.HandleLRU, ptr %109, i32 0, i32 1
  %111 = load i32, ptr %110, align 4, !tbaa !23
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.HandleLRU, ptr %112, i32 0, i32 0
  %114 = load i32, ptr %113, align 8, !tbaa !15
  %115 = icmp slt i32 %111, %114
  br i1 %115, label %116, label %136

116:                                              ; preds = %100
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = call ptr @mChainNode(ptr noundef %117, ptr noundef null, i32 noundef -1)
  store ptr %118, ptr %11, align 8, !tbaa !5
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.MChainNode, ptr %120, i32 0, i32 0
  store ptr %119, ptr %121, align 8, !tbaa !24
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.MObject, ptr %122, i32 0, i32 1
  %124 = load ptr, ptr %123, align 8, !tbaa !11
  %125 = icmp ne ptr %124, null
  br i1 %125, label %126, label %131

126:                                              ; preds = %116
  %127 = load ptr, ptr %11, align 8, !tbaa !5
  %128 = load ptr, ptr %3, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.MObject, ptr %128, i32 0, i32 1
  %130 = load ptr, ptr %129, align 8, !tbaa !11
  call void @mChainNodeInsert(ptr noundef null, ptr noundef %127, ptr noundef %130)
  br label %131

131:                                              ; preds = %126, %116
  %132 = load ptr, ptr %7, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.HandleLRU, ptr %132, i32 0, i32 1
  %134 = load i32, ptr %133, align 4, !tbaa !23
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %133, align 4, !tbaa !23
  br label %167

136:                                              ; preds = %100
  %137 = load ptr, ptr %3, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.MObject, ptr %137, i32 0, i32 1
  %139 = load ptr, ptr %138, align 8, !tbaa !11
  %140 = getelementptr inbounds %struct.MChainNode, ptr %139, i32 0, i32 1
  %141 = load ptr, ptr %140, align 8, !tbaa !26
  store ptr %141, ptr %11, align 8, !tbaa !5
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.HandleLRU, ptr %142, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !27
  %145 = icmp ne ptr %144, null
  br i1 %145, label %146, label %157

146:                                              ; preds = %136
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.HandleLRU, ptr %147, i32 0, i32 4
  %149 = load ptr, ptr %148, align 8, !tbaa !27
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = load ptr, ptr %11, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.MChainNode, ptr %151, i32 0, i32 0
  %153 = load ptr, ptr %152, align 8, !tbaa !24
  %154 = load ptr, ptr %7, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.HandleLRU, ptr %154, i32 0, i32 5
  %156 = load ptr, ptr %155, align 8, !tbaa !28
  call void %149(ptr noundef %150, ptr noundef %153, ptr noundef %156)
  br label %157

157:                                              ; preds = %146, %136
  %158 = load ptr, ptr %3, align 8, !tbaa !5
  %159 = load ptr, ptr %11, align 8, !tbaa !5
  call void @mChainNodeDelete(ptr noundef %158, ptr noundef %159)
  %160 = load ptr, ptr %10, align 8, !tbaa !5
  %161 = load ptr, ptr %11, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.MChainNode, ptr %161, i32 0, i32 0
  store ptr %160, ptr %162, align 8, !tbaa !24
  %163 = load ptr, ptr %11, align 8, !tbaa !5
  %164 = load ptr, ptr %3, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.MObject, ptr %164, i32 0, i32 1
  %166 = load ptr, ptr %165, align 8, !tbaa !11
  call void @mChainNodeInsert(ptr noundef null, ptr noundef %163, ptr noundef %166)
  br label %167

167:                                              ; preds = %157, %131
  %168 = load ptr, ptr %11, align 8, !tbaa !5
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.MObject, ptr %169, i32 0, i32 1
  store ptr %168, ptr %170, align 8, !tbaa !11
  %171 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  ret ptr %171
}

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

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

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

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

declare void @m_PropertyVariate(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 16}
!13 = !{!"MHandle", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!14 = !{!13, !10, i64 4}
!15 = !{!16, !10, i64 0}
!16 = !{!"HandleLRU", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!17 = !{!16, !6, i64 8}
!18 = !{!19, !6, i64 8}
!19 = !{!"HandleList", !20, i64 0, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!20 = !{!"MList", !10, i64 0, !6, i64 8}
!21 = !{!13, !10, i64 0}
!22 = !{!16, !6, i64 16}
!23 = !{!16, !10, i64 4}
!24 = !{!25, !6, i64 0}
!25 = !{!"MChainNode", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!25, !6, i64 8}
!27 = !{!16, !6, i64 24}
!28 = !{!16, !6, i64 32}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [75 x i8], align 1
@__FUNCTION__.mLRU = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [12 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local ptr @mLRU(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %magicptr = ptrtoint ptr %0 to i64
  switch i64 %magicptr, label %8 [
    i64 -1, label %3
    i64 0, label %3
  ]

3:                                                ; preds = %2, %2
  %4 = icmp eq ptr %0, null
  %5 = icmp eq ptr %0, inttoptr (i64 -1 to ptr)
  %6 = or i1 %4, %5
  %7 = zext i1 %6 to i32
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %7, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 16, ptr noundef nonnull @__FUNCTION__.mLRU, ptr noundef nonnull @.str.1) #2
  br label %8

8:                                                ; preds = %2, %3
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %26

12:                                               ; preds = %8
  %13 = tail call ptr @GetHandle(ptr noundef nonnull %0, i32 noundef 40, i32 noundef 1091851670, ptr noundef nonnull @endLRU) #2
  %14 = getelementptr inbounds i8, ptr %13, i64 16
  %15 = load ptr, ptr %14, align 8, !tbaa !8
  %16 = getelementptr inbounds i8, ptr %13, i64 4
  %17 = load volatile i32, ptr %16, align 4, !tbaa !12
  %18 = icmp eq i32 %17, 0
  br i1 %18, label %19, label %36

19:                                               ; preds = %12
  store i32 256, ptr %15, align 8, !tbaa !13
  tail call void @m_PropertyVariate(ptr noundef nonnull %0, ptr noundef nonnull @.str.2, ptr noundef nonnull %15, i32 noundef 4) #2
  %20 = getelementptr inbounds i8, ptr %15, i64 8
  tail call void @m_PropertyVariate(ptr noundef nonnull %0, ptr noundef nonnull @.str.3, ptr noundef nonnull %20, i32 noundef 8) #2
  %21 = getelementptr inbounds i8, ptr %15, i64 16
  tail call void @m_PropertyVariate(ptr noundef nonnull %0, ptr noundef nonnull @.str.4, ptr noundef nonnull %21, i32 noundef 8) #2
  tail call void @m_PropertyVariate(ptr noundef nonnull %0, ptr noundef nonnull @.str.5, ptr noundef nonnull %20, i32 noundef 8) #2
  tail call void @m_PropertyVariate(ptr noundef nonnull %0, ptr noundef nonnull @.str.6, ptr noundef nonnull %21, i32 noundef 8) #2
  %22 = load ptr, ptr %20, align 8, !tbaa !15
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %25

24:                                               ; 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 30, ptr noundef nonnull @__FUNCTION__.mLRU, ptr noundef nonnull @.str.7) #2
  br label %25

25:                                               ; preds = %24, %19
  store volatile i32 1, ptr %16, align 4, !tbaa !12
  br label %36

26:                                               ; preds = %8
  %27 = getelementptr inbounds i8, ptr %0, i64 -24
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %30 = load ptr, ptr %29, align 8, !tbaa !19
  %31 = load volatile i32, ptr %30, align 8, !tbaa !20
  %.not58 = icmp eq i32 %31, 1091851670
  br i1 %.not58, label %33, label %32

32:                                               ; preds = %26
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 37, ptr noundef nonnull @__FUNCTION__.mLRU, ptr noundef nonnull @.str.8) #2
  br label %33

33:                                               ; preds = %32, %26
  %34 = getelementptr inbounds i8, ptr %30, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !8
  br label %36

36:                                               ; preds = %12, %25, %33
  %.054 = phi ptr [ %15, %25 ], [ %15, %12 ], [ %35, %33 ]
  %37 = getelementptr inbounds i8, ptr %.054, i64 8
  %38 = load ptr, ptr %37, align 8, !tbaa !15
  %39 = getelementptr inbounds i8, ptr %.054, i64 16
  %40 = load ptr, ptr %39, align 8, !tbaa !21
  %41 = tail call ptr %38(ptr noundef %1, ptr noundef %40) #2
  %42 = getelementptr inbounds i8, ptr %.054, i64 4
  %43 = load i32, ptr %42, align 4, !tbaa !22
  %44 = load i32, ptr %.054, align 8, !tbaa !13
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %46, label %53

46:                                               ; preds = %36
  %47 = tail call ptr @mChainNode(ptr noundef nonnull %0, ptr noundef null, i32 noundef -1) #2
  store ptr %41, ptr %47, align 8, !tbaa !23
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %.not57 = icmp eq ptr %48, null
  br i1 %.not57, label %50, label %49

49:                                               ; preds = %46
  tail call void @mChainNodeInsert(ptr noundef null, ptr noundef nonnull %47, ptr noundef nonnull %48) #2
  br label %50

50:                                               ; preds = %49, %46
  %51 = load i32, ptr %42, align 4, !tbaa !22
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %42, align 4, !tbaa !22
  br label %65

53:                                               ; preds = %36
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %54, i64 8
  %56 = load ptr, ptr %55, align 8, !tbaa !25
  %57 = getelementptr inbounds i8, ptr %.054, i64 24
  %58 = load ptr, ptr %57, align 8, !tbaa !26
  %.not = icmp eq ptr %58, null
  br i1 %.not, label %63, label %59

59:                                               ; preds = %53
  %60 = load ptr, ptr %56, align 8, !tbaa !23
  %61 = getelementptr inbounds i8, ptr %.054, i64 32
  %62 = load ptr, ptr %61, align 8, !tbaa !27
  tail call void %58(ptr noundef %1, ptr noundef %60, ptr noundef %62) #2
  br label %63

63:                                               ; preds = %59, %53
  tail call void @mChainNodeDelete(ptr noundef nonnull %0, ptr noundef %56) #2
  store ptr %41, ptr %56, align 8, !tbaa !23
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  tail call void @mChainNodeInsert(ptr noundef null, ptr noundef nonnull %56, ptr noundef %64) #2
  br label %65

65:                                               ; preds = %63, %50
  %.0 = phi ptr [ %47, %50 ], [ %56, %63 ]
  store ptr %.0, ptr %9, align 8, !tbaa !5
  ret ptr %.0
}

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

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

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

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

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

declare void @mChainNodeDelete(ptr noundef, ptr noundef) local_unnamed_addr #1

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 = { "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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !11, i64 16}
!9 = !{!"MHandle", !10, i64 0, !10, i64 4, !11, i64 8, !11, i64 16}
!10 = !{!"int", !6, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!9, !10, i64 4}
!13 = !{!14, !10, i64 0}
!14 = !{!"HandleLRU", !10, i64 0, !10, i64 4, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32}
!15 = !{!14, !11, i64 8}
!16 = !{!17, !11, i64 8}
!17 = !{!"HandleList", !18, i64 0, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!18 = !{!"MList", !10, i64 0, !11, i64 8}
!19 = !{!11, !11, i64 0}
!20 = !{!9, !10, i64 0}
!21 = !{!14, !11, i64 16}
!22 = !{!14, !10, i64 4}
!23 = !{!24, !11, i64 0}
!24 = !{!"MChainNode", !11, i64 0, !11, i64 8, !11, i64 16}
!25 = !{!24, !11, i64 8}
!26 = !{!14, !11, i64 24}
!27 = !{!14, !11, i64 32}


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