; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZNK3P3D9CubeClass23getIntersectionDistanceENS_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 double, align 8
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca %"struct.P3D::Vector", align 8
  %8 = alloca %"struct.P3D::Vector", align 8
  %9 = alloca i32, align 4
  %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
  store ptr %0, ptr %5, align 8, !tbaa !5
  %16 = load ptr, ptr %5, align 8
  %17 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %18 = getelementptr inbounds %struct.anon, ptr %17, i32 0, i32 0
  %19 = load double, ptr %18, align 8, !tbaa !9
  %20 = fcmp olt double %19, 0.000000e+00
  br i1 %20, label %21, label %34

21:                                               ; preds = %3
  %22 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %23 = getelementptr inbounds %struct.anon, ptr %22, i32 0, i32 0
  %24 = load double, ptr %23, align 8, !tbaa !9
  %25 = fneg double %24
  %26 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %27 = getelementptr inbounds %struct.anon, ptr %26, i32 0, i32 0
  store double %25, ptr %27, align 8, !tbaa !9
  %28 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %29 = getelementptr inbounds %struct.anon, ptr %28, i32 0, i32 0
  %30 = load double, ptr %29, align 8, !tbaa !9
  %31 = fneg double %30
  %32 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %33 = getelementptr inbounds %struct.anon, ptr %32, i32 0, i32 0
  store double %31, ptr %33, align 8, !tbaa !9
  br label %34

34:                                               ; preds = %21, %3
  %35 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %36 = getelementptr inbounds %struct.anon, ptr %35, i32 0, i32 1
  %37 = load double, ptr %36, align 8, !tbaa !9
  %38 = fcmp olt double %37, 0.000000e+00
  br i1 %38, label %39, label %52

39:                                               ; preds = %34
  %40 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %41 = getelementptr inbounds %struct.anon, ptr %40, i32 0, i32 1
  %42 = load double, ptr %41, align 8, !tbaa !9
  %43 = fneg double %42
  %44 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %45 = getelementptr inbounds %struct.anon, ptr %44, i32 0, i32 1
  store double %43, ptr %45, align 8, !tbaa !9
  %46 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %47 = getelementptr inbounds %struct.anon, ptr %46, i32 0, i32 1
  %48 = load double, ptr %47, align 8, !tbaa !9
  %49 = fneg double %48
  %50 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %51 = getelementptr inbounds %struct.anon, ptr %50, i32 0, i32 1
  store double %49, ptr %51, align 8, !tbaa !9
  br label %52

52:                                               ; preds = %39, %34
  %53 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %54 = getelementptr inbounds %struct.anon, ptr %53, i32 0, i32 2
  %55 = load double, ptr %54, align 8, !tbaa !9
  %56 = fcmp olt double %55, 0.000000e+00
  br i1 %56, label %57, label %70

57:                                               ; preds = %52
  %58 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %59 = getelementptr inbounds %struct.anon, ptr %58, i32 0, i32 2
  %60 = load double, ptr %59, align 8, !tbaa !9
  %61 = fneg double %60
  %62 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %63 = getelementptr inbounds %struct.anon, ptr %62, i32 0, i32 2
  store double %61, ptr %63, align 8, !tbaa !9
  %64 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %65 = getelementptr inbounds %struct.anon, ptr %64, i32 0, i32 2
  %66 = load double, ptr %65, align 8, !tbaa !9
  %67 = fneg double %66
  %68 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %69 = getelementptr inbounds %struct.anon, ptr %68, i32 0, i32 2
  store double %67, ptr %69, align 8, !tbaa !9
  br label %70

70:                                               ; preds = %57, %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %71 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %72 = getelementptr inbounds %struct.anon, ptr %71, i32 0, i32 0
  %73 = load double, ptr %72, align 8, !tbaa !9
  %74 = fsub double 1.000000e+00, %73
  %75 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %76 = getelementptr inbounds %struct.anon, ptr %75, i32 0, i32 0
  %77 = load double, ptr %76, align 8, !tbaa !9
  %78 = fdiv double %74, %77
  store double %78, ptr %6, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #4
  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) #4
  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) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #4
  %79 = getelementptr inbounds %"struct.P3D::Vector", ptr %7, i32 0, i32 0
  %80 = getelementptr inbounds %struct.anon, ptr %79, i32 0, i32 1
  %81 = load double, ptr %80, align 8, !tbaa !9
  %82 = call noundef double @_ZSt3absd(double noundef %81)
  %83 = fcmp ole double %82, 1.000000e+00
  br i1 %83, label %84, label %92

84:                                               ; preds = %70
  %85 = getelementptr inbounds %"struct.P3D::Vector", ptr %7, i32 0, i32 0
  %86 = getelementptr inbounds %struct.anon, ptr %85, i32 0, i32 2
  %87 = load double, ptr %86, align 8, !tbaa !9
  %88 = call noundef double @_ZSt3absd(double noundef %87)
  %89 = fcmp ole double %88, 1.000000e+00
  br i1 %89, label %90, label %92

90:                                               ; preds = %84
  %91 = load double, ptr %6, align 8, !tbaa !10
  store double %91, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %140

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

106:                                              ; preds = %92
  %107 = getelementptr inbounds %"struct.P3D::Vector", ptr %11, i32 0, i32 0
  %108 = getelementptr inbounds %struct.anon, ptr %107, i32 0, i32 2
  %109 = load double, ptr %108, align 8, !tbaa !9
  %110 = call noundef double @_ZSt3absd(double noundef %109)
  %111 = fcmp ole double %110, 1.000000e+00
  br i1 %111, label %112, label %114

112:                                              ; preds = %106
  %113 = load double, ptr %10, align 8, !tbaa !10
  store double %113, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %139

114:                                              ; preds = %106, %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %115 = getelementptr inbounds %"struct.P3D::Vector", ptr %1, i32 0, i32 0
  %116 = getelementptr inbounds %struct.anon, ptr %115, i32 0, i32 2
  %117 = load double, ptr %116, align 8, !tbaa !9
  %118 = fsub double 1.000000e+00, %117
  %119 = getelementptr inbounds %"struct.P3D::Vector", ptr %2, i32 0, i32 0
  %120 = getelementptr inbounds %struct.anon, ptr %119, i32 0, i32 2
  %121 = load double, ptr %120, align 8, !tbaa !9
  %122 = fdiv double %118, %121
  store double %122, ptr %13, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  call void @_ZN3P3DmlIddLm3EEENS_6VectorIDTmlfp_ixfp0_Li0EEXT1_EEERKT_RKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %15, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  call void @_ZN3P3DplIddLm3EEENS_6VectorIDTplixfp_Li0Eixfp0_Li0EEXT1_EEERKNS1_IT_XT1_EEERKNS1_IT0_XT1_EEE(ptr dead_on_unwind writable sret(%"struct.P3D::Vector") align 8 %14, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  %123 = getelementptr inbounds %"struct.P3D::Vector", ptr %14, i32 0, i32 0
  %124 = getelementptr inbounds %struct.anon, ptr %123, i32 0, i32 0
  %125 = load double, ptr %124, align 8, !tbaa !9
  %126 = call noundef double @_ZSt3absd(double noundef %125)
  %127 = fcmp ole double %126, 1.000000e+00
  br i1 %127, label %128, label %136

128:                                              ; preds = %114
  %129 = getelementptr inbounds %"struct.P3D::Vector", ptr %14, i32 0, i32 0
  %130 = getelementptr inbounds %struct.anon, ptr %129, i32 0, i32 1
  %131 = load double, ptr %130, align 8, !tbaa !9
  %132 = call noundef double @_ZSt3absd(double noundef %131)
  %133 = fcmp ole double %132, 1.000000e+00
  br i1 %133, label %134, label %136

134:                                              ; preds = %128
  %135 = load double, ptr %13, align 8, !tbaa !10
  store double %135, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %138

136:                                              ; preds = %128, %114
  %137 = call noundef double @_ZNSt14numeric_limitsIdE8infinityEv() #4
  store double %137, ptr %4, align 8
  store i32 1, ptr %9, align 4
  br label %138

138:                                              ; preds = %136, %134
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %139

139:                                              ; preds = %138, %112
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %140

140:                                              ; preds = %139, %90
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %141 = load double, ptr %4, align 8
  ret double %141
}

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNSt14numeric_limitsIdE8infinityEv() #3 align 2

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZNK3P3D9CubeClass23getIntersectionDistanceENS_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 = load double, ptr %1, align 8, !tbaa !5
  %14 = fcmp olt double %13, 0.000000e+00
  br i1 %14, label %15, label %19

15:                                               ; preds = %3
  %16 = fneg double %13
  store double %16, ptr %1, align 8, !tbaa !5
  %17 = load double, ptr %2, align 8, !tbaa !5
  %18 = fneg double %17
  store double %18, ptr %2, align 8, !tbaa !5
  br label %19

19:                                               ; preds = %15, %3
  %20 = phi double [ %16, %15 ], [ %13, %3 ]
  %21 = getelementptr inbounds i8, ptr %1, i64 8
  %22 = load double, ptr %21, align 8, !tbaa !5
  %23 = fcmp olt double %22, 0.000000e+00
  br i1 %23, label %24, label %29

24:                                               ; preds = %19
  %25 = fneg double %22
  store double %25, ptr %21, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %2, i64 8
  %27 = load double, ptr %26, align 8, !tbaa !5
  %28 = fneg double %27
  store double %28, ptr %26, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %24, %19
  %30 = getelementptr inbounds i8, ptr %1, i64 16
  %31 = load double, ptr %30, align 8, !tbaa !5
  %32 = fcmp olt double %31, 0.000000e+00
  br i1 %32, label %33, label %38

33:                                               ; preds = %29
  %34 = fneg double %31
  store double %34, ptr %30, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %2, i64 16
  %36 = load double, ptr %35, align 8, !tbaa !5
  %37 = fneg double %36
  store double %37, ptr %35, align 8, !tbaa !5
  br label %38

38:                                               ; preds = %33, %29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %39 = fsub double 1.000000e+00, %20
  %40 = load double, ptr %2, align 8, !tbaa !5
  %41 = fdiv double %39, %40
  store double %41, ptr %4, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #3
  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) #3
  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) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #3
  %42 = getelementptr inbounds i8, ptr %5, i64 8
  %43 = load double, ptr %42, align 8, !tbaa !5
  %44 = call noundef double @_ZSt3absd(double noundef %43)
  %45 = fcmp ugt double %44, 1.000000e+00
  br i1 %45, label %53, label %46

46:                                               ; preds = %38
  %47 = getelementptr inbounds i8, ptr %5, i64 16
  %48 = load double, ptr %47, align 8, !tbaa !5
  %49 = call noundef double @_ZSt3absd(double noundef %48)
  %50 = fcmp ugt double %49, 1.000000e+00
  br i1 %50, label %53, label %51

51:                                               ; preds = %46
  %52 = load double, ptr %4, align 8, !tbaa !8
  br label %89

53:                                               ; preds = %46, %38
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  %54 = load double, ptr %21, align 8, !tbaa !5
  %55 = fsub double 1.000000e+00, %54
  %56 = getelementptr inbounds i8, ptr %2, i64 8
  %57 = load double, ptr %56, align 8, !tbaa !5
  %58 = fdiv double %55, %57
  store double %58, ptr %7, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #3
  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) #3
  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) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #3
  %59 = load double, ptr %8, align 8, !tbaa !5
  %60 = call noundef double @_ZSt3absd(double noundef %59)
  %61 = fcmp ugt double %60, 1.000000e+00
  br i1 %61, label %69, label %62

62:                                               ; preds = %53
  %63 = getelementptr inbounds i8, ptr %8, i64 16
  %64 = load double, ptr %63, align 8, !tbaa !5
  %65 = call noundef double @_ZSt3absd(double noundef %64)
  %66 = fcmp ugt double %65, 1.000000e+00
  br i1 %66, label %69, label %67

67:                                               ; preds = %62
  %68 = load double, ptr %7, align 8, !tbaa !8
  br label %88

69:                                               ; preds = %62, %53
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #3
  %70 = load double, ptr %30, align 8, !tbaa !5
  %71 = fsub double 1.000000e+00, %70
  %72 = getelementptr inbounds i8, ptr %2, i64 16
  %73 = load double, ptr %72, align 8, !tbaa !5
  %74 = fdiv double %71, %73
  store double %74, ptr %10, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #3
  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) #3
  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) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #3
  %75 = load double, ptr %11, align 8, !tbaa !5
  %76 = call noundef double @_ZSt3absd(double noundef %75)
  %77 = fcmp ugt double %76, 1.000000e+00
  br i1 %77, label %85, label %78

78:                                               ; preds = %69
  %79 = getelementptr inbounds i8, ptr %11, i64 8
  %80 = load double, ptr %79, align 8, !tbaa !5
  %81 = call noundef double @_ZSt3absd(double noundef %80)
  %82 = fcmp ugt double %81, 1.000000e+00
  br i1 %82, label %85, label %83

83:                                               ; preds = %78
  %84 = load double, ptr %10, align 8, !tbaa !8
  br label %87

85:                                               ; preds = %78, %69
  %86 = call noundef double @_ZNSt14numeric_limitsIdE8infinityEv() #3
  br label %87

87:                                               ; preds = %85, %83
  %.0 = phi double [ %84, %83 ], [ %86, %85 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #3
  br label %88

88:                                               ; preds = %87, %67
  %.1 = phi double [ %68, %67 ], [ %.0, %87 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  br label %89

89:                                               ; preds = %88, %51
  %.2 = phi double [ %52, %51 ], [ %.1, %88 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  ret double %.2
}

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

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

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

attributes #0 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass