; LLVM IR from jingweizhanghuai/Morn :: test/test_matrix3.ll (Z16test_determinanti)

; 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.Eigen::Matrix" = type { %"class.Eigen::PlainObjectBase" }
%"class.Eigen::PlainObjectBase" = type { %"class.Eigen::DenseStorage" }
%"class.Eigen::DenseStorage" = type { ptr, i64, i64 }
%struct.MMatrix = type { i32, i32, ptr }

@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@__FUNCTION__._Z16test_determinanti = external hidden unnamed_addr constant [17 x i8], align 1

declare i32 @printf(ptr noundef, ...) #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEC2IiiEERKT_RKT0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

declare ptr @MatrixCreate(i32 noundef, i32 noundef, ptr noundef) #0

declare i32 @__gxx_personality_v0(...)

declare i32 @m_Rand(i32 noundef, i32 noundef) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEELi1EEclEll(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef, i64 noundef) #2 align 2

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

declare void @_mTimerBegin(ptr noundef) #0

declare float @_mTimerEnd(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

declare void @mMatrixRelease(ptr noundef) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16test_determinanti(i32 noundef %0) #4 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.Eigen::Matrix", align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %14, i32 noundef %15)
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #5
  call void @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEC2IiiEERKT_RKT0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %17 = load i32, ptr %2, align 4, !tbaa !5
  %18 = add nsw i32 %17, 0
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = invoke ptr @MatrixCreate(i32 noundef %18, i32 noundef %19, ptr noundef null)
          to label %21 unwind label %27

21:                                               ; preds = %1
  store ptr %20, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %69, %21
  %23 = load i32, ptr %7, align 4, !tbaa !5
  %24 = load i32, ptr %2, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %31, label %26

26:                                               ; preds = %22
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %72

27:                                               ; preds = %1
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %5, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %6, align 4
  br label %117

31:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %61, %31
  %33 = load i32, ptr %9, align 4, !tbaa !5
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = icmp slt i32 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %68

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %38 = invoke i32 @m_Rand(i32 noundef -1000, i32 noundef 1000)
          to label %39 unwind label %64

39:                                               ; preds = %37
  %40 = sitofp i32 %38 to double
  %41 = fdiv double %40, 5.000000e+02
  %42 = fptrunc double %41 to float
  store float %42, ptr %10, align 4, !tbaa !11
  %43 = load float, ptr %10, align 4, !tbaa !11
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = load i32, ptr %9, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEELi1EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef %45, i64 noundef %47)
          to label %49 unwind label %64

49:                                               ; preds = %39
  store float %43, ptr %48, align 4, !tbaa !11
  %50 = load float, ptr %10, align 4, !tbaa !11
  %51 = load ptr, ptr %4, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.MMatrix, ptr %51, i32 0, i32 2
  %53 = load ptr, ptr %52, align 8, !tbaa !13
  %54 = load i32, ptr %7, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds ptr, ptr %53, i64 %55
  %57 = load ptr, ptr %56, align 8, !tbaa !9
  %58 = load i32, ptr %9, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds float, ptr %57, i64 %59
  store float %50, ptr %60, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %61

61:                                               ; preds = %49
  %62 = load i32, ptr %9, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %9, align 4, !tbaa !5
  br label %32, !llvm.loop !15

64:                                               ; preds = %39, %37
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %5, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %117

68:                                               ; preds = %36
  br label %69

69:                                               ; preds = %68
  %70 = load i32, ptr %7, align 4, !tbaa !5
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %7, align 4, !tbaa !5
  br label %22, !llvm.loop !17

72:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  invoke void @_mTimerBegin(ptr noundef @.str.3)
          to label %73 unwind label %78

73:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %85, %73
  %75 = load i32, ptr %12, align 4, !tbaa !5
  %76 = icmp slt i32 %75, 10000
  br i1 %76, label %82, label %77

77:                                               ; preds = %74
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %92

78:                                               ; preds = %113, %111, %94, %92, %72
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %5, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %6, align 4
  br label %116

82:                                               ; preds = %74
  %83 = invoke noundef float @_ZNK5Eigen10MatrixBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEE11determinantEv(ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %84 unwind label %88

84:                                               ; preds = %82
  store float %83, ptr %11, align 4, !tbaa !11
  br label %85

85:                                               ; preds = %84
  %86 = load i32, ptr %12, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %12, align 4, !tbaa !5
  br label %74, !llvm.loop !18

88:                                               ; preds = %82
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %5, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %116

92:                                               ; preds = %77
  %93 = invoke float @_mTimerEnd(ptr noundef @.str.3, ptr noundef @.str.4, i32 noundef 93, ptr noundef @__FUNCTION__._Z16test_determinanti)
          to label %94 unwind label %78

94:                                               ; preds = %92
  invoke void @_mTimerBegin(ptr noundef @.str.5)
          to label %95 unwind label %78

95:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !5
  br label %96

96:                                               ; preds = %104, %95
  %97 = load i32, ptr %13, align 4, !tbaa !5
  %98 = icmp slt i32 %97, 10000
  br i1 %98, label %100, label %99

99:                                               ; preds = %96
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %111

100:                                              ; preds = %96
  %101 = load ptr, ptr %4, align 8, !tbaa !9
  %102 = invoke float @mMatrixDetValue(ptr noundef %101)
          to label %103 unwind label %107

103:                                              ; preds = %100
  store float %102, ptr %11, align 4, !tbaa !11
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %13, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %13, align 4, !tbaa !5
  br label %96, !llvm.loop !19

107:                                              ; preds = %100
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %5, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %116

111:                                              ; preds = %99
  %112 = invoke float @_mTimerEnd(ptr noundef @.str.5, ptr noundef @.str.4, i32 noundef 99, ptr noundef @__FUNCTION__._Z16test_determinanti)
          to label %113 unwind label %78

113:                                              ; preds = %111
  %114 = load ptr, ptr %4, align 8, !tbaa !9
  invoke void @mMatrixRelease(ptr noundef %114)
          to label %115 unwind label %78

115:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  ret void

116:                                              ; preds = %107, %88, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %117

117:                                              ; preds = %116, %64, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  br label %118

118:                                              ; preds = %117
  %119 = load ptr, ptr %5, align 8
  %120 = load i32, ptr %6, align 4
  %121 = insertvalue { ptr, i32 } poison, ptr %119, 0
  %122 = insertvalue { ptr, i32 } %121, i32 %120, 1
  resume { ptr, i32 } %122
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZNK5Eigen10MatrixBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEE11determinantEv(ptr noundef nonnull align 1 dereferenceable(1)) #2 align 2

declare float @mMatrixDetValue(ptr noundef) #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 #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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !10, i64 8}
!14 = !{!"_ZTS7MMatrix", !6, i64 0, !6, i64 4, !10, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}


; 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.Eigen::Matrix" = type { %"class.Eigen::PlainObjectBase" }
%"class.Eigen::PlainObjectBase" = type { %"class.Eigen::DenseStorage" }
%"class.Eigen::DenseStorage" = type { ptr, i64, i64 }

@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [33 x i8], align 1
@__FUNCTION__._Z16test_determinanti = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEC2IiiEERKT_RKT0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

declare ptr @MatrixCreate(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare i32 @m_Rand(i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEELi1EEclEll(ptr noundef nonnull align 1 dereferenceable(1), i64 noundef, i64 noundef) local_unnamed_addr #2 align 2

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

declare void @_mTimerBegin(ptr noundef) local_unnamed_addr #3

declare float @_mTimerEnd(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

declare void @mMatrixRelease(ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16test_determinanti(i32 noundef %0) local_unnamed_addr #5 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.Eigen::Matrix", align 8
  store i32 %0, ptr %2, align 4, !tbaa !5
  %4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %0, i32 noundef %0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @_ZN5Eigen6MatrixIfLin1ELin1ELi0ELin1ELin1EEC2IiiEERKT_RKT0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %5 = load i32, ptr %2, align 4, !tbaa !5
  %6 = invoke ptr @MatrixCreate(i32 noundef %5, i32 noundef %5, ptr noundef null)
          to label %.preheader29 unwind label %12

.preheader29:                                     ; preds = %1
  %7 = load i32, ptr %2, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.preheader28.preheader, label %._crit_edge32

.preheader28.preheader:                           ; preds = %.preheader29
  %9 = getelementptr inbounds i8, ptr %6, i64 8
  br label %.preheader28

.preheader28:                                     ; preds = %.preheader28.preheader, %._crit_edge
  %10 = phi i32 [ %7, %.preheader28.preheader ], [ %14, %._crit_edge ]
  %indvars.iv37 = phi i64 [ 0, %.preheader28.preheader ], [ %indvars.iv.next38, %._crit_edge ]
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %.preheader28.._crit_edge_crit_edge

.preheader28.._crit_edge_crit_edge:               ; preds = %.preheader28
  %.pre = sext i32 %10 to i64
  br label %._crit_edge

._crit_edge32:                                    ; preds = %._crit_edge, %.preheader29
  invoke void @_mTimerBegin(ptr noundef nonnull @.str.3)
          to label %.preheader27 unwind label %34

12:                                               ; preds = %1
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %51

._crit_edge:                                      ; preds = %19, %.preheader28.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader28.._crit_edge_crit_edge ], [ %28, %19 ]
  %14 = phi i32 [ %10, %.preheader28.._crit_edge_crit_edge ], [ %27, %19 ]
  %indvars.iv.next38 = add nuw nsw i64 %indvars.iv37, 1
  %15 = icmp slt i64 %indvars.iv.next38, %.pre-phi
  br i1 %15, label %.preheader28, label %._crit_edge32, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader28, %19
  %indvars.iv = phi i64 [ %indvars.iv.next, %19 ], [ 0, %.preheader28 ]
  %16 = invoke i32 @m_Rand(i32 noundef -1000, i32 noundef 1000)
          to label %17 unwind label %30

17:                                               ; preds = %.lr.ph
  %18 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEELi1EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef %indvars.iv37, i64 noundef %indvars.iv)
          to label %19 unwind label %30

19:                                               ; preds = %17
  %20 = sitofp i32 %16 to double
  %21 = fdiv double %20, 5.000000e+02
  %22 = fptrunc double %21 to float
  store float %22, ptr %18, align 4, !tbaa !12
  %23 = load ptr, ptr %9, align 8, !tbaa !14
  %24 = getelementptr inbounds ptr, ptr %23, i64 %indvars.iv37
  %25 = load ptr, ptr %24, align 8, !tbaa !17
  %26 = getelementptr inbounds float, ptr %25, i64 %indvars.iv
  store float %22, ptr %26, align 4, !tbaa !12
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %27 = load i32, ptr %2, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = icmp slt i64 %indvars.iv.next, %28
  br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !18

30:                                               ; preds = %17, %.lr.ph
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %51

32:                                               ; preds = %37
  %33 = invoke float @_mTimerEnd(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.4, i32 noundef 93, ptr noundef nonnull @__FUNCTION__._Z16test_determinanti)
          to label %41 unwind label %34

34:                                               ; preds = %49, %42, %41, %32, %._crit_edge32
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %51

.preheader27:                                     ; preds = %._crit_edge32, %37
  %.01833 = phi i32 [ %38, %37 ], [ 0, %._crit_edge32 ]
  %36 = invoke noundef float @_ZNK5Eigen10MatrixBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEE11determinantEv(ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %37 unwind label %39

37:                                               ; preds = %.preheader27
  %38 = add nuw nsw i32 %.01833, 1
  %exitcond.not = icmp eq i32 %38, 10000
  br i1 %exitcond.not, label %32, label %.preheader27, !llvm.loop !19

39:                                               ; preds = %.preheader27
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %51

41:                                               ; preds = %32
  invoke void @_mTimerBegin(ptr noundef nonnull @.str.5)
          to label %.preheader unwind label %34

42:                                               ; preds = %45
  %43 = invoke float @_mTimerEnd(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.4, i32 noundef 99, ptr noundef nonnull @__FUNCTION__._Z16test_determinanti)
          to label %49 unwind label %34

.preheader:                                       ; preds = %41, %45
  %.034 = phi i32 [ %46, %45 ], [ 0, %41 ]
  %44 = invoke float @mMatrixDetValue(ptr noundef %6)
          to label %45 unwind label %47

45:                                               ; preds = %.preheader
  %46 = add nuw nsw i32 %.034, 1
  %exitcond40.not = icmp eq i32 %46, 10000
  br i1 %exitcond40.not, label %42, label %.preheader, !llvm.loop !20

47:                                               ; preds = %.preheader
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %51

49:                                               ; preds = %42
  invoke void @mMatrixRelease(ptr noundef %6)
          to label %50 unwind label %34

50:                                               ; preds = %49
  call void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  ret void

51:                                               ; preds = %34, %39, %47, %30, %12
  %.pn25 = phi { ptr, i32 } [ %31, %30 ], [ %13, %12 ], [ %40, %39 ], [ %48, %47 ], [ %35, %34 ]
  call void @_ZN5Eigen15PlainObjectBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn25
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef float @_ZNK5Eigen10MatrixBaseINS_6MatrixIfLin1ELin1ELi0ELin1ELin1EEEE11determinantEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

declare float @mMatrixDetValue(ptr noundef) local_unnamed_addr #3

attributes #0 = { nofree 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 #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 = { 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 #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, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = !{!13, !13, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !16, i64 8}
!15 = !{!"_ZTS7MMatrix", !6, i64 0, !6, i64 4, !16, i64 8}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!16, !16, i64 0}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}


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