; LLVM IR from SourangshuGhosh/Fluid-Simulation-for-Computer-Graphics :: src/aabb.ll (ZN4AABB16_planeBoxOverlapEN5vmath4vec3ES1_)

; 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.vmath::vec3" = type { float, float, float }
%class.AABB = type { %"class.vmath::vec3", double, double, double }

declare void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4AABB16_planeBoxOverlapEN5vmath4vec3ES1_(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %1, ptr noundef %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca %"class.vmath::vec3", align 4
  %18 = alloca %"class.vmath::vec3", align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %22 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %23 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 0
  %24 = load float, ptr %23, align 4, !tbaa !9
  %25 = fpext float %24 to double
  store double %25, ptr %14, align 8, !tbaa !12
  %26 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 1
  %27 = load float, ptr %26, align 4, !tbaa !14
  %28 = fpext float %27 to double
  store double %28, ptr %15, align 8, !tbaa !12
  %29 = getelementptr inbounds %"class.vmath::vec3", ptr %2, i32 0, i32 2
  %30 = load float, ptr %29, align 4, !tbaa !15
  %31 = fpext float %30 to double
  store double %31, ptr %16, align 8, !tbaa !12
  %32 = getelementptr inbounds %"class.vmath::vec3", ptr %1, i32 0, i32 0
  %33 = load float, ptr %32, align 4, !tbaa !9
  %34 = fpext float %33 to double
  %35 = fcmp ogt double %34, 0.000000e+00
  br i1 %35, label %36, label %47

36:                                               ; preds = %3
  %37 = getelementptr inbounds %class.AABB, ptr %22, i32 0, i32 1
  %38 = load double, ptr %37, align 8, !tbaa !16
  %39 = load double, ptr %14, align 8, !tbaa !12
  %40 = fneg double %39
  %41 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %38, double %40)
  store double %41, ptr %8, align 8, !tbaa !12
  %42 = getelementptr inbounds %class.AABB, ptr %22, i32 0, i32 1
  %43 = load double, ptr %42, align 8, !tbaa !16
  %44 = load double, ptr %14, align 8, !tbaa !12
  %45 = fneg double %44
  %46 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %43, double %45)
  store double %46, ptr %11, align 8, !tbaa !12
  br label %58

47:                                               ; preds = %3
  %48 = getelementptr inbounds %class.AABB, ptr %22, i32 0, i32 1
  %49 = load double, ptr %48, align 8, !tbaa !16
  %50 = load double, ptr %14, align 8, !tbaa !12
  %51 = fneg double %50
  %52 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %49, double %51)
  store double %52, ptr %8, align 8, !tbaa !12
  %53 = getelementptr inbounds %class.AABB, ptr %22, i32 0, i32 1
  %54 = load double, ptr %53, align 8, !tbaa !16
  %55 = load double, ptr %14, align 8, !tbaa !12
  %56 = fneg double %55
  %57 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %54, double %56)
  store double %57, ptr %11, align 8, !tbaa !12
  br label %58

58:                                               ; preds = %47, %36
  %59 = getelementptr inbounds %"class.vmath::vec3", ptr %1, i32 0, i32 1
  %60 = load float, ptr %59, align 4, !tbaa !14
  %61 = fpext float %60 to double
  %62 = fcmp ogt double %61, 0.000000e+00
  br i1 %62, label %63, label %74

63:                                               ; preds = %58
  %64 = getelementptr inbounds %class.AABB, ptr %22, i32 0, i32 2
  %65 = load double, ptr %64, align 8, !tbaa !18
  %66 = load double, ptr %15, align 8, !tbaa !12
  %67 = fneg double %66
  %68 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %65, double %67)
  store double %68, ptr %9, align 8, !tbaa !12
  %69 = getelementptr inbounds %class.AABB, ptr %22, i32 0, i32 2
  %70 = load double, ptr %69, align 8, !tbaa !18
  %71 = load double, ptr %15, align 8, !tbaa !12
  %72 = fneg double %71
  %73 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %70, double %72)
  store double %73, ptr %12, align 8, !tbaa !12
  br label %85

74:                                               ; preds = %58
  %75 = getelementptr inbounds %class.AABB, ptr %22, i32 0, i32 2
  %76 = load double, ptr %75, align 8, !tbaa !18
  %77 = load double, ptr %15, align 8, !tbaa !12
  %78 = fneg double %77
  %79 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %76, double %78)
  store double %79, ptr %9, align 8, !tbaa !12
  %80 = getelementptr inbounds %class.AABB, ptr %22, i32 0, i32 2
  %81 = load double, ptr %80, align 8, !tbaa !18
  %82 = load double, ptr %15, align 8, !tbaa !12
  %83 = fneg double %82
  %84 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %81, double %83)
  store double %84, ptr %12, align 8, !tbaa !12
  br label %85

85:                                               ; preds = %74, %63
  %86 = getelementptr inbounds %"class.vmath::vec3", ptr %1, i32 0, i32 2
  %87 = load float, ptr %86, align 4, !tbaa !15
  %88 = fpext float %87 to double
  %89 = fcmp ogt double %88, 0.000000e+00
  br i1 %89, label %90, label %101

90:                                               ; preds = %85
  %91 = getelementptr inbounds %class.AABB, ptr %22, i32 0, i32 3
  %92 = load double, ptr %91, align 8, !tbaa !19
  %93 = load double, ptr %16, align 8, !tbaa !12
  %94 = fneg double %93
  %95 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %92, double %94)
  store double %95, ptr %10, align 8, !tbaa !12
  %96 = getelementptr inbounds %class.AABB, ptr %22, i32 0, i32 3
  %97 = load double, ptr %96, align 8, !tbaa !19
  %98 = load double, ptr %16, align 8, !tbaa !12
  %99 = fneg double %98
  %100 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %97, double %99)
  store double %100, ptr %13, align 8, !tbaa !12
  br label %112

101:                                              ; preds = %85
  %102 = getelementptr inbounds %class.AABB, ptr %22, i32 0, i32 3
  %103 = load double, ptr %102, align 8, !tbaa !19
  %104 = load double, ptr %16, align 8, !tbaa !12
  %105 = fneg double %104
  %106 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %103, double %105)
  store double %106, ptr %10, align 8, !tbaa !12
  %107 = getelementptr inbounds %class.AABB, ptr %22, i32 0, i32 3
  %108 = load double, ptr %107, align 8, !tbaa !19
  %109 = load double, ptr %16, align 8, !tbaa !12
  %110 = fneg double %109
  %111 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %108, double %110)
  store double %111, ptr %13, align 8, !tbaa !12
  br label %112

112:                                              ; preds = %101, %90
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #6
  %113 = load double, ptr %8, align 8, !tbaa !12
  %114 = fptrunc double %113 to float
  %115 = load double, ptr %9, align 8, !tbaa !12
  %116 = fptrunc double %115 to float
  %117 = load double, ptr %10, align 8, !tbaa !12
  %118 = fptrunc double %117 to float
  call void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12) %17, float noundef %114, float noundef %116, float noundef %118)
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #6
  %119 = load double, ptr %11, align 8, !tbaa !12
  %120 = fptrunc double %119 to float
  %121 = load double, ptr %12, align 8, !tbaa !12
  %122 = fptrunc double %121 to float
  %123 = load double, ptr %13, align 8, !tbaa !12
  %124 = fptrunc double %123 to float
  invoke void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12) %18, float noundef %120, float noundef %122, float noundef %124)
          to label %125 unwind label %131

125:                                              ; preds = %112
  %126 = invoke noundef float @_ZN5vmath3dotERKNS_4vec3ES2_(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %17)
          to label %127 unwind label %135

127:                                              ; preds = %125
  %128 = fpext float %126 to double
  %129 = fcmp ogt double %128, 0.000000e+00
  br i1 %129, label %130, label %139

130:                                              ; preds = %127
  store i1 false, ptr %4, align 1
  store i32 1, ptr %21, align 4
  br label %146

131:                                              ; preds = %112
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %19, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %20, align 4
  br label %148

135:                                              ; preds = %139, %125
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %19, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %20, align 4
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %18) #6
  br label %148

139:                                              ; preds = %127
  %140 = invoke noundef float @_ZN5vmath3dotERKNS_4vec3ES2_(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %18)
          to label %141 unwind label %135

141:                                              ; preds = %139
  %142 = fpext float %140 to double
  %143 = fcmp oge double %142, 0.000000e+00
  br i1 %143, label %144, label %145

144:                                              ; preds = %141
  store i1 true, ptr %4, align 1
  store i32 1, ptr %21, align 4
  br label %146

145:                                              ; preds = %141
  store i1 false, ptr %4, align 1
  store i32 1, ptr %21, align 4
  br label %146

146:                                              ; preds = %145, %144, %130
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %18) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %17) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %147 = load i1, ptr %4, align 1
  ret i1 %147

148:                                              ; preds = %135, %131
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %17) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %149

149:                                              ; preds = %148
  %150 = load ptr, ptr %19, align 8
  %151 = load i32, ptr %20, align 4
  %152 = insertvalue { ptr, i32 } poison, ptr %150, 0
  %153 = insertvalue { ptr, i32 } %152, i32 %151, 1
  resume { ptr, i32 } %153
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZN5vmath3dotERKNS_4vec3ES2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #5

attributes #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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, !11, i64 0}
!10 = !{!"_ZTSN5vmath4vec3E", !11, i64 0, !11, i64 4, !11, i64 8}
!11 = !{!"float", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!10, !11, i64 4}
!15 = !{!10, !11, i64 8}
!16 = !{!17, !13, i64 16}
!17 = !{!"_ZTS4AABB", !10, i64 0, !13, i64 16, !13, i64 24, !13, i64 32}
!18 = !{!17, !13, i64 24}
!19 = !{!17, !13, i64 32}


; 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.vmath::vec3" = type { float, float, float }

declare void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12), float noundef, float noundef, float noundef) unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4AABB16_planeBoxOverlapEN5vmath4vec3ES1_(ptr nocapture noundef nonnull readonly align 8 dereferenceable(40) %0, ptr noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.vmath::vec3", align 4
  %5 = alloca %"class.vmath::vec3", align 4
  %6 = load float, ptr %2, align 4, !tbaa !5
  %7 = fpext float %6 to double
  %8 = getelementptr inbounds i8, ptr %2, i64 4
  %9 = load float, ptr %8, align 4, !tbaa !10
  %10 = fpext float %9 to double
  %11 = getelementptr inbounds i8, ptr %2, i64 8
  %12 = load float, ptr %11, align 4, !tbaa !11
  %13 = fpext float %12 to double
  %14 = load float, ptr %1, align 4, !tbaa !5
  %15 = fcmp ogt float %14, 0.000000e+00
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  %17 = load double, ptr %16, align 8, !tbaa !12
  %18 = fneg double %7
  br i1 %15, label %19, label %25

19:                                               ; preds = %3
  %20 = insertelement <2 x double> poison, double %17, i64 0
  %21 = shufflevector <2 x double> %20, <2 x double> poison, <2 x i32> zeroinitializer
  %22 = insertelement <2 x double> poison, double %18, i64 0
  %23 = shufflevector <2 x double> %22, <2 x double> poison, <2 x i32> zeroinitializer
  %24 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %21, <2 x double> <double 5.000000e-01, double -5.000000e-01>, <2 x double> %23)
  br label %31

25:                                               ; preds = %3
  %26 = insertelement <2 x double> poison, double %17, i64 0
  %27 = shufflevector <2 x double> %26, <2 x double> poison, <2 x i32> zeroinitializer
  %28 = insertelement <2 x double> poison, double %18, i64 0
  %29 = shufflevector <2 x double> %28, <2 x double> poison, <2 x i32> zeroinitializer
  %30 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %27, <2 x double> <double -5.000000e-01, double 5.000000e-01>, <2 x double> %29)
  br label %31

31:                                               ; preds = %25, %19
  %32 = phi <2 x double> [ %24, %19 ], [ %30, %25 ]
  %33 = getelementptr inbounds i8, ptr %1, i64 4
  %34 = load float, ptr %33, align 4, !tbaa !10
  %35 = fcmp ogt float %34, 0.000000e+00
  %36 = getelementptr inbounds i8, ptr %0, i64 24
  %37 = load double, ptr %36, align 8, !tbaa !15
  %38 = fneg double %10
  br i1 %35, label %39, label %45

39:                                               ; preds = %31
  %40 = insertelement <2 x double> poison, double %37, i64 0
  %41 = shufflevector <2 x double> %40, <2 x double> poison, <2 x i32> zeroinitializer
  %42 = insertelement <2 x double> poison, double %38, i64 0
  %43 = shufflevector <2 x double> %42, <2 x double> poison, <2 x i32> zeroinitializer
  %44 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %41, <2 x double> <double 5.000000e-01, double -5.000000e-01>, <2 x double> %43)
  br label %51

45:                                               ; preds = %31
  %46 = insertelement <2 x double> poison, double %37, i64 0
  %47 = shufflevector <2 x double> %46, <2 x double> poison, <2 x i32> zeroinitializer
  %48 = insertelement <2 x double> poison, double %38, i64 0
  %49 = shufflevector <2 x double> %48, <2 x double> poison, <2 x i32> zeroinitializer
  %50 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %47, <2 x double> <double -5.000000e-01, double 5.000000e-01>, <2 x double> %49)
  br label %51

51:                                               ; preds = %45, %39
  %52 = phi <2 x double> [ %44, %39 ], [ %50, %45 ]
  %53 = getelementptr inbounds i8, ptr %1, i64 8
  %54 = load float, ptr %53, align 4, !tbaa !11
  %55 = fcmp ogt float %54, 0.000000e+00
  %56 = getelementptr inbounds i8, ptr %0, i64 32
  %57 = load double, ptr %56, align 8, !tbaa !16
  %58 = fneg double %13
  br i1 %55, label %59, label %65

59:                                               ; preds = %51
  %60 = insertelement <2 x double> poison, double %57, i64 0
  %61 = shufflevector <2 x double> %60, <2 x double> poison, <2 x i32> zeroinitializer
  %62 = insertelement <2 x double> poison, double %58, i64 0
  %63 = shufflevector <2 x double> %62, <2 x double> poison, <2 x i32> zeroinitializer
  %64 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %61, <2 x double> <double 5.000000e-01, double -5.000000e-01>, <2 x double> %63)
  br label %71

65:                                               ; preds = %51
  %66 = insertelement <2 x double> poison, double %57, i64 0
  %67 = shufflevector <2 x double> %66, <2 x double> poison, <2 x i32> zeroinitializer
  %68 = insertelement <2 x double> poison, double %58, i64 0
  %69 = shufflevector <2 x double> %68, <2 x double> poison, <2 x i32> zeroinitializer
  %70 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %67, <2 x double> <double -5.000000e-01, double 5.000000e-01>, <2 x double> %69)
  br label %71

71:                                               ; preds = %65, %59
  %72 = phi <2 x double> [ %64, %59 ], [ %70, %65 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #6
  %73 = extractelement <2 x double> %32, i64 1
  %74 = fptrunc double %73 to float
  %75 = extractelement <2 x double> %52, i64 1
  %76 = fptrunc double %75 to float
  %77 = extractelement <2 x double> %72, i64 1
  %78 = fptrunc double %77 to float
  call void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12) %4, float noundef %74, float noundef %76, float noundef %78)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #6
  %79 = extractelement <2 x double> %32, i64 0
  %80 = fptrunc double %79 to float
  %81 = extractelement <2 x double> %52, i64 0
  %82 = fptrunc double %81 to float
  %83 = extractelement <2 x double> %72, i64 0
  %84 = fptrunc double %83 to float
  invoke void @_ZN5vmath4vec3C1Efff(ptr noundef nonnull align 4 dereferenceable(12) %5, float noundef %80, float noundef %82, float noundef %84)
          to label %85 unwind label %88

85:                                               ; preds = %71
  %86 = call noundef float @_ZN5vmath3dotERKNS_4vec3ES2_(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %87 = fcmp ogt float %86, 0.000000e+00
  br i1 %87, label %93, label %90

88:                                               ; preds = %71
  %89 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %4) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  resume { ptr, i32 } %89

90:                                               ; preds = %85
  %91 = call noundef float @_ZN5vmath3dotERKNS_4vec3ES2_(ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %5)
  %92 = fcmp oge float %91, 0.000000e+00
  br label %93

93:                                               ; preds = %90, %85
  %.0 = phi i1 [ false, %85 ], [ %92, %90 ]
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %5) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #6
  call void @_ZN5vmath4vec3D1Ev(ptr noundef nonnull align 4 dereferenceable(12) %4) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #6
  ret i1 %.0
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #5

attributes #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "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 = { 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 #4 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

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

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


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