; LLVM IR from Slingshot-Physics/slingshot-community :: common/geometry/src (segment)

; 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.Vector3 = type { [3 x float] }
%"struct.geometry::types::pointBaryCoord_t" = type { %class.Vector3, %class.Vector4 }
%class.Vector4 = type { [4 x float] }
%"struct.geometry::types::segmentClosestPoints_t" = type { i32, [2 x %class.Vector3], [2 x %class.Vector3] }

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3miERKS_(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4fmaxff(float noundef, float noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4fminff(float noundef, float noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1

declare void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(12)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3plERKS_(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry7segment22closestPointsToSegmentERK7Vector3S3_S3_S3_f(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::segmentClosestPoints_t") align 4 %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %5) #1 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca %class.Vector3, align 4
  %15 = alloca float, align 4
  %16 = alloca %class.Vector3, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %19 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %20 = alloca %class.Vector3, align 4
  %21 = alloca %class.Vector3, align 4
  %22 = alloca float, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca float, align 4
  %26 = alloca float, align 4
  %27 = alloca i32, align 4
  %28 = alloca float, align 4
  %29 = alloca %class.Vector3, align 4
  %30 = alloca float, align 4
  %31 = alloca %class.Vector3, align 4
  %32 = alloca float, align 4
  %33 = alloca float, align 4
  %34 = alloca float, align 4
  %35 = alloca float, align 4
  %36 = alloca %class.Vector3, align 4
  %37 = alloca %class.Vector3, align 4
  %38 = alloca %class.Vector3, align 4
  %39 = alloca %class.Vector3, align 4
  %40 = alloca float, align 4
  %41 = alloca float, align 4
  %42 = alloca %class.Vector3, align 4
  %43 = alloca float, align 4
  %44 = alloca float, align 4
  %45 = alloca %class.Vector3, align 4
  %46 = alloca %class.Vector3, align 4
  %47 = alloca %class.Vector3, align 4
  %48 = alloca %class.Vector3, align 4
  %49 = alloca %class.Vector3, align 4
  %50 = alloca %class.Vector3, align 4
  %51 = alloca %class.Vector3, align 4
  %52 = alloca float, align 4
  %53 = alloca %class.Vector3, align 4
  %54 = alloca %class.Vector3, align 4
  %55 = alloca %class.Vector3, align 4
  %56 = alloca float, align 4
  %57 = alloca %class.Vector3, align 4
  %58 = alloca float, align 4
  %59 = alloca %class.Vector3, align 4
  %60 = alloca float, align 4
  %61 = alloca float, align 4
  %62 = alloca %class.Vector3, align 4
  %63 = alloca %class.Vector3, align 4
  %64 = alloca float, align 4
  %65 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %66 = alloca %class.Vector3, align 4
  %67 = alloca %class.Vector3, align 4
  %68 = alloca %class.Vector3, align 4
  %69 = alloca %class.Vector3, align 4
  %70 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %71 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  store ptr %0, ptr %7, align 8
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store float %5, ptr %12, align 4, !tbaa !9
  call void @_ZN8geometry5types22segmentClosestPoints_tC2Ev(ptr noundef nonnull align 4 dereferenceable(52) %0)
  %72 = load float, ptr %12, align 4, !tbaa !9
  %73 = call noundef float @_ZSt4fmaxff(float noundef %72, float noundef 0.000000e+00)
  %74 = call noundef float @_ZSt4fminff(float noundef %73, float noundef 0x3FB99999A0000000)
  store float %74, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #7
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %75, ptr noundef nonnull align 4 dereferenceable(12) %76)
  %77 = call noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #7
  store float %77, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #7
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %16, ptr noundef nonnull align 4 dereferenceable(12) %78, ptr noundef nonnull align 4 dereferenceable(12) %79)
  %80 = call noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12) %16)
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #7
  store float %80, ptr %15, align 4, !tbaa !9
  %81 = load float, ptr %13, align 4, !tbaa !9
  %82 = fcmp olt float %81, 0x3E7AD7F2A0000000
  br i1 %82, label %83, label %96

83:                                               ; preds = %6
  %84 = load float, ptr %15, align 4, !tbaa !9
  %85 = fcmp olt float %84, 0x3E7AD7F2A0000000
  br i1 %85, label %86, label %96

86:                                               ; preds = %83
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 1
  %89 = getelementptr inbounds [2 x %class.Vector3], ptr %88, i64 0, i64 0
  %90 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %89, ptr noundef nonnull align 4 dereferenceable(12) %87)
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 2
  %93 = getelementptr inbounds [2 x %class.Vector3], ptr %92, i64 0, i64 0
  %94 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %93, ptr noundef nonnull align 4 dereferenceable(12) %91)
  %95 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 0
  store i32 1, ptr %95, align 4, !tbaa !11
  store i32 1, ptr %17, align 4
  br label %277

96:                                               ; preds = %83, %6
  %97 = load float, ptr %13, align 4, !tbaa !9
  %98 = fcmp olt float %97, 0x3E7AD7F2A0000000
  br i1 %98, label %99, label %112

99:                                               ; preds = %96
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 1
  %102 = getelementptr inbounds [2 x %class.Vector3], ptr %101, i64 0, i64 0
  %103 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %102, ptr noundef nonnull align 4 dereferenceable(12) %100)
  call void @llvm.lifetime.start.p0(i64 28, ptr %18) #7
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %18, ptr noundef nonnull align 4 dereferenceable(12) %104, ptr noundef nonnull align 4 dereferenceable(12) %105, ptr noundef nonnull align 4 dereferenceable(12) %106)
  %107 = getelementptr inbounds %"struct.geometry::types::pointBaryCoord_t", ptr %18, i32 0, i32 0
  %108 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 2
  %109 = getelementptr inbounds [2 x %class.Vector3], ptr %108, i64 0, i64 0
  %110 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %109, ptr noundef nonnull align 4 dereferenceable(12) %107)
  call void @llvm.lifetime.end.p0(i64 28, ptr %18) #7
  %111 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 0
  store i32 1, ptr %111, align 4, !tbaa !11
  store i32 1, ptr %17, align 4
  br label %277

112:                                              ; preds = %96
  %113 = load float, ptr %15, align 4, !tbaa !9
  %114 = fcmp olt float %113, 0x3E7AD7F2A0000000
  br i1 %114, label %115, label %128

115:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 28, ptr %19) #7
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %19, ptr noundef nonnull align 4 dereferenceable(12) %116, ptr noundef nonnull align 4 dereferenceable(12) %117, ptr noundef nonnull align 4 dereferenceable(12) %118)
  %119 = getelementptr inbounds %"struct.geometry::types::pointBaryCoord_t", ptr %19, i32 0, i32 0
  %120 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 1
  %121 = getelementptr inbounds [2 x %class.Vector3], ptr %120, i64 0, i64 0
  %122 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %121, ptr noundef nonnull align 4 dereferenceable(12) %119)
  call void @llvm.lifetime.end.p0(i64 28, ptr %19) #7
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 2
  %125 = getelementptr inbounds [2 x %class.Vector3], ptr %124, i64 0, i64 0
  %126 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %125, ptr noundef nonnull align 4 dereferenceable(12) %123)
  %127 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 0
  store i32 1, ptr %127, align 4, !tbaa !11
  store i32 1, ptr %17, align 4
  br label %277

128:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #7
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %20, ptr noundef nonnull align 4 dereferenceable(12) %129, ptr noundef nonnull align 4 dereferenceable(12) %130)
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #7
  %131 = load ptr, ptr %11, align 8, !tbaa !5
  %132 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %21, ptr noundef nonnull align 4 dereferenceable(12) %131, ptr noundef nonnull align 4 dereferenceable(12) %132)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  %133 = call noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12) %20)
  store float %133, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #7
  %134 = load float, ptr %22, align 4, !tbaa !9
  store float %134, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  %135 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %21)
  store float %135, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  %136 = call noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12) %21)
  store float %136, ptr %25, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  %137 = load float, ptr %23, align 4, !tbaa !9
  %138 = load float, ptr %25, align 4, !tbaa !9
  %139 = load float, ptr %24, align 4, !tbaa !9
  %140 = load float, ptr %24, align 4, !tbaa !9
  %141 = fmul float %139, %140
  %142 = fneg float %141
  %143 = call float @llvm.fmuladd.f32(float %137, float %138, float %142)
  store float %143, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %144 = load float, ptr %26, align 4, !tbaa !9
  %145 = fcmp olt float %144, 0x3E7AD7F2A0000000
  %146 = zext i1 %145 to i64
  %147 = select i1 %145, i32 2, i32 1
  store i32 %147, ptr %27, align 4, !tbaa !14
  %148 = load i32, ptr %27, align 4, !tbaa !14
  %149 = icmp eq i32 %148, 1
  br i1 %149, label %150, label %207

150:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %29) #7
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  %152 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %29, ptr noundef nonnull align 4 dereferenceable(12) %151, ptr noundef nonnull align 4 dereferenceable(12) %152)
  %153 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %29)
  call void @llvm.lifetime.end.p0(i64 12, ptr %29) #7
  store float %153, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #7
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %31, ptr noundef nonnull align 4 dereferenceable(12) %154, ptr noundef nonnull align 4 dereferenceable(12) %155)
  %156 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %21, ptr noundef nonnull align 4 dereferenceable(12) %31)
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #7
  store float %156, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  %157 = load float, ptr %28, align 4, !tbaa !9
  %158 = load float, ptr %25, align 4, !tbaa !9
  %159 = load float, ptr %30, align 4, !tbaa !9
  %160 = load float, ptr %24, align 4, !tbaa !9
  %161 = fmul float %159, %160
  %162 = call float @llvm.fmuladd.f32(float %157, float %158, float %161)
  %163 = load float, ptr %26, align 4, !tbaa !9
  %164 = fdiv float %162, %163
  store float %164, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  store float 0.000000e+00, ptr %33, align 4, !tbaa !9
  %165 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %33)
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #7
  store float 1.000000e+00, ptr %34, align 4, !tbaa !9
  %166 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %165, ptr noundef nonnull align 4 dereferenceable(4) %34)
  %167 = load float, ptr %166, align 4, !tbaa !9
  store float %167, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %36) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %37) #7
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %38) #7
  call void @_ZNK7Vector3mlERKf(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %38, ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(4) %32)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %37, ptr noundef nonnull align 4 dereferenceable(12) %168, ptr noundef nonnull align 4 dereferenceable(12) %38)
  %169 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %36, ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 4 dereferenceable(12) %169)
  %170 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %21, ptr noundef nonnull align 4 dereferenceable(12) %36)
  %171 = load float, ptr %25, align 4, !tbaa !9
  %172 = fdiv float %170, %171
  call void @llvm.lifetime.end.p0(i64 12, ptr %38) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %36) #7
  store float %172, ptr %35, align 4, !tbaa !9
  %173 = load float, ptr %35, align 4, !tbaa !9
  %174 = fcmp olt float %173, 0.000000e+00
  br i1 %174, label %175, label %184

175:                                              ; preds = %150
  store float 0.000000e+00, ptr %35, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %39) #7
  %176 = load ptr, ptr %10, align 8, !tbaa !5
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %39, ptr noundef nonnull align 4 dereferenceable(12) %176, ptr noundef nonnull align 4 dereferenceable(12) %177)
  %178 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %39)
  %179 = load float, ptr %23, align 4, !tbaa !9
  %180 = fdiv float %178, %179
  store float %180, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #7
  store float 0.000000e+00, ptr %40, align 4, !tbaa !9
  %181 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %40)
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #7
  store float 1.000000e+00, ptr %41, align 4, !tbaa !9
  %182 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %181, ptr noundef nonnull align 4 dereferenceable(4) %41)
  %183 = load float, ptr %182, align 4, !tbaa !9
  store float %183, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #7
  br label %197

184:                                              ; preds = %150
  %185 = load float, ptr %35, align 4, !tbaa !9
  %186 = fcmp ogt float %185, 1.000000e+00
  br i1 %186, label %187, label %196

187:                                              ; preds = %184
  store float 1.000000e+00, ptr %35, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %42) #7
  %188 = load ptr, ptr %11, align 8, !tbaa !5
  %189 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %42, ptr noundef nonnull align 4 dereferenceable(12) %188, ptr noundef nonnull align 4 dereferenceable(12) %189)
  %190 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %42)
  %191 = load float, ptr %23, align 4, !tbaa !9
  %192 = fdiv float %190, %191
  store float %192, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 12, ptr %42) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #7
  store float 0.000000e+00, ptr %43, align 4, !tbaa !9
  %193 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(4) %43)
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #7
  store float 1.000000e+00, ptr %44, align 4, !tbaa !9
  %194 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %193, ptr noundef nonnull align 4 dereferenceable(4) %44)
  %195 = load float, ptr %194, align 4, !tbaa !9
  store float %195, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #7
  br label %196

196:                                              ; preds = %187, %184
  br label %197

197:                                              ; preds = %196, %175
  call void @llvm.lifetime.start.p0(i64 12, ptr %45) #7
  %198 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %46) #7
  call void @_ZNK7Vector3mlERKf(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %46, ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(4) %32)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %45, ptr noundef nonnull align 4 dereferenceable(12) %198, ptr noundef nonnull align 4 dereferenceable(12) %46)
  %199 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 1
  %200 = getelementptr inbounds [2 x %class.Vector3], ptr %199, i64 0, i64 0
  %201 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %200, ptr noundef nonnull align 4 dereferenceable(12) %45)
  call void @llvm.lifetime.end.p0(i64 12, ptr %46) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %45) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %47) #7
  %202 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %48) #7
  call void @_ZNK7Vector3mlERKf(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %48, ptr noundef nonnull align 4 dereferenceable(12) %21, ptr noundef nonnull align 4 dereferenceable(4) %35)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %47, ptr noundef nonnull align 4 dereferenceable(12) %202, ptr noundef nonnull align 4 dereferenceable(12) %48)
  %203 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 2
  %204 = getelementptr inbounds [2 x %class.Vector3], ptr %203, i64 0, i64 0
  %205 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %204, ptr noundef nonnull align 4 dereferenceable(12) %47)
  call void @llvm.lifetime.end.p0(i64 12, ptr %48) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %47) #7
  %206 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 0
  store i32 1, ptr %206, align 4, !tbaa !11
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  br label %276

207:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 12, ptr %49) #7
  call void @_ZNK7Vector310unitVectorEv(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %49, ptr noundef nonnull align 4 dereferenceable(12) %20)
  call void @llvm.lifetime.start.p0(i64 12, ptr %50) #7
  %208 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %50, ptr noundef nonnull align 4 dereferenceable(12) %208)
  call void @llvm.lifetime.start.p0(i64 12, ptr %51) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #7
  %209 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %21, ptr noundef nonnull align 4 dereferenceable(12) %49)
  store float %209, ptr %52, align 4, !tbaa !9
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %51, ptr noundef nonnull align 4 dereferenceable(4) %52, ptr noundef nonnull align 4 dereferenceable(12) %49)
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %53) #7
  %210 = load ptr, ptr %8, align 8, !tbaa !5
  %211 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN8geometry4line19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %53, ptr noundef nonnull align 4 dereferenceable(12) %210, ptr noundef nonnull align 4 dereferenceable(12) %211, ptr noundef nonnull align 4 dereferenceable(12) %50)
  call void @llvm.lifetime.start.p0(i64 12, ptr %54) #7
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %54, ptr noundef nonnull align 4 dereferenceable(12) %53)
  call void @llvm.lifetime.start.p0(i64 12, ptr %55) #7
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %55, ptr noundef nonnull align 4 dereferenceable(12) %53, ptr noundef nonnull align 4 dereferenceable(12) %51)
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %57) #7
  %212 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %57, ptr noundef nonnull align 4 dereferenceable(12) %54, ptr noundef nonnull align 4 dereferenceable(12) %212)
  %213 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %57, ptr noundef nonnull align 4 dereferenceable(12) %20)
  %214 = load float, ptr %22, align 4, !tbaa !9
  %215 = fdiv float %213, %214
  call void @llvm.lifetime.end.p0(i64 12, ptr %57) #7
  store float %215, ptr %56, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %59) #7
  %216 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %59, ptr noundef nonnull align 4 dereferenceable(12) %55, ptr noundef nonnull align 4 dereferenceable(12) %216)
  %217 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %59, ptr noundef nonnull align 4 dereferenceable(12) %20)
  %218 = load float, ptr %22, align 4, !tbaa !9
  %219 = fdiv float %217, %218
  call void @llvm.lifetime.end.p0(i64 12, ptr %59) #7
  store float %219, ptr %58, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %60) #7
  %220 = load float, ptr %56, align 4, !tbaa !9
  %221 = call noundef float @_ZSt4fmaxff(float noundef %220, float noundef 0.000000e+00)
  %222 = call noundef float @_ZSt4fminff(float noundef %221, float noundef 1.000000e+00)
  store float %222, ptr %60, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #7
  %223 = load float, ptr %58, align 4, !tbaa !9
  %224 = call noundef float @_ZSt4fmaxff(float noundef %223, float noundef 0.000000e+00)
  %225 = call noundef float @_ZSt4fminff(float noundef %224, float noundef 1.000000e+00)
  store float %225, ptr %61, align 4, !tbaa !9
  %226 = load float, ptr %60, align 4, !tbaa !9
  %227 = load float, ptr %61, align 4, !tbaa !9
  %228 = fsub float %226, %227
  %229 = fpext float %228 to double
  %230 = call double @llvm.fabs.f64(double %229)
  %231 = fcmp olt double %230, 0x3E7AD7F2A0000000
  br i1 %231, label %232, label %249

232:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 12, ptr %62) #7
  %233 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %63) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %64) #7
  %234 = load float, ptr %60, align 4, !tbaa !9
  %235 = load float, ptr %61, align 4, !tbaa !9
  %236 = call noundef float @_ZSt4fminff(float noundef %234, float noundef %235)
  store float %236, ptr %64, align 4, !tbaa !9
  call void @_ZNK7Vector3mlERKf(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %63, ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(4) %64)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %62, ptr noundef nonnull align 4 dereferenceable(12) %233, ptr noundef nonnull align 4 dereferenceable(12) %63)
  %237 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 1
  %238 = getelementptr inbounds [2 x %class.Vector3], ptr %237, i64 0, i64 0
  %239 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %238, ptr noundef nonnull align 4 dereferenceable(12) %62)
  call void @llvm.lifetime.end.p0(i64 4, ptr %64) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %63) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %62) #7
  call void @llvm.lifetime.start.p0(i64 28, ptr %65) #7
  %240 = load ptr, ptr %10, align 8, !tbaa !5
  %241 = load ptr, ptr %11, align 8, !tbaa !5
  %242 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 1
  %243 = getelementptr inbounds [2 x %class.Vector3], ptr %242, i64 0, i64 0
  call void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %65, ptr noundef nonnull align 4 dereferenceable(12) %240, ptr noundef nonnull align 4 dereferenceable(12) %241, ptr noundef nonnull align 4 dereferenceable(12) %243)
  %244 = getelementptr inbounds %"struct.geometry::types::pointBaryCoord_t", ptr %65, i32 0, i32 0
  %245 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 2
  %246 = getelementptr inbounds [2 x %class.Vector3], ptr %245, i64 0, i64 0
  %247 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %246, ptr noundef nonnull align 4 dereferenceable(12) %244)
  call void @llvm.lifetime.end.p0(i64 28, ptr %65) #7
  %248 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 0
  store i32 1, ptr %248, align 4, !tbaa !11
  store i32 1, ptr %17, align 4
  br label %275

249:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 12, ptr %66) #7
  %250 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %67) #7
  call void @_ZNK7Vector3mlERKf(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %67, ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(4) %60)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %66, ptr noundef nonnull align 4 dereferenceable(12) %250, ptr noundef nonnull align 4 dereferenceable(12) %67)
  %251 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 1
  %252 = getelementptr inbounds [2 x %class.Vector3], ptr %251, i64 0, i64 0
  %253 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %252, ptr noundef nonnull align 4 dereferenceable(12) %66)
  call void @llvm.lifetime.end.p0(i64 12, ptr %67) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %66) #7
  call void @llvm.lifetime.start.p0(i64 12, ptr %68) #7
  %254 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %69) #7
  call void @_ZNK7Vector3mlERKf(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %69, ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(4) %61)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %68, ptr noundef nonnull align 4 dereferenceable(12) %254, ptr noundef nonnull align 4 dereferenceable(12) %69)
  %255 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 1
  %256 = getelementptr inbounds [2 x %class.Vector3], ptr %255, i64 0, i64 1
  %257 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %256, ptr noundef nonnull align 4 dereferenceable(12) %68)
  call void @llvm.lifetime.end.p0(i64 12, ptr %69) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %68) #7
  call void @llvm.lifetime.start.p0(i64 28, ptr %70) #7
  %258 = load ptr, ptr %10, align 8, !tbaa !5
  %259 = load ptr, ptr %11, align 8, !tbaa !5
  %260 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 1
  %261 = getelementptr inbounds [2 x %class.Vector3], ptr %260, i64 0, i64 0
  call void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %70, ptr noundef nonnull align 4 dereferenceable(12) %258, ptr noundef nonnull align 4 dereferenceable(12) %259, ptr noundef nonnull align 4 dereferenceable(12) %261)
  %262 = getelementptr inbounds %"struct.geometry::types::pointBaryCoord_t", ptr %70, i32 0, i32 0
  %263 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 2
  %264 = getelementptr inbounds [2 x %class.Vector3], ptr %263, i64 0, i64 0
  %265 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %264, ptr noundef nonnull align 4 dereferenceable(12) %262)
  call void @llvm.lifetime.end.p0(i64 28, ptr %70) #7
  call void @llvm.lifetime.start.p0(i64 28, ptr %71) #7
  %266 = load ptr, ptr %10, align 8, !tbaa !5
  %267 = load ptr, ptr %11, align 8, !tbaa !5
  %268 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 1
  %269 = getelementptr inbounds [2 x %class.Vector3], ptr %268, i64 0, i64 1
  call void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %71, ptr noundef nonnull align 4 dereferenceable(12) %266, ptr noundef nonnull align 4 dereferenceable(12) %267, ptr noundef nonnull align 4 dereferenceable(12) %269)
  %270 = getelementptr inbounds %"struct.geometry::types::pointBaryCoord_t", ptr %71, i32 0, i32 0
  %271 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 2
  %272 = getelementptr inbounds [2 x %class.Vector3], ptr %271, i64 0, i64 1
  %273 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %272, ptr noundef nonnull align 4 dereferenceable(12) %270)
  call void @llvm.lifetime.end.p0(i64 28, ptr %71) #7
  %274 = getelementptr inbounds %"struct.geometry::types::segmentClosestPoints_t", ptr %0, i32 0, i32 0
  store i32 2, ptr %274, align 4, !tbaa !11
  store i32 1, ptr %17, align 4
  br label %275

275:                                              ; preds = %249, %232
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %60) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %55) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %54) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %53) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %51) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %50) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %49) #7
  br label %276

276:                                              ; preds = %275, %197
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #7
  br label %277

277:                                              ; preds = %276, %115, %99, %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8geometry5types22segmentClosestPoints_tC2Ev(ptr noundef nonnull align 4 dereferenceable(52)) unnamed_addr #4 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3mlERKf(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector310unitVectorEv(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

declare void @_ZN8geometry4line19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #5

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 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { 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, !13, i64 0}
!12 = !{!"_ZTSN8geometry5types22segmentClosestPoints_tE", !13, i64 0, !7, i64 4, !7, i64 28}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, 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"

%class.Vector3 = type { [3 x float] }
%"struct.geometry::types::pointBaryCoord_t" = type { %class.Vector3, %class.Vector4 }
%class.Vector4 = type { [4 x float] }
%"struct.geometry::types::segmentClosestPoints_t" = type { i32, [2 x %class.Vector3], [2 x %class.Vector3] }

; 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 uwtable
declare dso_local void @_ZNK7Vector3miERKS_(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

; 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 nounwind uwtable
declare dso_local noundef float @_ZSt4fmaxff(float noundef, float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4fminff(float noundef, float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind noalias writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1

declare void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3plERKS_(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry7segment22closestPointsToSegmentERK7Vector3S3_S3_S3_f(ptr dead_on_unwind noalias nonnull writable sret(%"struct.geometry::types::segmentClosestPoints_t") align 4 %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %5) local_unnamed_addr #1 {
  %7 = alloca %class.Vector3, align 4
  %8 = alloca %class.Vector3, align 4
  %9 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %10 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %11 = alloca %class.Vector3, align 4
  %12 = alloca %class.Vector3, align 4
  %13 = alloca %class.Vector3, align 4
  %14 = alloca %class.Vector3, align 4
  %15 = alloca float, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca float, align 4
  %19 = alloca %class.Vector3, align 4
  %20 = alloca %class.Vector3, align 4
  %21 = alloca %class.Vector3, align 4
  %22 = alloca %class.Vector3, align 4
  %23 = alloca float, align 4
  %24 = alloca float, align 4
  %25 = alloca %class.Vector3, align 4
  %26 = alloca float, align 4
  %27 = alloca float, align 4
  %28 = alloca %class.Vector3, align 4
  %29 = alloca %class.Vector3, align 4
  %30 = alloca %class.Vector3, align 4
  %31 = alloca %class.Vector3, align 4
  %32 = alloca %class.Vector3, align 4
  %33 = alloca %class.Vector3, align 4
  %34 = alloca %class.Vector3, align 4
  %35 = alloca float, align 4
  %36 = alloca %class.Vector3, align 4
  %37 = alloca %class.Vector3, align 4
  %38 = alloca %class.Vector3, align 4
  %39 = alloca %class.Vector3, align 4
  %40 = alloca %class.Vector3, align 4
  %41 = alloca float, align 4
  %42 = alloca float, align 4
  %43 = alloca %class.Vector3, align 4
  %44 = alloca %class.Vector3, align 4
  %45 = alloca float, align 4
  %46 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %47 = alloca %class.Vector3, align 4
  %48 = alloca %class.Vector3, align 4
  %49 = alloca %class.Vector3, align 4
  %50 = alloca %class.Vector3, align 4
  %51 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %52 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  tail call void @_ZN8geometry5types22segmentClosestPoints_tC2Ev(ptr noundef nonnull align 4 dereferenceable(52) %0)
  %53 = tail call noundef float @_ZSt4fmaxff(float noundef %5, float noundef 0.000000e+00)
  %54 = tail call noundef float @_ZSt4fminff(float noundef %53, float noundef 0x3FB99999A0000000)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #8
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %7, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %55 = call noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #8
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %8, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %56 = call noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #8
  %57 = fcmp olt float %55, 0x3E7AD7F2A0000000
  %58 = fcmp olt float %56, 0x3E7AD7F2A0000000
  %or.cond = and i1 %57, %58
  br i1 %or.cond, label %59, label %64

59:                                               ; preds = %6
  %60 = getelementptr inbounds i8, ptr %0, i64 4
  %61 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %60, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %62 = getelementptr inbounds i8, ptr %0, i64 28
  %63 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %62, ptr noundef nonnull align 4 dereferenceable(12) %3)
  store i32 1, ptr %0, align 4, !tbaa !5
  br label %145

64:                                               ; preds = %6
  br i1 %57, label %65, label %70

65:                                               ; preds = %64
  %66 = getelementptr inbounds i8, ptr %0, i64 4
  %67 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %66, ptr noundef nonnull align 4 dereferenceable(12) %1)
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %9) #8
  call void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %68 = getelementptr inbounds i8, ptr %0, i64 28
  %69 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %68, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %9) #8
  store i32 1, ptr %0, align 4, !tbaa !5
  br label %145

70:                                               ; preds = %64
  br i1 %58, label %71, label %76

71:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %10) #8
  call void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %10, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %3)
  %72 = getelementptr inbounds i8, ptr %0, i64 4
  %73 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %72, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %10) #8
  %74 = getelementptr inbounds i8, ptr %0, i64 28
  %75 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %74, ptr noundef nonnull align 4 dereferenceable(12) %3)
  store i32 1, ptr %0, align 4, !tbaa !5
  br label %145

76:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #8
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %1)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #8
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %3)
  %77 = call noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12) %11)
  %78 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %12)
  %79 = call noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12) %12)
  %80 = fneg float %78
  %81 = fmul float %78, %80
  %82 = call float @llvm.fmuladd.f32(float %77, float %79, float %81)
  %83 = fcmp uge float %82, 0x3E7AD7F2A0000000
  br i1 %83, label %84, label %115

84:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #8
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %13, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %85 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #8
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %3)
  %86 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #8
  %87 = fmul float %78, %86
  %88 = call float @llvm.fmuladd.f32(float %85, float %79, float %87)
  %89 = fdiv float %88, %82
  store float %89, ptr %15, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #8
  store float 0.000000e+00, ptr %16, align 4, !tbaa !10
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %16)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #8
  store float 1.000000e+00, ptr %17, align 4, !tbaa !10
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %90, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %92 = load float, ptr %91, align 4, !tbaa !10
  store float %92, ptr %15, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %19) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #8
  call void @_ZNK7Vector3mlERKf(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %21, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %20, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %21)
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %19, ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %3)
  %93 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %19)
  %94 = fdiv float %93, %79
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #8
  store float %94, ptr %18, align 4, !tbaa !10
  %95 = fcmp olt float %94, 0.000000e+00
  br i1 %95, label %96, label %102

96:                                               ; preds = %84
  store float 0.000000e+00, ptr %18, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %22) #8
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %22, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %97 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %22)
  %98 = fdiv float %97, %77
  store float %98, ptr %15, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #8
  store float 0.000000e+00, ptr %23, align 4, !tbaa !10
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %23)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #8
  store float 1.000000e+00, ptr %24, align 4, !tbaa !10
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %99, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %101 = load float, ptr %100, align 4, !tbaa !10
  store float %101, ptr %15, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #8
  br label %110

102:                                              ; preds = %84
  %103 = fcmp ogt float %94, 1.000000e+00
  br i1 %103, label %104, label %110

104:                                              ; preds = %102
  store float 1.000000e+00, ptr %18, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %25) #8
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %105 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %25)
  %106 = fdiv float %105, %77
  store float %106, ptr %15, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %26) #8
  store float 0.000000e+00, ptr %26, align 4, !tbaa !10
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %15, ptr noundef nonnull align 4 dereferenceable(4) %26)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %27) #8
  store float 1.000000e+00, ptr %27, align 4, !tbaa !10
  %108 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %107, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %109 = load float, ptr %108, align 4, !tbaa !10
  store float %109, ptr %15, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %27) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %26) #8
  br label %110

110:                                              ; preds = %102, %104, %96
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %28) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %29) #8
  call void @_ZNK7Vector3mlERKf(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %29, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(4) %15)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %28, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %29)
  %111 = getelementptr inbounds i8, ptr %0, i64 4
  %112 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %111, ptr noundef nonnull align 4 dereferenceable(12) %28)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %29) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %28) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %30) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %31) #8
  call void @_ZNK7Vector3mlERKf(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %31, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(4) %18)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %30, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %31)
  %113 = getelementptr inbounds i8, ptr %0, i64 28
  %114 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %113, ptr noundef nonnull align 4 dereferenceable(12) %30)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %31) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #8
  store i32 1, ptr %0, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #8
  br label %144

115:                                              ; preds = %76
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %32) #8
  call void @_ZNK7Vector310unitVectorEv(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %32, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %33) #8
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %33, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %34) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %35) #8
  %116 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %32)
  store float %116, ptr %35, align 4, !tbaa !10
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %34, ptr noundef nonnull align 4 dereferenceable(4) %35, ptr noundef nonnull align 4 dereferenceable(12) %32)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %36) #8
  call void @_ZN8geometry4line19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %36, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %33)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %37) #8
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 4 dereferenceable(12) %36)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %38) #8
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %38, ptr noundef nonnull align 4 dereferenceable(12) %36, ptr noundef nonnull align 4 dereferenceable(12) %34)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %39) #8
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %39, ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %117 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %39, ptr noundef nonnull align 4 dereferenceable(12) %11)
  %118 = fdiv float %117, %77
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %39) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %40) #8
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %40, ptr noundef nonnull align 4 dereferenceable(12) %38, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %119 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(12) %11)
  %120 = fdiv float %119, %77
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %40) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %41) #8
  %121 = call noundef float @_ZSt4fmaxff(float noundef %118, float noundef 0.000000e+00)
  %122 = call noundef float @_ZSt4fminff(float noundef %121, float noundef 1.000000e+00)
  store float %122, ptr %41, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %42) #8
  %123 = call noundef float @_ZSt4fmaxff(float noundef %120, float noundef 0.000000e+00)
  %124 = call noundef float @_ZSt4fminff(float noundef %123, float noundef 1.000000e+00)
  store float %124, ptr %42, align 4, !tbaa !10
  %125 = fsub float %122, %124
  %126 = call float @llvm.fabs.f32(float %125)
  %127 = fcmp olt float %126, 0x3E7AD7F2A0000000
  br i1 %127, label %128, label %134

128:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %43) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %44) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %45) #8
  %129 = call noundef float @_ZSt4fminff(float noundef %122, float noundef %124)
  store float %129, ptr %45, align 4, !tbaa !10
  call void @_ZNK7Vector3mlERKf(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %44, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(4) %45)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %43, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %44)
  %130 = getelementptr inbounds i8, ptr %0, i64 4
  %131 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %130, ptr noundef nonnull align 4 dereferenceable(12) %43)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %45) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %44) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %43) #8
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %46) #8
  call void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %46, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %130)
  %132 = getelementptr inbounds i8, ptr %0, i64 28
  %133 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %132, ptr noundef nonnull align 4 dereferenceable(12) %46)
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %46) #8
  br label %143

134:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %47) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %48) #8
  call void @_ZNK7Vector3mlERKf(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %48, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(4) %41)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %47, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %48)
  %135 = getelementptr inbounds i8, ptr %0, i64 4
  %136 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %135, ptr noundef nonnull align 4 dereferenceable(12) %47)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %48) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %47) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %49) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %50) #8
  call void @_ZNK7Vector3mlERKf(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %50, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(4) %42)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %49, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %50)
  %137 = getelementptr inbounds i8, ptr %0, i64 16
  %138 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %137, ptr noundef nonnull align 4 dereferenceable(12) %49)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %50) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %49) #8
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %51) #8
  call void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %51, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %135)
  %139 = getelementptr inbounds i8, ptr %0, i64 28
  %140 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %139, ptr noundef nonnull align 4 dereferenceable(12) %51)
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %51) #8
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %52) #8
  call void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %52, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %137)
  %141 = getelementptr inbounds i8, ptr %0, i64 40
  %142 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %141, ptr noundef nonnull align 4 dereferenceable(12) %52)
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %52) #8
  br label %143

143:                                              ; preds = %134, %128
  %storemerge = phi i32 [ 2, %134 ], [ 1, %128 ]
  store i32 %storemerge, ptr %0, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %42) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %41) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %38) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %37) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %36) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %34) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %33) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %32) #8
  br label %144

144:                                              ; preds = %143, %110
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #8
  br label %145

145:                                              ; preds = %144, %71, %65, %59
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8geometry5types22segmentClosestPoints_tC2Ev(ptr noundef nonnull align 4 dereferenceable(52)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIfERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3mlERKf(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector310unitVectorEv(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

declare void @_ZN8geometry4line19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #7

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 = { "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !7, i64 0}
!6 = !{!"_ZTSN8geometry5types22segmentClosestPoints_tE", !7, i64 0, !8, i64 4, !8, i64 28}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"float", !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass