; LLVM IR from vectozavr/3dzavr :: engine/components/geometry (Plane)

; 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"

%"struct.std::pair" = type { %class.Vec3D, %class.Vec3D }
%class.Vec3D = type { %"struct.std::array.3" }
%"struct.std::array.3" = type { [3 x double] }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.Plane::IntersectionInformation" = type <{ %class.Vec3D, double, double, i8, [7 x i8] }>

; 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: mustprogress uwtable
declare dso_local noundef double @_ZNK5Plane8distanceERK5Vec3D(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK5Plane4clipERSt6vectorISt4pairI5Vec3DS2_ESaIS3_EES6_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"struct.std::pair", align 8
  %8 = alloca double, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca ptr, align 8
  %13 = alloca double, align 8
  %14 = alloca %"struct.Plane::IntersectionInformation", align 8
  %15 = alloca %class.Vec3D, align 8
  %16 = alloca %class.Vec3D, align 8
  %17 = alloca %class.Vec3D, align 8
  %18 = alloca %"struct.Plane::IntersectionInformation", align 8
  %19 = alloca %class.Vec3D, align 8
  %20 = alloca %class.Vec3D, align 8
  %21 = alloca %class.Vec3D, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %22 = load ptr, ptr %4, align 8
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = call noundef zeroext i1 @_ZNKSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  br i1 %24, label %25, label %26

25:                                               ; preds = %3
  br label %92

26:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #5
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #5
  call void @_ZNSt4pairI5Vec3DS0_EC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(48) %28)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %29 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 0
  %30 = call noundef double @_ZNK5Plane8distanceERK5Vec3D(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(24) %29)
  store double %30, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %31, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = call ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #5
  %34 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %33, ptr %34, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = call ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #5
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  br label %38

38:                                               ; preds = %89, %26
  %39 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairI5Vec3DS2_ESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br i1 %39, label %41, label %40

40:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %91

41:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %42 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairI5Vec3DS2_ESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  store ptr %42, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.std::pair", ptr %43, i32 0, i32 0
  %45 = call noundef double @_ZNK5Plane8distanceERK5Vec3D(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(24) %44)
  store double %45, ptr %13, align 8, !tbaa !9
  %46 = load double, ptr %13, align 8, !tbaa !9
  %47 = fcmp oge double %46, 0.000000e+00
  br i1 %47, label %48, label %68

48:                                               ; preds = %41
  %49 = load double, ptr %8, align 8, !tbaa !9
  %50 = fcmp olt double %49, 0.000000e+00
  br i1 %50, label %51, label %64

51:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #5
  %52 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 0
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.std::pair", ptr %53, i32 0, i32 0
  call void @_ZNK5Plane9intersectERK5Vec3DS2_(ptr dead_on_unwind writable sret(%"struct.Plane::IntersectionInformation") align 8 %14, ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(24) %52, ptr noundef nonnull align 8 dereferenceable(24) %54)
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.Plane::IntersectionInformation", ptr %14, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #5
  %57 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #5
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.std::pair", ptr %58, i32 0, i32 1
  %60 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 1
  call void @_ZNK5Vec3DmiERKS_(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %59, ptr noundef nonnull align 8 dereferenceable(24) %60)
  %61 = getelementptr inbounds %"struct.Plane::IntersectionInformation", ptr %14, i32 0, i32 2
  %62 = load double, ptr %61, align 8, !tbaa !11
  call void @_ZNK5Vec3DmlEd(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %16, ptr noundef nonnull align 8 dereferenceable(24) %17, double noundef %62)
  call void @_ZNK5Vec3DplERKS_(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %57, ptr noundef nonnull align 8 dereferenceable(24) %16)
  %63 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE12emplace_backIJRS1_S1_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %55, ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(24) %15)
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #5
  br label %64

64:                                               ; preds = %51, %48
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE12emplace_backIJRS2_EEES6_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %65, ptr noundef nonnull align 8 dereferenceable(48) %66)
  br label %85

68:                                               ; preds = %41
  %69 = load double, ptr %8, align 8, !tbaa !9
  %70 = fcmp oge double %69, 0.000000e+00
  br i1 %70, label %71, label %84

71:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 48, ptr %18) #5
  %72 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 0
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.std::pair", ptr %73, i32 0, i32 0
  call void @_ZNK5Plane9intersectERK5Vec3DS2_(ptr dead_on_unwind writable sret(%"struct.Plane::IntersectionInformation") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(24) %72, ptr noundef nonnull align 8 dereferenceable(24) %74)
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.Plane::IntersectionInformation", ptr %18, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #5
  %77 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #5
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.std::pair", ptr %78, i32 0, i32 1
  %80 = getelementptr inbounds %"struct.std::pair", ptr %7, i32 0, i32 1
  call void @_ZNK5Vec3DmiERKS_(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %21, ptr noundef nonnull align 8 dereferenceable(24) %79, ptr noundef nonnull align 8 dereferenceable(24) %80)
  %81 = getelementptr inbounds %"struct.Plane::IntersectionInformation", ptr %18, i32 0, i32 2
  %82 = load double, ptr %81, align 8, !tbaa !11
  call void @_ZNK5Vec3DmlEd(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %20, ptr noundef nonnull align 8 dereferenceable(24) %21, double noundef %82)
  call void @_ZNK5Vec3DplERKS_(ptr dead_on_unwind writable sret(%class.Vec3D) align 8 %19, ptr noundef nonnull align 8 dereferenceable(24) %77, ptr noundef nonnull align 8 dereferenceable(24) %20)
  %83 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE12emplace_backIJRS1_S1_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %75, ptr noundef nonnull align 8 dereferenceable(24) %76, ptr noundef nonnull align 8 dereferenceable(24) %19)
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %18) #5
  br label %84

84:                                               ; preds = %71, %68
  br label %85

85:                                               ; preds = %84, %64
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt4pairI5Vec3DS0_EaSERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(48) %86)
  %88 = load double, ptr %13, align 8, !tbaa !9
  store double %88, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %89

89:                                               ; preds = %85
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairI5Vec3DS2_ESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br label %38

91:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #5
  br label %92

92:                                               ; preds = %91, %25
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt4pairI5Vec3DS0_EC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairI5Vec3DS2_ESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairI5Vec3DS2_ESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5Plane9intersectERK5Vec3DS2_(ptr dead_on_unwind noalias writable sret(%"struct.Plane::IntersectionInformation") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE12emplace_backIJRS1_S1_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DplERKS_(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DmiERKS_(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DmlEd(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE12emplace_backIJRS2_EEES6_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(48)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt4pairI5Vec3DS0_EaSERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 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 #3 = { 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 #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 }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 32}
!12 = !{!"_ZTSN5Plane23IntersectionInformationE", !13, i64 0, !10, i64 24, !10, i64 32, !15, i64 40}
!13 = !{!"_ZTS5Vec3D", !14, i64 0}
!14 = !{!"_ZTSSt5arrayIdLm3EE", !7, i64 0}
!15 = !{!"bool", !7, i64 0}


; 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"

%"struct.std::pair" = type { %class.Vec3D, %class.Vec3D }
%class.Vec3D = type { %"struct.std::array.3" }
%"struct.std::array.3" = type { [3 x double] }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.Plane::IntersectionInformation" = type <{ %class.Vec3D, double, double, i8, [7 x i8] }>

; 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 uwtable
declare dso_local noundef double @_ZNK5Plane8distanceERK5Vec3D(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK5Plane4clipERSt6vectorISt4pairI5Vec3DS2_ESaIS3_EES6_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #1 align 2 {
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"struct.Plane::IntersectionInformation", align 8
  %8 = alloca %class.Vec3D, align 8
  %9 = alloca %class.Vec3D, align 8
  %10 = alloca %class.Vec3D, align 8
  %11 = alloca %"struct.Plane::IntersectionInformation", align 8
  %12 = alloca %class.Vec3D, align 8
  %13 = alloca %class.Vec3D, align 8
  %14 = alloca %class.Vec3D, align 8
  %15 = tail call noundef zeroext i1 @_ZNKSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  br i1 %15, label %47, label %16

16:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #5
  %17 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @_ZNSt4pairI5Vec3DS0_EC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(48) %17)
  %18 = call noundef double @_ZNK5Plane8distanceERK5Vec3D(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %19 = call ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  store ptr %19, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %20 = call ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  store ptr %20, ptr %6, align 8
  %21 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairI5Vec3DS2_ESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %21, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %16
  %22 = getelementptr inbounds i8, ptr %4, i64 24
  %23 = getelementptr inbounds i8, ptr %7, i64 32
  %24 = getelementptr inbounds i8, ptr %11, i64 32
  br label %25

._crit_edge:                                      ; preds = %43, %16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #5
  br label %47

25:                                               ; preds = %.lr.ph, %43
  %.020 = phi double [ %18, %.lr.ph ], [ %27, %43 ]
  %26 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairI5Vec3DS2_ESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %27 = call noundef double @_ZNK5Plane8distanceERK5Vec3D(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %26)
  %28 = fcmp ult double %27, 0.000000e+00
  br i1 %28, label %37, label %29

29:                                               ; preds = %25
  %30 = fcmp olt double %.020, 0.000000e+00
  br i1 %30, label %31, label %35

31:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %7) #5
  call void @_ZNK5Plane9intersectERK5Vec3DS2_(ptr dead_on_unwind nonnull writable sret(%"struct.Plane::IntersectionInformation") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %26)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  %32 = getelementptr inbounds i8, ptr %26, i64 24
  call void @_ZNK5Vec3DmiERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %32, ptr noundef nonnull align 8 dereferenceable(24) %22)
  %33 = load double, ptr %23, align 8, !tbaa !5
  call void @_ZNK5Vec3DmlEd(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %10, double noundef %33)
  call void @_ZNK5Vec3DplERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %9)
  %34 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE12emplace_backIJRS1_S1_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %7) #5
  br label %35

35:                                               ; preds = %31, %29
  %36 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE12emplace_backIJRS2_EEES6_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(48) %26)
  br label %43

37:                                               ; preds = %25
  %38 = fcmp ult double %.020, 0.000000e+00
  br i1 %38, label %43, label %39

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %11) #5
  call void @_ZNK5Plane9intersectERK5Vec3DS2_(ptr dead_on_unwind nonnull writable sret(%"struct.Plane::IntersectionInformation") align 8 %11, ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %26)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #5
  %40 = getelementptr inbounds i8, ptr %26, i64 24
  call void @_ZNK5Vec3DmiERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %40, ptr noundef nonnull align 8 dereferenceable(24) %22)
  %41 = load double, ptr %24, align 8, !tbaa !5
  call void @_ZNK5Vec3DmlEd(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %14, double noundef %41)
  call void @_ZNK5Vec3DplERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vec3D) align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(24) %13)
  %42 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE12emplace_backIJRS1_S1_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #5
  br label %43

43:                                               ; preds = %37, %39, %35
  %44 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt4pairI5Vec3DS0_EaSERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(48) %26)
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt4pairI5Vec3DS2_ESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %46 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairI5Vec3DS2_ESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %46, label %25, label %._crit_edge

47:                                               ; preds = %3, %._crit_edge
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt4pairI5Vec3DS0_EC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt4pairI5Vec3DS2_ESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairI5Vec3DS2_ESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5Plane9intersectERK5Vec3DS2_(ptr dead_on_unwind noalias writable sret(%"struct.Plane::IntersectionInformation") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE12emplace_backIJRS1_S1_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DplERKS_(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DmiERKS_(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK5Vec3DmlEd(ptr dead_on_unwind noalias writable sret(%class.Vec3D) align 8, ptr noundef nonnull align 8 dereferenceable(24), double noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt6vectorISt4pairI5Vec3DS1_ESaIS2_EE12emplace_backIJRS2_EEES6_DpOT_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt4pairI5Vec3DS0_EaSERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 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 #3 = { 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 #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 }

!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, !11, i64 32}
!6 = !{!"_ZTSN5Plane23IntersectionInformationE", !7, i64 0, !11, i64 24, !11, i64 32, !12, i64 40}
!7 = !{!"_ZTS5Vec3D", !8, i64 0}
!8 = !{!"_ZTSSt5arrayIdLm3EE", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"double", !9, i64 0}
!12 = !{!"bool", !9, i64 0}


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