; 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] }

; 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 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
declare dso_local void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8geometry7segment12intersectionERK7Vector3S3_S3_S3_RS1_S4_f(ptr noundef nonnull align 4 dereferenceable(12) %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, ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef %6) #1 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca float, align 4
  %16 = alloca %class.Vector3, align 4
  %17 = alloca %class.Vector3, align 4
  %18 = alloca %class.Vector3, align 4
  %19 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %20 = alloca %class.Vector3, align 4
  %21 = alloca i32, align 4
  %22 = alloca %class.Vector3, align 4
  %23 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %24 = alloca %class.Vector3, align 4
  %25 = alloca %class.Vector3, align 4
  %26 = alloca %class.Vector3, align 4
  %27 = alloca float, align 4
  %28 = alloca float, align 4
  %29 = alloca float, align 4
  %30 = alloca float, align 4
  %31 = alloca %class.Vector3, align 4
  %32 = alloca float, align 4
  %33 = alloca %class.Vector3, align 4
  %34 = alloca float, align 4
  %35 = alloca %class.Vector3, align 4
  %36 = alloca float, align 4
  %37 = alloca %class.Vector3, align 4
  %38 = alloca float, align 4
  %39 = alloca %class.Vector3, align 4
  %40 = alloca %class.Vector3, align 4
  %41 = alloca [4 x float], align 16
  %42 = alloca %class.Vector3, align 4
  %43 = alloca %class.Vector3, align 4
  %44 = alloca %class.Vector3, align 4
  %45 = alloca %class.Vector3, align 4
  %46 = alloca float, align 4
  %47 = alloca %class.Vector3, align 4
  %48 = alloca %class.Vector3, align 4
  %49 = alloca float, align 4
  %50 = alloca %class.Vector3, align 4
  %51 = alloca %class.Vector3, align 4
  %52 = alloca %class.Vector3, align 4
  %53 = alloca %class.Vector3, align 4
  %54 = alloca %class.Vector3, align 4
  %55 = alloca %class.Vector3, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store float %6, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %16) #5
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = load ptr, ptr %9, 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) %56, ptr noundef nonnull align 4 dereferenceable(12) %57)
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #5
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %17, ptr noundef nonnull align 4 dereferenceable(12) %58, ptr noundef nonnull align 4 dereferenceable(12) %59)
  %60 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %17)
  %61 = load float, ptr %15, align 4, !tbaa !9
  %62 = fcmp olt float %60, %61
  br i1 %62, label %63, label %78

63:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 28, ptr %19) #5
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = load ptr, ptr %11, 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) %64, ptr noundef nonnull align 4 dereferenceable(12) %65, ptr noundef nonnull align 4 dereferenceable(12) %66)
  %67 = getelementptr inbounds %"struct.geometry::types::pointBaryCoord_t", ptr %19, i32 0, i32 0
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(12) %67)
  call void @llvm.lifetime.end.p0(i64 28, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #5
  %68 = load ptr, ptr %11, 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) %18, ptr noundef nonnull align 4 dereferenceable(12) %68)
  %69 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %20)
  %70 = load float, ptr %15, align 4, !tbaa !9
  %71 = fcmp olt float %69, %70
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #5
  br i1 %71, label %72, label %76

72:                                               ; preds = %63
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %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) %73)
  store i32 1, ptr %8, align 4
  store i32 1, ptr %21, align 4
  br label %77

76:                                               ; preds = %63
  store i32 0, ptr %8, align 4
  store i32 1, ptr %21, align 4
  br label %77

77:                                               ; preds = %76, %72
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #5
  br label %237

78:                                               ; preds = %7
  %79 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %16)
  %80 = load float, ptr %15, align 4, !tbaa !9
  %81 = fcmp olt float %79, %80
  br i1 %81, label %82, label %97

82:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 28, ptr %23) #5
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  %85 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %23, ptr noundef nonnull align 4 dereferenceable(12) %83, ptr noundef nonnull align 4 dereferenceable(12) %84, ptr noundef nonnull align 4 dereferenceable(12) %85)
  %86 = getelementptr inbounds %"struct.geometry::types::pointBaryCoord_t", ptr %23, i32 0, i32 0
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %86)
  call void @llvm.lifetime.end.p0(i64 28, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #5
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %24, ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %87)
  %88 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %24)
  %89 = load float, ptr %15, align 4, !tbaa !9
  %90 = fcmp olt float %88, %89
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #5
  br i1 %90, label %91, label %95

91:                                               ; preds = %82
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %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) %92)
  store i32 1, ptr %8, align 4
  store i32 1, ptr %21, align 4
  br label %96

95:                                               ; preds = %82
  store i32 0, ptr %8, align 4
  store i32 1, ptr %21, align 4
  br label %96

96:                                               ; preds = %95, %91
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #5
  br label %237

97:                                               ; preds = %78
  %98 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %16)
  %99 = load float, ptr %15, align 4, !tbaa !9
  %100 = fcmp olt float %98, %99
  br i1 %100, label %101, label %116

101:                                              ; preds = %97
  %102 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %17)
  %103 = load float, ptr %15, align 4, !tbaa !9
  %104 = fcmp olt float %102, %103
  br i1 %104, label %105, label %116

105:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #5
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %106, ptr noundef nonnull align 4 dereferenceable(12) %107)
  %108 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %25)
  %109 = load float, ptr %15, align 4, !tbaa !9
  %110 = fcmp olt float %108, %109
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #5
  br i1 %110, label %111, label %115

111:                                              ; preds = %105
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = load ptr, ptr %13, align 8, !tbaa !5
  %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) %112)
  store i32 1, ptr %8, align 4
  store i32 1, ptr %21, align 4
  br label %237

115:                                              ; preds = %105
  store i32 0, ptr %8, align 4
  store i32 1, ptr %21, align 4
  br label %237

116:                                              ; preds = %101, %97
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #5
  call void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %26, ptr noundef nonnull align 4 dereferenceable(12) %16, ptr noundef nonnull align 4 dereferenceable(12) %17)
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %117 = call noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12) %26)
  store float %117, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %118 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %16)
  store float %118, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  %119 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %17)
  store float %119, ptr %29, align 4, !tbaa !9
  %120 = load float, ptr %27, align 4, !tbaa !9
  %121 = load float, ptr %15, align 4, !tbaa !9
  %122 = fcmp ole float %120, %121
  br i1 %122, label %123, label %201

123:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #5
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = load ptr, ptr %9, 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) %124, ptr noundef nonnull align 4 dereferenceable(12) %125)
  %126 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(12) %16)
  %127 = load float, ptr %28, align 4, !tbaa !9
  %128 = load float, ptr %28, align 4, !tbaa !9
  %129 = fmul float %127, %128
  %130 = fdiv float %126, %129
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #5
  store float %130, ptr %30, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %33) #5
  %131 = load ptr, ptr %12, align 8, !tbaa !5
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %33, ptr noundef nonnull align 4 dereferenceable(12) %131, ptr noundef nonnull align 4 dereferenceable(12) %132)
  %133 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %33, ptr noundef nonnull align 4 dereferenceable(12) %16)
  %134 = load float, ptr %28, align 4, !tbaa !9
  %135 = load float, ptr %28, align 4, !tbaa !9
  %136 = fmul float %134, %135
  %137 = fdiv float %133, %136
  call void @llvm.lifetime.end.p0(i64 12, ptr %33) #5
  store float %137, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %35) #5
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %35, ptr noundef nonnull align 4 dereferenceable(12) %138, ptr noundef nonnull align 4 dereferenceable(12) %139)
  %140 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %35, ptr noundef nonnull align 4 dereferenceable(12) %17)
  %141 = load float, ptr %29, align 4, !tbaa !9
  %142 = load float, ptr %29, align 4, !tbaa !9
  %143 = fmul float %141, %142
  %144 = fdiv float %140, %143
  call void @llvm.lifetime.end.p0(i64 12, ptr %35) #5
  store float %144, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %37) #5
  %145 = load ptr, ptr %10, align 8, !tbaa !5
  %146 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %37, ptr noundef nonnull align 4 dereferenceable(12) %145, ptr noundef nonnull align 4 dereferenceable(12) %146)
  %147 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %37, ptr noundef nonnull align 4 dereferenceable(12) %17)
  %148 = load float, ptr %29, align 4, !tbaa !9
  %149 = load float, ptr %29, align 4, !tbaa !9
  %150 = fmul float %148, %149
  %151 = fdiv float %147, %150
  call void @llvm.lifetime.end.p0(i64 12, ptr %37) #5
  store float %151, ptr %36, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %39) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %40) #5
  %152 = load ptr, ptr %11, align 8, !tbaa !5
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %40, ptr noundef nonnull align 4 dereferenceable(12) %152, ptr noundef nonnull align 4 dereferenceable(12) %153)
  call void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %39, ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(12) %17)
  %154 = call noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12) %39)
  call void @llvm.lifetime.end.p0(i64 12, ptr %40) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %39) #5
  store float %154, ptr %38, align 4, !tbaa !9
  %155 = load float, ptr %30, align 4, !tbaa !9
  %156 = fcmp ogt float %155, 1.000000e+00
  br i1 %156, label %160, label %157

157:                                              ; preds = %123
  %158 = load float, ptr %30, align 4, !tbaa !9
  %159 = fcmp olt float %158, 0.000000e+00
  br i1 %159, label %160, label %178

160:                                              ; preds = %157, %123
  %161 = load float, ptr %32, align 4, !tbaa !9
  %162 = fcmp ogt float %161, 1.000000e+00
  br i1 %162, label %166, label %163

163:                                              ; preds = %160
  %164 = load float, ptr %32, align 4, !tbaa !9
  %165 = fcmp olt float %164, 0.000000e+00
  br i1 %165, label %166, label %178

166:                                              ; preds = %163, %160
  %167 = load float, ptr %34, align 4, !tbaa !9
  %168 = fcmp ogt float %167, 1.000000e+00
  br i1 %168, label %172, label %169

169:                                              ; preds = %166
  %170 = load float, ptr %34, align 4, !tbaa !9
  %171 = fcmp olt float %170, 0.000000e+00
  br i1 %171, label %172, label %178

172:                                              ; preds = %169, %166
  %173 = load float, ptr %36, align 4, !tbaa !9
  %174 = fcmp ogt float %173, 1.000000e+00
  br i1 %174, label %182, label %175

175:                                              ; preds = %172
  %176 = load float, ptr %36, align 4, !tbaa !9
  %177 = fcmp olt float %176, 0.000000e+00
  br i1 %177, label %182, label %178

178:                                              ; preds = %175, %169, %163, %157
  %179 = load float, ptr %38, align 4, !tbaa !9
  %180 = load float, ptr %15, align 4, !tbaa !9
  %181 = fcmp ogt float %179, %180
  br i1 %181, label %182, label %183

182:                                              ; preds = %178, %175, %172
  store i32 0, ptr %8, align 4
  store i32 1, ptr %21, align 4
  br label %200

183:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #5
  store float 0.000000e+00, ptr %41, align 4, !tbaa !9
  %184 = getelementptr inbounds float, ptr %41, i64 1
  store float 1.000000e+00, ptr %184, align 4, !tbaa !9
  %185 = getelementptr inbounds float, ptr %41, i64 2
  %186 = load float, ptr %30, align 4, !tbaa !9
  store float %186, ptr %185, align 4, !tbaa !9
  %187 = getelementptr inbounds float, ptr %41, i64 3
  %188 = load float, ptr %32, align 4, !tbaa !9
  store float %188, ptr %187, align 4, !tbaa !9
  %189 = getelementptr inbounds [4 x float], ptr %41, i64 0, i64 0
  %190 = getelementptr inbounds [4 x float], ptr %41, i64 0, i64 0
  %191 = getelementptr inbounds float, ptr %190, i64 4
  call void @_ZSt4sortIPfEvT_S1_(ptr noundef %189, ptr noundef %191)
  call void @llvm.lifetime.start.p0(i64 12, ptr %42) #5
  %192 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %43) #5
  %193 = getelementptr inbounds [4 x float], ptr %41, i64 0, i64 1
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %43, ptr noundef nonnull align 4 dereferenceable(4) %193, ptr noundef nonnull align 4 dereferenceable(12) %16)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %42, ptr noundef nonnull align 4 dereferenceable(12) %192, ptr noundef nonnull align 4 dereferenceable(12) %43)
  %194 = load ptr, ptr %13, align 8, !tbaa !5
  %195 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %194, ptr noundef nonnull align 4 dereferenceable(12) %42)
  call void @llvm.lifetime.end.p0(i64 12, ptr %43) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %42) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %44) #5
  %196 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %45) #5
  %197 = getelementptr inbounds [4 x float], ptr %41, i64 0, i64 2
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %45, ptr noundef nonnull align 4 dereferenceable(4) %197, ptr noundef nonnull align 4 dereferenceable(12) %16)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %44, ptr noundef nonnull align 4 dereferenceable(12) %196, ptr noundef nonnull align 4 dereferenceable(12) %45)
  %198 = load ptr, ptr %14, align 8, !tbaa !5
  %199 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %198, ptr noundef nonnull align 4 dereferenceable(12) %44)
  call void @llvm.lifetime.end.p0(i64 12, ptr %45) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %44) #5
  store i32 2, ptr %8, align 4
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #5
  br label %200

200:                                              ; preds = %183, %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %236

201:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %47) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %48) #5
  %202 = load ptr, ptr %11, align 8, !tbaa !5
  %203 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %48, ptr noundef nonnull align 4 dereferenceable(12) %202, ptr noundef nonnull align 4 dereferenceable(12) %203)
  call void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %47, ptr noundef nonnull align 4 dereferenceable(12) %48, ptr noundef nonnull align 4 dereferenceable(12) %17)
  %204 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %47, ptr noundef nonnull align 4 dereferenceable(12) %26)
  %205 = load float, ptr %27, align 4, !tbaa !9
  %206 = fdiv float %204, %205
  call void @llvm.lifetime.end.p0(i64 12, ptr %48) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %47) #5
  store float %206, ptr %46, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %50) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %51) #5
  %207 = load ptr, ptr %11, align 8, !tbaa !5
  %208 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %51, ptr noundef nonnull align 4 dereferenceable(12) %207, ptr noundef nonnull align 4 dereferenceable(12) %208)
  call void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %50, ptr noundef nonnull align 4 dereferenceable(12) %51, ptr noundef nonnull align 4 dereferenceable(12) %16)
  %209 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %50, ptr noundef nonnull align 4 dereferenceable(12) %26)
  %210 = load float, ptr %27, align 4, !tbaa !9
  %211 = fdiv float %209, %210
  call void @llvm.lifetime.end.p0(i64 12, ptr %51) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %50) #5
  store float %211, ptr %49, align 4, !tbaa !9
  %212 = load float, ptr %27, align 4, !tbaa !9
  %213 = fpext float %212 to double
  %214 = fcmp ogt double %213, 0x3D06849B86A12B9B
  br i1 %214, label %215, label %234

215:                                              ; preds = %201
  %216 = load float, ptr %46, align 4, !tbaa !9
  %217 = fcmp oge float %216, 0.000000e+00
  br i1 %217, label %218, label %234

218:                                              ; preds = %215
  %219 = load float, ptr %49, align 4, !tbaa !9
  %220 = fcmp oge float %219, 0.000000e+00
  br i1 %220, label %221, label %234

221:                                              ; preds = %218
  %222 = load float, ptr %46, align 4, !tbaa !9
  %223 = fcmp ole float %222, 1.000000e+00
  br i1 %223, label %224, label %234

224:                                              ; preds = %221
  %225 = load float, ptr %49, align 4, !tbaa !9
  %226 = fcmp ole float %225, 1.000000e+00
  br i1 %226, label %227, label %234

227:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 12, ptr %52) #5
  %228 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %53) #5
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %53, ptr noundef nonnull align 4 dereferenceable(4) %46, ptr noundef nonnull align 4 dereferenceable(12) %16)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %52, ptr noundef nonnull align 4 dereferenceable(12) %228, ptr noundef nonnull align 4 dereferenceable(12) %53)
  %229 = load ptr, ptr %13, align 8, !tbaa !5
  %230 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %229, ptr noundef nonnull align 4 dereferenceable(12) %52)
  call void @llvm.lifetime.end.p0(i64 12, ptr %53) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %52) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %54) #5
  %231 = load ptr, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %55) #5
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %55, ptr noundef nonnull align 4 dereferenceable(4) %49, ptr noundef nonnull align 4 dereferenceable(12) %17)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %54, ptr noundef nonnull align 4 dereferenceable(12) %231, ptr noundef nonnull align 4 dereferenceable(12) %55)
  %232 = load ptr, ptr %14, align 8, !tbaa !5
  %233 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %232, ptr noundef nonnull align 4 dereferenceable(12) %54)
  call void @llvm.lifetime.end.p0(i64 12, ptr %55) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %54) #5
  store i32 1, ptr %8, align 4
  store i32 1, ptr %21, align 4
  br label %235

234:                                              ; preds = %224, %221, %218, %215, %201
  store i32 0, ptr %8, align 4
  store i32 1, ptr %21, align 4
  br label %235

235:                                              ; preds = %234, %227
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #5
  br label %236

236:                                              ; preds = %235, %200
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #5
  br label %237

237:                                              ; preds = %236, %115, %111, %96, %77
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %16) #5
  %238 = load i32, ptr %8, align 4
  ret i32 %238
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector312crossProductERKS_(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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPfEvT_S1_(ptr noundef, ptr noundef) #4

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 = { 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}


; 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] }

; 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 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
declare dso_local void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 3) i32 @_ZN8geometry7segment12intersectionERK7Vector3S3_S3_S3_RS1_S4_f(ptr noundef nonnull align 4 dereferenceable(12) %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, ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef %6) local_unnamed_addr #1 {
  %8 = alloca %class.Vector3, align 4
  %9 = alloca %class.Vector3, align 4
  %10 = alloca %class.Vector3, align 4
  %11 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %12 = alloca %class.Vector3, align 4
  %13 = alloca %class.Vector3, align 4
  %14 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %15 = alloca %class.Vector3, align 4
  %16 = alloca %class.Vector3, align 4
  %17 = alloca %class.Vector3, align 4
  %18 = alloca %class.Vector3, 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 %class.Vector3, align 4
  %24 = alloca [4 x float], align 16
  %25 = alloca %class.Vector3, align 4
  %26 = alloca %class.Vector3, align 4
  %27 = alloca %class.Vector3, align 4
  %28 = alloca %class.Vector3, align 4
  %29 = alloca float, align 4
  %30 = alloca %class.Vector3, align 4
  %31 = alloca %class.Vector3, align 4
  %32 = alloca float, align 4
  %33 = alloca %class.Vector3, align 4
  %34 = alloca %class.Vector3, align 4
  %35 = alloca %class.Vector3, align 4
  %36 = alloca %class.Vector3, align 4
  %37 = alloca %class.Vector3, align 4
  %38 = alloca %class.Vector3, align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %8, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %0)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %39 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %9)
  %40 = fcmp olt float %39, %6
  br i1 %40, label %41, label %47

41:                                               ; preds = %7
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %11) #5
  call void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2)
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %42 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %12)
  %43 = fcmp olt float %42, %6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #5
  br i1 %43, label %44, label %46

44:                                               ; preds = %41
  %45 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %2)
  br label %46

46:                                               ; preds = %41, %44
  %.0 = phi i32 [ 1, %44 ], [ 0, %41 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #5
  br label %124

47:                                               ; preds = %7
  %48 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %8)
  %49 = fcmp olt float %48, %6
  br i1 %49, label %50, label %56

50:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %14) #5
  call void @_ZN8geometry7segment19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %14, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %0)
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %14)
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %14) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %15, ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %0)
  %51 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %15)
  %52 = fcmp olt float %51, %6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #5
  br i1 %52, label %53, label %55

53:                                               ; preds = %50
  %54 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %0)
  br label %55

55:                                               ; preds = %50, %53
  %.1 = phi i32 [ 1, %53 ], [ 0, %50 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #5
  br label %124

56:                                               ; preds = %47
  %57 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %8)
  %58 = fcmp olt float %57, %6
  br i1 %58, label %59, label %67

59:                                               ; preds = %56
  %60 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %9)
  %61 = fcmp olt float %60, %6
  br i1 %61, label %62, label %67

62:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %16) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %16, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %63 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %16)
  %64 = fcmp olt float %63, %6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %16) #5
  br i1 %64, label %65, label %124

65:                                               ; preds = %62
  %66 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %0)
  br label %124

67:                                               ; preds = %59, %56
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #5
  call void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %17, ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %9)
  %68 = call noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12) %17)
  %69 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %8)
  %70 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %9)
  %71 = fcmp ugt float %68, %6
  br i1 %71, label %108, label %72

72:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %18) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %18, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %0)
  %73 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(12) %8)
  %74 = fmul float %69, %69
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %18) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %19) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %19, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %0)
  %75 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %19, ptr noundef nonnull align 4 dereferenceable(12) %8)
  %76 = insertelement <2 x float> poison, float %73, i64 0
  %77 = insertelement <2 x float> %76, float %75, i64 1
  %78 = insertelement <2 x float> poison, float %74, i64 0
  %79 = shufflevector <2 x float> %78, <2 x float> poison, <2 x i32> zeroinitializer
  %80 = fdiv <2 x float> %77, %79
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %19) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %20) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %20, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %81 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %9)
  %82 = fmul float %70, %70
  %83 = fdiv float %81, %82
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %20) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %21, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %2)
  %84 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %21, ptr noundef nonnull align 4 dereferenceable(12) %9)
  %85 = fdiv float %84, %82
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %22) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %23) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %23, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %0)
  call void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %22, ptr noundef nonnull align 4 dereferenceable(12) %23, ptr noundef nonnull align 4 dereferenceable(12) %9)
  %86 = call noundef float @_ZNK7Vector316magnitudeSquaredEv(ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %23) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %22) #5
  %87 = extractelement <2 x float> %80, i64 0
  %88 = fcmp ogt float %87, 1.000000e+00
  %89 = fcmp olt float %87, 0.000000e+00
  %or.cond = or i1 %88, %89
  br i1 %or.cond, label %90, label %101

90:                                               ; preds = %72
  %91 = extractelement <2 x float> %80, i64 1
  %92 = fcmp ogt float %91, 1.000000e+00
  %93 = fcmp olt float %91, 0.000000e+00
  %or.cond3 = or i1 %92, %93
  br i1 %or.cond3, label %94, label %101

94:                                               ; preds = %90
  %95 = fcmp ogt float %83, 1.000000e+00
  %96 = fcmp olt float %83, 0.000000e+00
  %or.cond5 = or i1 %95, %96
  br i1 %or.cond5, label %97, label %101

97:                                               ; preds = %94
  %98 = fcmp ogt float %85, 1.000000e+00
  %99 = fcmp olt float %85, 0.000000e+00
  %or.cond7 = or i1 %98, %99
  %100 = fcmp ogt float %86, %6
  %or.cond92 = or i1 %or.cond7, %100
  br i1 %or.cond92, label %123, label %102

101:                                              ; preds = %94, %90, %72
  %.old = fcmp ogt float %86, %6
  br i1 %.old, label %123, label %102

102:                                              ; preds = %97, %101
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %24) #5
  %103 = getelementptr inbounds i8, ptr %24, i64 4
  store <2 x float> <float 0.000000e+00, float 1.000000e+00>, ptr %24, align 16, !tbaa !5
  %104 = getelementptr inbounds i8, ptr %24, i64 8
  store <2 x float> %80, ptr %104, align 8, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %24, i64 16
  call void @_ZSt4sortIPfEvT_S1_(ptr noundef nonnull %24, ptr noundef nonnull %105)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %25) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %26) #5
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %26, ptr noundef nonnull align 4 dereferenceable(4) %103, ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %26)
  %106 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %25)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %26) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %25) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %27) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %28) #5
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %28, ptr noundef nonnull align 4 dereferenceable(4) %104, ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %27, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %28)
  %107 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %27)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %28) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %27) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #5
  br label %123

108:                                              ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %29) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %30) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %31) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %31, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %0)
  call void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %30, ptr noundef nonnull align 4 dereferenceable(12) %31, ptr noundef nonnull align 4 dereferenceable(12) %9)
  %109 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %30, ptr noundef nonnull align 4 dereferenceable(12) %17)
  %110 = fdiv float %109, %68
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %31) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %30) #5
  store float %110, ptr %29, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %32) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %33) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %34) #5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %34, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %0)
  call void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %33, ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull align 4 dereferenceable(12) %8)
  %111 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %33, ptr noundef nonnull align 4 dereferenceable(12) %17)
  %112 = fdiv float %111, %68
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %34) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %33) #5
  store float %112, ptr %32, align 4, !tbaa !5
  %113 = fpext float %68 to double
  %114 = fcmp ogt double %113, 0x3D06849B86A12B9B
  %115 = fcmp oge float %110, 0.000000e+00
  %or.cond9 = and i1 %114, %115
  %116 = fcmp oge float %112, 0.000000e+00
  %or.cond11 = and i1 %116, %or.cond9
  %117 = fcmp ole float %110, 1.000000e+00
  %or.cond13 = and i1 %or.cond11, %117
  %118 = fcmp ole float %112, 1.000000e+00
  %or.cond15 = and i1 %118, %or.cond13
  br i1 %or.cond15, label %119, label %122

119:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %35) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %36) #5
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %36, ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %35, ptr noundef nonnull align 4 dereferenceable(12) %0, ptr noundef nonnull align 4 dereferenceable(12) %36)
  %120 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %35)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %36) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %35) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %37) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %38) #5
  call void @_ZmlRKfRK7Vector3(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %38, ptr noundef nonnull align 4 dereferenceable(4) %32, ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @_ZNK7Vector3plERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %37, ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) %38)
  %121 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3aSERKS_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %37)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %38) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %37) #5
  br label %122

122:                                              ; preds = %108, %119
  %.3 = phi i32 [ 1, %119 ], [ 0, %108 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %29) #5
  br label %123

123:                                              ; preds = %102, %101, %97, %122
  %.4 = phi i32 [ %.3, %122 ], [ 2, %102 ], [ 0, %101 ], [ 0, %97 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #5
  br label %124

124:                                              ; preds = %62, %123, %65, %55, %46
  %.5 = phi i32 [ %.0, %46 ], [ %.1, %55 ], [ 1, %65 ], [ %.4, %123 ], [ 0, %62 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #5
  ret i32 %.5
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector312crossProductERKS_(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: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPfEvT_S1_(ptr noundef, ptr noundef) local_unnamed_addr #4

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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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