; LLVM IR from dtecta/motion-toolkit :: curve/ConicBezierSplineCurve.ll (ZNK2cv22ConicBezierSplineCurve4evalEf)

; 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.mt::Vector3" = type { %"class.mt::Dual", %"class.mt::Dual", %"class.mt::Dual" }
%"class.mt::Dual" = type { float, float }
%"class.cv::SplineCurve" = type { %"class.cv::Curve", %"class.std::vector" }
%"class.cv::Curve" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<mt::Vector3<float>, std::allocator<mt::Vector3<float>>>::_Vector_impl" }
%"struct.std::_Vector_base<mt::Vector3<float>, std::allocator<mt::Vector3<float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<mt::Vector3<float>, std::allocator<mt::Vector3<float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<mt::Vector3<float>, std::allocator<mt::Vector3<float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.mt::Vector3.0" = type { float, float, float }

@.str = external hidden unnamed_addr constant [40 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@__PRETTY_FUNCTION__._ZNK2cv22ConicBezierSplineCurve4evalEf = external hidden unnamed_addr constant [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [46 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK2cv22ConicBezierSplineCurve4evalEf(ptr dead_on_unwind noalias writable sret(%"class.mt::Vector3") align 4 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, float noundef %2) unnamed_addr #0 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"class.mt::Dual", align 4
  %12 = alloca %"class.mt::Dual", align 4
  %13 = alloca %"class.mt::Vector3", align 4
  %14 = alloca %"class.mt::Vector3", align 4
  %15 = alloca %"class.mt::Dual", align 4
  %16 = alloca %"class.mt::Dual", align 4
  %17 = alloca %"class.mt::Vector3", align 4
  %18 = alloca %"class.mt::Dual", align 4
  %19 = alloca %"class.mt::Dual", align 4
  %20 = alloca %"class.mt::Vector3", align 4
  %21 = alloca %"class.mt::Dual", align 4
  %22 = alloca %"class.mt::Dual", align 4
  store ptr %1, ptr %4, align 8, !tbaa !5
  store float %2, ptr %5, align 4, !tbaa !9
  %23 = load ptr, ptr %4, align 8
  %24 = load float, ptr %5, align 4, !tbaa !9
  %25 = fcmp ole float 0.000000e+00, %24
  br i1 %25, label %26, label %29

26:                                               ; preds = %3
  %27 = load float, ptr %5, align 4, !tbaa !9
  %28 = fcmp ole float %27, 1.000000e+00
  br label %29

29:                                               ; preds = %26, %3
  %30 = phi i1 [ false, %3 ], [ %28, %26 ]
  br i1 %30, label %31, label %32

31:                                               ; preds = %29
  br label %34

32:                                               ; preds = %29
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 17, ptr noundef @__PRETTY_FUNCTION__._ZNK2cv22ConicBezierSplineCurve4evalEf) #8
  unreachable

33:                                               ; No predecessors!
  br label %34

34:                                               ; preds = %33, %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  %35 = getelementptr inbounds %"class.cv::SplineCurve", ptr %23, i32 0, i32 1
  %36 = call noundef i64 @_ZNKSt6vectorIN2mt7Vector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #9
  %37 = sub i64 %36, 1
  %38 = udiv i64 %37, 2
  %39 = uitofp i64 %38 to float
  store float %39, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  %40 = load float, ptr %5, align 4, !tbaa !9
  %41 = load float, ptr %6, align 4, !tbaa !9
  %42 = fmul float %40, %41
  %43 = call noundef float @_ZSt4modffPf(float noundef %42, ptr noundef %7)
  store float %43, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %44 = load float, ptr %7, align 4, !tbaa !9
  %45 = fptosi float %44 to i32
  %46 = mul nsw i32 %45, 2
  store i32 %46, ptr %9, align 4, !tbaa !11
  %47 = load i32, ptr %9, align 4, !tbaa !11
  %48 = add nsw i32 %47, 1
  %49 = getelementptr inbounds %"class.cv::SplineCurve", ptr %23, i32 0, i32 1
  %50 = call noundef i64 @_ZNKSt6vectorIN2mt7Vector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #9
  %51 = trunc i64 %50 to i32
  %52 = icmp eq i32 %48, %51
  br i1 %52, label %53, label %58

53:                                               ; preds = %34
  %54 = load float, ptr %8, align 4, !tbaa !9
  %55 = fadd float %54, 1.000000e+00
  store float %55, ptr %8, align 4, !tbaa !9
  %56 = load i32, ptr %9, align 4, !tbaa !11
  %57 = sub nsw i32 %56, 2
  store i32 %57, ptr %9, align 4, !tbaa !11
  br label %58

58:                                               ; preds = %53, %34
  %59 = load float, ptr %8, align 4, !tbaa !9
  %60 = fcmp ole float 0.000000e+00, %59
  br i1 %60, label %61, label %64

61:                                               ; preds = %58
  %62 = load float, ptr %8, align 4, !tbaa !9
  %63 = fcmp ole float %62, 1.000000e+00
  br label %64

64:                                               ; preds = %61, %58
  %65 = phi i1 [ false, %58 ], [ %63, %61 ]
  br i1 %65, label %66, label %67

66:                                               ; preds = %64
  br label %69

67:                                               ; preds = %64
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 30, ptr noundef @__PRETTY_FUNCTION__._ZNK2cv22ConicBezierSplineCurve4evalEf) #8
  unreachable

68:                                               ; No predecessors!
  br label %69

69:                                               ; preds = %68, %66
  %70 = load i32, ptr %9, align 4, !tbaa !11
  %71 = icmp sle i32 0, %70
  br i1 %71, label %72, label %79

72:                                               ; preds = %69
  %73 = load i32, ptr %9, align 4, !tbaa !11
  %74 = add nsw i32 %73, 2
  %75 = getelementptr inbounds %"class.cv::SplineCurve", ptr %23, i32 0, i32 1
  %76 = call noundef i64 @_ZNKSt6vectorIN2mt7Vector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %75) #9
  %77 = trunc i64 %76 to i32
  %78 = icmp slt i32 %74, %77
  br label %79

79:                                               ; preds = %72, %69
  %80 = phi i1 [ false, %69 ], [ %78, %72 ]
  br i1 %80, label %81, label %82

81:                                               ; preds = %79
  br label %84

82:                                               ; preds = %79
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 31, ptr noundef @__PRETTY_FUNCTION__._ZNK2cv22ConicBezierSplineCurve4evalEf) #8
  unreachable

83:                                               ; No predecessors!
  br label %84

84:                                               ; preds = %83, %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %85 = getelementptr inbounds %"class.cv::SplineCurve", ptr %23, i32 0, i32 1
  %86 = load i32, ptr %9, align 4, !tbaa !11
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt6vectorIN2mt7Vector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %87) #9
  store ptr %88, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %89 = load float, ptr %8, align 4, !tbaa !9
  call void @_ZN2mt4DualIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef %89, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %90 = call <2 x float> @_ZN2mtmiIfEENS_4DualIT_EES2_RKS3_(float noundef 1.000000e+00, ptr noundef nonnull align 4 dereferenceable(8) %11)
  store <2 x float> %90, ptr %12, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #9
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = getelementptr inbounds %"class.mt::Vector3.0", ptr %91, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %12, i64 8, i1 false), !tbaa.struct !13
  %93 = load <2 x float>, ptr %16, align 4
  %94 = call <2 x float> @_ZN2mt6squareINS_4DualIfEEEET_S3_(<2 x float> %93)
  store <2 x float> %94, ptr %15, align 4
  %95 = load <2 x float>, ptr %15, align 4
  call void @_ZN2mtmlIfNS_4DualIfEEEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EES6_(ptr dead_on_unwind writable sret(%"class.mt::Vector3") align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %92, <2 x float> %95)
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #9
  %96 = load ptr, ptr %10, align 8, !tbaa !5
  %97 = getelementptr inbounds %"class.mt::Vector3.0", ptr %96, i64 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %98 = call <2 x float> @_ZN2mtmlIfEENS_4DualIT_EES2_RKS3_(float noundef 2.000000e+00, ptr noundef nonnull align 4 dereferenceable(8) %12)
  store <2 x float> %98, ptr %19, align 4
  %99 = call <2 x float> @_ZN2mtmlIffEENS_4DualINS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %11)
  store <2 x float> %99, ptr %18, align 4
  %100 = load <2 x float>, ptr %18, align 4
  call void @_ZN2mtmlIfNS_4DualIfEEEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EES6_(ptr dead_on_unwind writable sret(%"class.mt::Vector3") align 4 %17, ptr noundef nonnull align 4 dereferenceable(12) %97, <2 x float> %100)
  call void @_ZN2mtplINS_4DualIfEES2_EENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EERKNS3_IS6_EE(ptr dead_on_unwind writable sret(%"class.mt::Vector3") align 4 %13, ptr noundef nonnull align 4 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(24) %17)
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #9
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = getelementptr inbounds %"class.mt::Vector3.0", ptr %101, i64 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %11, i64 8, i1 false), !tbaa.struct !13
  %103 = load <2 x float>, ptr %22, align 4
  %104 = call <2 x float> @_ZN2mt6squareINS_4DualIfEEEET_S3_(<2 x float> %103)
  store <2 x float> %104, ptr %21, align 4
  %105 = load <2 x float>, ptr %21, align 4
  call void @_ZN2mtmlIfNS_4DualIfEEEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EES6_(ptr dead_on_unwind writable sret(%"class.mt::Vector3") align 4 %20, ptr noundef nonnull align 4 dereferenceable(12) %102, <2 x float> %105)
  call void @_ZN2mtplINS_4DualIfEES2_EENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EERKNS3_IS6_EE(ptr dead_on_unwind writable sret(%"class.mt::Vector3") align 4 %0, ptr noundef nonnull align 4 dereferenceable(24) %13, ptr noundef nonnull align 4 dereferenceable(24) %20)
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  ret void
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4modffPf(float noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt6vectorIN2mt7Vector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN2mt4DualIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local <2 x float> @_ZN2mtmiIfEENS_4DualIT_EES2_RKS3_(float noundef, ptr noundef nonnull align 4 dereferenceable(8)) #6

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN2mtplINS_4DualIfEES2_EENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EERKNS3_IS6_EE(ptr dead_on_unwind noalias writable sret(%"class.mt::Vector3") align 4, ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24)) #6

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN2mtmlIfNS_4DualIfEEEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EES6_(ptr dead_on_unwind noalias writable sret(%"class.mt::Vector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), <2 x float>) #6

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local <2 x float> @_ZN2mt6squareINS_4DualIfEEEET_S3_(<2 x float>) #6

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local <2 x float> @_ZN2mtmlIffEENS_4DualINS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #6

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local <2 x float> @_ZN2mtmlIfEENS_4DualIT_EES2_RKS3_(float noundef, ptr noundef nonnull align 4 dereferenceable(8)) #6

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { alwaysinline 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 #6 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="64" "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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { noreturn nounwind }
attributes #9 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 4, !9, i64 4, i64 4, !9}


; 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.mt::Vector3" = type { %"class.mt::Dual", %"class.mt::Dual", %"class.mt::Dual" }
%"class.mt::Dual" = type { float, float }

@.str = external hidden unnamed_addr constant [40 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@__PRETTY_FUNCTION__._ZNK2cv22ConicBezierSplineCurve4evalEf = external hidden unnamed_addr constant [67 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [46 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK2cv22ConicBezierSplineCurve4evalEf(ptr dead_on_unwind noalias writable sret(%"class.mt::Vector3") align 4 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, float noundef %2) unnamed_addr #0 align 2 {
  %4 = alloca float, align 4
  %5 = alloca %"class.mt::Dual", align 8
  %6 = alloca %"class.mt::Dual", align 8
  %7 = alloca %"class.mt::Vector3", align 4
  %8 = alloca %"class.mt::Vector3", align 4
  %9 = alloca %"class.mt::Vector3", align 4
  %10 = alloca %"class.mt::Dual", align 8
  %11 = alloca %"class.mt::Vector3", align 4
  %12 = fcmp oge float %2, 0.000000e+00
  %13 = fcmp ole float %2, 1.000000e+00
  %14 = and i1 %12, %13
  br i1 %14, label %16, label %15

15:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 17, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK2cv22ConicBezierSplineCurve4evalEf) #7
  unreachable

16:                                               ; preds = %3
  %17 = getelementptr inbounds i8, ptr %1, i64 8
  %18 = tail call noundef i64 @_ZNKSt6vectorIN2mt7Vector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  %19 = add i64 %18, -1
  %20 = lshr i64 %19, 1
  %21 = uitofp nneg i64 %20 to float
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %22 = fmul float %21, %2
  %23 = call noundef float @_ZSt4modffPf(float noundef %22, ptr noundef nonnull %4)
  %24 = load float, ptr %4, align 4, !tbaa !5
  %25 = fptosi float %24 to i32
  %26 = shl nsw i32 %25, 1
  %27 = or disjoint i32 %26, 1
  %28 = call noundef i64 @_ZNKSt6vectorIN2mt7Vector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  %29 = trunc i64 %28 to i32
  %30 = icmp eq i32 %27, %29
  %31 = fadd float %23, 1.000000e+00
  %32 = add nsw i32 %26, -2
  %.020 = select i1 %30, i32 %32, i32 %26
  %.0 = select i1 %30, float %31, float %23
  %33 = fcmp oge float %.0, 0.000000e+00
  %34 = fcmp ole float %.0, 1.000000e+00
  %35 = and i1 %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %16
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 30, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK2cv22ConicBezierSplineCurve4evalEf) #7
  unreachable

37:                                               ; preds = %16
  %38 = icmp sgt i32 %.020, -1
  br i1 %38, label %39, label %.critedge

39:                                               ; preds = %37
  %40 = add nuw nsw i32 %.020, 2
  %41 = call noundef i64 @_ZNKSt6vectorIN2mt7Vector3IfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #8
  %42 = trunc i64 %41 to i32
  %43 = icmp slt i32 %40, %42
  br i1 %43, label %44, label %.critedge

.critedge:                                        ; preds = %37, %39
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 31, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK2cv22ConicBezierSplineCurve4evalEf) #7
  unreachable

44:                                               ; preds = %39
  %45 = zext nneg i32 %.020 to i64
  %46 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt6vectorIN2mt7Vector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %45) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  call void @_ZN2mt4DualIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %5, float noundef %.0, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %47 = call <2 x float> @_ZN2mtmiIfEENS_4DualIT_EES2_RKS3_(float noundef 1.000000e+00, ptr noundef nonnull align 4 dereferenceable(8) %5)
  store <2 x float> %47, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #8
  %48 = call <2 x float> @_ZN2mt6squareINS_4DualIfEEEET_S3_(<2 x float> %47)
  call void @_ZN2mtmlIfNS_4DualIfEEEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EES6_(ptr dead_on_unwind nonnull writable sret(%"class.mt::Vector3") align 4 %8, ptr noundef nonnull align 4 dereferenceable(12) %46, <2 x float> %48)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #8
  %49 = getelementptr inbounds i8, ptr %46, i64 12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %50 = call <2 x float> @_ZN2mtmlIfEENS_4DualIT_EES2_RKS3_(float noundef 2.000000e+00, ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %50, ptr %10, align 8
  %51 = call <2 x float> @_ZN2mtmlIffEENS_4DualINS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @_ZN2mtmlIfNS_4DualIfEEEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EES6_(ptr dead_on_unwind nonnull writable sret(%"class.mt::Vector3") align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %49, <2 x float> %51)
  call void @_ZN2mtplINS_4DualIfEES2_EENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EERKNS3_IS6_EE(ptr dead_on_unwind nonnull writable sret(%"class.mt::Vector3") align 4 %7, ptr noundef nonnull align 4 dereferenceable(24) %8, ptr noundef nonnull align 4 dereferenceable(24) %9)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #8
  %52 = getelementptr inbounds i8, ptr %46, i64 24
  %.sroa.0.0.copyload = load <2 x float>, ptr %5, align 8
  %53 = call <2 x float> @_ZN2mt6squareINS_4DualIfEEEET_S3_(<2 x float> %.sroa.0.0.copyload)
  call void @_ZN2mtmlIfNS_4DualIfEEEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EES6_(ptr dead_on_unwind nonnull writable sret(%"class.mt::Vector3") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %52, <2 x float> %53)
  call void @_ZN2mtplINS_4DualIfEES2_EENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EERKNS3_IS6_EE(ptr dead_on_unwind writable sret(%"class.mt::Vector3") align 4 %0, ptr noundef nonnull align 4 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(24) %11)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  ret void
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4modffPf(float noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZNKSt6vectorIN2mt7Vector3IfEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN2mt4DualIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local <2 x float> @_ZN2mtmiIfEENS_4DualIT_EES2_RKS3_(float noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN2mtplINS_4DualIfEES2_EENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EERKNS3_IS6_EE(ptr dead_on_unwind noalias writable sret(%"class.mt::Vector3") align 4, ptr noundef nonnull align 4 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #6

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN2mtmlIfNS_4DualIfEEEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS3_IS5_EES6_(ptr dead_on_unwind noalias writable sret(%"class.mt::Vector3") align 4, ptr noundef nonnull align 4 dereferenceable(12), <2 x float>) local_unnamed_addr #6

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local <2 x float> @_ZN2mt6squareINS_4DualIfEEEET_S3_(<2 x float>) local_unnamed_addr #6

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local <2 x float> @_ZN2mtmlIffEENS_4DualINS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local <2 x float> @_ZN2mtmlIfEENS_4DualIT_EES2_RKS3_(float noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #6

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { alwaysinline 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 #6 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="64" "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 #7 = { noreturn nounwind }
attributes #8 = { 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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass