; 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__.mMatrixVectorMul = 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 @mMatrixVectorMul(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 ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca float, align 4
  %22 = alloca i32, align 4
  %23 = 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
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %24, ptr %7, align 8, !tbaa !5
  br label %25

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

28:                                               ; preds = %25
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = ptrtoint ptr %29 to i64
  %31 = icmp eq i64 %30, -1
  br i1 %31, label %32, label %33

32:                                               ; preds = %28, %25
  br i1 true, label %79, label %54

33:                                               ; preds = %28
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.MMatrix, ptr %34, i32 0, i32 2
  %36 = load ptr, ptr %35, align 8, !tbaa !9
  %37 = icmp eq ptr %36, null
  br i1 %37, label %79, label %38

38:                                               ; preds = %33
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.MMatrix, ptr %39, i32 0, i32 2
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = ptrtoint ptr %41 to i64
  %43 = icmp sle i64 %42, 0
  br i1 %43, label %79, label %44

44:                                               ; preds = %38
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.MMatrix, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 4, !tbaa !12
  %48 = icmp sle i32 %47, 0
  br i1 %48, label %79, label %49

49:                                               ; preds = %44
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.MMatrix, ptr %50, i32 0, i32 0
  %52 = load i32, ptr %51, align 8, !tbaa !13
  %53 = icmp sle i32 %52, 0
  br i1 %53, label %79, label %54

54:                                               ; preds = %49, %32
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = icmp eq ptr %55, null
  br i1 %56, label %61, label %57

57:                                               ; preds = %54
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = ptrtoint ptr %58 to i64
  %60 = icmp eq i64 %59, -1
  br i1 %60, label %61, label %62

61:                                               ; preds = %57, %54
  br label %76

62:                                               ; preds = %57
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.MVector, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !14
  %66 = icmp sle i32 %65, 0
  br i1 %66, label %73, label %67

67:                                               ; preds = %62
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.MVector, ptr %68, i32 0, i32 1
  %70 = load ptr, ptr %69, align 8, !tbaa !16
  %71 = ptrtoint ptr %70 to i64
  %72 = icmp sle i64 %71, 0
  br label %73

73:                                               ; preds = %67, %62
  %74 = phi i1 [ true, %62 ], [ %72, %67 ]
  %75 = zext i1 %74 to i32
  br label %76

76:                                               ; preds = %73, %61
  %77 = phi i32 [ 1, %61 ], [ %75, %73 ]
  %78 = icmp ne i32 %77, 0
  br label %79

79:                                               ; preds = %76, %49, %44, %38, %33, %32
  %80 = phi i1 [ true, %49 ], [ true, %44 ], [ true, %38 ], [ true, %33 ], [ true, %32 ], [ %78, %76 ]
  %81 = zext i1 %80 to i32
  store i32 %81, ptr %8, align 4, !tbaa !17
  %82 = load i32, ptr %8, align 4, !tbaa !17
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %86

84:                                               ; preds = %79
  %85 = load i32, ptr %8, align 4, !tbaa !17
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %85, i32 noundef -1, ptr noundef @.str, i32 noundef 542, ptr noundef @__FUNCTION__.mMatrixVectorMul, ptr noundef @.str.2)
  br label %86

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

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.MMatrix, ptr %89, i32 0, i32 1
  %91 = load i32, ptr %90, align 4, !tbaa !12
  store i32 %91, ptr %9, align 4, !tbaa !17
  br label %92

92:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.MVector, ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 8, !tbaa !14
  %96 = load i32, ptr %9, align 4, !tbaa !17
  %97 = icmp ne i32 %95, %96
  %98 = zext i1 %97 to i32
  store i32 %98, ptr %10, align 4, !tbaa !17
  %99 = load i32, ptr %10, align 4, !tbaa !17
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %103

101:                                              ; preds = %92
  %102 = load i32, ptr %10, align 4, !tbaa !17
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %102, i32 noundef -1, ptr noundef @.str, i32 noundef 545, ptr noundef @__FUNCTION__.mMatrixVectorMul, ptr noundef @.str.2)
  br label %103

103:                                              ; preds = %101, %92
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.MMatrix, ptr %106, i32 0, i32 0
  %108 = load i32, ptr %107, align 8, !tbaa !13
  store i32 %108, ptr %11, align 4, !tbaa !17
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = icmp eq ptr %109, null
  br i1 %110, label %119, label %111

111:                                              ; preds = %105
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = ptrtoint ptr %112 to i64
  %114 = icmp eq i64 %113, -1
  br i1 %114, label %119, label %115

115:                                              ; preds = %111
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = icmp eq ptr %116, %117
  br i1 %118, label %119, label %120

119:                                              ; preds = %115, %111, %105
  store ptr null, ptr %6, align 8, !tbaa !5
  br label %154

120:                                              ; preds = %115
  br label %121

121:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 3, ptr %12, align 4, !tbaa !17
  %122 = load i32, ptr %12, align 4, !tbaa !17
  %123 = icmp eq i32 %122, 1
  br i1 %123, label %124, label %131

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

131:                                              ; preds = %121
  %132 = load i32, ptr %12, align 4, !tbaa !17
  %133 = icmp eq i32 %132, 2
  br i1 %133, label %134, label %141

134:                                              ; preds = %131
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = load i32, ptr %11, align 4, !tbaa !17
  %137 = add nsw i32 %136, 0
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.MVector, ptr %138, i32 0, i32 1
  %140 = load ptr, ptr %139, align 8, !tbaa !16
  call void @VectorRedefine(ptr noundef %135, i32 noundef %137, ptr noundef %140)
  br label %150

141:                                              ; preds = %131
  br label %142

142:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 1, ptr %13, align 4, !tbaa !17
  %143 = load i32, ptr %13, align 4, !tbaa !17
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %147

145:                                              ; preds = %142
  %146 = load i32, ptr %13, align 4, !tbaa !17
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %146, i32 noundef -1, ptr noundef @.str, i32 noundef 549, ptr noundef @__FUNCTION__.mMatrixVectorMul, ptr noundef @.str.11)
  br label %147

147:                                              ; preds = %145, %142
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %148

148:                                              ; preds = %147
  br label %149

149:                                              ; preds = %148
  br label %150

150:                                              ; preds = %149, %134
  br label %151

151:                                              ; preds = %150, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %152

152:                                              ; preds = %151
  br label %153

153:                                              ; preds = %152
  br label %154

154:                                              ; preds = %153, %119
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.MVector, ptr %155, i32 0, i32 1
  %157 = load ptr, ptr %156, align 8, !tbaa !16
  store ptr %157, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.MVector, ptr %158, i32 0, i32 1
  %160 = load ptr, ptr %159, align 8, !tbaa !16
  store ptr %160, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.MMatrix, ptr %161, i32 0, i32 2
  %163 = load ptr, ptr %162, align 8, !tbaa !9
  store ptr %163, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !17
  br label %164

164:                                              ; preds = %286, %154
  %165 = load i32, ptr %17, align 4, !tbaa !17
  %166 = load i32, ptr %11, align 4, !tbaa !17
  %167 = icmp slt i32 %165, %166
  br i1 %167, label %169, label %168

168:                                              ; preds = %164
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %289

169:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store float 0.000000e+00, ptr %18, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  store float 0.000000e+00, ptr %19, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store float 0.000000e+00, ptr %20, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store float 0.000000e+00, ptr %21, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !17
  br label %170

170:                                              ; preds = %246, %169
  %171 = load i32, ptr %22, align 4, !tbaa !17
  %172 = load i32, ptr %9, align 4, !tbaa !17
  %173 = sub nsw i32 %172, 3
  %174 = icmp slt i32 %171, %173
  br i1 %174, label %175, label %249

175:                                              ; preds = %170
  %176 = load ptr, ptr %15, align 8, !tbaa !5
  %177 = load i32, ptr %22, align 4, !tbaa !17
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds float, ptr %176, i64 %178
  %180 = load float, ptr %179, align 4, !tbaa !18
  %181 = load ptr, ptr %16, align 8, !tbaa !5
  %182 = load i32, ptr %17, 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 %22, 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 = load float, ptr %18, align 4, !tbaa !18
  %191 = call float @llvm.fmuladd.f32(float %180, float %189, float %190)
  store float %191, ptr %18, align 4, !tbaa !18
  %192 = load ptr, ptr %15, align 8, !tbaa !5
  %193 = load i32, ptr %22, align 4, !tbaa !17
  %194 = add nsw i32 %193, 1
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds float, ptr %192, i64 %195
  %197 = load float, ptr %196, align 4, !tbaa !18
  %198 = load ptr, ptr %16, align 8, !tbaa !5
  %199 = load i32, ptr %17, align 4, !tbaa !17
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds ptr, ptr %198, i64 %200
  %202 = load ptr, ptr %201, align 8, !tbaa !5
  %203 = load i32, ptr %22, align 4, !tbaa !17
  %204 = add nsw i32 %203, 1
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds float, ptr %202, i64 %205
  %207 = load float, ptr %206, align 4, !tbaa !18
  %208 = load float, ptr %19, align 4, !tbaa !18
  %209 = call float @llvm.fmuladd.f32(float %197, float %207, float %208)
  store float %209, ptr %19, align 4, !tbaa !18
  %210 = load ptr, ptr %15, align 8, !tbaa !5
  %211 = load i32, ptr %22, align 4, !tbaa !17
  %212 = add nsw i32 %211, 1
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds float, ptr %210, i64 %213
  %215 = load float, ptr %214, align 4, !tbaa !18
  %216 = load ptr, ptr %16, align 8, !tbaa !5
  %217 = load i32, ptr %17, align 4, !tbaa !17
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds ptr, ptr %216, i64 %218
  %220 = load ptr, ptr %219, align 8, !tbaa !5
  %221 = load i32, ptr %22, align 4, !tbaa !17
  %222 = add nsw i32 %221, 1
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds float, ptr %220, i64 %223
  %225 = load float, ptr %224, align 4, !tbaa !18
  %226 = load float, ptr %20, align 4, !tbaa !18
  %227 = call float @llvm.fmuladd.f32(float %215, float %225, float %226)
  store float %227, ptr %20, align 4, !tbaa !18
  %228 = load ptr, ptr %15, align 8, !tbaa !5
  %229 = load i32, ptr %22, align 4, !tbaa !17
  %230 = add nsw i32 %229, 1
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds float, ptr %228, i64 %231
  %233 = load float, ptr %232, align 4, !tbaa !18
  %234 = load ptr, ptr %16, align 8, !tbaa !5
  %235 = load i32, ptr %17, align 4, !tbaa !17
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds ptr, ptr %234, i64 %236
  %238 = load ptr, ptr %237, align 8, !tbaa !5
  %239 = load i32, ptr %22, align 4, !tbaa !17
  %240 = add nsw i32 %239, 1
  %241 = sext i32 %240 to i64
  %242 = getelementptr inbounds float, ptr %238, i64 %241
  %243 = load float, ptr %242, align 4, !tbaa !18
  %244 = load float, ptr %21, align 4, !tbaa !18
  %245 = call float @llvm.fmuladd.f32(float %233, float %243, float %244)
  store float %245, ptr %21, align 4, !tbaa !18
  br label %246

246:                                              ; preds = %175
  %247 = load i32, ptr %22, align 4, !tbaa !17
  %248 = add nsw i32 %247, 4
  store i32 %248, ptr %22, align 4, !tbaa !17
  br label %170, !llvm.loop !20

249:                                              ; preds = %170
  br label %250

250:                                              ; preds = %271, %249
  %251 = load i32, ptr %22, align 4, !tbaa !17
  %252 = load i32, ptr %9, align 4, !tbaa !17
  %253 = icmp slt i32 %251, %252
  br i1 %253, label %254, label %274

254:                                              ; preds = %250
  %255 = load ptr, ptr %15, align 8, !tbaa !5
  %256 = load i32, ptr %22, align 4, !tbaa !17
  %257 = sext i32 %256 to i64
  %258 = getelementptr inbounds float, ptr %255, i64 %257
  %259 = load float, ptr %258, align 4, !tbaa !18
  %260 = load ptr, ptr %16, align 8, !tbaa !5
  %261 = load i32, ptr %17, align 4, !tbaa !17
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds ptr, ptr %260, i64 %262
  %264 = load ptr, ptr %263, align 8, !tbaa !5
  %265 = load i32, ptr %22, align 4, !tbaa !17
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds float, ptr %264, i64 %266
  %268 = load float, ptr %267, align 4, !tbaa !18
  %269 = load float, ptr %18, align 4, !tbaa !18
  %270 = call float @llvm.fmuladd.f32(float %259, float %268, float %269)
  store float %270, ptr %18, align 4, !tbaa !18
  br label %271

271:                                              ; preds = %254
  %272 = load i32, ptr %22, align 4, !tbaa !17
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %22, align 4, !tbaa !17
  br label %250, !llvm.loop !22

274:                                              ; preds = %250
  %275 = load float, ptr %18, align 4, !tbaa !18
  %276 = load float, ptr %19, align 4, !tbaa !18
  %277 = fadd float %275, %276
  %278 = load float, ptr %20, align 4, !tbaa !18
  %279 = fadd float %277, %278
  %280 = load float, ptr %21, align 4, !tbaa !18
  %281 = fadd float %279, %280
  %282 = load ptr, ptr %14, align 8, !tbaa !5
  %283 = load i32, ptr %17, align 4, !tbaa !17
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds float, ptr %282, i64 %284
  store float %281, ptr %285, align 4, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %286

286:                                              ; preds = %274
  %287 = load i32, ptr %17, align 4, !tbaa !17
  %288 = add nsw i32 %287, 1
  store i32 %288, ptr %17, align 4, !tbaa !17
  br label %164, !llvm.loop !23

289:                                              ; preds = %168
  %290 = load ptr, ptr %7, align 8, !tbaa !5
  %291 = load ptr, ptr %6, align 8, !tbaa !5
  %292 = icmp ne ptr %290, %291
  br i1 %292, label %293, label %304

293:                                              ; preds = %289
  br label %294

294:                                              ; preds = %293
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  %295 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %295, i64 16, i1 false), !tbaa.struct !24
  %296 = load ptr, ptr %6, align 8, !tbaa !5
  %297 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %296, ptr align 8 %297, i64 16, i1 false), !tbaa.struct !24
  %298 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %298, ptr align 8 %23, i64 16, i1 false), !tbaa.struct !24
  %299 = load ptr, ptr %6, align 8, !tbaa !5
  %300 = load ptr, ptr %5, align 8, !tbaa !5
  call void @HandleExchange(ptr noundef %299, ptr noundef %300)
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  br label %301

301:                                              ; preds = %294
  br label %302

302:                                              ; preds = %301
  %303 = load ptr, ptr %6, align 8, !tbaa !5
  call void @mVectorRelease(ptr noundef %303)
  br label %304

304:                                              ; preds = %302, %289
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  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 = distinct !{!23, !21}
!24 = !{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"

@.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__.mMatrixVectorMul = 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

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

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

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

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

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

15:                                               ; preds = %12
  %magicptr108 = ptrtoint ptr %1 to i64
  switch i64 %magicptr108, label %16 [
    i64 -1, label %.thread
    i64 0, label %.thread
  ]

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

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

.thread:                                          ; preds = %16, %15, %15, %3, %3, %4, %8, %12, %19
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 542, ptr noundef nonnull @__FUNCTION__.mMatrixVectorMul, ptr noundef nonnull @.str.2) #6
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 4
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !11
  %.pre162 = load i32, ptr %1, align 8, !tbaa !13
  br label %23

23:                                               ; preds = %.thread, %19
  %24 = phi i32 [ %.pre162, %.thread ], [ %17, %19 ]
  %25 = phi i32 [ %.pre, %.thread ], [ %10, %19 ]
  %.not = icmp eq i32 %24, %25
  br i1 %.not, label %27, label %26

26:                                               ; preds = %23
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 545, ptr noundef nonnull @__FUNCTION__.mMatrixVectorMul, ptr noundef nonnull @.str.2) #6
  br label %27

27:                                               ; preds = %26, %23
  %28 = load i32, ptr %0, align 8, !tbaa !12
  %29 = icmp ne ptr %2, %1
  tail call void @llvm.assume(i1 %29)
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 549, ptr noundef nonnull @__FUNCTION__.mMatrixVectorMul, ptr noundef nonnull @.str.11) #6
  %30 = getelementptr inbounds i8, ptr %2, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !15
  %32 = getelementptr inbounds i8, ptr %1, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  %34 = getelementptr inbounds i8, ptr %0, i64 8
  %35 = load ptr, ptr %34, align 8, !tbaa !5
  %36 = icmp sgt i32 %28, 0
  br i1 %36, label %.preheader110.lr.ph, label %._crit_edge125

.preheader110.lr.ph:                              ; preds = %27
  %37 = icmp sgt i32 %25, 3
  br i1 %37, label %.preheader110.us.preheader, label %.preheader110.lr.ph.split

.preheader110.us.preheader:                       ; preds = %.preheader110.lr.ph
  %38 = add nsw i32 %25, -3
  %39 = zext nneg i32 %38 to i64
  %40 = zext nneg i32 %25 to i64
  %wide.trip.count160 = zext nneg i32 %28 to i64
  br label %.preheader110.us

.preheader110.us:                                 ; preds = %.preheader110.us.preheader, %._crit_edge.us
  %indvars.iv157 = phi i64 [ 0, %.preheader110.us.preheader ], [ %indvars.iv.next158, %._crit_edge.us ]
  %41 = getelementptr inbounds ptr, ptr %35, i64 %indvars.iv157
  %42 = load ptr, ptr %41, align 8, !tbaa !16
  br label %56

._crit_edge.us:                                   ; preds = %.lr.ph122.us, %..preheader_crit_edge.us
  %.1101.lcssa.us = phi float [ %68, %..preheader_crit_edge.us ], [ %54, %.lr.ph122.us ]
  %43 = extractelement <4 x float> %64, i64 2
  %44 = fadd float %43, %.1101.lcssa.us
  %45 = extractelement <4 x float> %64, i64 1
  %46 = fadd float %45, %44
  %47 = extractelement <4 x float> %64, i64 0
  %48 = fadd float %47, %46
  %49 = getelementptr inbounds float, ptr %31, i64 %indvars.iv157
  store float %48, ptr %49, align 4, !tbaa !17
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %exitcond161.not = icmp eq i64 %indvars.iv.next158, %wide.trip.count160
  br i1 %exitcond161.not, label %._crit_edge125, label %.preheader110.us, !llvm.loop !19

.lr.ph122.us:                                     ; preds = %..preheader_crit_edge.us, %.lr.ph122.us
  %indvars.iv154 = phi i64 [ %indvars.iv.next155, %.lr.ph122.us ], [ %indvars.iv152, %..preheader_crit_edge.us ]
  %.1101120.us = phi float [ %54, %.lr.ph122.us ], [ %68, %..preheader_crit_edge.us ]
  %50 = getelementptr inbounds float, ptr %33, i64 %indvars.iv154
  %51 = load float, ptr %50, align 4, !tbaa !17
  %52 = getelementptr inbounds float, ptr %42, i64 %indvars.iv154
  %53 = load float, ptr %52, align 4, !tbaa !17
  %54 = tail call float @llvm.fmuladd.f32(float %51, float %53, float %.1101120.us)
  %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1
  %55 = icmp ult i64 %indvars.iv.next155, %40
  br i1 %55, label %.lr.ph122.us, label %._crit_edge.us, !llvm.loop !21

56:                                               ; preds = %.preheader110.us, %56
  %indvars.iv152 = phi i64 [ 4, %.preheader110.us ], [ %indvars.iv.next153, %56 ]
  %indvars.iv149 = phi i64 [ 0, %.preheader110.us ], [ %indvars.iv.next150, %56 ]
  %57 = phi <4 x float> [ zeroinitializer, %.preheader110.us ], [ %64, %56 ]
  %58 = getelementptr inbounds float, ptr %33, i64 %indvars.iv149
  %59 = getelementptr inbounds float, ptr %42, i64 %indvars.iv149
  %60 = load <2 x float>, ptr %58, align 4, !tbaa !17
  %61 = shufflevector <2 x float> %60, <2 x float> poison, <4 x i32> <i32 1, i32 1, i32 1, i32 0>
  %62 = load <2 x float>, ptr %59, align 4, !tbaa !17
  %63 = shufflevector <2 x float> %62, <2 x float> poison, <4 x i32> <i32 1, i32 1, i32 1, i32 0>
  %64 = tail call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %61, <4 x float> %63, <4 x float> %57)
  %indvars.iv.next150 = add nuw nsw i64 %indvars.iv149, 4
  %65 = icmp ult i64 %indvars.iv.next150, %39
  %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 4
  br i1 %65, label %56, label %..preheader_crit_edge.us, !llvm.loop !22

..preheader_crit_edge.us:                         ; preds = %56
  %66 = trunc nuw nsw i64 %indvars.iv.next150 to i32
  %67 = icmp sgt i32 %25, %66
  %68 = extractelement <4 x float> %64, i64 3
  br i1 %67, label %.lr.ph122.us, label %._crit_edge.us

.preheader110.lr.ph.split:                        ; preds = %.preheader110.lr.ph
  %69 = icmp sgt i32 %25, 0
  %wide.trip.count147 = zext nneg i32 %28 to i64
  br i1 %69, label %.preheader110.us126.preheader, label %.preheader110.preheader

.preheader110.preheader:                          ; preds = %.preheader110.lr.ph.split
  %70 = shl nuw nsw i64 %wide.trip.count147, 2
  tail call void @llvm.memset.p0.i64(ptr align 4 %31, i8 0, i64 %70, i1 false), !tbaa !17
  br label %._crit_edge125

.preheader110.us126.preheader:                    ; preds = %.preheader110.lr.ph.split
  %exitcond.not = icmp eq i32 %25, 1
  %71 = getelementptr inbounds i8, ptr %33, i64 4
  %exitcond.not.1 = icmp eq i32 %25, 2
  %72 = getelementptr inbounds i8, ptr %33, i64 8
  br label %.preheader110.us126

.preheader110.us126:                              ; preds = %.preheader110.us126.preheader, %._crit_edge.us132
  %indvars.iv144 = phi i64 [ 0, %.preheader110.us126.preheader ], [ %indvars.iv.next145, %._crit_edge.us132 ]
  %73 = getelementptr inbounds ptr, ptr %35, i64 %indvars.iv144
  %74 = load ptr, ptr %73, align 8, !tbaa !16
  %75 = load float, ptr %33, align 4, !tbaa !17
  %76 = load float, ptr %74, align 4, !tbaa !17
  %77 = tail call float @llvm.fmuladd.f32(float %75, float %76, float 0.000000e+00)
  br i1 %exitcond.not, label %._crit_edge.us132, label %78, !llvm.loop !21

78:                                               ; preds = %.preheader110.us126
  %79 = load float, ptr %71, align 4, !tbaa !17
  %80 = getelementptr inbounds i8, ptr %74, i64 4
  %81 = load float, ptr %80, align 4, !tbaa !17
  %82 = tail call float @llvm.fmuladd.f32(float %79, float %81, float %77)
  br i1 %exitcond.not.1, label %._crit_edge.us132, label %83, !llvm.loop !21

83:                                               ; preds = %78
  %84 = load float, ptr %72, align 4, !tbaa !17
  %85 = getelementptr inbounds i8, ptr %74, i64 8
  %86 = load float, ptr %85, align 4, !tbaa !17
  %87 = tail call float @llvm.fmuladd.f32(float %84, float %86, float %82)
  br label %._crit_edge.us132

._crit_edge.us132:                                ; preds = %83, %78, %.preheader110.us126
  %.lcssa177 = phi float [ %77, %.preheader110.us126 ], [ %82, %78 ], [ %87, %83 ]
  %88 = fadd float %.lcssa177, 0.000000e+00
  %89 = getelementptr inbounds float, ptr %31, i64 %indvars.iv144
  store float %88, ptr %89, align 4, !tbaa !17
  %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1
  %exitcond148.not = icmp eq i64 %indvars.iv.next145, %wide.trip.count147
  br i1 %exitcond148.not, label %._crit_edge125, label %.preheader110.us126, !llvm.loop !19

._crit_edge125:                                   ; preds = %._crit_edge.us132, %._crit_edge.us, %.preheader110.preheader, %27
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
declare void @llvm.assume(i1 noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x float> @llvm.fmuladd.v4f32(<4 x float>, <4 x float>, <4 x float>) #5

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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 nosync nounwind willreturn memory(inaccessiblemem: write) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!10, !10, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !8, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = distinct !{!22, !20}


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