; 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] }
%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
@.str.4 = external hidden unnamed_addr constant [42 x i8], align 1
@__PRETTY_FUNCTION__._Z13compute_f_fitPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_IdLin1ELi1ELi0ELin1ELi1EEEi = external hidden unnamed_addr constant [106 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: mustprogress uwtable
declare dso_local noundef double @_Z23integrateDF2OverSegmentPK11SParametersRKN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEES6_d(ptr noundef, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16), double noundef) #3

; 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) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_5BlockIKNS0_IdLi2ELin1ELi0ELi2ELin1EEELi2ELi1ELb1EEEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 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) #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNK5Eigen15PlainObjectBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEE4colsEv(ptr noundef nonnull align 8 dereferenceable(16)) #4 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) #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13compute_f_fitPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_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) #3 {
  %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 double, align 8
  %15 = alloca %"class.Eigen::Matrix", align 16
  %16 = alloca %"class.Eigen::Block", align 8
  %17 = alloca %"class.Eigen::Matrix", align 16
  %18 = 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
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.SCurve, ptr %19, i32 0, i32 0
  %21 = load i8, ptr %20, align 8, !tbaa !11, !range !21, !noundef !22
  %22 = trunc i8 %21 to i1
  br i1 %22, label %23, label %27

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

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

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

41:                                               ; preds = %32
  br label %44

42:                                               ; preds = %32
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 235, ptr noundef @__PRETTY_FUNCTION__._Z13compute_f_fitPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_IdLin1ELi1ELi0ELin1ELi1EEEi) #6
  unreachable

43:                                               ; No predecessors!
  br label %44

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

52:                                               ; preds = %44
  br label %55

53:                                               ; preds = %44
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 236, ptr noundef @__PRETTY_FUNCTION__._Z13compute_f_fitPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_IdLin1ELi1ELi0ELin1ELi1EEEi) #6
  unreachable

54:                                               ; No predecessors!
  br label %55

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

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

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

61:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %62 = load i32, ptr %12, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.SCurve, ptr %64, i32 0, i32 1
  %66 = load i32, ptr %65, align 4, !tbaa !23
  %67 = srem i32 %63, %66
  store i32 %67, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = load i32, ptr %12, align 4, !tbaa !9
  %71 = sext i32 %70 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) %69, i64 noundef %71)
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_5BlockIKNS0_IdLi2ELin1ELi0ELi2ELin1EEELi2ELi1ELb1EEEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16) %15, ptr noundef nonnull align 1 dereferenceable(1) %16)
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #5
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = load i32, ptr %13, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  call void @_ZNK5Eigen9DenseBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEE3colEl(ptr dead_on_unwind writable sret(%"class.Eigen::Block") align 8 %18, ptr noundef nonnull align 1 dereferenceable(1) %72, i64 noundef %74)
  call void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_5BlockIKNS0_IdLi2ELin1ELi0ELi2ELin1EEELi2ELi1ELb1EEEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16) %17, ptr noundef nonnull align 1 dereferenceable(1) %18)
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.SCurve, ptr %75, i32 0, i32 3
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK5Eigen15DenseCoeffsBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi0EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %76, i64 noundef %78)
  %80 = load double, ptr %79, align 8, !tbaa !24
  %81 = call noundef double @_Z23integrateDF2OverSegmentPK11SParametersRKN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEES6_d(ptr noundef %68, ptr noundef nonnull align 16 dereferenceable(16) %15, ptr noundef nonnull align 16 dereferenceable(16) %17, double noundef %80)
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  store double %81, ptr %14, align 8, !tbaa !24
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.SParameters, ptr %82, i32 0, i32 2
  %84 = load double, ptr %83, align 8, !tbaa !26
  %85 = fmul double %84, 5.000000e-01
  %86 = call double @sqrt(double noundef %85) #5
  %87 = load double, ptr %14, align 8, !tbaa !24
  %88 = call double @sqrt(double noundef %87) #5
  %89 = fmul double %86, %88
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = load i32, ptr %12, align 4, !tbaa !9
  %92 = load i32, ptr %10, align 4, !tbaa !9
  %93 = add nsw i32 %91, %92
  %94 = sext i32 %93 to i64
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN5Eigen15DenseCoeffsBaseINS_6MatrixIdLin1ELi1ELi0ELin1ELi1EEELi1EEclEl(ptr noundef nonnull align 1 dereferenceable(1) %90, i64 noundef %94)
  store double %89, ptr %95, align 8, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %96

96:                                               ; preds = %61
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = add nsw i32 %97, 1
  store i32 %98, ptr %12, align 4, !tbaa !9
  br label %56, !llvm.loop !30

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

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 = { 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 = { 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 #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, !25, i64 0}
!25 = !{!"double", !7, i64 0}
!26 = !{!27, !25, i64 16}
!27 = !{!"_ZTS11SParameters", !25, i64 0, !25, i64 8, !25, i64 16, !25, i64 24, !28, i64 32, !29, i64 48, !10, i64 80, !25, i64 88, !25, i64 96, !25, i64 104, !25, i64 112, !10, i64 120, !25, i64 128}
!28 = !{!"_ZTSN9_BlueTail6_Image6SImageIdLi1EEE", !10, i64 0, !10, i64 4, !6, i64 8}
!29 = !{!"_ZTS7SRegion", !25, i64 0, !25, i64 8, !25, i64 16, !25, i64 24}
!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] }

@.str.1 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [42 x i8], align 1
@__PRETTY_FUNCTION__._Z13compute_f_fitPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_IdLin1ELi1ELi0ELin1ELi1EEEi = external hidden unnamed_addr constant [106 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: mustprogress uwtable
declare dso_local noundef double @_Z23integrateDF2OverSegmentPK11SParametersRKN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEES6_d(ptr noundef, ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 16 dereferenceable(16), double noundef) local_unnamed_addr #3

; 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 #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN5Eigen6MatrixIdLi2ELi1ELi0ELi2ELi1EEC2INS_5BlockIKNS0_IdLi2ELin1ELi0ELi2ELin1EEELi2ELi1ELb1EEEEERKNS_10MatrixBaseIT_EE(ptr noundef nonnull align 16 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 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 #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZNK5Eigen15PlainObjectBaseINS_6MatrixIdLi2ELin1ELi0ELi2ELin1EEEE4colsEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 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 #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13compute_f_fitPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_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) local_unnamed_addr #3 {
  %6 = alloca %"class.Eigen::Matrix", align 16
  %7 = alloca %"class.Eigen::Block", align 8
  %8 = alloca %"class.Eigen::Matrix", align 16
  %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 235, ptr noundef nonnull @__PRETTY_FUNCTION__._Z13compute_f_fitPK11SParametersPK6SCurveRKN5Eigen6MatrixIdLi2ELin1ELi0ELi2ELin1EEERNS6_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 %30

.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 = getelementptr inbounds i8, ptr %0, i64 16
  %29 = sext i32 %4 to i64
  %wide.trip.count = zext nneg i32 %15 to i64
  br label %31

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

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

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

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 = { 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 = { 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 #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, !23, i64 0}
!23 = !{!"double", !8, i64 0}
!24 = !{!25, !23, i64 16}
!25 = !{!"_ZTS11SParameters", !23, i64 0, !23, i64 8, !23, i64 16, !23, i64 24, !26, i64 32, !27, i64 48, !10, i64 80, !23, i64 88, !23, i64 96, !23, i64 104, !23, i64 112, !10, i64 120, !23, i64 128}
!26 = !{!"_ZTSN9_BlueTail6_Image6SImageIdLi1EEE", !10, i64 0, !10, i64 4, !14, i64 8}
!27 = !{!"_ZTS7SRegion", !23, i64 0, !23, i64 8, !23, i64 16, !23, i64 24}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


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