; LLVM IR from rdguez-mariano/fast_imas_IPOL :: libOrsa (conditioning)

; 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.libNumerics::matrix" = type { ptr, i32, i32, ptr }

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics6matrixIdEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4orsa27ApplyTransformationToPointsERKN11libNumerics6matrixIdEES4_PS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.libNumerics::matrix", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"class.libNumerics::matrix", align 8
  %13 = alloca %"class.libNumerics::matrix", align 8
  %14 = alloca %"class.libNumerics::matrix", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = call noundef i32 @_ZNK11libNumerics6matrixIdE4ncolEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  store i32 %16, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  %17 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %8, i32 noundef 2, i32 noundef %17)
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics6matrixIdEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %20 unwind label %26

20:                                               ; preds = %3
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %72, %20
  %22 = load i32, ptr %11, align 4, !tbaa !9
  %23 = load i32, ptr %7, align 4, !tbaa !9
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %30, label %25

25:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %94

26:                                               ; preds = %3
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %9, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %10, align 4
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  br label %95

30:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #4
  call void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef 3, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #4
  invoke void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef 3, i32 noundef 1)
          to label %31 unwind label %75

31:                                               ; preds = %30
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = load i32, ptr %11, align 4, !tbaa !9
  %34 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %32, i32 noundef 0, i32 noundef %33)
          to label %35 unwind label %79

35:                                               ; preds = %31
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef 0, i32 noundef 0)
          to label %37 unwind label %79

37:                                               ; preds = %35
  store double %34, ptr %36, align 8, !tbaa !11
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = load i32, ptr %11, align 4, !tbaa !9
  %40 = invoke noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %38, i32 noundef 1, i32 noundef %39)
          to label %41 unwind label %79

41:                                               ; preds = %37
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef 1, i32 noundef 0)
          to label %43 unwind label %79

43:                                               ; preds = %41
  store double %40, ptr %42, align 8, !tbaa !11
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %12, i32 noundef 2, i32 noundef 0)
          to label %45 unwind label %79

45:                                               ; preds = %43
  store double 1.000000e+00, ptr %44, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #4
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK11libNumerics6matrixIdEmlERKS1_(ptr dead_on_unwind writable sret(%"class.libNumerics::matrix") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %47 unwind label %83

47:                                               ; preds = %45
  %48 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics6matrixIdEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %49 unwind label %87

49:                                               ; preds = %47
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  %50 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef 0)
          to label %51 unwind label %79

51:                                               ; preds = %49
  %52 = load double, ptr %50, align 8, !tbaa !11
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef 2)
          to label %54 unwind label %79

54:                                               ; preds = %51
  %55 = load double, ptr %53, align 8, !tbaa !11
  %56 = fdiv double %52, %55
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = load i32, ptr %11, align 4, !tbaa !9
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %57, i32 noundef 0, i32 noundef %58)
          to label %60 unwind label %79

60:                                               ; preds = %54
  store double %56, ptr %59, align 8, !tbaa !11
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef 1)
          to label %62 unwind label %79

62:                                               ; preds = %60
  %63 = load double, ptr %61, align 8, !tbaa !11
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef 2)
          to label %65 unwind label %79

65:                                               ; preds = %62
  %66 = load double, ptr %64, align 8, !tbaa !11
  %67 = fdiv double %63, %66
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = load i32, ptr %11, align 4, !tbaa !9
  %70 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %68, i32 noundef 1, i32 noundef %69)
          to label %71 unwind label %79

71:                                               ; preds = %65
  store double %67, ptr %70, align 8, !tbaa !11
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #4
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  br label %72

72:                                               ; preds = %71
  %73 = load i32, ptr %11, align 4, !tbaa !9
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %11, align 4, !tbaa !9
  br label %21, !llvm.loop !13

75:                                               ; preds = %30
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %9, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %10, align 4
  br label %93

79:                                               ; preds = %65, %62, %60, %54, %51, %49, %43, %41, %37, %35, %31
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %9, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %10, align 4
  br label %92

83:                                               ; preds = %45
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %9, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %10, align 4
  br label %91

87:                                               ; preds = %47
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %9, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %10, align 4
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  br label %91

91:                                               ; preds = %87, %83
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  br label %92

92:                                               ; preds = %91, %79
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  br label %93

93:                                               ; preds = %92, %75
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #4
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %95

94:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void

95:                                               ; preds = %93, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %96

96:                                               ; preds = %95
  %97 = load ptr, ptr %9, align 8
  %98 = load i32, ptr %10, align 4
  %99 = insertvalue { ptr, i32 } poison, ptr %97, 0
  %100 = insertvalue { ptr, i32 } %99, i32 %98, 1
  resume { ptr, i32 } %100
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK11libNumerics6matrixIdEmlERKS1_(ptr dead_on_unwind noalias writable sret(%"class.libNumerics::matrix") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #1 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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.libNumerics::matrix" = type { ptr, i32, i32, ptr }

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics6matrixIdEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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) #0

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4orsa27ApplyTransformationToPointsERKN11libNumerics6matrixIdEES4_PS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.libNumerics::matrix", align 8
  %5 = alloca %"class.libNumerics::matrix", align 8
  %6 = alloca %"class.libNumerics::matrix", align 8
  %7 = alloca %"class.libNumerics::matrix", align 8
  %8 = tail call noundef i32 @_ZNK11libNumerics6matrixIdE4ncolEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  call void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %4, i32 noundef 2, i32 noundef %8)
  %9 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics6matrixIdEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %10 unwind label %12

10:                                               ; preds = %3
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  %11 = icmp sgt i32 %8, 0
  br i1 %11, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %22, %10
  ret void

12:                                               ; preds = %3
  %13 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  br label %44

.lr.ph:                                           ; preds = %10, %22
  %.023 = phi i32 [ %35, %22 ], [ 0, %10 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #4
  call void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 3, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  invoke void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef 3, i32 noundef 1)
          to label %14 unwind label %36

14:                                               ; preds = %.lr.ph
  %15 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef 0, i32 noundef %.023)
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 0, i32 noundef 0)
  store double %15, ptr %16, align 8, !tbaa !5
  %17 = call noundef double @_ZNK11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef 1, i32 noundef %.023)
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 1, i32 noundef 0)
  store double %17, ptr %18, align 8, !tbaa !5
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef 2, i32 noundef 0)
  store double 1.000000e+00, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #4
  invoke void @_ZNK11libNumerics6matrixIdEmlERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.libNumerics::matrix") align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %20 unwind label %38

20:                                               ; preds = %14
  %21 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN11libNumerics6matrixIdEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %22 unwind label %40

22:                                               ; preds = %20
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef 0)
  %24 = load double, ptr %23, align 8, !tbaa !5
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef 2)
  %26 = load double, ptr %25, align 8, !tbaa !5
  %27 = fdiv double %24, %26
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 0, i32 noundef %.023)
  store double %27, ptr %28, align 8, !tbaa !5
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef 1)
  %30 = load double, ptr %29, align 8, !tbaa !5
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEi(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef 2)
  %32 = load double, ptr %31, align 8, !tbaa !5
  %33 = fdiv double %30, %32
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11libNumerics6matrixIdEclEii(ptr noundef nonnull align 8 dereferenceable(24) %2, i32 noundef 1, i32 noundef %.023)
  store double %33, ptr %34, align 8, !tbaa !5
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  %35 = add nuw nsw i32 %.023, 1
  %exitcond.not = icmp eq i32 %35, %8
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

36:                                               ; preds = %.lr.ph
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %43

38:                                               ; preds = %14
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %20
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  br label %42

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #4
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  br label %43

43:                                               ; preds = %42, %36
  %.pn.pn = phi { ptr, i32 } [ %.pn, %42 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @_ZN11libNumerics6matrixIdED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #4
  br label %44

44:                                               ; preds = %43, %12
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %43 ], [ %13, %12 ]
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK11libNumerics6matrixIdEmlERKS1_(ptr dead_on_unwind noalias writable sret(%"class.libNumerics::matrix") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11libNumerics6matrixIdEC2Eii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) unnamed_addr #1 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass