; LLVM IR from dtecta/motion-toolkit :: curve (Extruder)

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN2mtmiIffEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN2mt4realIfEENS_7Vector3IT_EERKNS1_INS_4DualIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(24)) #1

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZN2mt13lengthSquaredINS_7Vector3IfEEEENT_10ScalarTypeERKS3_(ptr noundef nonnull align 4 dereferenceable(12)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2cv8Extruder12auxTesselateERKNS_5CurveERKN2mt7Vector3INS4_4DualIfEEEEfSA_ffRf(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(24) %2, float noundef %3, ptr noundef nonnull align 4 dereferenceable(24) %4, float noundef %5, float noundef %6, ptr noundef nonnull align 4 dereferenceable(4) %7) #3 align 2 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca float, align 4
  %13 = alloca ptr, align 8
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca ptr, align 8
  %17 = alloca float, align 4
  %18 = alloca %"class.mt::Vector3", align 4
  %19 = alloca %"class.mt::Vector3.0", align 4
  %20 = alloca %"class.mt::Vector3.0", align 4
  %21 = alloca { <2 x float>, float }, align 8
  %22 = alloca %"class.mt::Vector3.0", align 4
  %23 = alloca { <2 x float>, float }, align 8
  %24 = alloca { <2 x float>, float }, align 8
  %25 = alloca %"class.mt::Vector3.0", align 4
  %26 = alloca %"class.mt::Vector3.0", align 4
  %27 = alloca { <2 x float>, float }, align 8
  %28 = alloca %"class.mt::Vector3.0", align 4
  %29 = alloca { <2 x float>, float }, align 8
  %30 = alloca { <2 x float>, float }, align 8
  %31 = alloca float, align 4
  %32 = alloca %"class.mt::Vector3.0", align 4
  %33 = alloca { <2 x float>, float }, align 8
  %34 = alloca float, align 4
  %35 = alloca float, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store float %3, ptr %12, align 4, !tbaa !9
  store ptr %4, ptr %13, align 8, !tbaa !5
  store float %5, ptr %14, align 4, !tbaa !9
  store float %6, ptr %15, align 4, !tbaa !9
  store ptr %7, ptr %16, align 8, !tbaa !5
  %36 = load ptr, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %37 = load float, ptr %12, align 4, !tbaa !9
  %38 = load float, ptr %14, align 4, !tbaa !9
  %39 = fadd float %37, %38
  %40 = fmul float %39, 5.000000e-01
  store float %40, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #5
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = load float, ptr %17, align 4, !tbaa !9
  %43 = load ptr, ptr %41, align 8, !tbaa !11
  %44 = getelementptr inbounds ptr, ptr %43, i64 2
  %45 = load ptr, ptr %44, align 8
  call void %45(ptr dead_on_unwind writable sret(%"class.mt::Vector3") align 4 %18, ptr noundef nonnull align 8 dereferenceable(8) %41, float noundef %42)
  call void @llvm.lifetime.start.p0(i64 12, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #5
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = call { <2 x float>, float } @_ZN2mt4realIfEENS_7Vector3IT_EERKNS1_INS_4DualIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(24) %46)
  store { <2 x float>, float } %47, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 8 %21, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #5
  %48 = call { <2 x float>, float } @_ZN2mt4realIfEENS_7Vector3IT_EERKNS1_INS_4DualIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(24) %18)
  store { <2 x float>, float } %48, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 8 %23, i64 12, i1 false)
  %49 = call { <2 x float>, float } @_ZN2mtmiIffEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %22)
  store { <2 x float>, float } %49, ptr %24, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 8 %24, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #5
  %50 = load ptr, ptr %13, align 8, !tbaa !5
  %51 = call { <2 x float>, float } @_ZN2mt4realIfEENS_7Vector3IT_EERKNS1_INS_4DualIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(24) %50)
  store { <2 x float>, float } %51, ptr %27, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 8 %27, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %28) #5
  %52 = call { <2 x float>, float } @_ZN2mt4realIfEENS_7Vector3IT_EERKNS1_INS_4DualIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(24) %18)
  store { <2 x float>, float } %52, ptr %29, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 8 %29, i64 12, i1 false)
  %53 = call { <2 x float>, float } @_ZN2mtmiIffEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(12) %26, ptr noundef nonnull align 4 dereferenceable(12) %28)
  store { <2 x float>, float } %53, ptr %30, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 8 %30, i64 12, i1 false)
  call void @llvm.lifetime.end.p0(i64 12, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %32) #5
  %54 = call { <2 x float>, float } @_ZN2mt5crossIffEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(12) %25)
  store { <2 x float>, float } %54, ptr %33, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 8 %33, i64 12, i1 false)
  %55 = call noundef float @_ZN2mt13lengthSquaredINS_7Vector3IfEEEENT_10ScalarTypeERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %32)
  call void @llvm.lifetime.end.p0(i64 12, ptr %32) #5
  store float %55, ptr %31, align 4, !tbaa !9
  %56 = load float, ptr %31, align 4, !tbaa !9
  %57 = load float, ptr %15, align 4, !tbaa !9
  %58 = getelementptr inbounds %"class.cv::Extruder", ptr %36, i32 0, i32 0
  %59 = load float, ptr %58, align 8, !tbaa !13
  %60 = fmul float %57, %59
  %61 = fcmp ogt float %56, %60
  br i1 %61, label %62, label %77

62:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  %63 = call noundef float @_ZN2mt13lengthSquaredINS_7Vector3IfEEEENT_10ScalarTypeERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %19)
  store float %63, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #5
  %64 = call noundef float @_ZN2mt13lengthSquaredINS_7Vector3IfEEEENT_10ScalarTypeERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %25)
  store float %64, ptr %35, align 4, !tbaa !9
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = load float, ptr %12, align 4, !tbaa !9
  %68 = load float, ptr %17, align 4, !tbaa !9
  %69 = load float, ptr %34, align 4, !tbaa !9
  %70 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN2cv8Extruder12auxTesselateERKNS_5CurveERKN2mt7Vector3INS4_4DualIfEEEEfSA_ffRf(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull align 4 dereferenceable(24) %66, float noundef %67, ptr noundef nonnull align 4 dereferenceable(24) %18, float noundef %68, float noundef %69, ptr noundef nonnull align 4 dereferenceable(4) %70)
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = load float, ptr %17, align 4, !tbaa !9
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = load float, ptr %14, align 4, !tbaa !9
  %75 = load float, ptr %35, align 4, !tbaa !9
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN2cv8Extruder12auxTesselateERKNS_5CurveERKN2mt7Vector3INS4_4DualIfEEEEfSA_ffRf(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull align 4 dereferenceable(24) %18, float noundef %72, ptr noundef nonnull align 4 dereferenceable(24) %73, float noundef %74, float noundef %75, ptr noundef nonnull align 4 dereferenceable(4) %76)
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  br label %89

77:                                               ; preds = %8
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  %80 = load float, ptr %79, align 4, !tbaa !9
  call void @_ZN2cv8Extruder9addSampleERKN2mt7Vector3INS1_4DualIfEEEEf(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef nonnull align 4 dereferenceable(24) %78, float noundef %80)
  %81 = load float, ptr %15, align 4, !tbaa !9
  %82 = fpext float %81 to double
  %83 = call double @sqrt(double noundef %82) #5
  %84 = load ptr, ptr %16, align 8, !tbaa !5
  %85 = load float, ptr %84, align 4, !tbaa !9
  %86 = fpext float %85 to double
  %87 = fadd double %86, %83
  %88 = fptrunc double %87 to float
  store float %88, ptr %84, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %77, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2cv8Extruder9addSampleERKN2mt7Vector3INS1_4DualIfEEEEf(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(24), float noundef) #3 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN2mt5crossIffEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1

; Function Attrs: nounwind
declare double @sqrt(double noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { 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 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN2cv8ExtruderE", !10, i64 0, !15, i64 8}
!15 = !{!"_ZTSSt6vectorIN2cv6SampleESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIN2cv6SampleESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN2cv6SampleESaIS1_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN2cv6SampleESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}


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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN2mtmiIffEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN2mt4realIfEENS_7Vector3IT_EERKNS1_INS_4DualIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(24)) local_unnamed_addr #1

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef float @_ZN2mt13lengthSquaredINS_7Vector3IfEEEENT_10ScalarTypeERKS3_(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2cv8Extruder12auxTesselateERKNS_5CurveERKN2mt7Vector3INS4_4DualIfEEEEfSA_ffRf(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(24) %2, float noundef %3, ptr noundef nonnull align 4 dereferenceable(24) %4, float noundef %5, float noundef %6, ptr noundef nonnull align 4 dereferenceable(4) %7) local_unnamed_addr #2 align 2 {
  %9 = alloca %"class.mt::Vector3", align 4
  %10 = alloca %"class.mt::Vector3.0", align 8
  %11 = alloca %"class.mt::Vector3.0", align 8
  %12 = alloca %"class.mt::Vector3.0", align 8
  %13 = alloca %"class.mt::Vector3.0", align 8
  %14 = alloca %"class.mt::Vector3.0", align 8
  %15 = alloca %"class.mt::Vector3.0", align 8
  %16 = alloca %"class.mt::Vector3.0", align 8
  %17 = fadd float %3, %5
  %18 = fmul float %17, 5.000000e-01
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  %19 = load ptr, ptr %1, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 16
  %21 = load ptr, ptr %20, align 8
  call void %21(ptr dead_on_unwind nonnull writable sret(%"class.mt::Vector3") align 4 %9, ptr noundef nonnull align 8 dereferenceable(8) %1, float noundef %18)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #4
  %22 = call { <2 x float>, float } @_ZN2mt4realIfEENS_7Vector3IT_EERKNS1_INS_4DualIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(24) %2)
  %.fca.0.extract23 = extractvalue { <2 x float>, float } %22, 0
  %.fca.1.extract24 = extractvalue { <2 x float>, float } %22, 1
  store <2 x float> %.fca.0.extract23, ptr %11, align 8
  %.sroa.226.0..sroa_idx = getelementptr inbounds i8, ptr %11, i64 8
  store float %.fca.1.extract24, ptr %.sroa.226.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #4
  %23 = call { <2 x float>, float } @_ZN2mt4realIfEENS_7Vector3IT_EERKNS1_INS_4DualIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(24) %9)
  %.fca.0.extract19 = extractvalue { <2 x float>, float } %23, 0
  %.fca.1.extract20 = extractvalue { <2 x float>, float } %23, 1
  store <2 x float> %.fca.0.extract19, ptr %12, align 8
  %.sroa.222.0..sroa_idx = getelementptr inbounds i8, ptr %12, i64 8
  store float %.fca.1.extract20, ptr %.sroa.222.0..sroa_idx, align 8
  %24 = call { <2 x float>, float } @_ZN2mtmiIffEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %12)
  %.fca.0.extract15 = extractvalue { <2 x float>, float } %24, 0
  %.fca.1.extract16 = extractvalue { <2 x float>, float } %24, 1
  store <2 x float> %.fca.0.extract15, ptr %10, align 8
  %.sroa.218.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  store float %.fca.1.extract16, ptr %.sroa.218.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #4
  %25 = call { <2 x float>, float } @_ZN2mt4realIfEENS_7Vector3IT_EERKNS1_INS_4DualIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(24) %4)
  %.fca.0.extract11 = extractvalue { <2 x float>, float } %25, 0
  %.fca.1.extract12 = extractvalue { <2 x float>, float } %25, 1
  store <2 x float> %.fca.0.extract11, ptr %14, align 8
  %.sroa.214.0..sroa_idx = getelementptr inbounds i8, ptr %14, i64 8
  store float %.fca.1.extract12, ptr %.sroa.214.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #4
  %26 = call { <2 x float>, float } @_ZN2mt4realIfEENS_7Vector3IT_EERKNS1_INS_4DualIS2_EEEE(ptr noundef nonnull align 4 dereferenceable(24) %9)
  %.fca.0.extract7 = extractvalue { <2 x float>, float } %26, 0
  %.fca.1.extract8 = extractvalue { <2 x float>, float } %26, 1
  store <2 x float> %.fca.0.extract7, ptr %15, align 8
  %.sroa.210.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 8
  store float %.fca.1.extract8, ptr %.sroa.210.0..sroa_idx, align 8
  %27 = call { <2 x float>, float } @_ZN2mtmiIffEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %15)
  %.fca.0.extract3 = extractvalue { <2 x float>, float } %27, 0
  %.fca.1.extract4 = extractvalue { <2 x float>, float } %27, 1
  store <2 x float> %.fca.0.extract3, ptr %13, align 8
  %.sroa.26.0..sroa_idx = getelementptr inbounds i8, ptr %13, i64 8
  store float %.fca.1.extract4, ptr %.sroa.26.0..sroa_idx, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #4
  %28 = call { <2 x float>, float } @_ZN2mt5crossIffEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %.fca.0.extract = extractvalue { <2 x float>, float } %28, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %28, 1
  store <2 x float> %.fca.0.extract, ptr %16, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 8
  store float %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %29 = call noundef float @_ZN2mt13lengthSquaredINS_7Vector3IfEEEENT_10ScalarTypeERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %16)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #4
  %30 = load float, ptr %0, align 8, !tbaa !8
  %31 = fmul float %30, %6
  %32 = fcmp ogt float %29, %31
  br i1 %32, label %33, label %36

33:                                               ; preds = %8
  %34 = call noundef float @_ZN2mt13lengthSquaredINS_7Vector3IfEEEENT_10ScalarTypeERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %10)
  %35 = call noundef float @_ZN2mt13lengthSquaredINS_7Vector3IfEEEENT_10ScalarTypeERKS3_(ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @_ZN2cv8Extruder12auxTesselateERKNS_5CurveERKN2mt7Vector3INS4_4DualIfEEEEfSA_ffRf(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(24) %2, float noundef %3, ptr noundef nonnull align 4 dereferenceable(24) %9, float noundef %18, float noundef %34, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @_ZN2cv8Extruder12auxTesselateERKNS_5CurveERKN2mt7Vector3INS4_4DualIfEEEEfSA_ffRf(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(24) %9, float noundef %18, ptr noundef nonnull align 4 dereferenceable(24) %4, float noundef %5, float noundef %35, ptr noundef nonnull align 4 dereferenceable(4) %7)
  br label %44

36:                                               ; preds = %8
  %37 = load float, ptr %7, align 4, !tbaa !17
  call void @_ZN2cv8Extruder9addSampleERKN2mt7Vector3INS1_4DualIfEEEEf(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 4 dereferenceable(24) %2, float noundef %37)
  %38 = fpext float %6 to double
  %39 = call double @sqrt(double noundef %38) #4
  %40 = load float, ptr %7, align 4, !tbaa !17
  %41 = fpext float %40 to double
  %42 = fadd double %39, %41
  %43 = fptrunc double %42 to float
  store float %43, ptr %7, align 4, !tbaa !17
  br label %44

44:                                               ; preds = %36, %33
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2cv8Extruder9addSampleERKN2mt7Vector3INS1_4DualIfEEEEf(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(24), float noundef) local_unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { <2 x float>, float } @_ZN2mt5crossIffEENS_7Vector3INS_7PromoteIT_T0_E2RTEEERKNS1_IS3_EERKNS1_IS4_EE(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { 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 #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 0}
!9 = !{!"_ZTSN2cv8ExtruderE", !10, i64 0, !12, i64 8}
!10 = !{!"float", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIN2cv6SampleESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIN2cv6SampleESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN2cv6SampleESaIS1_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN2cv6SampleESaIS1_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !11, i64 0}
!17 = !{!10, !10, i64 0}


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