; LLVM IR from jingweizhanghuai/Morn :: src/math (morn_matrix)

; 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.MVector = type { i32, ptr }
%struct.HandleList = type { %struct.MList, i32, i32, i32, i32 }
%struct.MList = type { i32, ptr }
%struct.MHandle = type { i32, i32, ptr, ptr }
%struct.HandleVectorCreate = type { ptr, ptr, [8 x i64], i32, i32, ptr }

@.str = external hidden unnamed_addr constant [78 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@__FUNCTION__.VectorRedefine = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 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

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

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

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

declare void @m_PropertyFunction(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare void @mornMemoryDevice(ptr noundef, ptr noundef) #1

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

15:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %22, label %18

18:                                               ; preds = %15
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = ptrtoint ptr %19 to i64
  %21 = icmp eq i64 %20, -1
  br label %22

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

27:                                               ; preds = %22
  %28 = load i32, ptr %7, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %28, i32 noundef -1, ptr noundef @.str, i32 noundef 62, ptr noundef @__FUNCTION__.VectorRedefine, ptr noundef @.str.2)
  br label %29

29:                                               ; preds = %27, %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %30

30:                                               ; preds = %29
  %31 = load i32, ptr %5, align 4, !tbaa !9
  %32 = icmp sle i32 %31, 0
  br i1 %32, label %33, label %37

33:                                               ; preds = %30
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.MVector, ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 8, !tbaa !11
  store i32 %36, ptr %5, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %33, %30
  %38 = load i32, ptr %5, align 4, !tbaa !9
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.MVector, ptr %39, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !11
  %42 = icmp ne i32 %38, %41
  br i1 %42, label %43, label %45

43:                                               ; preds = %37
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  call void @mHandleReset(ptr noundef %44)
  br label %45

45:                                               ; preds = %43, %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %46 = load i32, ptr %5, align 4, !tbaa !9
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.MVector, ptr %47, i32 0, i32 0
  %49 = load i32, ptr %48, align 8, !tbaa !11
  %50 = icmp sle i32 %46, %49
  %51 = zext i1 %50 to i32
  store i32 %51, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.MVector, ptr %53, i32 0, i32 1
  %55 = load ptr, ptr %54, align 8, !tbaa !13
  %56 = icmp eq ptr %52, %55
  %57 = zext i1 %56 to i32
  store i32 %57, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.MVector, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 8, !tbaa !11
  %61 = icmp sgt i32 %60, 0
  %62 = zext i1 %61 to i32
  store i32 %62, ptr %10, align 4, !tbaa !9
  %63 = load i32, ptr %5, align 4, !tbaa !9
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.MVector, ptr %64, i32 0, i32 0
  store i32 %63, ptr %65, align 8, !tbaa !11
  %66 = load i32, ptr %8, align 4, !tbaa !9
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %72

68:                                               ; preds = %45
  %69 = load i32, ptr %9, align 4, !tbaa !9
  %70 = icmp ne i32 %69, 0
  br i1 %70, label %71, label %72

71:                                               ; preds = %68
  store i32 1, ptr %11, align 4
  br label %199

72:                                               ; preds = %68, %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.HandleList, ptr %73, i64 -1
  %75 = getelementptr inbounds %struct.HandleList, ptr %74, i32 0, i32 0
  %76 = getelementptr inbounds %struct.MList, ptr %75, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !14
  %78 = getelementptr inbounds ptr, ptr %77, i64 0
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.MHandle, ptr %79, i32 0, i32 3
  %81 = load ptr, ptr %80, align 8, !tbaa !17
  store ptr %81, ptr %12, align 8, !tbaa !5
  %82 = load i32, ptr %8, align 4, !tbaa !9
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %93

84:                                               ; preds = %72
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = icmp eq ptr %85, null
  br i1 %86, label %87, label %93

87:                                               ; preds = %84
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.HandleVectorCreate, ptr %88, i32 0, i32 4
  %90 = load i32, ptr %89, align 4, !tbaa !19
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %92, label %93

92:                                               ; preds = %87
  store i32 1, ptr %11, align 4
  br label %198

93:                                               ; preds = %87, %84, %72
  br label %94

94:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %95 = load i32, ptr %9, align 4, !tbaa !9
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %105

97:                                               ; preds = %94
  %98 = load i32, ptr %10, align 4, !tbaa !9
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %105

100:                                              ; preds = %97
  %101 = load ptr, ptr %12, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.HandleVectorCreate, ptr %101, i32 0, i32 4
  %103 = load i32, ptr %102, align 4, !tbaa !19
  %104 = icmp eq i32 %103, 0
  br label %105

105:                                              ; preds = %100, %97, %94
  %106 = phi i1 [ false, %97 ], [ false, %94 ], [ %104, %100 ]
  %107 = zext i1 %106 to i32
  store i32 %107, ptr %13, align 4, !tbaa !9
  %108 = load i32, ptr %13, align 4, !tbaa !9
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %110, label %112

110:                                              ; preds = %105
  %111 = load i32, ptr %13, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %111, i32 noundef -1, ptr noundef @.str, i32 noundef 75, ptr noundef @__FUNCTION__.VectorRedefine, ptr noundef @.str.4)
  br label %112

112:                                              ; preds = %110, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %113

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.HandleVectorCreate, ptr %115, i32 0, i32 4
  store i32 0, ptr %116, align 4, !tbaa !19
  %117 = load i32, ptr %5, align 4, !tbaa !9
  %118 = icmp sle i32 %117, 0
  br i1 %118, label %119, label %139

119:                                              ; preds = %114
  br label %120

120:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = icmp ne ptr %121, null
  br i1 %122, label %123, label %127

123:                                              ; preds = %120
  %124 = load i32, ptr %9, align 4, !tbaa !9
  %125 = icmp ne i32 %124, 0
  %126 = xor i1 %125, true
  br label %127

127:                                              ; preds = %123, %120
  %128 = phi i1 [ false, %120 ], [ %126, %123 ]
  %129 = zext i1 %128 to i32
  store i32 %129, ptr %14, align 4, !tbaa !9
  %130 = load i32, ptr %14, align 4, !tbaa !9
  %131 = icmp ne i32 %130, 0
  br i1 %131, label %132, label %134

132:                                              ; preds = %127
  %133 = load i32, ptr %14, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %133, i32 noundef -1, ptr noundef @.str, i32 noundef 78, ptr noundef @__FUNCTION__.VectorRedefine, ptr noundef @.str.2)
  br label %134

134:                                              ; preds = %132, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %135

135:                                              ; preds = %134
  br label %136

136:                                              ; preds = %135
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.MVector, ptr %137, i32 0, i32 1
  store ptr null, ptr %138, align 8, !tbaa !13
  store i32 1, ptr %11, align 4
  br label %198

139:                                              ; preds = %114
  %140 = load i32, ptr %9, align 4, !tbaa !9
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %143

142:                                              ; preds = %139
  store ptr null, ptr %6, align 8, !tbaa !5
  br label %143

143:                                              ; preds = %142, %139
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = icmp ne ptr %144, null
  br i1 %145, label %146, label %150

146:                                              ; preds = %143
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.MVector, ptr %148, i32 0, i32 1
  store ptr %147, ptr %149, align 8, !tbaa !13
  store i32 1, ptr %11, align 4
  br label %198

150:                                              ; preds = %143
  %151 = load i32, ptr %5, align 4, !tbaa !9
  %152 = load ptr, ptr %12, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.HandleVectorCreate, ptr %152, i32 0, i32 4
  %154 = load i32, ptr %153, align 4, !tbaa !19
  %155 = icmp sgt i32 %151, %154
  br i1 %155, label %156, label %197

156:                                              ; preds = %150
  %157 = load i32, ptr %5, align 4, !tbaa !9
  %158 = load ptr, ptr %12, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.HandleVectorCreate, ptr %158, i32 0, i32 4
  store i32 %157, ptr %159, align 4, !tbaa !19
  %160 = load ptr, ptr %12, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.HandleVectorCreate, ptr %160, i32 0, i32 5
  %162 = load ptr, ptr %161, align 8, !tbaa !21
  %163 = icmp eq ptr %162, null
  br i1 %163, label %164, label %179

164:                                              ; preds = %156
  %165 = load i32, ptr %5, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = mul i64 %166, 4
  %168 = trunc i64 %167 to i32
  %169 = call ptr @mMemoryCreate(i32 noundef 1, i32 noundef %168, i32 noundef 0)
  %170 = load ptr, ptr %12, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.HandleVectorCreate, ptr %170, i32 0, i32 5
  store ptr %169, ptr %171, align 8, !tbaa !21
  br label %172

172:                                              ; preds = %164
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = load ptr, ptr %12, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.HandleVectorCreate, ptr %174, i32 0, i32 5
  %176 = load ptr, ptr %175, align 8, !tbaa !21
  call void @m_PropertyFunction(ptr noundef %173, ptr noundef @.str.3, ptr noundef @mornMemoryDevice, ptr noundef %176)
  br label %177

177:                                              ; preds = %172
  br label %178

178:                                              ; preds = %177
  br label %187

179:                                              ; preds = %156
  %180 = load ptr, ptr %12, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.HandleVectorCreate, ptr %180, i32 0, i32 5
  %182 = load ptr, ptr %181, align 8, !tbaa !21
  %183 = load i32, ptr %5, align 4, !tbaa !9
  %184 = sext i32 %183 to i64
  %185 = mul i64 %184, 4
  %186 = trunc i64 %185 to i32
  call void @mMemoryRedefine(ptr noundef %182, i32 noundef 1, i32 noundef %186, i32 noundef -1)
  br label %187

187:                                              ; preds = %179, %178
  %188 = load ptr, ptr %12, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.HandleVectorCreate, ptr %188, i32 0, i32 5
  %190 = load ptr, ptr %189, align 8, !tbaa !21
  %191 = getelementptr inbounds %struct.MList, ptr %190, i32 0, i32 1
  %192 = load ptr, ptr %191, align 8, !tbaa !22
  %193 = getelementptr inbounds ptr, ptr %192, i64 0
  %194 = load ptr, ptr %193, align 8, !tbaa !5
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.MVector, ptr %195, i32 0, i32 1
  store ptr %194, ptr %196, align 8, !tbaa !13
  br label %197

197:                                              ; preds = %187, %150
  store i32 0, ptr %11, align 4
  br label %198

198:                                              ; preds = %197, %146, %136, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %199

199:                                              ; preds = %198, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %200 = load i32, ptr %11, align 4
  switch i32 %200, label %202 [
    i32 0, label %201
    i32 1, label %201
  ]

201:                                              ; preds = %199, %199
  ret void

202:                                              ; preds = %199
  unreachable
}

declare void @mHandleReset(ptr noundef) #1

declare void @mMemoryRedefine(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #1

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 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 #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 = !{!12, !10, i64 0}
!12 = !{!"MVector", !10, i64 0, !6, i64 8}
!13 = !{!12, !6, i64 8}
!14 = !{!15, !6, i64 8}
!15 = !{!"HandleList", !16, i64 0, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!16 = !{!"MList", !10, i64 0, !6, i64 8}
!17 = !{!18, !6, i64 16}
!18 = !{!"MHandle", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!19 = !{!20, !10, i64 84}
!20 = !{!"HandleVectorCreate", !6, i64 0, !6, i64 8, !7, i64 16, !10, i64 80, !10, i64 84, !6, i64 88}
!21 = !{!20, !6, i64 88}
!22 = !{!16, !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 [78 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@__FUNCTION__.VectorRedefine = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1

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

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

declare void @m_PropertyFunction(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @mornMemoryDevice(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @VectorRedefine(ptr noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #1 {
  %magicptr = ptrtoint ptr %0 to i64
  switch i64 %magicptr, label %9 [
    i64 -1, label %4
    i64 0, label %4
  ]

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

9:                                                ; preds = %3, %4
  %10 = icmp slt i32 %1, 1
  %.pre = load i32, ptr %0, align 8, !tbaa !5
  br i1 %10, label %.thread64, label %11

11:                                               ; preds = %9
  %.not = icmp eq i32 %.pre, %1
  br i1 %.not, label %.thread64, label %12

12:                                               ; preds = %11
  tail call void @mHandleReset(ptr noundef nonnull %0) #2
  %.pre63 = load i32, ptr %0, align 8, !tbaa !5
  br label %.thread64

.thread64:                                        ; preds = %9, %12, %11
  %.067 = phi i32 [ %1, %12 ], [ %1, %11 ], [ %.pre, %9 ]
  %13 = phi i32 [ %.pre63, %12 ], [ %.pre, %11 ], [ %.pre, %9 ]
  %14 = icmp sle i32 %.067, %13
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = icmp eq ptr %16, %2
  %18 = icmp sgt i32 %13, 0
  store i32 %.067, ptr %0, align 8, !tbaa !5
  %or.cond = select i1 %14, i1 %17, i1 false
  br i1 %or.cond, label %54, label %19

19:                                               ; preds = %.thread64
  %20 = getelementptr inbounds i8, ptr %0, i64 -24
  %21 = load ptr, ptr %20, align 8, !tbaa !12
  %22 = load ptr, ptr %21, align 8, !tbaa !15
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %24 = load ptr, ptr %23, align 8, !tbaa !16
  %25 = icmp eq ptr %2, null
  %or.cond3 = and i1 %25, %14
  br i1 %or.cond3, label %26, label %30

26:                                               ; preds = %19
  %27 = getelementptr inbounds i8, ptr %24, i64 84
  %28 = load i32, ptr %27, align 4, !tbaa !18
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %54, label %30

30:                                               ; preds = %19, %26
  %or.cond5 = and i1 %18, %17
  br i1 %or.cond5, label %31, label %.thread

31:                                               ; preds = %30
  %32 = getelementptr inbounds i8, ptr %24, i64 84
  %33 = load i32, ptr %32, align 4, !tbaa !18
  %34 = icmp eq i32 %33, 0
  br i1 %34, label %35, label %.thread

35:                                               ; preds = %31
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 75, ptr noundef nonnull @__FUNCTION__.VectorRedefine, ptr noundef nonnull @.str.4) #2
  br label %.thread

.thread:                                          ; preds = %30, %35, %31
  %36 = getelementptr inbounds i8, ptr %24, i64 84
  store i32 0, ptr %36, align 4, !tbaa !18
  %37 = icmp slt i32 %.067, 1
  br i1 %37, label %38, label %40

38:                                               ; preds = %.thread
  %.not62 = select i1 %25, i1 true, i1 %17
  br i1 %.not62, label %.sink.split, label %39

39:                                               ; preds = %38
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 78, ptr noundef nonnull @__FUNCTION__.VectorRedefine, ptr noundef nonnull @.str.2) #2
  br label %.sink.split

40:                                               ; preds = %.thread
  %.not59 = or i1 %25, %17
  br i1 %.not59, label %41, label %.sink.split

41:                                               ; preds = %40
  store i32 %.067, ptr %36, align 4, !tbaa !18
  %42 = getelementptr inbounds i8, ptr %24, i64 88
  %43 = load ptr, ptr %42, align 8, !tbaa !20
  %44 = icmp eq ptr %43, null
  %45 = shl i32 %.067, 2
  br i1 %44, label %46, label %48

46:                                               ; preds = %41
  %47 = tail call ptr @mMemoryCreate(i32 noundef 1, i32 noundef %45, i32 noundef 0) #2
  store ptr %47, ptr %42, align 8, !tbaa !20
  tail call void @m_PropertyFunction(ptr noundef nonnull %0, ptr noundef nonnull @.str.3, ptr noundef nonnull @mornMemoryDevice, ptr noundef %47) #2
  br label %49

48:                                               ; preds = %41
  tail call void @mMemoryRedefine(ptr noundef nonnull %43, i32 noundef 1, i32 noundef %45, i32 noundef -1) #2
  br label %49

49:                                               ; preds = %48, %46
  %50 = load ptr, ptr %42, align 8, !tbaa !20
  %51 = getelementptr inbounds i8, ptr %50, i64 8
  %52 = load ptr, ptr %51, align 8, !tbaa !21
  %53 = load ptr, ptr %52, align 8, !tbaa !15
  br label %.sink.split

.sink.split:                                      ; preds = %40, %38, %39, %49
  %.sink = phi ptr [ %53, %49 ], [ null, %39 ], [ null, %38 ], [ %2, %40 ]
  store ptr %.sink, ptr %15, align 8, !tbaa !11
  br label %54

54:                                               ; preds = %.sink.split, %26, %.thread64
  ret void
}

declare void @mHandleReset(ptr noundef) local_unnamed_addr #0

declare void @mMemoryRedefine(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

attributes #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 = { 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 = { 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, !7, i64 0}
!6 = !{!"MVector", !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 = !{!13, !10, i64 8}
!13 = !{!"HandleList", !14, i64 0, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28}
!14 = !{!"MList", !7, i64 0, !10, i64 8}
!15 = !{!10, !10, i64 0}
!16 = !{!17, !10, i64 16}
!17 = !{!"MHandle", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16}
!18 = !{!19, !7, i64 84}
!19 = !{!"HandleVectorCreate", !10, i64 0, !10, i64 8, !8, i64 16, !7, i64 80, !7, i64 84, !10, i64 88}
!20 = !{!19, !10, i64 88}
!21 = !{!14, !10, i64 8}


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