; LLVM IR from Yinxiaoli/iros2015_folding :: src/folding_planner/src (Registration)

; 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::Block" = type { %"class.Eigen::BlockImpl" }
%"class.Eigen::BlockImpl" = type { %"class.Eigen::internal::BlockImpl_dense" }
%"class.Eigen::internal::BlockImpl_dense" = type { %"class.Eigen::MapBase.base", ptr, i64 }
%"class.Eigen::MapBase.base" = type <{ ptr, [2 x i8] }>
%"class.Eigen::Matrix" = type { %"class.Eigen::PlainObjectBase" }
%"class.Eigen::PlainObjectBase" = type { %"class.Eigen::DenseStorage" }
%"class.Eigen::DenseStorage" = type { %"struct.Eigen::internal::plain_array" }
%"struct.Eigen::internal::plain_array" = type { [2 x double] }
%"class.Eigen::CwiseBinaryOp.63" = type <{ %"class.Eigen::Block", %"class.Eigen::Block", [8 x i8] }>
%struct.SCurve = type { i8, i32, %"class.Eigen::Matrix.27", %"class.Eigen::Matrix.27", %"class.Eigen::Matrix.37" }
%"class.Eigen::Matrix.27" = type { %"class.Eigen::PlainObjectBase.28" }
%"class.Eigen::PlainObjectBase.28" = type { %"class.Eigen::DenseStorage.36" }
%"class.Eigen::DenseStorage.36" = type { ptr, i64 }
%"class.Eigen::Matrix.37" = type { %"class.Eigen::PlainObjectBase.38" }
%"class.Eigen::PlainObjectBase.38" = type { %"class.Eigen::DenseStorage.46" }
%"class.Eigen::DenseStorage.46" = type { ptr, i64 }
%struct.SParameters = type { double, double, double, double, %"struct._BlueTail::_Image::SImage", %struct.SRegion, i32, double, double, double, double, i32, double }
%"struct._BlueTail::_Image::SImage" = type { i32, i32, ptr }
%struct.SRegion = type { double, double, double, double }

@.str.1 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@__PRETTY_FUNCTION__._Z17compute_f_elasticPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_IdLin1ELi1ELi0ELin1ELi1EEEi = external hidden unnamed_addr constant [110 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [42 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: nounwind
declare double @sqrt(double noundef) #1

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen9DenseBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEE3colEl(ptr dead_on_unwind noalias writable sret(%"class.Eigen::Block") align 8, ptr noundef nonnull align 1 dereferenceable(1), i64 noundef) #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17compute_f_elasticPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_IdLin1ELi1ELi0ELin1ELi1EEEi(ptr noundef %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %4) #4 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.Eigen::Matrix", align 16
  %15 = alloca %"class.Eigen::CwiseBinaryOp.63", align 8
  %16 = alloca %"class.Eigen::Block", align 8
  %17 = alloca %"class.Eigen::Block", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.SCurve, ptr %18, i32 0, i32 0
  %20 = load i8, ptr %19, align 8, !tbaa !11, !range !21, !noundef !22
  %21 = trunc i8 %20 to i1
  br i1 %21, label %22, label %26

22:                                               ; preds = %5
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.SCurve, ptr %23, i32 0, i32 1
  %25 = load i32, ptr %24, align 4, !tbaa !23
  br label %31

26:                                               ; preds = %5
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.SCurve, ptr %27, i32 0, i32 1
  %29 = load i32, ptr %28, align 4, !tbaa !23
  %30 = sub nsw i32 %29, 1
  br label %31

31:                                               ; preds = %26, %22
  %32 = phi i32 [ %25, %22 ], [ %30, %26 ]
  store i32 %32, ptr %11, align 4, !tbaa !9
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = call noundef i64 @_ZNK5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEEE4rowsEv(ptr noundef nonnull align 8 dereferenceable(16) %33)
  %35 = load i32, ptr %11, align 4, !tbaa !9
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = add nsw i32 %35, %36
  %38 = sext i32 %37 to i64
  %39 = icmp sge i64 %34, %38
  br i1 %39, label %40, label %41

40:                                               ; preds = %31
  br label %43

41:                                               ; preds = %31
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 188, ptr noundef @__PRETTY_FUNCTION__._Z17compute_f_elasticPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_IdLin1ELi1ELi0ELin1ELi1EEEi) #6
  unreachable

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %40
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.SCurve, ptr %44, i32 0, i32 1
  %46 = load i32, ptr %45, align 4, !tbaa !23
  %47 = sext i32 %46 to i64
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = call noundef i64 @_ZNK5Eigen15PlainObjectBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEE4colsEv(ptr noundef nonnull align 8 dereferenceable(16) %48)
  %50 = icmp eq i64 %47, %49
  br i1 %50, label %51, label %52

51:                                               ; preds = %43
  br label %54

52:                                               ; preds = %43
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 189, ptr noundef @__PRETTY_FUNCTION__._Z17compute_f_elasticPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_IdLin1ELi1ELi0ELin1ELi1EEEi) #6
  unreachable

53:                                               ; No predecessors!
  br label %54

54:                                               ; preds = %53, %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %55

55:                                               ; preds = %101, %54
  %56 = load i32, ptr %12, align 4, !tbaa !9
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %104

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %61 = load i32, ptr %12, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.SCurve, ptr %63, i32 0, i32 1
  %65 = load i32, ptr %64, align 4, !tbaa !23
  %66 = srem i32 %62, %65
  store i32 %66, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = load i32, ptr %13, align 4, !tbaa !9
  %69 = sext i32 %68 to i64
  call void @_ZNK5Eigen9DenseBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEE3colEl(ptr dead_on_unwind writable sret(%"class.Eigen::Block") align 8 %16, ptr noundef nonnull align 1 dereferenceable(1) %67, i64 noundef %69)
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #5
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = load i32, ptr %12, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  call void @_ZNK5Eigen9DenseBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEE3colEl(ptr dead_on_unwind writable sret(%"class.Eigen::Block") align 8 %17, ptr noundef nonnull align 1 dereferenceable(1) %70, i64 noundef %72)
  call void @_ZNK5Eigen10MatrixBaseINS_5BlockIKNS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEELi2ELi1ELb1EEEEmiIS5_EEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKS5_KT_EERKNS0_ISD_EE(ptr dead_on_unwind writable sret(%"class.Eigen::CwiseBinaryOp.63") align 8 %15, ptr noundef nonnull align 1 dereferenceable(1) %16, ptr noundef nonnull align 1 dereferenceable(1) %17)
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKNS_5BlockIKNS0_IdLi2ELin1ELi0ELi2ELin1EEELi2ELi1ELb1EEESB_EEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16) %14, ptr noundef nonnull align 1 dereferenceable(1) %15)
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %15) #5
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.SParameters, ptr %73, i32 0, i32 0
  %75 = load double, ptr %74, align 8, !tbaa !24
  %76 = fmul double 5.000000e-01, %75
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.SCurve, ptr %77, i32 0, i32 3
  %79 = load i32, ptr %12, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi0EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %78, i64 noundef %80)
  %82 = load double, ptr %81, align 8, !tbaa !29
  %83 = fmul double %76, %82
  %84 = call double @sqrt(double noundef %83) #5
  %85 = call noundef double @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEE4normEv(ptr noundef nonnull align 1 dereferenceable(1) %14)
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.SCurve, ptr %86, i32 0, i32 3
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = sext i32 %88 to i64
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi0EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %87, i64 noundef %89)
  %91 = load double, ptr %90, align 8, !tbaa !29
  %92 = fdiv double %85, %91
  %93 = fsub double %92, 1.000000e+00
  %94 = fmul double %84, %93
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = load i32, ptr %12, align 4, !tbaa !9
  %97 = load i32, ptr %10, align 4, !tbaa !9
  %98 = add nsw i32 %96, %97
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi1EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %95, i64 noundef %99)
  store double %94, ptr %100, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %101

101:                                              ; preds = %60
  %102 = load i32, ptr %12, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %12, align 4, !tbaa !9
  br label %55, !llvm.loop !30

104:                                              ; preds = %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  ret void
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen10MatrixBaseINS_5BlockIKNS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEELi2ELi1ELb1EEEEmiIS5_EEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKS5_KT_EERKNS0_ISD_EE(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseBinaryOp.63") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKNS_5BlockIKNS0_IdLi2ELin1ELi0ELi2ELin1EEELi2ELi1ELb1EEESB_EEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 #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 = { nounwind }
attributes #6 = { 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 = !{!"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, !13, i64 0}
!12 = !{!"_ZTS6SCurve", !13, i64 0, !10, i64 4, !14, i64 8, !14, i64 24, !18, i64 40}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN5Eigen6MatrixIdLin1ELi1ELi0ELin1ELi1EEE", !15, i64 0}
!15 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEEEE", !16, i64 0}
!16 = !{!"_ZTSN5Eigen12DenseStorageIdLin1ELin1ELi1ELi0EEE", !6, i64 0, !17, i64 8}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEE", !19, i64 0}
!19 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEE", !20, i64 0}
!20 = !{!"_ZTSN5Eigen12DenseStorageIiLin1ELin1ELi1ELi0EEE", !6, i64 0, !17, i64 8}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!12, !10, i64 4}
!24 = !{!25, !26, i64 0}
!25 = !{!"_ZTS11SParameters", !26, i64 0, !26, i64 8, !26, i64 16, !26, i64 24, !27, i64 32, !28, i64 48, !10, i64 80, !26, i64 88, !26, i64 96, !26, i64 104, !26, i64 112, !10, i64 120, !26, i64 128}
!26 = !{!"double", !7, i64 0}
!27 = !{!"_ZTSN9_BlueTail6_Image6SImageIdLi1EEE", !10, i64 0, !10, i64 4, !6, i64 8}
!28 = !{!"_ZTS7SRegion", !26, i64 0, !26, i64 8, !26, i64 16, !26, i64 24}
!29 = !{!26, !26, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"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.Eigen::Block" = type { %"class.Eigen::BlockImpl" }
%"class.Eigen::BlockImpl" = type { %"class.Eigen::internal::BlockImpl_dense" }
%"class.Eigen::internal::BlockImpl_dense" = type { %"class.Eigen::MapBase.base", ptr, i64 }
%"class.Eigen::MapBase.base" = type <{ ptr, [2 x i8] }>
%"class.Eigen::Matrix" = type { %"class.Eigen::PlainObjectBase" }
%"class.Eigen::PlainObjectBase" = type { %"class.Eigen::DenseStorage" }
%"class.Eigen::DenseStorage" = type { %"struct.Eigen::internal::plain_array" }
%"struct.Eigen::internal::plain_array" = type { [2 x double] }
%"class.Eigen::CwiseBinaryOp.63" = type <{ %"class.Eigen::Block", %"class.Eigen::Block", [8 x i8] }>

@.str.1 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@__PRETTY_FUNCTION__._Z17compute_f_elasticPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_IdLin1ELi1ELi0ELin1ELi1EEEi = external hidden unnamed_addr constant [110 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [42 x i8], align 1

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen9DenseBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEE3colEl(ptr dead_on_unwind noalias writable sret(%"class.Eigen::Block") align 8, ptr noundef nonnull align 1 dereferenceable(1), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17compute_f_elasticPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_IdLin1ELi1ELi0ELin1ELi1EEEi(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %3, i32 noundef %4) local_unnamed_addr #4 {
  %6 = alloca %"class.Eigen::Matrix", align 16
  %7 = alloca %"class.Eigen::CwiseBinaryOp.63", align 8
  %8 = alloca %"class.Eigen::Block", align 8
  %9 = alloca %"class.Eigen::Block", align 8
  %10 = load i8, ptr %1, align 8, !tbaa !5, !range !19, !noundef !20
  %11 = getelementptr inbounds i8, ptr %1, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !21
  %13 = xor i8 %10, 1
  %14 = zext nneg i8 %13 to i32
  %15 = sub i32 %12, %14
  %16 = tail call noundef i64 @_ZNK5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEEE4rowsEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %17 = add nsw i32 %15, %4
  %18 = sext i32 %17 to i64
  %.not = icmp slt i64 %16, %18
  br i1 %.not, label %19, label %20

19:                                               ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 188, ptr noundef nonnull @__PRETTY_FUNCTION__._Z17compute_f_elasticPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_IdLin1ELi1ELi0ELin1ELi1EEEi) #5
  unreachable

20:                                               ; preds = %5
  %21 = getelementptr inbounds i8, ptr %1, i64 4
  %22 = load i32, ptr %21, align 4, !tbaa !21
  %23 = sext i32 %22 to i64
  %24 = tail call noundef i64 @_ZNK5Eigen15PlainObjectBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEE4colsEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %25 = icmp eq i64 %24, %23
  br i1 %25, label %.preheader, label %29

.preheader:                                       ; preds = %20
  %26 = icmp sgt i32 %15, 0
  br i1 %26, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader
  %27 = getelementptr inbounds i8, ptr %1, i64 24
  %28 = sext i32 %4 to i64
  %wide.trip.count = zext nneg i32 %15 to i64
  br label %30

29:                                               ; preds = %20
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 189, ptr noundef nonnull @__PRETTY_FUNCTION__._Z17compute_f_elasticPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_IdLin1ELi1ELi0ELin1ELi1EEEi) #5
  unreachable

._crit_edge:                                      ; preds = %30, %.preheader
  ret void

30:                                               ; preds = %.lr.ph, %30
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %30 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = load i32, ptr %21, align 4, !tbaa !21
  %32 = trunc nuw nsw i64 %indvars.iv.next to i32
  %33 = srem i32 %32, %31
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  %34 = zext nneg i32 %33 to i64
  call void @_ZNK5Eigen9DenseBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEE3colEl(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::Block") align 8 %8, ptr noundef nonnull align 1 dereferenceable(1) %2, i64 noundef %34)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #6
  call void @_ZNK5Eigen9DenseBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEE3colEl(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::Block") align 8 %9, ptr noundef nonnull align 1 dereferenceable(1) %2, i64 noundef %indvars.iv)
  call void @_ZNK5Eigen10MatrixBaseINS_5BlockIKNS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEELi2ELi1ELb1EEEEmiIS5_EEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKS5_KT_EERKNS0_ISD_EE(ptr dead_on_unwind nonnull writable sret(%"class.Eigen::CwiseBinaryOp.63") align 8 %7, ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKNS_5BlockIKNS0_IdLi2ELin1ELi0ELi2ELin1EEELi2ELi1ELb1EEESB_EEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7) #6
  %35 = load double, ptr %0, align 8, !tbaa !22
  %36 = fmul double %35, 5.000000e-01
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi0EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %27, i64 noundef %indvars.iv)
  %38 = load double, ptr %37, align 8, !tbaa !27
  %39 = fmul double %36, %38
  %40 = call double @sqrt(double noundef %39) #6
  %41 = call noundef double @_ZNK5Eigen10MatrixBaseINS_6MatrixIdLi2ELi1ELi0ELi2ELi1EEEE4normEv(ptr noundef nonnull align 1 dereferenceable(1) %6)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi0EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %27, i64 noundef %indvars.iv)
  %43 = load double, ptr %42, align 8, !tbaa !27
  %44 = fdiv double %41, %43
  %45 = fadd double %44, -1.000000e+00
  %46 = fmul double %40, %45
  %47 = add nsw i64 %indvars.iv, %28
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi1EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %3, i64 noundef %47)
  store double %46, ptr %48, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %30, !llvm.loop !28
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNK5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEEE4rowsEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNK5Eigen15PlainObjectBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEE4colsEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Eigen10MatrixBaseINS_5BlockIKNS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEELi2ELi1ELb1EEEEmiIS5_EEKNS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKS5_KT_EERKNS0_ISD_EE(ptr dead_on_unwind noalias writable sret(%"class.Eigen::CwiseBinaryOp.63") align 8, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_13CwiseBinaryOpINS_8internal20scalar_difference_opIdEEKNS_5BlockIKNS0_IdLi2ELin1ELi0ELi2ELin1EEELi2ELi1ELb1EEESB_EEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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, !7, i64 0}
!6 = !{!"_ZTS6SCurve", !7, i64 0, !10, i64 4, !11, i64 8, !11, i64 24, !16, i64 40}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTSN5Eigen6MatrixIdLin1ELi1ELi0ELin1ELi1EEE", !12, i64 0}
!12 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEEEE", !13, i64 0}
!13 = !{!"_ZTSN5Eigen12DenseStorageIdLin1ELin1ELi1ELi0EEE", !14, i64 0, !15, i64 8}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!"_ZTSN5Eigen6MatrixIiLin1ELi1ELi0ELin1ELi1EEE", !17, i64 0}
!17 = !{!"_ZTSN5Eigen15PlainObjectBaseINS_6MatrixIiLin1ELi1ELi0ELin1ELi1EEEEE", !18, i64 0}
!18 = !{!"_ZTSN5Eigen12DenseStorageIiLin1ELin1ELi1ELi0EEE", !14, i64 0, !15, i64 8}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!6, !10, i64 4}
!22 = !{!23, !24, i64 0}
!23 = !{!"_ZTS11SParameters", !24, i64 0, !24, i64 8, !24, i64 16, !24, i64 24, !25, i64 32, !26, i64 48, !10, i64 80, !24, i64 88, !24, i64 96, !24, i64 104, !24, i64 112, !10, i64 120, !24, i64 128}
!24 = !{!"double", !8, i64 0}
!25 = !{!"_ZTSN9_BlueTail6_Image6SImageIdLi1EEE", !10, i64 0, !10, i64 4, !14, i64 8}
!26 = !{!"_ZTS7SRegion", !24, i64 0, !24, i64 8, !24, i64 16, !24, i64 24}
!27 = !{!24, !24, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


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