; LLVM IR from ox-vgg/vise :: src/search_engine/relja_retrival/external/KMCode_relja/stats (stats)

; 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.GaussMixture = type { ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, i32 }
%class.Matrix = type { ptr, ptr, i32, i32 }

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #2

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

declare void @_ZN6MatrixC1EPKc(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #5

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12GaussMixture15loadCovariancesEPKc(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %1) #6 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %15 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #9
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN6MatrixC1EPKc(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef %16)
          to label %17 unwind label %51

17:                                               ; preds = %2
  store ptr %15, ptr %5, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %18)
  %20 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 11
  store i32 %19, ptr %20, align 8, !tbaa !9
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
  %23 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 11
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = sdiv i32 %22, %24
  %26 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 8
  store i32 %25, ptr %26, align 4, !tbaa !13
  %27 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 8
  %28 = load i32, ptr %27, align 4, !tbaa !13
  %29 = sext i32 %28 to i64
  %30 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %29, i64 8)
  %31 = extractvalue { i64, i1 } %30, 1
  %32 = extractvalue { i64, i1 } %30, 0
  %33 = select i1 %31, i64 -1, i64 %32
  %34 = call noalias noundef nonnull ptr @_Znam(i64 noundef %33) #9
  %35 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 0
  store ptr %34, ptr %35, align 8, !tbaa !14
  %36 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 8
  %37 = load i32, ptr %36, align 4, !tbaa !13
  %38 = sext i32 %37 to i64
  %39 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %38, i64 8)
  %40 = extractvalue { i64, i1 } %39, 1
  %41 = extractvalue { i64, i1 } %39, 0
  %42 = select i1 %40, i64 -1, i64 %41
  %43 = call noalias noundef nonnull ptr @_Znam(i64 noundef %42) #9
  %44 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 1
  store ptr %43, ptr %44, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !16
  br label %45

45:                                               ; preds = %134, %17
  %46 = load i32, ptr %9, align 4, !tbaa !16
  %47 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 8
  %48 = load i32, ptr %47, align 4, !tbaa !13
  %49 = icmp slt i32 %46, %48
  br i1 %49, label %55, label %50

50:                                               ; preds = %45
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %142

51:                                               ; preds = %2
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %6, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %15, i64 noundef 24) #10
  br label %183

55:                                               ; preds = %45
  %56 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #9
  %57 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 11
  %58 = load i32, ptr %57, align 8, !tbaa !9
  %59 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 11
  %60 = load i32, ptr %59, align 8, !tbaa !9
  invoke void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %56, i32 noundef %58, i32 noundef %60)
          to label %61 unwind label %73

61:                                               ; preds = %55
  %62 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !14
  %64 = load i32, ptr %9, align 4, !tbaa !16
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds ptr, ptr %63, i64 %65
  store ptr %56, ptr %66, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 1, ptr %11, align 4, !tbaa !16
  br label %67

67:                                               ; preds = %117, %61
  %68 = load i32, ptr %11, align 4, !tbaa !16
  %69 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 11
  %70 = load i32, ptr %69, align 8, !tbaa !9
  %71 = icmp sle i32 %68, %70
  br i1 %71, label %77, label %72

72:                                               ; preds = %67
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %120

73:                                               ; preds = %55
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %6, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %56, i64 noundef 24) #10
  br label %141

77:                                               ; preds = %67
  %78 = load i32, ptr %8, align 4, !tbaa !16
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %8, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 1, ptr %12, align 4, !tbaa !16
  br label %80

80:                                               ; preds = %113, %77
  %81 = load i32, ptr %12, align 4, !tbaa !16
  %82 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 11
  %83 = load i32, ptr %82, align 8, !tbaa !9
  %84 = icmp sle i32 %81, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %80
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %116

86:                                               ; preds = %80
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %class.Matrix, ptr %87, i32 0, i32 1
  %89 = load ptr, ptr %88, align 8, !tbaa !17
  %90 = load i32, ptr %8, align 4, !tbaa !16
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds ptr, ptr %89, i64 %91
  %93 = load ptr, ptr %92, align 8, !tbaa !5
  %94 = load i32, ptr %12, align 4, !tbaa !16
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds double, ptr %93, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !19
  %98 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 0
  %99 = load ptr, ptr %98, align 8, !tbaa !14
  %100 = load i32, ptr %9, align 4, !tbaa !16
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds ptr, ptr %99, i64 %101
  %103 = load ptr, ptr %102, align 8, !tbaa !5
  %104 = getelementptr inbounds %class.Matrix, ptr %103, i32 0, i32 1
  %105 = load ptr, ptr %104, align 8, !tbaa !17
  %106 = load i32, ptr %11, align 4, !tbaa !16
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds ptr, ptr %105, i64 %107
  %109 = load ptr, ptr %108, align 8, !tbaa !5
  %110 = load i32, ptr %12, align 4, !tbaa !16
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds double, ptr %109, i64 %111
  store double %97, ptr %112, align 8, !tbaa !19
  br label %113

113:                                              ; preds = %86
  %114 = load i32, ptr %12, align 4, !tbaa !16
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %12, align 4, !tbaa !16
  br label %80, !llvm.loop !21

116:                                              ; preds = %85
  br label %117

117:                                              ; preds = %116
  %118 = load i32, ptr %11, align 4, !tbaa !16
  %119 = add nsw i32 %118, 1
  store i32 %119, ptr %11, align 4, !tbaa !16
  br label %67, !llvm.loop !23

120:                                              ; preds = %72
  %121 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #9
  %122 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !14
  %124 = load i32, ptr %9, align 4, !tbaa !16
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds ptr, ptr %123, i64 %125
  %127 = load ptr, ptr %126, align 8, !tbaa !5
  invoke void @_ZNK6Matrix7inverseEv(ptr dead_on_unwind writable sret(%class.Matrix) align 8 %121, ptr noundef nonnull align 8 dereferenceable(24) %127)
          to label %128 unwind label %137

128:                                              ; preds = %120
  %129 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 1
  %130 = load ptr, ptr %129, align 8, !tbaa !15
  %131 = load i32, ptr %9, align 4, !tbaa !16
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds ptr, ptr %130, i64 %132
  store ptr %121, ptr %133, align 8, !tbaa !5
  br label %134

134:                                              ; preds = %128
  %135 = load i32, ptr %9, align 4, !tbaa !16
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %9, align 4, !tbaa !16
  br label %45, !llvm.loop !24

137:                                              ; preds = %120
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %6, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %7, align 4
  call void @_ZdlPvm(ptr noundef %121, i64 noundef 24) #10
  br label %141

141:                                              ; preds = %137, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %183

142:                                              ; preds = %50
  %143 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 8
  %144 = load i32, ptr %143, align 4, !tbaa !13
  %145 = sext i32 %144 to i64
  %146 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %145, i64 4)
  %147 = extractvalue { i64, i1 } %146, 1
  %148 = extractvalue { i64, i1 } %146, 0
  %149 = select i1 %147, i64 -1, i64 %148
  %150 = call noalias noundef nonnull ptr @_Znam(i64 noundef %149) #9
  %151 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 2
  store ptr %150, ptr %151, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !16
  br label %152

152:                                              ; preds = %179, %142
  %153 = load i32, ptr %13, align 4, !tbaa !16
  %154 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 8
  %155 = load i32, ptr %154, align 4, !tbaa !13
  %156 = icmp slt i32 %153, %155
  br i1 %156, label %158, label %157

157:                                              ; preds = %152
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %182

158:                                              ; preds = %152
  %159 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 9
  %160 = load i32, ptr %159, align 8, !tbaa !26
  %161 = sitofp i32 %160 to double
  %162 = call double @pow(double noundef 0x401921FB54442D18, double noundef %161) #8
  %163 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !14
  %165 = load i32, ptr %13, align 4, !tbaa !16
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds ptr, ptr %164, i64 %166
  %168 = load ptr, ptr %167, align 8, !tbaa !5
  %169 = call noundef double @_ZNK6Matrix11determinantEv(ptr noundef nonnull align 8 dereferenceable(24) %168)
  %170 = fmul double %162, %169
  %171 = call double @sqrt(double noundef %170) #8
  %172 = fdiv double 1.000000e+00, %171
  %173 = fptrunc double %172 to float
  %174 = getelementptr inbounds %class.GaussMixture, ptr %14, i32 0, i32 2
  %175 = load ptr, ptr %174, align 8, !tbaa !25
  %176 = load i32, ptr %13, align 4, !tbaa !16
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds float, ptr %175, i64 %177
  store float %173, ptr %178, align 4, !tbaa !27
  br label %179

179:                                              ; preds = %158
  %180 = load i32, ptr %13, align 4, !tbaa !16
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %13, align 4, !tbaa !16
  br label %152, !llvm.loop !28

182:                                              ; preds = %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret void

183:                                              ; preds = %141, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %184

184:                                              ; preds = %183
  %185 = load ptr, ptr %6, align 8
  %186 = load i32, ptr %7, align 4
  %187 = insertvalue { ptr, i32 } poison, ptr %185, 0
  %188 = insertvalue { ptr, i32 } %187, i32 %186, 1
  resume { ptr, i32 } %188
}

declare void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #3

declare void @_ZNK6Matrix7inverseEv(ptr dead_on_unwind writable sret(%class.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(24)) #3

; Function Attrs: nounwind
declare double @sqrt(double noundef) #7

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #7

declare noundef double @_ZNK6Matrix11determinantEv(ptr noundef nonnull align 8 dereferenceable(24)) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nobuiltin 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 #3 = { "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 = { inlinehint mustprogress 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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++ TBAA"}
!9 = !{!10, !11, i64 64}
!10 = !{!"_ZTS12GaussMixture", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !11, i64 84}
!11 = !{!"int", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!10, !11, i64 52}
!14 = !{!10, !6, i64 0}
!15 = !{!10, !6, i64 8}
!16 = !{!11, !11, i64 0}
!17 = !{!18, !6, i64 8}
!18 = !{!"_ZTS6Matrix", !6, i64 8, !11, i64 16, !11, i64 20}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}
!25 = !{!10, !6, i64 16}
!26 = !{!10, !11, i64 56}
!27 = !{!12, !12, i64 0}
!28 = distinct !{!28, !22}


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

%class.Matrix = type { ptr, ptr, i32, i32 }

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @_ZN6MatrixC1EPKc(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12GaussMixture15loadCovariancesEPKc(ptr nocapture noundef nonnull align 8 dereferenceable(88) %0, ptr noundef %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #6
  invoke void @_ZN6MatrixC1EPKc(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef %1)
          to label %4 unwind label %28

4:                                                ; preds = %2
  %5 = tail call noundef i32 @_ZNK6Matrix6nbColsEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %6 = getelementptr inbounds i8, ptr %0, i64 64
  store i32 %5, ptr %6, align 8, !tbaa !5
  %7 = tail call noundef i32 @_ZNK6Matrix6nbRowsEv(ptr noundef nonnull align 8 dereferenceable(24) %3)
  %8 = load i32, ptr %6, align 8, !tbaa !5
  %9 = sdiv i32 %7, %8
  %10 = getelementptr inbounds i8, ptr %0, i64 52
  store i32 %9, ptr %10, align 4, !tbaa !12
  %11 = sext i32 %9 to i64
  %12 = icmp slt i32 %9, 0
  %13 = shl nsw i64 %11, 3
  %14 = select i1 %12, i64 -1, i64 %13
  %15 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %14) #6
  store ptr %15, ptr %0, align 8, !tbaa !13
  %16 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %14) #6
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %16, ptr %17, align 8, !tbaa !14
  %18 = icmp sgt i32 %9, 0
  br i1 %18, label %.lr.ph53, label %._crit_edge54

.lr.ph53:                                         ; preds = %4
  %19 = getelementptr inbounds i8, ptr %3, i64 8
  br label %30

._crit_edge54:                                    ; preds = %84, %4
  %.pre-phi = phi i64 [ %11, %4 ], [ %88, %84 ]
  %20 = phi i32 [ %9, %4 ], [ %87, %84 ]
  %21 = icmp slt i32 %20, 0
  %22 = shl nsw i64 %.pre-phi, 2
  %23 = select i1 %21, i64 -1, i64 %22
  %24 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %23) #6
  %25 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %24, ptr %25, align 8, !tbaa !15
  %26 = icmp sgt i32 %20, 0
  br i1 %26, label %.lr.ph58, label %._crit_edge59

.lr.ph58:                                         ; preds = %._crit_edge54
  %27 = getelementptr inbounds i8, ptr %0, i64 56
  br label %92

28:                                               ; preds = %2
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %109

30:                                               ; preds = %.lr.ph53, %84
  %indvars.iv78 = phi i64 [ 0, %.lr.ph53 ], [ %indvars.iv.next79, %84 ]
  %.02850 = phi i32 [ 0, %.lr.ph53 ], [ %.1.lcssa, %84 ]
  %31 = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #6
  %32 = load i32, ptr %6, align 8, !tbaa !5
  invoke void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %31, i32 noundef %32, i32 noundef %32)
          to label %33 unwind label %52

33:                                               ; preds = %30
  %34 = load ptr, ptr %0, align 8, !tbaa !13
  %35 = getelementptr inbounds ptr, ptr %34, i64 %indvars.iv78
  store ptr %31, ptr %35, align 8, !tbaa !16
  %36 = load i32, ptr %6, align 8, !tbaa !5
  %.not44 = icmp slt i32 %36, 1
  br i1 %.not44, label %._crit_edge49.split, label %.lr.ph48

.lr.ph48:                                         ; preds = %33
  %37 = load ptr, ptr %0, align 8
  %38 = getelementptr inbounds ptr, ptr %37, i64 %indvars.iv78
  %39 = load ptr, ptr %19, align 8, !tbaa !17
  %40 = load ptr, ptr %38, align 8, !tbaa !16
  %41 = getelementptr inbounds i8, ptr %40, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !17
  %43 = add nuw i32 %36, 1
  %44 = sext i32 %.02850 to i64
  %wide.trip.count76 = zext i32 %43 to i64
  %45 = zext nneg i32 %36 to i64
  %46 = zext nneg i32 %36 to i64
  %min.iters.check = icmp ult i32 %36, 4
  %n.vec = and i64 %45, 2147483644
  %ind.end = or disjoint i64 %n.vec, 1
  %cmp.n = icmp eq i64 %n.vec, %45
  br label %.lr.ph

._crit_edge49.split.loopexit:                     ; preds = %._crit_edge
  %47 = trunc nsw i64 %indvars.iv.next72 to i32
  br label %._crit_edge49.split

._crit_edge49.split:                              ; preds = %._crit_edge49.split.loopexit, %33
  %.1.lcssa = phi i32 [ %.02850, %33 ], [ %47, %._crit_edge49.split.loopexit ]
  %48 = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #6
  %49 = load ptr, ptr %0, align 8, !tbaa !13
  %50 = getelementptr inbounds ptr, ptr %49, i64 %indvars.iv78
  %51 = load ptr, ptr %50, align 8, !tbaa !16
  invoke void @_ZNK6Matrix7inverseEv(ptr dead_on_unwind nonnull writable sret(%class.Matrix) align 8 %48, ptr noundef nonnull align 8 dereferenceable(24) %51)
          to label %84 unwind label %90

52:                                               ; preds = %30
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %109

.lr.ph:                                           ; preds = %.lr.ph48, %._crit_edge
  %indvars.iv71 = phi i64 [ %44, %.lr.ph48 ], [ %indvars.iv.next72, %._crit_edge ]
  %indvars.iv69 = phi i64 [ 1, %.lr.ph48 ], [ %indvars.iv.next70, %._crit_edge ]
  %indvars.iv.next72 = add nsw i64 %indvars.iv71, 1
  %54 = getelementptr inbounds ptr, ptr %39, i64 %indvars.iv.next72
  %55 = load ptr, ptr %54, align 8, !tbaa !16
  %56 = getelementptr inbounds ptr, ptr %42, i64 %indvars.iv69
  %57 = load ptr, ptr %56, align 8, !tbaa !16
  %58 = ptrtoint ptr %57 to i64
  %59 = ptrtoint ptr %55 to i64
  %60 = sub i64 %58, %59
  %diff.check = icmp ult i64 %60, 32
  %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond, label %scalar.ph.preheader, label %vector.body

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph ], [ %ind.end, %middle.block ]
  %61 = sub nsw i64 %wide.trip.count76, %indvars.iv.ph
  %62 = sub nsw i64 %46, %indvars.iv.ph
  %xtraiter = and i64 %61, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %63 = getelementptr inbounds double, ptr %55, i64 %indvars.iv.prol
  %64 = load double, ptr %63, align 8, !tbaa !19
  %65 = getelementptr inbounds double, ptr %57, i64 %indvars.iv.prol
  store double %64, ptr %65, align 8, !tbaa !19
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !21

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %66 = icmp ult i64 %62, 3
  br i1 %66, label %._crit_edge, label %scalar.ph

vector.body:                                      ; preds = %.lr.ph, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.lr.ph ]
  %offset.idx = or disjoint i64 %index, 1
  %67 = getelementptr inbounds double, ptr %55, i64 %offset.idx
  %68 = getelementptr inbounds i8, ptr %67, i64 16
  %wide.load = load <2 x double>, ptr %67, align 8, !tbaa !19
  %wide.load96 = load <2 x double>, ptr %68, align 8, !tbaa !19
  %69 = getelementptr inbounds double, ptr %57, i64 %offset.idx
  %70 = getelementptr inbounds i8, ptr %69, i64 16
  store <2 x double> %wide.load, ptr %69, align 8, !tbaa !19
  store <2 x double> %wide.load96, ptr %70, align 8, !tbaa !19
  %index.next = add nuw i64 %index, 4
  %71 = icmp eq i64 %index.next, %n.vec
  br i1 %71, label %middle.block, label %vector.body, !llvm.loop !23

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge, label %scalar.ph.preheader

._crit_edge:                                      ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1
  %exitcond77.not = icmp eq i64 %indvars.iv.next70, %wide.trip.count76
  br i1 %exitcond77.not, label %._crit_edge49.split.loopexit, label %.lr.ph, !llvm.loop !27

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %72 = getelementptr inbounds double, ptr %55, i64 %indvars.iv
  %73 = load double, ptr %72, align 8, !tbaa !19
  %74 = getelementptr inbounds double, ptr %57, i64 %indvars.iv
  store double %73, ptr %74, align 8, !tbaa !19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %75 = getelementptr inbounds double, ptr %55, i64 %indvars.iv.next
  %76 = load double, ptr %75, align 8, !tbaa !19
  %77 = getelementptr inbounds double, ptr %57, i64 %indvars.iv.next
  store double %76, ptr %77, align 8, !tbaa !19
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %78 = getelementptr inbounds double, ptr %55, i64 %indvars.iv.next.1
  %79 = load double, ptr %78, align 8, !tbaa !19
  %80 = getelementptr inbounds double, ptr %57, i64 %indvars.iv.next.1
  store double %79, ptr %80, align 8, !tbaa !19
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %81 = getelementptr inbounds double, ptr %55, i64 %indvars.iv.next.2
  %82 = load double, ptr %81, align 8, !tbaa !19
  %83 = getelementptr inbounds double, ptr %57, i64 %indvars.iv.next.2
  store double %82, ptr %83, align 8, !tbaa !19
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count76
  br i1 %exitcond.not.3, label %._crit_edge, label %scalar.ph, !llvm.loop !28

84:                                               ; preds = %._crit_edge49.split
  %85 = load ptr, ptr %17, align 8, !tbaa !14
  %86 = getelementptr inbounds ptr, ptr %85, i64 %indvars.iv78
  store ptr %48, ptr %86, align 8, !tbaa !16
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %87 = load i32, ptr %10, align 4, !tbaa !12
  %88 = sext i32 %87 to i64
  %89 = icmp slt i64 %indvars.iv.next79, %88
  br i1 %89, label %30, label %._crit_edge54, !llvm.loop !29

90:                                               ; preds = %._crit_edge49.split
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %109

._crit_edge59:                                    ; preds = %92, %._crit_edge54
  ret void

92:                                               ; preds = %.lr.ph58, %92
  %indvars.iv81 = phi i64 [ 0, %.lr.ph58 ], [ %indvars.iv.next82, %92 ]
  %93 = load i32, ptr %27, align 8, !tbaa !30
  %94 = sitofp i32 %93 to double
  %95 = tail call double @pow(double noundef 0x401921FB54442D18, double noundef %94) #7
  %96 = load ptr, ptr %0, align 8, !tbaa !13
  %97 = getelementptr inbounds ptr, ptr %96, i64 %indvars.iv81
  %98 = load ptr, ptr %97, align 8, !tbaa !16
  %99 = tail call noundef double @_ZNK6Matrix11determinantEv(ptr noundef nonnull align 8 dereferenceable(24) %98)
  %100 = fmul double %95, %99
  %101 = tail call double @sqrt(double noundef %100) #7
  %102 = fdiv double 1.000000e+00, %101
  %103 = fptrunc double %102 to float
  %104 = load ptr, ptr %25, align 8, !tbaa !15
  %105 = getelementptr inbounds float, ptr %104, i64 %indvars.iv81
  store float %103, ptr %105, align 4, !tbaa !31
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %106 = load i32, ptr %10, align 4, !tbaa !12
  %107 = sext i32 %106 to i64
  %108 = icmp slt i64 %indvars.iv.next82, %107
  br i1 %108, label %92, label %._crit_edge59, !llvm.loop !32

109:                                              ; preds = %52, %90, %28
  %.lcssa.sink = phi ptr [ %31, %52 ], [ %48, %90 ], [ %3, %28 ]
  %.pn.pn = phi { ptr, i32 } [ %53, %52 ], [ %91, %90 ], [ %29, %28 ]
  tail call void @_ZdlPvm(ptr noundef nonnull %.lcssa.sink, i64 noundef 24) #8
  resume { ptr, i32 } %.pn.pn
}

declare void @_ZN6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #2

declare void @_ZNK6Matrix7inverseEv(ptr dead_on_unwind writable sret(%class.Matrix) align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #5

declare noundef double @_ZNK6Matrix11determinantEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

attributes #0 = { nobuiltin allocsize(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 = { nobuiltin 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 #4 = { 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 #5 = { mustprogress nofree nounwind willreturn memory(write) "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 #6 = { builtin allocsize(0) }
attributes #7 = { nounwind }
attributes #8 = { builtin 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 64}
!6 = !{!"_ZTS12GaussMixture", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !10, i64 84}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !10, i64 52}
!13 = !{!6, !7, i64 0}
!14 = !{!6, !7, i64 8}
!15 = !{!6, !7, i64 16}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !7, i64 8}
!18 = !{!"_ZTS6Matrix", !7, i64 8, !10, i64 16, !10, i64 20}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !8, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !24, !25, !26}
!24 = !{!"llvm.loop.mustprogress"}
!25 = !{!"llvm.loop.isvectorized", i32 1}
!26 = !{!"llvm.loop.unroll.runtime.disable"}
!27 = distinct !{!27, !24}
!28 = distinct !{!28, !24, !25}
!29 = distinct !{!29, !24}
!30 = !{!6, !10, i64 56}
!31 = !{!11, !11, i64 0}
!32 = distinct !{!32, !24}


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