; LLVM IR from moarseniy/CudaFEMproject :: FEMproject/matrix_pack/src/cpu_matrix.ll (ZN10CPU_Matrix7productER6MatrixS1_bfbf)

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

%class.Matrix = type <{ ptr, i32, [4 x i8], i64, i64, i64, ptr, i8, [7 x i8] }>

@.str = external hidden unnamed_addr constant [100 x i8], align 1
@__FUNCTION__._ZN10CPU_Matrix7productER6MatrixS1_bfbf = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [43 x i8], align 1
@_ZTISt13runtime_error = external constant ptr

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10CPU_Matrix7productER6MatrixS1_bfbf(ptr noundef nonnull align 8 dereferenceable(49) %0, ptr noundef nonnull align 8 dereferenceable(49) %1, ptr noundef nonnull align 8 dereferenceable(49) %2, i1 noundef zeroext %3, float noundef %4, i1 noundef zeroext %5, float noundef %6) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = alloca float, align 4
  %13 = alloca i8, align 1
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  %23 = zext i1 %3 to i8
  store i8 %23, ptr %11, align 1, !tbaa !9
  store float %4, ptr %12, align 4, !tbaa !11
  %24 = zext i1 %5 to i8
  store i8 %24, ptr %13, align 1, !tbaa !9
  store float %6, ptr %14, align 4, !tbaa !11
  %25 = load ptr, ptr %8, align 8
  %26 = getelementptr inbounds %class.Matrix, ptr %25, i32 0, i32 5
  %27 = load i64, ptr %26, align 8, !tbaa !13
  %28 = icmp ugt i64 %27, 0
  br i1 %28, label %29, label %33

29:                                               ; preds = %7
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = call noundef i64 @_ZNK6Matrix15get_numElementsEv(ptr noundef nonnull align 8 dereferenceable(49) %30)
  %32 = icmp ugt i64 %31, 0
  br label %33

33:                                               ; preds = %29, %7
  %34 = phi i1 [ false, %7 ], [ %32, %29 ]
  call void @_Z10_my_assertbPKciS0_(i1 noundef zeroext %34, ptr noundef @.str, i32 noundef 30, ptr noundef @__FUNCTION__._ZN10CPU_Matrix7productER6MatrixS1_bfbf)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %35 = getelementptr inbounds %class.Matrix, ptr %25, i32 0, i32 4
  %36 = load i64, ptr %35, align 8, !tbaa !17
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = call noundef i64 @_ZNK6Matrix11get_numRowsEv(ptr noundef nonnull align 8 dereferenceable(49) %37)
  %39 = icmp eq i64 %36, %38
  br i1 %39, label %40, label %148

40:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store i64 0, ptr %17, align 8, !tbaa !18
  br label %41

41:                                               ; preds = %144, %40
  %42 = load i64, ptr %17, align 8, !tbaa !18
  %43 = getelementptr inbounds %class.Matrix, ptr %25, i32 0, i32 3
  %44 = load i64, ptr %43, align 8, !tbaa !19
  %45 = icmp ult i64 %42, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %41
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %147

47:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store i64 0, ptr %19, align 8, !tbaa !18
  br label %48

48:                                               ; preds = %140, %47
  %49 = load i64, ptr %19, align 8, !tbaa !18
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %50)
  %52 = icmp ult i64 %49, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %48
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %143

54:                                               ; preds = %48
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %55)
  %57 = load i64, ptr %19, align 8, !tbaa !18
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %58)
  %60 = load i64, ptr %17, align 8, !tbaa !18
  %61 = mul i64 %59, %60
  %62 = add i64 %57, %61
  %63 = getelementptr inbounds float, ptr %56, i64 %62
  store float 0.000000e+00, ptr %63, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  store i64 0, ptr %20, align 8, !tbaa !18
  br label %64

64:                                               ; preds = %136, %54
  %65 = load i64, ptr %20, align 8, !tbaa !18
  %66 = getelementptr inbounds %class.Matrix, ptr %25, i32 0, i32 4
  %67 = load i64, ptr %66, align 8, !tbaa !17
  %68 = icmp ult i64 %65, %67
  br i1 %68, label %70, label %69

69:                                               ; preds = %64
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %139

70:                                               ; preds = %64
  %71 = load i8, ptr %11, align 1, !tbaa !9, !range !20, !noundef !21
  %72 = trunc i8 %71 to i1
  br i1 %72, label %73, label %84

73:                                               ; preds = %70
  %74 = getelementptr inbounds %class.Matrix, ptr %25, i32 0, i32 6
  %75 = load ptr, ptr %74, align 8, !tbaa !22
  %76 = load i64, ptr %17, align 8, !tbaa !18
  %77 = load i64, ptr %20, align 8, !tbaa !18
  %78 = getelementptr inbounds %class.Matrix, ptr %25, i32 0, i32 3
  %79 = load i64, ptr %78, align 8, !tbaa !19
  %80 = mul i64 %77, %79
  %81 = add i64 %76, %80
  %82 = getelementptr inbounds float, ptr %75, i64 %81
  %83 = load float, ptr %82, align 4, !tbaa !11
  br label %95

84:                                               ; preds = %70
  %85 = getelementptr inbounds %class.Matrix, ptr %25, i32 0, i32 6
  %86 = load ptr, ptr %85, align 8, !tbaa !22
  %87 = load i64, ptr %20, align 8, !tbaa !18
  %88 = load i64, ptr %17, align 8, !tbaa !18
  %89 = getelementptr inbounds %class.Matrix, ptr %25, i32 0, i32 4
  %90 = load i64, ptr %89, align 8, !tbaa !17
  %91 = mul i64 %88, %90
  %92 = add i64 %87, %91
  %93 = getelementptr inbounds float, ptr %86, i64 %92
  %94 = load float, ptr %93, align 4, !tbaa !11
  br label %95

95:                                               ; preds = %84, %73
  %96 = phi float [ %83, %73 ], [ %94, %84 ]
  store float %96, ptr %15, align 4, !tbaa !11
  %97 = load i8, ptr %13, align 1, !tbaa !9, !range !20, !noundef !21
  %98 = trunc i8 %97 to i1
  br i1 %98, label %99, label %110

99:                                               ; preds = %95
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %100)
  %102 = load i64, ptr %19, align 8, !tbaa !18
  %103 = load ptr, ptr %9, align 8, !tbaa !5
  %104 = call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %103)
  %105 = load i64, ptr %20, align 8, !tbaa !18
  %106 = mul i64 %104, %105
  %107 = add i64 %102, %106
  %108 = getelementptr inbounds float, ptr %101, i64 %107
  %109 = load float, ptr %108, align 4, !tbaa !11
  br label %121

110:                                              ; preds = %95
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %111)
  %113 = load i64, ptr %19, align 8, !tbaa !18
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  %115 = call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %114)
  %116 = load i64, ptr %20, align 8, !tbaa !18
  %117 = mul i64 %115, %116
  %118 = add i64 %113, %117
  %119 = getelementptr inbounds float, ptr %112, i64 %118
  %120 = load float, ptr %119, align 4, !tbaa !11
  br label %121

121:                                              ; preds = %110, %99
  %122 = phi float [ %109, %99 ], [ %120, %110 ]
  store float %122, ptr %16, align 4, !tbaa !11
  %123 = load float, ptr %15, align 4, !tbaa !11
  %124 = load float, ptr %16, align 4, !tbaa !11
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %125)
  %127 = load i64, ptr %19, align 8, !tbaa !18
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %128)
  %130 = load i64, ptr %17, align 8, !tbaa !18
  %131 = mul i64 %129, %130
  %132 = add i64 %127, %131
  %133 = getelementptr inbounds float, ptr %126, i64 %132
  %134 = load float, ptr %133, align 4, !tbaa !11
  %135 = call float @llvm.fmuladd.f32(float %123, float %124, float %134)
  store float %135, ptr %133, align 4, !tbaa !11
  br label %136

136:                                              ; preds = %121
  %137 = load i64, ptr %20, align 8, !tbaa !18
  %138 = add i64 %137, 1
  store i64 %138, ptr %20, align 8, !tbaa !18
  br label %64, !llvm.loop !23

139:                                              ; preds = %69
  br label %140

140:                                              ; preds = %139
  %141 = load i64, ptr %19, align 8, !tbaa !18
  %142 = add i64 %141, 1
  store i64 %142, ptr %19, align 8, !tbaa !18
  br label %48, !llvm.loop !25

143:                                              ; preds = %53
  br label %144

144:                                              ; preds = %143
  %145 = load i64, ptr %17, align 8, !tbaa !18
  %146 = add i64 %145, 1
  store i64 %146, ptr %17, align 8, !tbaa !18
  br label %41, !llvm.loop !26

147:                                              ; preds = %46
  br label %155

148:                                              ; preds = %33
  %149 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %149, ptr noundef @.str.1)
          to label %150 unwind label %151

150:                                              ; preds = %148
  call void @__cxa_throw(ptr %149, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

151:                                              ; preds = %148
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %21, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %22, align 4
  call void @__cxa_free_exception(ptr %149) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %156

155:                                              ; preds = %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  ret void

156:                                              ; preds = %151
  %157 = load ptr, ptr %21, align 8
  %158 = load i32, ptr %22, align 4
  %159 = insertvalue { ptr, i32 } poison, ptr %157, 0
  %160 = insertvalue { ptr, i32 } %159, i32 %158, 1
  resume { ptr, i32 } %160
}

declare void @_Z10_my_assertbPKciS0_(i1 noundef zeroext, ptr noundef, i32 noundef, ptr noundef) #1

declare noundef i64 @_ZNK6Matrix15get_numElementsEv(ptr noundef nonnull align 8 dereferenceable(49)) #1

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

declare noundef i64 @_ZNK6Matrix11get_numRowsEv(ptr noundef nonnull align 8 dereferenceable(49)) #1

declare noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49)) #1

declare noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49)) #1

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

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

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr)

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind "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 #5 = { nounwind }
attributes #6 = { noreturn }

!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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !16, i64 32}
!14 = !{!"_ZTS6Matrix", !15, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !6, i64 40, !10, i64 48}
!15 = !{!"_ZTS11DEVICE_NAME", !7, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!14, !16, i64 24}
!18 = !{!16, !16, i64 0}
!19 = !{!14, !16, i64 16}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!14, !6, i64 40}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}
!26 = distinct !{!26, !24}


; 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 [100 x i8], align 1
@__FUNCTION__._ZN10CPU_Matrix7productER6MatrixS1_bfbf = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [43 x i8], align 1
@_ZTISt13runtime_error = external constant ptr

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10CPU_Matrix7productER6MatrixS1_bfbf(ptr nocapture noundef nonnull readonly align 8 dereferenceable(49) %0, ptr noundef nonnull align 8 dereferenceable(49) %1, ptr noundef nonnull align 8 dereferenceable(49) %2, i1 noundef zeroext %3, float noundef %4, i1 noundef zeroext %5, float noundef %6) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %8 = getelementptr inbounds i8, ptr %0, i64 32
  %9 = load i64, ptr %8, align 8, !tbaa !5
  %.not = icmp eq i64 %9, 0
  br i1 %.not, label %13, label %10

10:                                               ; preds = %7
  %11 = tail call noundef i64 @_ZNK6Matrix15get_numElementsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %12 = icmp ne i64 %11, 0
  br label %13

13:                                               ; preds = %10, %7
  %14 = phi i1 [ false, %7 ], [ %12, %10 ]
  tail call void @_Z10_my_assertbPKciS0_(i1 noundef zeroext %14, ptr noundef nonnull @.str, i32 noundef 30, ptr noundef nonnull @__FUNCTION__._ZN10CPU_Matrix7productER6MatrixS1_bfbf)
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  %16 = load i64, ptr %15, align 8, !tbaa !13
  %17 = tail call noundef i64 @_ZNK6Matrix11get_numRowsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %18 = icmp eq i64 %16, %17
  br i1 %18, label %.preheader39, label %162

.preheader39:                                     ; preds = %13
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  %20 = load i64, ptr %19, align 8, !tbaa !14
  %.not61 = icmp eq i64 %20, 0
  br i1 %.not61, label %._crit_edge, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader39
  %21 = getelementptr inbounds i8, ptr %0, i64 40
  br i1 %5, label %.preheader.lr.ph.split.us, label %.preheader.lr.ph.split

.preheader.lr.ph.split.us:                        ; preds = %.preheader.lr.ph
  br i1 %3, label %.preheader.us.us, label %.preheader.us

.preheader.us.us:                                 ; preds = %.preheader.lr.ph.split.us, %._crit_edge47.split.us.us.split.us.us
  %.050.us.us = phi i64 [ %23, %._crit_edge47.split.us.us.split.us.us ], [ 0, %.preheader.lr.ph.split.us ]
  %22 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %.not68 = icmp eq i64 %22, 0
  br i1 %.not68, label %._crit_edge47.split.us.us.split.us.us, label %.lr.ph46.us.us

._crit_edge47.split.us.us.split.us.us:            ; preds = %._crit_edge.split.us.us.split.us.us.us.us, %.preheader.us.us
  %23 = add nuw i64 %.050.us.us, 1
  %24 = load i64, ptr %19, align 8, !tbaa !14
  %25 = icmp ult i64 %23, %24
  br i1 %25, label %.preheader.us.us, label %._crit_edge, !llvm.loop !15

.lr.ph46.us.us:                                   ; preds = %.preheader.us.us, %._crit_edge.split.us.us.split.us.us.us.us
  %.03643.us.us.us.us = phi i64 [ %32, %._crit_edge.split.us.us.split.us.us.us.us ], [ 0, %.preheader.us.us ]
  %26 = tail call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %27 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %28 = mul i64 %27, %.050.us.us
  %29 = getelementptr float, ptr %26, i64 %.03643.us.us.us.us
  %30 = getelementptr float, ptr %29, i64 %28
  store float 0.000000e+00, ptr %30, align 4, !tbaa !17
  %31 = load i64, ptr %15, align 8, !tbaa !13
  %.not69 = icmp eq i64 %31, 0
  br i1 %.not69, label %._crit_edge.split.us.us.split.us.us.us.us, label %.lr.ph.us.us.us.us

._crit_edge.split.us.us.split.us.us.us.us:        ; preds = %.lr.ph.us.us.us.us, %.lr.ph46.us.us
  %32 = add nuw i64 %.03643.us.us.us.us, 1
  %33 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %34 = icmp ult i64 %32, %33
  br i1 %34, label %.lr.ph46.us.us, label %._crit_edge47.split.us.us.split.us.us, !llvm.loop !19

.lr.ph.us.us.us.us:                               ; preds = %.lr.ph46.us.us, %.lr.ph.us.us.us.us
  %.03540.us.us.us.us.us.us = phi i64 [ %54, %.lr.ph.us.us.us.us ], [ 0, %.lr.ph46.us.us ]
  %35 = load ptr, ptr %21, align 8, !tbaa !20
  %36 = load i64, ptr %19, align 8, !tbaa !14
  %37 = mul i64 %36, %.03540.us.us.us.us.us.us
  %38 = getelementptr float, ptr %35, i64 %.050.us.us
  %39 = getelementptr float, ptr %38, i64 %37
  %40 = load float, ptr %39, align 4, !tbaa !17
  %41 = tail call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %42 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %43 = mul i64 %42, %.03540.us.us.us.us.us.us
  %44 = getelementptr float, ptr %41, i64 %.03643.us.us.us.us
  %45 = getelementptr float, ptr %44, i64 %43
  %46 = load float, ptr %45, align 4, !tbaa !17
  %47 = tail call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %48 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %49 = mul i64 %48, %.050.us.us
  %50 = getelementptr float, ptr %47, i64 %.03643.us.us.us.us
  %51 = getelementptr float, ptr %50, i64 %49
  %52 = load float, ptr %51, align 4, !tbaa !17
  %53 = tail call float @llvm.fmuladd.f32(float %40, float %46, float %52)
  store float %53, ptr %51, align 4, !tbaa !17
  %54 = add nuw i64 %.03540.us.us.us.us.us.us, 1
  %55 = load i64, ptr %15, align 8, !tbaa !13
  %56 = icmp ult i64 %54, %55
  br i1 %56, label %.lr.ph.us.us.us.us, label %._crit_edge.split.us.us.split.us.us.us.us, !llvm.loop !21

.preheader.us:                                    ; preds = %.preheader.lr.ph.split.us, %._crit_edge47.split.us.us.split
  %.050.us = phi i64 [ %58, %._crit_edge47.split.us.us.split ], [ 0, %.preheader.lr.ph.split.us ]
  %57 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %.not66 = icmp eq i64 %57, 0
  br i1 %.not66, label %._crit_edge47.split.us.us.split, label %.lr.ph46.us

._crit_edge47.split.us.us.split:                  ; preds = %._crit_edge.split.us.us.split.us54, %.preheader.us
  %58 = add nuw i64 %.050.us, 1
  %59 = load i64, ptr %19, align 8, !tbaa !14
  %60 = icmp ult i64 %58, %59
  br i1 %60, label %.preheader.us, label %._crit_edge, !llvm.loop !15

.lr.ph46.us:                                      ; preds = %.preheader.us, %._crit_edge.split.us.us.split.us54
  %.03643.us.us = phi i64 [ %67, %._crit_edge.split.us.us.split.us54 ], [ 0, %.preheader.us ]
  %61 = tail call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %62 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %63 = mul i64 %62, %.050.us
  %64 = getelementptr float, ptr %61, i64 %.03643.us.us
  %65 = getelementptr float, ptr %64, i64 %63
  store float 0.000000e+00, ptr %65, align 4, !tbaa !17
  %66 = load i64, ptr %15, align 8, !tbaa !13
  %.not67 = icmp eq i64 %66, 0
  br i1 %.not67, label %._crit_edge.split.us.us.split.us54, label %.lr.ph.us.us

._crit_edge.split.us.us.split.us54:               ; preds = %.lr.ph.us.us, %.lr.ph46.us
  %67 = add nuw i64 %.03643.us.us, 1
  %68 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %69 = icmp ult i64 %67, %68
  br i1 %69, label %.lr.ph46.us, label %._crit_edge47.split.us.us.split, !llvm.loop !19

.lr.ph.us.us:                                     ; preds = %.lr.ph46.us, %.lr.ph.us.us
  %70 = phi i64 [ %90, %.lr.ph.us.us ], [ %66, %.lr.ph46.us ]
  %.03540.us.us.us53 = phi i64 [ %89, %.lr.ph.us.us ], [ 0, %.lr.ph46.us ]
  %71 = load ptr, ptr %21, align 8, !tbaa !20
  %72 = mul i64 %70, %.050.us
  %73 = getelementptr float, ptr %71, i64 %.03540.us.us.us53
  %74 = getelementptr float, ptr %73, i64 %72
  %75 = load float, ptr %74, align 4, !tbaa !17
  %76 = tail call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %77 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %78 = mul i64 %77, %.03540.us.us.us53
  %79 = getelementptr float, ptr %76, i64 %.03643.us.us
  %80 = getelementptr float, ptr %79, i64 %78
  %81 = load float, ptr %80, align 4, !tbaa !17
  %82 = tail call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %83 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %84 = mul i64 %83, %.050.us
  %85 = getelementptr float, ptr %82, i64 %.03643.us.us
  %86 = getelementptr float, ptr %85, i64 %84
  %87 = load float, ptr %86, align 4, !tbaa !17
  %88 = tail call float @llvm.fmuladd.f32(float %75, float %81, float %87)
  store float %88, ptr %86, align 4, !tbaa !17
  %89 = add nuw i64 %.03540.us.us.us53, 1
  %90 = load i64, ptr %15, align 8, !tbaa !13
  %91 = icmp ult i64 %89, %90
  br i1 %91, label %.lr.ph.us.us, label %._crit_edge.split.us.us.split.us54, !llvm.loop !21

.preheader.lr.ph.split:                           ; preds = %.preheader.lr.ph
  br i1 %3, label %.preheader.us56, label %.preheader

.preheader.us56:                                  ; preds = %.preheader.lr.ph.split, %._crit_edge47.split.split.us.us
  %.050.us57 = phi i64 [ %93, %._crit_edge47.split.split.us.us ], [ 0, %.preheader.lr.ph.split ]
  %92 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %.not64 = icmp eq i64 %92, 0
  br i1 %.not64, label %._crit_edge47.split.split.us.us, label %.lr.ph46.us58

._crit_edge47.split.split.us.us:                  ; preds = %._crit_edge.split.split.us.us.us, %.preheader.us56
  %93 = add nuw i64 %.050.us57, 1
  %94 = load i64, ptr %19, align 8, !tbaa !14
  %95 = icmp ult i64 %93, %94
  br i1 %95, label %.preheader.us56, label %._crit_edge, !llvm.loop !15

.lr.ph46.us58:                                    ; preds = %.preheader.us56, %._crit_edge.split.split.us.us.us
  %.03643.us48.us = phi i64 [ %102, %._crit_edge.split.split.us.us.us ], [ 0, %.preheader.us56 ]
  %96 = tail call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %97 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %98 = mul i64 %97, %.050.us57
  %99 = getelementptr float, ptr %96, i64 %.03643.us48.us
  %100 = getelementptr float, ptr %99, i64 %98
  store float 0.000000e+00, ptr %100, align 4, !tbaa !17
  %101 = load i64, ptr %15, align 8, !tbaa !13
  %.not65 = icmp eq i64 %101, 0
  br i1 %.not65, label %._crit_edge.split.split.us.us.us, label %.lr.ph.us49.us

._crit_edge.split.split.us.us.us:                 ; preds = %.lr.ph.us49.us, %.lr.ph46.us58
  %102 = add nuw i64 %.03643.us48.us, 1
  %103 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %104 = icmp ult i64 %102, %103
  br i1 %104, label %.lr.ph46.us58, label %._crit_edge47.split.split.us.us, !llvm.loop !19

.lr.ph.us49.us:                                   ; preds = %.lr.ph46.us58, %.lr.ph.us49.us
  %.03540.us41.us.us = phi i64 [ %124, %.lr.ph.us49.us ], [ 0, %.lr.ph46.us58 ]
  %105 = load ptr, ptr %21, align 8, !tbaa !20
  %106 = load i64, ptr %19, align 8, !tbaa !14
  %107 = mul i64 %106, %.03540.us41.us.us
  %108 = getelementptr float, ptr %105, i64 %.050.us57
  %109 = getelementptr float, ptr %108, i64 %107
  %110 = load float, ptr %109, align 4, !tbaa !17
  %111 = tail call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %112 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %113 = mul i64 %112, %.03540.us41.us.us
  %114 = getelementptr float, ptr %111, i64 %.03643.us48.us
  %115 = getelementptr float, ptr %114, i64 %113
  %116 = load float, ptr %115, align 4, !tbaa !17
  %117 = tail call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %118 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %119 = mul i64 %118, %.050.us57
  %120 = getelementptr float, ptr %117, i64 %.03643.us48.us
  %121 = getelementptr float, ptr %120, i64 %119
  %122 = load float, ptr %121, align 4, !tbaa !17
  %123 = tail call float @llvm.fmuladd.f32(float %110, float %116, float %122)
  store float %123, ptr %121, align 4, !tbaa !17
  %124 = add nuw i64 %.03540.us41.us.us, 1
  %125 = load i64, ptr %15, align 8, !tbaa !13
  %126 = icmp ult i64 %124, %125
  br i1 %126, label %.lr.ph.us49.us, label %._crit_edge.split.split.us.us.us, !llvm.loop !21

.preheader:                                       ; preds = %.preheader.lr.ph.split, %._crit_edge47.split.split
  %.050 = phi i64 [ %128, %._crit_edge47.split.split ], [ 0, %.preheader.lr.ph.split ]
  %127 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %.not62 = icmp eq i64 %127, 0
  br i1 %.not62, label %._crit_edge47.split.split, label %.lr.ph46

._crit_edge:                                      ; preds = %._crit_edge47.split.split, %._crit_edge47.split.split.us.us, %._crit_edge47.split.us.us.split, %._crit_edge47.split.us.us.split.us.us, %.preheader39
  ret void

._crit_edge47.split.split:                        ; preds = %._crit_edge.split.split, %.preheader
  %128 = add nuw i64 %.050, 1
  %129 = load i64, ptr %19, align 8, !tbaa !14
  %130 = icmp ult i64 %128, %129
  br i1 %130, label %.preheader, label %._crit_edge, !llvm.loop !15

.lr.ph46:                                         ; preds = %.preheader, %._crit_edge.split.split
  %.03643 = phi i64 [ %137, %._crit_edge.split.split ], [ 0, %.preheader ]
  %131 = tail call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %132 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %133 = mul i64 %132, %.050
  %134 = getelementptr float, ptr %131, i64 %.03643
  %135 = getelementptr float, ptr %134, i64 %133
  store float 0.000000e+00, ptr %135, align 4, !tbaa !17
  %136 = load i64, ptr %15, align 8, !tbaa !13
  %.not63 = icmp eq i64 %136, 0
  br i1 %.not63, label %._crit_edge.split.split, label %.lr.ph

._crit_edge.split.split:                          ; preds = %.lr.ph, %.lr.ph46
  %137 = add nuw i64 %.03643, 1
  %138 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %139 = icmp ult i64 %137, %138
  br i1 %139, label %.lr.ph46, label %._crit_edge47.split.split, !llvm.loop !19

.lr.ph:                                           ; preds = %.lr.ph46, %.lr.ph
  %140 = phi i64 [ %160, %.lr.ph ], [ %136, %.lr.ph46 ]
  %.03540 = phi i64 [ %159, %.lr.ph ], [ 0, %.lr.ph46 ]
  %141 = load ptr, ptr %21, align 8, !tbaa !20
  %142 = mul i64 %140, %.050
  %143 = getelementptr float, ptr %141, i64 %.03540
  %144 = getelementptr float, ptr %143, i64 %142
  %145 = load float, ptr %144, align 4, !tbaa !17
  %146 = tail call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %147 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %1)
  %148 = mul i64 %147, %.03540
  %149 = getelementptr float, ptr %146, i64 %.03643
  %150 = getelementptr float, ptr %149, i64 %148
  %151 = load float, ptr %150, align 4, !tbaa !17
  %152 = tail call noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %153 = tail call noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49) %2)
  %154 = mul i64 %153, %.050
  %155 = getelementptr float, ptr %152, i64 %.03643
  %156 = getelementptr float, ptr %155, i64 %154
  %157 = load float, ptr %156, align 4, !tbaa !17
  %158 = tail call float @llvm.fmuladd.f32(float %145, float %151, float %157)
  store float %158, ptr %156, align 4, !tbaa !17
  %159 = add nuw i64 %.03540, 1
  %160 = load i64, ptr %15, align 8, !tbaa !13
  %161 = icmp ult i64 %159, %160
  br i1 %161, label %.lr.ph, label %._crit_edge.split.split, !llvm.loop !21

162:                                              ; preds = %13
  %163 = tail call ptr @__cxa_allocate_exception(i64 16) #4
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %163, ptr noundef nonnull @.str.1)
          to label %164 unwind label %165

164:                                              ; preds = %162
  tail call void @__cxa_throw(ptr nonnull %163, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #5
  unreachable

165:                                              ; preds = %162
  %166 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %163) #4
  resume { ptr, i32 } %166
}

declare void @_Z10_my_assertbPKciS0_(i1 noundef zeroext, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare noundef i64 @_ZNK6Matrix15get_numElementsEv(ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #1

declare noundef i64 @_ZNK6Matrix11get_numRowsEv(ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #1

declare noundef i64 @_ZNK6Matrix11get_numColsEv(ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #1

declare noundef ptr @_ZNK6Matrix8get_dataEv(ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #1

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

!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 32}
!6 = !{!"_ZTS6Matrix", !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !11, i64 40, !12, i64 48}
!7 = !{!"_ZTS11DEVICE_NAME", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"bool", !8, i64 0}
!13 = !{!6, !10, i64 24}
!14 = !{!6, !10, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !8, i64 0}
!19 = distinct !{!19, !16}
!20 = !{!6, !11, i64 40}
!21 = distinct !{!21, !16}


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