; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/rbdl/src (rbdl_mathutils)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@.str.8 = external hidden unnamed_addr constant [115 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.13 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN17RigidBodyDynamics4Math27SpatialMatrixCompareEpsilonERK15SpatialMatrix_tS3_d = external hidden unnamed_addr constant [112 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [8 x i8], align 1

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN17RigidBodyDynamics4Math27SpatialMatrixCompareEpsilonERK15SpatialMatrix_tS3_d(ptr noundef nonnull align 16 dereferenceable(288) %0, ptr noundef nonnull align 16 dereferenceable(288) %1, double noundef %2) #4 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store double %2, ptr %7, align 8, !tbaa !9
  %11 = load double, ptr %7, align 8, !tbaa !9
  %12 = fcmp oge double %11, 0.000000e+00
  br i1 %12, label %13, label %14

13:                                               ; preds = %3
  br label %16

14:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.8, i32 noundef 148, ptr noundef @__PRETTY_FUNCTION__._ZN17RigidBodyDynamics4Math27SpatialMatrixCompareEpsilonERK15SpatialMatrix_tS3_d) #5
  unreachable

15:                                               ; No predecessors!
  br label %16

16:                                               ; preds = %15, %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %8, align 4, !tbaa !11
  br label %17

17:                                               ; preds = %59, %16
  %18 = load i32, ptr %8, align 4, !tbaa !11
  %19 = icmp ult i32 %18, 6
  br i1 %19, label %20, label %62

20:                                               ; preds = %17
  store i32 0, ptr %9, align 4, !tbaa !11
  br label %21

21:                                               ; preds = %55, %20
  %22 = load i32, ptr %9, align 4, !tbaa !11
  %23 = icmp ult i32 %22, 6
  br i1 %23, label %24, label %58

24:                                               ; preds = %21
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = load i32, ptr %8, align 4, !tbaa !11
  %27 = zext i32 %26 to i64
  %28 = load i32, ptr %9, align 4, !tbaa !11
  %29 = zext i32 %28 to i64
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %25, i64 noundef %27, i64 noundef %29)
  %31 = load double, ptr %30, align 8, !tbaa !9
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load i32, ptr %8, align 4, !tbaa !11
  %34 = zext i32 %33 to i64
  %35 = load i32, ptr %9, align 4, !tbaa !11
  %36 = zext i32 %35 to i64
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %32, i64 noundef %34, i64 noundef %36)
  %38 = load double, ptr %37, align 8, !tbaa !9
  %39 = fsub double %31, %38
  %40 = call double @llvm.fabs.f64(double %39)
  %41 = load double, ptr %7, align 8, !tbaa !9
  %42 = fcmp oge double %40, %41
  br i1 %42, label %43, label %54

43:                                               ; preds = %24
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.14)
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5EigenlsINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEEEERSoS3_RKNS_9DenseBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 1 dereferenceable(1) %46)
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef @.str.15)
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5EigenlsINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEEEERSoS3_RKNS_9DenseBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 1 dereferenceable(1) %51)
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i1 false, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %63

54:                                               ; preds = %24
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %9, align 4, !tbaa !11
  %57 = add i32 %56, 1
  store i32 %57, ptr %9, align 4, !tbaa !11
  br label %21, !llvm.loop !13

58:                                               ; preds = %21
  br label %59

59:                                               ; preds = %58
  %60 = load i32, ptr %8, align 4, !tbaa !11
  %61 = add i32 %60, 1
  store i32 %61, ptr %8, align 4, !tbaa !11
  br label %17, !llvm.loop !15

62:                                               ; preds = %17
  store i1 true, ptr %4, align 1
  store i32 1, ptr %10, align 4
  br label %63

63:                                               ; preds = %62, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  %64 = load i1, ptr %4, align 1
  ret i1 %64
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #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 = { noreturn nounwind }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@.str.8 = external hidden unnamed_addr constant [115 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.13 = external hidden unnamed_addr constant [14 x i8], align 1
@__PRETTY_FUNCTION__._ZN17RigidBodyDynamics4Math27SpatialMatrixCompareEpsilonERK15SpatialMatrix_tS3_d = external hidden unnamed_addr constant [112 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN17RigidBodyDynamics4Math27SpatialMatrixCompareEpsilonERK15SpatialMatrix_tS3_d(ptr noundef nonnull align 16 dereferenceable(288) %0, ptr noundef nonnull align 16 dereferenceable(288) %1, double noundef %2) local_unnamed_addr #3 {
  %4 = fcmp ult double %2, 0.000000e+00
  br i1 %4, label %12, label %.preheader.preheader

.preheader.preheader:                             ; preds = %3
  %5 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %0, i64 noundef 0, i64 noundef 0)
  %6 = load double, ptr %5, align 8, !tbaa !5
  %7 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %1, i64 noundef 0, i64 noundef 0)
  %8 = load double, ptr %7, align 8, !tbaa !5
  %9 = fsub double %6, %8
  %10 = tail call double @llvm.fabs.f64(double %9)
  %11 = fcmp ult double %10, %2
  br i1 %11, label %.lr.ph, label %._crit_edge

12:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.8, i32 noundef 148, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN17RigidBodyDynamics4Math27SpatialMatrixCompareEpsilonERK15SpatialMatrix_tS3_d) #4
  unreachable

.preheader:                                       ; preds = %60
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %0, i64 noundef %indvars.iv.next, i64 noundef 0)
  %14 = load double, ptr %13, align 8, !tbaa !5
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %1, i64 noundef %indvars.iv.next, i64 noundef 0)
  %16 = load double, ptr %15, align 8, !tbaa !5
  %17 = fsub double %14, %16
  %18 = tail call double @llvm.fabs.f64(double %17)
  %19 = fcmp ult double %18, %2
  br i1 %19, label %.lr.ph, label %._crit_edge, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader.preheader, %.preheader
  %20 = phi i1 [ %61, %.preheader ], [ false, %.preheader.preheader ]
  %indvars.iv28 = phi i64 [ %indvars.iv.next, %.preheader ], [ 0, %.preheader.preheader ]
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %0, i64 noundef %indvars.iv28, i64 noundef 1)
  %22 = load double, ptr %21, align 8, !tbaa !5
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %1, i64 noundef %indvars.iv28, i64 noundef 1)
  %24 = load double, ptr %23, align 8, !tbaa !5
  %25 = fsub double %22, %24
  %26 = tail call double @llvm.fabs.f64(double %25)
  %27 = fcmp ult double %26, %2
  br i1 %27, label %28, label %._crit_edge

28:                                               ; preds = %.lr.ph
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %0, i64 noundef %indvars.iv28, i64 noundef 2)
  %30 = load double, ptr %29, align 8, !tbaa !5
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %1, i64 noundef %indvars.iv28, i64 noundef 2)
  %32 = load double, ptr %31, align 8, !tbaa !5
  %33 = fsub double %30, %32
  %34 = tail call double @llvm.fabs.f64(double %33)
  %35 = fcmp ult double %34, %2
  br i1 %35, label %36, label %._crit_edge

36:                                               ; preds = %28
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %0, i64 noundef %indvars.iv28, i64 noundef 3)
  %38 = load double, ptr %37, align 8, !tbaa !5
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %1, i64 noundef %indvars.iv28, i64 noundef 3)
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = fsub double %38, %40
  %42 = tail call double @llvm.fabs.f64(double %41)
  %43 = fcmp ult double %42, %2
  br i1 %43, label %44, label %._crit_edge

44:                                               ; preds = %36
  %45 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %0, i64 noundef %indvars.iv28, i64 noundef 4)
  %46 = load double, ptr %45, align 8, !tbaa !5
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %1, i64 noundef %indvars.iv28, i64 noundef 4)
  %48 = load double, ptr %47, align 8, !tbaa !5
  %49 = fsub double %46, %48
  %50 = tail call double @llvm.fabs.f64(double %49)
  %51 = fcmp ult double %50, %2
  br i1 %51, label %52, label %._crit_edge

52:                                               ; preds = %44
  %53 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %0, i64 noundef %indvars.iv28, i64 noundef 5)
  %54 = load double, ptr %53, align 8, !tbaa !5
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEELi0EEclEll(ptr noundef nonnull align 1 dereferenceable(1) %1, i64 noundef %indvars.iv28, i64 noundef 5)
  %56 = load double, ptr %55, align 8, !tbaa !5
  %57 = fsub double %54, %56
  %58 = tail call double @llvm.fabs.f64(double %57)
  %59 = fcmp ult double %58, %2
  br i1 %59, label %60, label %._crit_edge

60:                                               ; preds = %52
  %indvars.iv.next = add nuw nsw i64 %indvars.iv28, 1
  %61 = icmp ugt i64 %indvars.iv28, 4
  %exitcond = icmp eq i64 %indvars.iv.next, 6
  br i1 %exitcond, label %.loopexit, label %.preheader, !llvm.loop !9

._crit_edge:                                      ; preds = %.preheader, %.lr.ph, %28, %36, %44, %52, %.preheader.preheader
  %.lcssa = phi i1 [ false, %.preheader.preheader ], [ %61, %.preheader ], [ %20, %.lr.ph ], [ %20, %28 ], [ %20, %36 ], [ %20, %44 ], [ %20, %52 ]
  %62 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.14)
  %63 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %64 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5EigenlsINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEEEERSoS3_RKNS_9DenseBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull align 1 dereferenceable(1) %0)
  %65 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %66 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull @.str.15)
  %67 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  %68 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5EigenlsINS_6MatrixIdLi6ELi6ELi0ELi6ELi6EEEEERSoS3_RKNS_9DenseBaseIT_EE(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull align 1 dereferenceable(1) %1)
  %69 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %68, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %.loopexit

.loopexit:                                        ; preds = %60, %._crit_edge
  %70 = phi i1 [ %.lcssa, %._crit_edge ], [ %61, %60 ]
  ret i1 %70
}

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

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

attributes #0 = { noreturn 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 speculatable willreturn memory(none) }
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 = { 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 #4 = { noreturn 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: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass