; LLVM IR from ThePhysicsGuys/Physics3D :: Physics3D/geometry (builtinShapeClasses)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }
%struct.anon = type { double, double, double }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) #1

; 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 double @_ZNSt14numeric_limitsIdE3maxEv() #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZNK3P3D11CornerClass23getIntersectionDistanceENS_6VectorIdLm3EEES2_(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef byval(%"struct.P3D::Vector") align 8 %1, ptr noundef byval(%"struct.P3D::Vector") align 8 %2) unnamed_addr #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca %"struct.P3D::Vector", align 8
  %8 = alloca %"struct.P3D::Vector", align 8
  %9 = alloca double, align 8
  %10 = alloca %"struct.P3D::Vector", align 8
  %11 = alloca %"struct.P3D::Vector", align 8
  %12 = alloca double, align 8
  %13 = alloca %"struct.P3D::Vector", align 8
  %14 = alloca %"struct.P3D::Vector", align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca %"struct.P3D::Vector", align 8
  %18 = alloca %"struct.P3D::Vector", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #2
  %20 = call noundef double @_ZNSt14numeric_limitsIdE3maxEv() #2
  store double %20, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #2
  %21 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %22 = getelementptr inbounds %struct.anon, ptr %21, i32 0, i32 0
  %23 = load double, ptr %22, align 8, !tbaa !11
  %24 = fsub double -1.000000e+00, %23
  %25 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %26 = getelementptr inbounds %struct.anon, ptr %25, i32 0, i32 0
  %27 = load double, ptr %26, align 8, !tbaa !11
  %28 = fdiv double %24, %27
  store double %28, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #2
  call void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(24) %2) #2
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %7, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %8) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #2
  %29 = getelementptr inbounds %"struct.P3D::Vector", ptr %7, i32 0, i32 0
  %30 = getelementptr inbounds %struct.anon, ptr %29, i32 0, i32 1
  %31 = load double, ptr %30, align 8, !tbaa !11
  %32 = fcmp oge double %31, -1.000000e+00
  br i1 %32, label %33, label %57

33:                                               ; preds = %3
  %34 = getelementptr inbounds %"struct.P3D::Vector", ptr %7, i32 0, i32 0
  %35 = getelementptr inbounds %struct.anon, ptr %34, i32 0, i32 2
  %36 = load double, ptr %35, align 8, !tbaa !11
  %37 = fcmp oge double %36, -1.000000e+00
  br i1 %37, label %38, label %57

38:                                               ; preds = %33
  %39 = getelementptr inbounds %"struct.P3D::Vector", ptr %7, i32 0, i32 0
  %40 = getelementptr inbounds %struct.anon, ptr %39, i32 0, i32 1
  %41 = load double, ptr %40, align 8, !tbaa !11
  %42 = getelementptr inbounds %"struct.P3D::Vector", ptr %7, i32 0, i32 0
  %43 = getelementptr inbounds %struct.anon, ptr %42, i32 0, i32 2
  %44 = load double, ptr %43, align 8, !tbaa !11
  %45 = fadd double %41, %44
  %46 = fcmp ole double %45, 0.000000e+00
  br i1 %46, label %47, label %57

47:                                               ; preds = %38
  %48 = load double, ptr %6, align 8, !tbaa !9
  %49 = fcmp ogt double %48, 0.000000e+00
  br i1 %49, label %50, label %57

50:                                               ; preds = %47
  %51 = load double, ptr %6, align 8, !tbaa !9
  %52 = load double, ptr %5, align 8, !tbaa !9
  %53 = fcmp olt double %51, %52
  br i1 %53, label %54, label %56

54:                                               ; preds = %50
  %55 = load double, ptr %6, align 8, !tbaa !9
  store double %55, ptr %5, align 8, !tbaa !9
  br label %56

56:                                               ; preds = %54, %50
  br label %57

57:                                               ; preds = %56, %47, %38, %33, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  %58 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %59 = getelementptr inbounds %struct.anon, ptr %58, i32 0, i32 1
  %60 = load double, ptr %59, align 8, !tbaa !11
  %61 = fsub double -1.000000e+00, %60
  %62 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %63 = getelementptr inbounds %struct.anon, ptr %62, i32 0, i32 1
  %64 = load double, ptr %63, align 8, !tbaa !11
  %65 = fdiv double %61, %64
  store double %65, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #2
  call void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(24) %2) #2
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %10, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %11) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #2
  %66 = getelementptr inbounds %"struct.P3D::Vector", ptr %10, i32 0, i32 0
  %67 = getelementptr inbounds %struct.anon, ptr %66, i32 0, i32 0
  %68 = load double, ptr %67, align 8, !tbaa !11
  %69 = fcmp oge double %68, -1.000000e+00
  br i1 %69, label %70, label %94

70:                                               ; preds = %57
  %71 = getelementptr inbounds %"struct.P3D::Vector", ptr %10, i32 0, i32 0
  %72 = getelementptr inbounds %struct.anon, ptr %71, i32 0, i32 2
  %73 = load double, ptr %72, align 8, !tbaa !11
  %74 = fcmp oge double %73, -1.000000e+00
  br i1 %74, label %75, label %94

75:                                               ; preds = %70
  %76 = getelementptr inbounds %"struct.P3D::Vector", ptr %10, i32 0, i32 0
  %77 = getelementptr inbounds %struct.anon, ptr %76, i32 0, i32 0
  %78 = load double, ptr %77, align 8, !tbaa !11
  %79 = getelementptr inbounds %"struct.P3D::Vector", ptr %10, i32 0, i32 0
  %80 = getelementptr inbounds %struct.anon, ptr %79, i32 0, i32 2
  %81 = load double, ptr %80, align 8, !tbaa !11
  %82 = fadd double %78, %81
  %83 = fcmp ole double %82, 0.000000e+00
  br i1 %83, label %84, label %94

84:                                               ; preds = %75
  %85 = load double, ptr %9, align 8, !tbaa !9
  %86 = fcmp ogt double %85, 0.000000e+00
  br i1 %86, label %87, label %94

87:                                               ; preds = %84
  %88 = load double, ptr %9, align 8, !tbaa !9
  %89 = load double, ptr %5, align 8, !tbaa !9
  %90 = fcmp olt double %88, %89
  br i1 %90, label %91, label %93

91:                                               ; preds = %87
  %92 = load double, ptr %9, align 8, !tbaa !9
  store double %92, ptr %5, align 8, !tbaa !9
  br label %93

93:                                               ; preds = %91, %87
  br label %94

94:                                               ; preds = %93, %84, %75, %70, %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #2
  %95 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %96 = getelementptr inbounds %struct.anon, ptr %95, i32 0, i32 2
  %97 = load double, ptr %96, align 8, !tbaa !11
  %98 = fsub double -1.000000e+00, %97
  %99 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %100 = getelementptr inbounds %struct.anon, ptr %99, i32 0, i32 2
  %101 = load double, ptr %100, align 8, !tbaa !11
  %102 = fdiv double %98, %101
  store double %102, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #2
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #2
  call void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(24) %2) #2
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %14) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #2
  %103 = getelementptr inbounds %"struct.P3D::Vector", ptr %13, i32 0, i32 0
  %104 = getelementptr inbounds %struct.anon, ptr %103, i32 0, i32 0
  %105 = load double, ptr %104, align 8, !tbaa !11
  %106 = fcmp oge double %105, -1.000000e+00
  br i1 %106, label %107, label %131

107:                                              ; preds = %94
  %108 = getelementptr inbounds %"struct.P3D::Vector", ptr %13, i32 0, i32 0
  %109 = getelementptr inbounds %struct.anon, ptr %108, i32 0, i32 1
  %110 = load double, ptr %109, align 8, !tbaa !11
  %111 = fcmp oge double %110, -1.000000e+00
  br i1 %111, label %112, label %131

112:                                              ; preds = %107
  %113 = getelementptr inbounds %"struct.P3D::Vector", ptr %13, i32 0, i32 0
  %114 = getelementptr inbounds %struct.anon, ptr %113, i32 0, i32 0
  %115 = load double, ptr %114, align 8, !tbaa !11
  %116 = getelementptr inbounds %"struct.P3D::Vector", ptr %13, i32 0, i32 0
  %117 = getelementptr inbounds %struct.anon, ptr %116, i32 0, i32 1
  %118 = load double, ptr %117, align 8, !tbaa !11
  %119 = fadd double %115, %118
  %120 = fcmp ole double %119, 0.000000e+00
  br i1 %120, label %121, label %131

121:                                              ; preds = %112
  %122 = load double, ptr %12, align 8, !tbaa !9
  %123 = fcmp ogt double %122, 0.000000e+00
  br i1 %123, label %124, label %131

124:                                              ; preds = %121
  %125 = load double, ptr %12, align 8, !tbaa !9
  %126 = load double, ptr %5, align 8, !tbaa !9
  %127 = fcmp olt double %125, %126
  br i1 %127, label %128, label %130

128:                                              ; preds = %124
  %129 = load double, ptr %12, align 8, !tbaa !9
  store double %129, ptr %5, align 8, !tbaa !9
  br label %130

130:                                              ; preds = %128, %124
  br label %131

131:                                              ; preds = %130, %121, %112, %107, %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #2
  %132 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %133 = getelementptr inbounds %struct.anon, ptr %132, i32 0, i32 0
  %134 = load double, ptr %133, align 8, !tbaa !11
  %135 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %136 = getelementptr inbounds %struct.anon, ptr %135, i32 0, i32 1
  %137 = load double, ptr %136, align 8, !tbaa !11
  %138 = fadd double %134, %137
  %139 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %140 = getelementptr inbounds %struct.anon, ptr %139, i32 0, i32 2
  %141 = load double, ptr %140, align 8, !tbaa !11
  %142 = fadd double %138, %141
  store double %142, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #2
  %143 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %144 = getelementptr inbounds %struct.anon, ptr %143, i32 0, i32 0
  %145 = load double, ptr %144, align 8, !tbaa !11
  %146 = fsub double -1.000000e+00, %145
  %147 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %148 = getelementptr inbounds %struct.anon, ptr %147, i32 0, i32 1
  %149 = load double, ptr %148, align 8, !tbaa !11
  %150 = fsub double %146, %149
  %151 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %152 = getelementptr inbounds %struct.anon, ptr %151, i32 0, i32 2
  %153 = load double, ptr %152, align 8, !tbaa !11
  %154 = fsub double %150, %153
  %155 = load double, ptr %15, align 8, !tbaa !9
  %156 = fdiv double %154, %155
  store double %156, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #2
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #2
  call void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %18, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(24) %2) #2
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %18) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #2
  %157 = getelementptr inbounds %"struct.P3D::Vector", ptr %17, i32 0, i32 0
  %158 = getelementptr inbounds %struct.anon, ptr %157, i32 0, i32 0
  %159 = load double, ptr %158, align 8, !tbaa !11
  %160 = fcmp oge double %159, -1.000000e+00
  br i1 %160, label %161, label %181

161:                                              ; preds = %131
  %162 = getelementptr inbounds %"struct.P3D::Vector", ptr %17, i32 0, i32 0
  %163 = getelementptr inbounds %struct.anon, ptr %162, i32 0, i32 1
  %164 = load double, ptr %163, align 8, !tbaa !11
  %165 = fcmp oge double %164, -1.000000e+00
  br i1 %165, label %166, label %181

166:                                              ; preds = %161
  %167 = getelementptr inbounds %"struct.P3D::Vector", ptr %17, i32 0, i32 0
  %168 = getelementptr inbounds %struct.anon, ptr %167, i32 0, i32 2
  %169 = load double, ptr %168, align 8, !tbaa !11
  %170 = fcmp oge double %169, -1.000000e+00
  br i1 %170, label %171, label %181

171:                                              ; preds = %166
  %172 = load double, ptr %16, align 8, !tbaa !9
  %173 = fcmp ogt double %172, 0.000000e+00
  br i1 %173, label %174, label %181

174:                                              ; preds = %171
  %175 = load double, ptr %16, align 8, !tbaa !9
  %176 = load double, ptr %5, align 8, !tbaa !9
  %177 = fcmp olt double %175, %176
  br i1 %177, label %178, label %180

178:                                              ; preds = %174
  %179 = load double, ptr %16, align 8, !tbaa !9
  store double %179, ptr %5, align 8, !tbaa !9
  br label %180

180:                                              ; preds = %178, %174
  br label %181

181:                                              ; preds = %180, %171, %166, %161, %131
  %182 = load double, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #2
  ret double %182
}

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.P3D::Vector" = type { %union.anon }
%union.anon = type { [3 x double] }

; 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 nounwind uwtable
declare dso_local void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind noalias writable sret(%"struct.P3D::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE3maxEv() local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZNK3P3D11CornerClass23getIntersectionDistanceENS_6VectorIdLm3EEES2_(ptr nocapture noundef nonnull readnone align 8 dereferenceable(104) %0, ptr noundef byval(%"struct.P3D::Vector") align 8 %1, ptr noundef byval(%"struct.P3D::Vector") align 8 %2) unnamed_addr #1 align 2 {
  %4 = alloca double, align 8
  %5 = alloca %"struct.P3D::Vector", align 8
  %6 = alloca %"struct.P3D::Vector", align 8
  %7 = alloca double, align 8
  %8 = alloca %"struct.P3D::Vector", align 8
  %9 = alloca %"struct.P3D::Vector", align 8
  %10 = alloca double, align 8
  %11 = alloca %"struct.P3D::Vector", align 8
  %12 = alloca %"struct.P3D::Vector", align 8
  %13 = alloca double, align 8
  %14 = alloca %"struct.P3D::Vector", align 8
  %15 = alloca %"struct.P3D::Vector", align 8
  %16 = tail call noundef double @_ZNSt14numeric_limitsIdE3maxEv() #2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #2
  %17 = load double, ptr %1, align 8, !tbaa !5
  %18 = fsub double -1.000000e+00, %17
  %19 = load double, ptr %2, align 8, !tbaa !5
  %20 = fdiv double %18, %19
  store double %20, ptr %4, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #2
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #2
  call void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(24) %2) #2
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %6) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #2
  %21 = getelementptr inbounds i8, ptr %5, i64 8
  %22 = load double, ptr %21, align 8, !tbaa !5
  %23 = fcmp oge double %22, -1.000000e+00
  %24 = getelementptr inbounds i8, ptr %5, i64 16
  %25 = load double, ptr %24, align 8
  %26 = fcmp oge double %25, -1.000000e+00
  %or.cond = select i1 %23, i1 %26, i1 false
  br i1 %or.cond, label %27, label %35

27:                                               ; preds = %3
  %28 = fadd double %22, %25
  %29 = fcmp ole double %28, 0.000000e+00
  %30 = load double, ptr %4, align 8
  %31 = fcmp ogt double %30, 0.000000e+00
  %32 = fcmp olt double %30, %16
  %33 = and i1 %31, %32
  %or.cond45 = select i1 %29, i1 %33, i1 false
  br i1 %or.cond45, label %34, label %35

34:                                               ; preds = %27
  br label %35

35:                                               ; preds = %34, %27, %3
  %.0 = phi double [ %30, %34 ], [ %16, %27 ], [ %16, %3 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #2
  %36 = getelementptr inbounds i8, ptr %1, i64 8
  %37 = load double, ptr %36, align 8, !tbaa !5
  %38 = fsub double -1.000000e+00, %37
  %39 = getelementptr inbounds i8, ptr %2, i64 8
  %40 = load double, ptr %39, align 8, !tbaa !5
  %41 = fdiv double %38, %40
  store double %41, ptr %7, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #2
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #2
  call void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(24) %2) #2
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %9) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #2
  %42 = load double, ptr %8, align 8, !tbaa !5
  %43 = fcmp oge double %42, -1.000000e+00
  %44 = getelementptr inbounds i8, ptr %8, i64 16
  %45 = load double, ptr %44, align 8
  %46 = fcmp oge double %45, -1.000000e+00
  %or.cond9 = select i1 %43, i1 %46, i1 false
  br i1 %or.cond9, label %47, label %54

47:                                               ; preds = %35
  %48 = fadd double %42, %45
  %49 = fcmp ole double %48, 0.000000e+00
  %50 = load double, ptr %7, align 8
  %51 = fcmp ogt double %50, 0.000000e+00
  %or.cond11 = select i1 %49, i1 %51, i1 false
  %52 = fcmp olt double %50, %.0
  %or.cond46 = select i1 %or.cond11, i1 %52, i1 false
  br i1 %or.cond46, label %53, label %54

53:                                               ; preds = %47
  br label %54

54:                                               ; preds = %53, %47, %35
  %.1 = phi double [ %50, %53 ], [ %.0, %47 ], [ %.0, %35 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #2
  %55 = getelementptr inbounds i8, ptr %1, i64 16
  %56 = load double, ptr %55, align 8, !tbaa !5
  %57 = fsub double -1.000000e+00, %56
  %58 = getelementptr inbounds i8, ptr %2, i64 16
  %59 = load double, ptr %58, align 8, !tbaa !5
  %60 = fdiv double %57, %59
  store double %60, ptr %10, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #2
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #2
  call void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %12, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(24) %2) #2
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %11, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %12) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #2
  %61 = load double, ptr %11, align 8, !tbaa !5
  %62 = fcmp oge double %61, -1.000000e+00
  %63 = getelementptr inbounds i8, ptr %11, i64 8
  %64 = load double, ptr %63, align 8
  %65 = fcmp oge double %64, -1.000000e+00
  %or.cond15 = select i1 %62, i1 %65, i1 false
  br i1 %or.cond15, label %66, label %73

66:                                               ; preds = %54
  %67 = fadd double %61, %64
  %68 = fcmp ole double %67, 0.000000e+00
  %69 = load double, ptr %10, align 8
  %70 = fcmp ogt double %69, 0.000000e+00
  %or.cond17 = select i1 %68, i1 %70, i1 false
  %71 = fcmp olt double %69, %.1
  %or.cond47 = select i1 %or.cond17, i1 %71, i1 false
  br i1 %or.cond47, label %72, label %73

72:                                               ; preds = %66
  br label %73

73:                                               ; preds = %72, %66, %54
  %.2 = phi double [ %69, %72 ], [ %.1, %66 ], [ %.1, %54 ]
  %74 = load double, ptr %2, align 8, !tbaa !5
  %75 = load double, ptr %39, align 8, !tbaa !5
  %76 = fadd double %74, %75
  %77 = load double, ptr %58, align 8, !tbaa !5
  %78 = fadd double %76, %77
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #2
  %79 = load double, ptr %1, align 8, !tbaa !5
  %80 = fsub double -1.000000e+00, %79
  %81 = load double, ptr %36, align 8, !tbaa !5
  %82 = fsub double %80, %81
  %83 = load double, ptr %55, align 8, !tbaa !5
  %84 = fsub double %82, %83
  %85 = fdiv double %84, %78
  store double %85, ptr %13, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #2
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #2
  call void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %15, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(24) %2) #2
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.P3D::Vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %15) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #2
  %86 = load double, ptr %14, align 8, !tbaa !5
  %87 = fcmp oge double %86, -1.000000e+00
  %88 = getelementptr inbounds i8, ptr %14, i64 8
  %89 = load double, ptr %88, align 8
  %90 = fcmp oge double %89, -1.000000e+00
  %or.cond21 = select i1 %87, i1 %90, i1 false
  %91 = getelementptr inbounds i8, ptr %14, i64 16
  %92 = load double, ptr %91, align 8
  %93 = fcmp oge double %92, -1.000000e+00
  %or.cond25 = select i1 %or.cond21, i1 %93, i1 false
  %94 = load double, ptr %13, align 8
  %95 = fcmp ogt double %94, 0.000000e+00
  %or.cond27 = select i1 %or.cond25, i1 %95, i1 false
  %96 = fcmp olt double %94, %.2
  %or.cond48 = select i1 %or.cond27, i1 %96, i1 false
  %.3 = select i1 %or.cond48, double %94, double %.2
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #2
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #2
  ret double %.3
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"double", !6, i64 0}


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