; 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.MMatrix = type { 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.11 = external hidden unnamed_addr constant [19 x i8], align 1
@__FUNCTION__.mVectorMatrixMul = 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

; Function Attrs: nounwind uwtable
declare dso_local void @mVectorRelease(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @VectorRedefine(ptr noundef, i32 noundef, 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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

; Function Attrs: nounwind uwtable
define dso_local void @mVectorMatrixMul(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %struct.MVector, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %17, ptr %7, align 8, !tbaa !5
  br label %18

18:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = icmp eq ptr %19, null
  br i1 %20, label %25, label %21

21:                                               ; preds = %18
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = ptrtoint ptr %22 to i64
  %24 = icmp eq i64 %23, -1
  br i1 %24, label %25, label %26

25:                                               ; preds = %21, %18
  br i1 true, label %72, label %47

26:                                               ; preds = %21
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.MMatrix, ptr %27, i32 0, i32 2
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  %30 = icmp eq ptr %29, null
  br i1 %30, label %72, label %31

31:                                               ; preds = %26
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.MMatrix, ptr %32, i32 0, i32 2
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = ptrtoint ptr %34 to i64
  %36 = icmp sle i64 %35, 0
  br i1 %36, label %72, label %37

37:                                               ; preds = %31
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.MMatrix, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 4, !tbaa !12
  %41 = icmp sle i32 %40, 0
  br i1 %41, label %72, label %42

42:                                               ; preds = %37
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.MMatrix, ptr %43, i32 0, i32 0
  %45 = load i32, ptr %44, align 8, !tbaa !13
  %46 = icmp sle i32 %45, 0
  br i1 %46, label %72, label %47

47:                                               ; preds = %42, %25
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = icmp eq ptr %48, null
  br i1 %49, label %54, label %50

50:                                               ; preds = %47
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = ptrtoint ptr %51 to i64
  %53 = icmp eq i64 %52, -1
  br i1 %53, label %54, label %55

54:                                               ; preds = %50, %47
  br label %69

55:                                               ; preds = %50
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.MVector, ptr %56, i32 0, i32 0
  %58 = load i32, ptr %57, align 8, !tbaa !14
  %59 = icmp sle i32 %58, 0
  br i1 %59, label %66, label %60

60:                                               ; preds = %55
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.MVector, ptr %61, i32 0, i32 1
  %63 = load ptr, ptr %62, align 8, !tbaa !16
  %64 = ptrtoint ptr %63 to i64
  %65 = icmp sle i64 %64, 0
  br label %66

66:                                               ; preds = %60, %55
  %67 = phi i1 [ true, %55 ], [ %65, %60 ]
  %68 = zext i1 %67 to i32
  br label %69

69:                                               ; preds = %66, %54
  %70 = phi i32 [ 1, %54 ], [ %68, %66 ]
  %71 = icmp ne i32 %70, 0
  br label %72

72:                                               ; preds = %69, %42, %37, %31, %26, %25
  %73 = phi i1 [ true, %42 ], [ true, %37 ], [ true, %31 ], [ true, %26 ], [ true, %25 ], [ %71, %69 ]
  %74 = zext i1 %73 to i32
  store i32 %74, ptr %8, align 4, !tbaa !17
  %75 = load i32, ptr %8, align 4, !tbaa !17
  %76 = icmp ne i32 %75, 0
  br i1 %76, label %77, label %79

77:                                               ; preds = %72
  %78 = load i32, ptr %8, align 4, !tbaa !17
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %78, i32 noundef -1, ptr noundef @.str, i32 noundef 592, ptr noundef @__FUNCTION__.mVectorMatrixMul, ptr noundef @.str.2)
  br label %79

79:                                               ; preds = %77, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %80

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.MMatrix, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %83, align 8, !tbaa !13
  store i32 %84, ptr %9, align 4, !tbaa !17
  br label %85

85:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.MVector, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !14
  %89 = load i32, ptr %9, align 4, !tbaa !17
  %90 = icmp ne i32 %88, %89
  %91 = zext i1 %90 to i32
  store i32 %91, ptr %10, align 4, !tbaa !17
  %92 = load i32, ptr %10, align 4, !tbaa !17
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %96

94:                                               ; preds = %85
  %95 = load i32, ptr %10, align 4, !tbaa !17
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %95, i32 noundef -1, ptr noundef @.str, i32 noundef 595, ptr noundef @__FUNCTION__.mVectorMatrixMul, ptr noundef @.str.2)
  br label %96

96:                                               ; preds = %94, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %97

97:                                               ; preds = %96
  br label %98

98:                                               ; preds = %97
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.MMatrix, ptr %99, i32 0, i32 1
  %101 = load i32, ptr %100, align 4, !tbaa !12
  store i32 %101, ptr %11, align 4, !tbaa !17
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = icmp eq ptr %102, null
  br i1 %103, label %112, label %104

104:                                              ; preds = %98
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = ptrtoint ptr %105 to i64
  %107 = icmp eq i64 %106, -1
  br i1 %107, label %112, label %108

108:                                              ; preds = %104
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = icmp eq ptr %109, %110
  br i1 %111, label %112, label %113

112:                                              ; preds = %108, %104, %98
  store ptr null, ptr %6, align 8, !tbaa !5
  br label %147

113:                                              ; preds = %108
  br label %114

114:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 3, ptr %12, align 4, !tbaa !17
  %115 = load i32, ptr %12, align 4, !tbaa !17
  %116 = icmp eq i32 %115, 1
  br i1 %116, label %117, label %124

117:                                              ; preds = %114
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = load i32, ptr %11, align 4, !tbaa !17
  %120 = add nsw i32 %119, 0
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.MVector, ptr %121, i32 0, i32 1
  %123 = load ptr, ptr %122, align 8, !tbaa !16
  call void @VectorRedefine(ptr noundef %118, i32 noundef %120, ptr noundef %123)
  br label %144

124:                                              ; preds = %114
  %125 = load i32, ptr %12, align 4, !tbaa !17
  %126 = icmp eq i32 %125, 2
  br i1 %126, label %127, label %134

127:                                              ; preds = %124
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = load i32, ptr %11, align 4, !tbaa !17
  %130 = add nsw i32 %129, 0
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.MVector, ptr %131, i32 0, i32 1
  %133 = load ptr, ptr %132, align 8, !tbaa !16
  call void @VectorRedefine(ptr noundef %128, i32 noundef %130, ptr noundef %133)
  br label %143

134:                                              ; preds = %124
  br label %135

135:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 1, ptr %13, align 4, !tbaa !17
  %136 = load i32, ptr %13, align 4, !tbaa !17
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %138, label %140

138:                                              ; preds = %135
  %139 = load i32, ptr %13, align 4, !tbaa !17
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %139, i32 noundef -1, ptr noundef @.str, i32 noundef 599, ptr noundef @__FUNCTION__.mVectorMatrixMul, ptr noundef @.str.11)
  br label %140

140:                                              ; preds = %138, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %141

141:                                              ; preds = %140
  br label %142

142:                                              ; preds = %141
  br label %143

143:                                              ; preds = %142, %127
  br label %144

144:                                              ; preds = %143, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %145

145:                                              ; preds = %144
  br label %146

146:                                              ; preds = %145
  br label %147

147:                                              ; preds = %146, %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !17
  br label %148

148:                                              ; preds = %201, %147
  %149 = load i32, ptr %14, align 4, !tbaa !17
  %150 = load i32, ptr %11, align 4, !tbaa !17
  %151 = icmp slt i32 %149, %150
  br i1 %151, label %153, label %152

152:                                              ; preds = %148
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %204

153:                                              ; preds = %148
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.MVector, ptr %154, i32 0, i32 1
  %156 = load ptr, ptr %155, align 8, !tbaa !16
  %157 = load i32, ptr %14, align 4, !tbaa !17
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds float, ptr %156, i64 %158
  store float 0.000000e+00, ptr %159, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !17
  br label %160

160:                                              ; preds = %197, %153
  %161 = load i32, ptr %15, align 4, !tbaa !17
  %162 = load i32, ptr %9, align 4, !tbaa !17
  %163 = icmp slt i32 %161, %162
  br i1 %163, label %164, label %200

164:                                              ; preds = %160
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.MVector, ptr %165, i32 0, i32 1
  %167 = load ptr, ptr %166, align 8, !tbaa !16
  %168 = load i32, ptr %14, align 4, !tbaa !17
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds float, ptr %167, i64 %169
  %171 = load float, ptr %170, align 4, !tbaa !18
  %172 = load ptr, ptr %4, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.MVector, ptr %172, i32 0, i32 1
  %174 = load ptr, ptr %173, align 8, !tbaa !16
  %175 = load i32, ptr %15, align 4, !tbaa !17
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds float, ptr %174, i64 %176
  %178 = load float, ptr %177, align 4, !tbaa !18
  %179 = load ptr, ptr %5, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.MMatrix, ptr %179, i32 0, i32 2
  %181 = load ptr, ptr %180, align 8, !tbaa !9
  %182 = load i32, ptr %15, align 4, !tbaa !17
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds ptr, ptr %181, i64 %183
  %185 = load ptr, ptr %184, align 8, !tbaa !5
  %186 = load i32, ptr %14, align 4, !tbaa !17
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds float, ptr %185, i64 %187
  %189 = load float, ptr %188, align 4, !tbaa !18
  %190 = call float @llvm.fmuladd.f32(float %178, float %189, float %171)
  %191 = load ptr, ptr %6, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.MVector, ptr %191, i32 0, i32 1
  %193 = load ptr, ptr %192, align 8, !tbaa !16
  %194 = load i32, ptr %14, align 4, !tbaa !17
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds float, ptr %193, i64 %195
  store float %190, ptr %196, align 4, !tbaa !18
  br label %197

197:                                              ; preds = %164
  %198 = load i32, ptr %15, align 4, !tbaa !17
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %15, align 4, !tbaa !17
  br label %160, !llvm.loop !20

200:                                              ; preds = %160
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %201

201:                                              ; preds = %200
  %202 = load i32, ptr %14, align 4, !tbaa !17
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr %14, align 4, !tbaa !17
  br label %148, !llvm.loop !22

204:                                              ; preds = %152
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = load ptr, ptr %6, align 8, !tbaa !5
  %207 = icmp ne ptr %205, %206
  br i1 %207, label %208, label %219

208:                                              ; preds = %204
  br label %209

209:                                              ; preds = %208
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %210 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %210, i64 16, i1 false), !tbaa.struct !23
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %211, ptr align 8 %212, i64 16, i1 false), !tbaa.struct !23
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %213, ptr align 8 %16, i64 16, i1 false), !tbaa.struct !23
  %214 = load ptr, ptr %4, align 8, !tbaa !5
  %215 = load ptr, ptr %6, align 8, !tbaa !5
  call void @HandleExchange(ptr noundef %214, ptr noundef %215)
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  br label %216

216:                                              ; preds = %209
  br label %217

217:                                              ; preds = %216
  %218 = load ptr, ptr %6, align 8, !tbaa !5
  call void @mVectorRelease(ptr noundef %218)
  br label %219

219:                                              ; preds = %217, %204
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void
}

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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, !6, i64 8}
!10 = !{!"MMatrix", !11, i64 0, !11, i64 4, !6, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!10, !11, i64 0}
!14 = !{!15, !11, i64 0}
!15 = !{!"MVector", !11, i64 0, !6, i64 8}
!16 = !{!15, !6, i64 8}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"float", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = !{i64 0, i64 4, !17, i64 8, i64 8, !5}


; 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"

%struct.MVector = type { 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.11 = external hidden unnamed_addr constant [19 x i8], align 1
@__FUNCTION__.mVectorMatrixMul = external hidden unnamed_addr constant [17 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

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

; 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 void @mVectorRelease(ptr 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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

; Function Attrs: nounwind uwtable
define dso_local void @mVectorMatrixMul(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = alloca %struct.MVector, align 8
  %magicptr = ptrtoint ptr %1 to i64
  switch i64 %magicptr, label %5 [
    i64 -1, label %.thread
    i64 0, label %.thread
  ]

5:                                                ; preds = %3
  %6 = getelementptr inbounds i8, ptr %1, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = icmp slt ptr %7, inttoptr (i64 1 to ptr)
  br i1 %8, label %.thread, label %9

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %1, i64 4
  %11 = load i32, ptr %10, align 4, !tbaa !11
  %12 = icmp slt i32 %11, 1
  br i1 %12, label %.thread, label %13

13:                                               ; preds = %9
  %14 = load i32, ptr %1, align 8, !tbaa !12
  %15 = icmp slt i32 %14, 1
  br i1 %15, label %.thread, label %16

16:                                               ; preds = %13
  %magicptr72 = ptrtoint ptr %0 to i64
  switch i64 %magicptr72, label %17 [
    i64 -1, label %.thread
    i64 0, label %.thread
  ]

17:                                               ; preds = %16
  %18 = load i32, ptr %0, align 8, !tbaa !13
  %19 = icmp slt i32 %18, 1
  br i1 %19, label %.thread, label %20

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  %22 = load ptr, ptr %21, align 8, !tbaa !15
  %23 = icmp slt ptr %22, inttoptr (i64 1 to ptr)
  br i1 %23, label %.thread, label %24

.thread:                                          ; preds = %17, %16, %16, %3, %3, %5, %9, %13, %20
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 592, ptr noundef nonnull @__FUNCTION__.mVectorMatrixMul, ptr noundef nonnull @.str.2) #6
  %.pre = load i32, ptr %1, align 8, !tbaa !12
  %.pre88 = load i32, ptr %0, align 8, !tbaa !13
  br label %24

24:                                               ; preds = %.thread, %20
  %25 = phi i32 [ %.pre88, %.thread ], [ %18, %20 ]
  %26 = phi i32 [ %.pre, %.thread ], [ %14, %20 ]
  %.not74 = icmp eq i32 %25, %26
  br i1 %.not74, label %28, label %27

27:                                               ; preds = %24
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 595, ptr noundef nonnull @__FUNCTION__.mVectorMatrixMul, ptr noundef nonnull @.str.2) #6
  br label %28

28:                                               ; preds = %27, %24
  %29 = getelementptr inbounds i8, ptr %1, i64 4
  %30 = load i32, ptr %29, align 4, !tbaa !11
  %magicptr73 = ptrtoint ptr %2 to i64
  switch i64 %magicptr73, label %31 [
    i64 -1, label %34
    i64 0, label %34
  ]

31:                                               ; preds = %28
  %32 = icmp eq ptr %2, %0
  br i1 %32, label %34, label %33

33:                                               ; 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 599, ptr noundef nonnull @__FUNCTION__.mVectorMatrixMul, ptr noundef nonnull @.str.11) #6
  br label %34

34:                                               ; preds = %31, %28, %28, %33
  %.067 = phi ptr [ %2, %33 ], [ null, %28 ], [ null, %28 ], [ null, %31 ]
  %35 = icmp sgt i32 %30, 0
  br i1 %35, label %.lr.ph78, label %._crit_edge79

.lr.ph78:                                         ; preds = %34
  %36 = getelementptr inbounds i8, ptr %.067, i64 8
  %37 = load ptr, ptr %36, align 8, !tbaa !15
  %38 = icmp sgt i32 %26, 0
  br i1 %38, label %.lr.ph78.split.us, label %.lr.ph78.split.preheader

.lr.ph78.split.preheader:                         ; preds = %.lr.ph78
  %39 = zext nneg i32 %30 to i64
  %40 = shl nuw nsw i64 %39, 2
  tail call void @llvm.memset.p0.i64(ptr align 4 %37, i8 0, i64 %40, i1 false), !tbaa !16
  br label %._crit_edge79

.lr.ph78.split.us:                                ; preds = %.lr.ph78
  %41 = getelementptr inbounds i8, ptr %1, i64 8
  %42 = getelementptr inbounds i8, ptr %0, i64 8
  %43 = load ptr, ptr %42, align 8, !tbaa !15
  %44 = load ptr, ptr %41, align 8, !tbaa !5
  %wide.trip.count86 = zext nneg i32 %30 to i64
  %wide.trip.count = zext nneg i32 %26 to i64
  %xtraiter = and i64 %wide.trip.count, 1
  %45 = icmp eq i32 %26, 1
  %unroll_iter = and i64 %wide.trip.count, 2147483646
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %._crit_edge.us, %.lr.ph78.split.us
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %._crit_edge.us ], [ 0, %.lr.ph78.split.us ]
  %46 = getelementptr inbounds float, ptr %37, i64 %indvars.iv83
  store float 0.000000e+00, ptr %46, align 4, !tbaa !16
  br i1 %45, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us.new

.lr.ph.us.new:                                    ; preds = %.lr.ph.us, %.lr.ph.us.new
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph.us.new ], [ 0, %.lr.ph.us ]
  %47 = phi float [ %61, %.lr.ph.us.new ], [ 0.000000e+00, %.lr.ph.us ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph.us.new ], [ 0, %.lr.ph.us ]
  %48 = getelementptr inbounds float, ptr %43, i64 %indvars.iv
  %49 = load float, ptr %48, align 4, !tbaa !16
  %50 = getelementptr inbounds ptr, ptr %44, i64 %indvars.iv
  %51 = load ptr, ptr %50, align 8, !tbaa !18
  %52 = getelementptr inbounds float, ptr %51, i64 %indvars.iv83
  %53 = load float, ptr %52, align 4, !tbaa !16
  %54 = tail call float @llvm.fmuladd.f32(float %49, float %53, float %47)
  store float %54, ptr %46, align 4, !tbaa !16
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %55 = getelementptr inbounds float, ptr %43, i64 %indvars.iv.next
  %56 = load float, ptr %55, align 4, !tbaa !16
  %57 = getelementptr inbounds ptr, ptr %44, i64 %indvars.iv.next
  %58 = load ptr, ptr %57, align 8, !tbaa !18
  %59 = getelementptr inbounds float, ptr %58, i64 %indvars.iv83
  %60 = load float, ptr %59, align 4, !tbaa !16
  %61 = tail call float @llvm.fmuladd.f32(float %56, float %60, float %54)
  store float %61, ptr %46, align 4, !tbaa !16
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.lr.ph.us.new, !llvm.loop !19

._crit_edge.us.unr-lcssa:                         ; preds = %.lr.ph.us.new, %.lr.ph.us
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next.1, %.lr.ph.us.new ]
  %.unr = phi float [ 0.000000e+00, %.lr.ph.us ], [ %61, %.lr.ph.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %62 = getelementptr inbounds float, ptr %43, i64 %indvars.iv.unr
  %63 = load float, ptr %62, align 4, !tbaa !16
  %64 = getelementptr inbounds ptr, ptr %44, i64 %indvars.iv.unr
  %65 = load ptr, ptr %64, align 8, !tbaa !18
  %66 = getelementptr inbounds float, ptr %65, i64 %indvars.iv83
  %67 = load float, ptr %66, align 4, !tbaa !16
  %68 = tail call float @llvm.fmuladd.f32(float %63, float %67, float %.unr)
  store float %68, ptr %46, align 4, !tbaa !16
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next84, %wide.trip.count86
  br i1 %exitcond87.not, label %._crit_edge79, label %.lr.ph.us, !llvm.loop !21

._crit_edge79:                                    ; preds = %._crit_edge.us, %.lr.ph78.split.preheader, %34
  %.not = icmp eq ptr %.067, %2
  br i1 %.not, label %70, label %69

69:                                               ; preds = %._crit_edge79
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %0, i64 16, i1 false), !tbaa.struct !22
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %.067, i64 16, i1 false), !tbaa.struct !22
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %.067, ptr noundef nonnull align 8 dereferenceable(16) %4, i64 16, i1 false), !tbaa.struct !22
  tail call void @HandleExchange(ptr noundef nonnull %0, ptr noundef %.067) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4)
  tail call void @mVectorRelease(ptr noundef %.067)
  br label %70

70:                                               ; preds = %69, %._crit_edge79
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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, !10, i64 8}
!6 = !{!"MMatrix", !7, i64 0, !7, i64 4, !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, !7, i64 4}
!12 = !{!6, !7, i64 0}
!13 = !{!14, !7, i64 0}
!14 = !{!"MVector", !7, i64 0, !10, i64 8}
!15 = !{!14, !10, i64 8}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !8, i64 0}
!18 = !{!10, !10, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{i64 0, i64 4, !23, i64 8, i64 8, !18}
!23 = !{!7, !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass