; LLVM IR from yangfengzzz/DigitalVox4 :: vox.math (collision_utils)

; 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.vox::BoundingPlane" = type { %"class.vox::Vector", float }
%"class.vox::Vector" = type { float, float, float }
%"class.vox::Point" = type { float, float, float }
%"class.vox::BoundingBox" = type { %"class.vox::Point", %"class.vox::Point" }

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12)) #0

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

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

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

declare void @_ZNK3vox15BoundingFrustum8getPlaneEi(ptr dead_on_unwind writable sret(%"class.vox::BoundingPlane") align 4, ptr noundef nonnull align 4 dereferenceable(96), i32 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3vox18frustumContainsBoxERKNS_15BoundingFrustumERKNS_11BoundingBoxIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(96) %0, ptr noundef nonnull align 4 dereferenceable(24) %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.vox::Point", align 4
  %9 = alloca %"class.vox::Point", align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.vox::BoundingPlane", align 4
  %14 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %"class.vox::BoundingBox", ptr %15, i32 0, i32 0
  store ptr %16, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %"class.vox::BoundingBox", ptr %17, i32 0, i32 1
  store ptr %18, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %8) #4
  call void @_ZN3vox5PointIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %8)
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #4
  call void @_ZN3vox5PointIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 1, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %19

19:                                               ; preds = %107, %2
  %20 = load i32, ptr %11, align 4, !tbaa !11
  %21 = icmp slt i32 %20, 6
  br i1 %21, label %23, label %22

22:                                               ; preds = %19
  store i32 2, ptr %12, align 4
  br label %110

23:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = load i32, ptr %11, align 4, !tbaa !11
  call void @_ZNK3vox15BoundingFrustum8getPlaneEi(ptr dead_on_unwind writable sret(%"class.vox::BoundingPlane") align 4 %13, ptr noundef nonnull align 4 dereferenceable(96) %24, i32 noundef %25)
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %26 = getelementptr inbounds %"class.vox::BoundingPlane", ptr %13, i32 0, i32 0
  store ptr %26, ptr %14, align 8, !tbaa !5
  %27 = load ptr, ptr %14, align 8, !tbaa !5
  %28 = getelementptr inbounds %"class.vox::Vector", ptr %27, i32 0, i32 0
  %29 = load float, ptr %28, align 4, !tbaa !13
  %30 = fcmp oge float %29, 0.000000e+00
  br i1 %30, label %31, label %40

31:                                               ; preds = %23
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %"class.vox::Point", ptr %32, i32 0, i32 0
  %34 = load float, ptr %33, align 4, !tbaa !16
  %35 = getelementptr inbounds %"class.vox::Point", ptr %8, i32 0, i32 0
  store float %34, ptr %35, align 4, !tbaa !16
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.vox::Point", ptr %36, i32 0, i32 0
  %38 = load float, ptr %37, align 4, !tbaa !16
  %39 = getelementptr inbounds %"class.vox::Point", ptr %9, i32 0, i32 0
  store float %38, ptr %39, align 4, !tbaa !16
  br label %49

40:                                               ; preds = %23
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %"class.vox::Point", ptr %41, i32 0, i32 0
  %43 = load float, ptr %42, align 4, !tbaa !16
  %44 = getelementptr inbounds %"class.vox::Point", ptr %8, i32 0, i32 0
  store float %43, ptr %44, align 4, !tbaa !16
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = getelementptr inbounds %"class.vox::Point", ptr %45, i32 0, i32 0
  %47 = load float, ptr %46, align 4, !tbaa !16
  %48 = getelementptr inbounds %"class.vox::Point", ptr %9, i32 0, i32 0
  store float %47, ptr %48, align 4, !tbaa !16
  br label %49

49:                                               ; preds = %40, %31
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  %51 = getelementptr inbounds %"class.vox::Vector", ptr %50, i32 0, i32 1
  %52 = load float, ptr %51, align 4, !tbaa !18
  %53 = fcmp oge float %52, 0.000000e+00
  br i1 %53, label %54, label %63

54:                                               ; preds = %49
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = getelementptr inbounds %"class.vox::Point", ptr %55, i32 0, i32 1
  %57 = load float, ptr %56, align 4, !tbaa !19
  %58 = getelementptr inbounds %"class.vox::Point", ptr %8, i32 0, i32 1
  store float %57, ptr %58, align 4, !tbaa !19
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %"class.vox::Point", ptr %59, i32 0, i32 1
  %61 = load float, ptr %60, align 4, !tbaa !19
  %62 = getelementptr inbounds %"class.vox::Point", ptr %9, i32 0, i32 1
  store float %61, ptr %62, align 4, !tbaa !19
  br label %72

63:                                               ; preds = %49
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %"class.vox::Point", ptr %64, i32 0, i32 1
  %66 = load float, ptr %65, align 4, !tbaa !19
  %67 = getelementptr inbounds %"class.vox::Point", ptr %8, i32 0, i32 1
  store float %66, ptr %67, align 4, !tbaa !19
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %"class.vox::Point", ptr %68, i32 0, i32 1
  %70 = load float, ptr %69, align 4, !tbaa !19
  %71 = getelementptr inbounds %"class.vox::Point", ptr %9, i32 0, i32 1
  store float %70, ptr %71, align 4, !tbaa !19
  br label %72

72:                                               ; preds = %63, %54
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = getelementptr inbounds %"class.vox::Vector", ptr %73, i32 0, i32 2
  %75 = load float, ptr %74, align 4, !tbaa !20
  %76 = fcmp oge float %75, 0.000000e+00
  br i1 %76, label %77, label %86

77:                                               ; preds = %72
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %"class.vox::Point", ptr %78, i32 0, i32 2
  %80 = load float, ptr %79, align 4, !tbaa !21
  %81 = getelementptr inbounds %"class.vox::Point", ptr %8, i32 0, i32 2
  store float %80, ptr %81, align 4, !tbaa !21
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %"class.vox::Point", ptr %82, i32 0, i32 2
  %84 = load float, ptr %83, align 4, !tbaa !21
  %85 = getelementptr inbounds %"class.vox::Point", ptr %9, i32 0, i32 2
  store float %84, ptr %85, align 4, !tbaa !21
  br label %95

86:                                               ; preds = %72
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %"class.vox::Point", ptr %87, i32 0, i32 2
  %89 = load float, ptr %88, align 4, !tbaa !21
  %90 = getelementptr inbounds %"class.vox::Point", ptr %8, i32 0, i32 2
  store float %89, ptr %90, align 4, !tbaa !21
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %"class.vox::Point", ptr %91, i32 0, i32 2
  %93 = load float, ptr %92, align 4, !tbaa !21
  %94 = getelementptr inbounds %"class.vox::Point", ptr %9, i32 0, i32 2
  store float %93, ptr %94, align 4, !tbaa !21
  br label %95

95:                                               ; preds = %86, %77
  %96 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(12) %9)
  %97 = icmp eq i32 %96, 1
  br i1 %97, label %98, label %99

98:                                               ; preds = %95
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %104

99:                                               ; preds = %95
  %100 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(12) %8)
  %101 = icmp eq i32 %100, 1
  br i1 %101, label %102, label %103

102:                                              ; preds = %99
  store i32 2, ptr %10, align 4, !tbaa !9
  br label %103

103:                                              ; preds = %102, %99
  store i32 0, ptr %12, align 4
  br label %104

104:                                              ; preds = %103, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  %105 = load i32, ptr %12, align 4
  switch i32 %105, label %110 [
    i32 0, label %106
  ]

106:                                              ; preds = %104
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %11, align 4, !tbaa !11
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %11, align 4, !tbaa !11
  br label %19, !llvm.loop !22

110:                                              ; preds = %104, %22
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  %111 = load i32, ptr %12, align 4
  switch i32 %111, label %114 [
    i32 2, label %112
  ]

112:                                              ; preds = %110
  %113 = load i32, ptr %10, align 4, !tbaa !9
  store i32 %113, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %114

114:                                              ; preds = %112, %110
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %115 = load i32, ptr %3, align 4
  ret i32 %115
}

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"_ZTSN3vox15ContainmentTypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN3vox6VectorIfLm3EEE", !15, i64 0, !15, i64 4, !15, i64 8}
!15 = !{!"float", !7, i64 0}
!16 = !{!17, !15, i64 0}
!17 = !{!"_ZTSN3vox5PointIfLm3EEE", !15, i64 0, !15, i64 4, !15, i64 8}
!18 = !{!14, !15, i64 4}
!19 = !{!17, !15, i64 4}
!20 = !{!14, !15, i64 8}
!21 = !{!17, !15, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


; 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.vox::BoundingPlane" = type { %"class.vox::Vector", float }
%"class.vox::Vector" = type { float, float, float }
%"class.vox::Point" = type { float, float, float }

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12)) local_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

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

declare void @_ZNK3vox15BoundingFrustum8getPlaneEi(ptr dead_on_unwind writable sret(%"class.vox::BoundingPlane") align 4, ptr noundef nonnull align 4 dereferenceable(96), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3vox18frustumContainsBoxERKNS_15BoundingFrustumERKNS_11BoundingBoxIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(96) %0, ptr nocapture noundef nonnull readonly align 4 dereferenceable(24) %1) local_unnamed_addr #0 {
  %3 = alloca %"class.vox::Point", align 8
  %4 = alloca %"class.vox::Point", align 8
  %5 = alloca %"class.vox::BoundingPlane", align 8
  %6 = getelementptr inbounds i8, ptr %1, i64 12
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #4
  call void @_ZN3vox5PointIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #4
  call void @_ZN3vox5PointIfLm3EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12) %4)
  %7 = getelementptr inbounds i8, ptr %5, i64 8
  %8 = getelementptr inbounds i8, ptr %1, i64 20
  %9 = getelementptr inbounds i8, ptr %3, i64 8
  %10 = getelementptr inbounds i8, ptr %1, i64 8
  %11 = getelementptr inbounds i8, ptr %4, i64 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZNK3vox15BoundingFrustum8getPlaneEi(ptr dead_on_unwind nonnull writable sret(%"class.vox::BoundingPlane") align 4 %5, ptr noundef nonnull align 4 dereferenceable(96) %0, i32 noundef 0)
  %12 = load <2 x float>, ptr %5, align 8, !tbaa !5
  %13 = fcmp ult <2 x float> %12, zeroinitializer
  %14 = load <2 x float>, ptr %1, align 4
  %15 = load <2 x float>, ptr %6, align 4
  %16 = select <2 x i1> %13, <2 x float> %14, <2 x float> %15
  store <2 x float> %16, ptr %3, align 8, !tbaa !5
  %17 = select <2 x i1> %13, <2 x float> %15, <2 x float> %14
  store <2 x float> %17, ptr %4, align 8, !tbaa !5
  %18 = load float, ptr %7, align 8, !tbaa !9
  %19 = fcmp ult float %18, 0.000000e+00
  %.val50 = load float, ptr %10, align 4
  %.val51 = load float, ptr %8, align 4
  %storemerge45 = select i1 %19, float %.val50, float %.val51
  store float %storemerge45, ptr %9, align 8, !tbaa !11
  %storemerge44 = select i1 %19, float %.val51, float %.val50
  store float %storemerge44, ptr %11, align 8, !tbaa !11
  %20 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %.not = icmp eq i32 %20, 1
  br i1 %.not, label %.thread, label %21

.thread:                                          ; preds = %65, %54, %43, %32, %21, %2
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  br label %.loopexit

21:                                               ; preds = %2
  %22 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZNK3vox15BoundingFrustum8getPlaneEi(ptr dead_on_unwind nonnull writable sret(%"class.vox::BoundingPlane") align 4 %5, ptr noundef nonnull align 4 dereferenceable(96) %0, i32 noundef 1)
  %23 = load <2 x float>, ptr %5, align 8, !tbaa !5
  %24 = fcmp ult <2 x float> %23, zeroinitializer
  %25 = load <2 x float>, ptr %1, align 4
  %26 = load <2 x float>, ptr %6, align 4
  %27 = select <2 x i1> %24, <2 x float> %25, <2 x float> %26
  store <2 x float> %27, ptr %3, align 8, !tbaa !5
  %28 = select <2 x i1> %24, <2 x float> %26, <2 x float> %25
  store <2 x float> %28, ptr %4, align 8, !tbaa !5
  %29 = load float, ptr %7, align 8, !tbaa !9
  %30 = fcmp ult float %29, 0.000000e+00
  %.val50.1 = load float, ptr %10, align 4
  %.val51.1 = load float, ptr %8, align 4
  %storemerge45.1 = select i1 %30, float %.val50.1, float %.val51.1
  store float %storemerge45.1, ptr %9, align 8, !tbaa !11
  %storemerge44.1 = select i1 %30, float %.val51.1, float %.val50.1
  store float %storemerge44.1, ptr %11, align 8, !tbaa !11
  %31 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %.not.1 = icmp eq i32 %31, 1
  br i1 %.not.1, label %.thread, label %32

32:                                               ; preds = %21
  %33 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZNK3vox15BoundingFrustum8getPlaneEi(ptr dead_on_unwind nonnull writable sret(%"class.vox::BoundingPlane") align 4 %5, ptr noundef nonnull align 4 dereferenceable(96) %0, i32 noundef 2)
  %34 = load <2 x float>, ptr %5, align 8, !tbaa !5
  %35 = fcmp ult <2 x float> %34, zeroinitializer
  %36 = load <2 x float>, ptr %1, align 4
  %37 = load <2 x float>, ptr %6, align 4
  %38 = select <2 x i1> %35, <2 x float> %36, <2 x float> %37
  store <2 x float> %38, ptr %3, align 8, !tbaa !5
  %39 = select <2 x i1> %35, <2 x float> %37, <2 x float> %36
  store <2 x float> %39, ptr %4, align 8, !tbaa !5
  %40 = load float, ptr %7, align 8, !tbaa !9
  %41 = fcmp ult float %40, 0.000000e+00
  %.val50.2 = load float, ptr %10, align 4
  %.val51.2 = load float, ptr %8, align 4
  %storemerge45.2 = select i1 %41, float %.val50.2, float %.val51.2
  store float %storemerge45.2, ptr %9, align 8, !tbaa !11
  %storemerge44.2 = select i1 %41, float %.val51.2, float %.val50.2
  store float %storemerge44.2, ptr %11, align 8, !tbaa !11
  %42 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %.not.2 = icmp eq i32 %42, 1
  br i1 %.not.2, label %.thread, label %43

43:                                               ; preds = %32
  %44 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZNK3vox15BoundingFrustum8getPlaneEi(ptr dead_on_unwind nonnull writable sret(%"class.vox::BoundingPlane") align 4 %5, ptr noundef nonnull align 4 dereferenceable(96) %0, i32 noundef 3)
  %45 = load <2 x float>, ptr %5, align 8, !tbaa !5
  %46 = fcmp ult <2 x float> %45, zeroinitializer
  %47 = load <2 x float>, ptr %1, align 4
  %48 = load <2 x float>, ptr %6, align 4
  %49 = select <2 x i1> %46, <2 x float> %47, <2 x float> %48
  store <2 x float> %49, ptr %3, align 8, !tbaa !5
  %50 = select <2 x i1> %46, <2 x float> %48, <2 x float> %47
  store <2 x float> %50, ptr %4, align 8, !tbaa !5
  %51 = load float, ptr %7, align 8, !tbaa !9
  %52 = fcmp ult float %51, 0.000000e+00
  %.val50.3 = load float, ptr %10, align 4
  %.val51.3 = load float, ptr %8, align 4
  %storemerge45.3 = select i1 %52, float %.val50.3, float %.val51.3
  store float %storemerge45.3, ptr %9, align 8, !tbaa !11
  %storemerge44.3 = select i1 %52, float %.val51.3, float %.val50.3
  store float %storemerge44.3, ptr %11, align 8, !tbaa !11
  %53 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %.not.3 = icmp eq i32 %53, 1
  br i1 %.not.3, label %.thread, label %54

54:                                               ; preds = %43
  %55 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZNK3vox15BoundingFrustum8getPlaneEi(ptr dead_on_unwind nonnull writable sret(%"class.vox::BoundingPlane") align 4 %5, ptr noundef nonnull align 4 dereferenceable(96) %0, i32 noundef 4)
  %56 = load <2 x float>, ptr %5, align 8, !tbaa !5
  %57 = fcmp ult <2 x float> %56, zeroinitializer
  %58 = load <2 x float>, ptr %1, align 4
  %59 = load <2 x float>, ptr %6, align 4
  %60 = select <2 x i1> %57, <2 x float> %58, <2 x float> %59
  store <2 x float> %60, ptr %3, align 8, !tbaa !5
  %61 = select <2 x i1> %57, <2 x float> %59, <2 x float> %58
  store <2 x float> %61, ptr %4, align 8, !tbaa !5
  %62 = load float, ptr %7, align 8, !tbaa !9
  %63 = fcmp ult float %62, 0.000000e+00
  %.val50.4 = load float, ptr %10, align 4
  %.val51.4 = load float, ptr %8, align 4
  %storemerge45.4 = select i1 %63, float %.val50.4, float %.val51.4
  store float %storemerge45.4, ptr %9, align 8, !tbaa !11
  %storemerge44.4 = select i1 %63, float %.val51.4, float %.val50.4
  store float %storemerge44.4, ptr %11, align 8, !tbaa !11
  %64 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %.not.4 = icmp eq i32 %64, 1
  br i1 %.not.4, label %.thread, label %65

65:                                               ; preds = %54
  %66 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %3)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZNK3vox15BoundingFrustum8getPlaneEi(ptr dead_on_unwind nonnull writable sret(%"class.vox::BoundingPlane") align 4 %5, ptr noundef nonnull align 4 dereferenceable(96) %0, i32 noundef 5)
  %67 = load <2 x float>, ptr %5, align 8, !tbaa !5
  %68 = fcmp ult <2 x float> %67, zeroinitializer
  %69 = load <2 x float>, ptr %1, align 4
  %70 = load <2 x float>, ptr %6, align 4
  %71 = select <2 x i1> %68, <2 x float> %69, <2 x float> %70
  store <2 x float> %71, ptr %3, align 8, !tbaa !5
  %72 = select <2 x i1> %68, <2 x float> %70, <2 x float> %69
  store <2 x float> %72, ptr %4, align 8, !tbaa !5
  %73 = load float, ptr %7, align 8, !tbaa !9
  %74 = fcmp ult float %73, 0.000000e+00
  %.val50.5 = load float, ptr %10, align 4
  %.val51.5 = load float, ptr %8, align 4
  %storemerge45.5 = select i1 %74, float %.val50.5, float %.val51.5
  store float %storemerge45.5, ptr %9, align 8, !tbaa !11
  %storemerge44.5 = select i1 %74, float %.val51.5, float %.val50.5
  store float %storemerge44.5, ptr %11, align 8, !tbaa !11
  %75 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %.not.5 = icmp eq i32 %75, 1
  br i1 %.not.5, label %.thread, label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %65
  %76 = icmp eq i32 %66, 1
  %77 = icmp eq i32 %55, 1
  %78 = icmp eq i32 %44, 1
  %79 = icmp eq i32 %33, 1
  %80 = icmp eq i32 %22, 1
  %81 = or i1 %79, %80
  %82 = or i1 %78, %81
  %83 = or i1 %77, %82
  %84 = or i1 %76, %83
  %85 = call noundef i32 @_ZN3vox23intersectsPlaneAndPointERKNS_13BoundingPlaneIfLm3EEERKNS_5PointIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(12) %3)
  %86 = icmp eq i32 %85, 1
  %87 = or i1 %86, %84
  %spec.select.5 = select i1 %87, i32 2, i32 1
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.thread
  %spec.select34 = phi i32 [ 0, %.thread ], [ %spec.select.5, %.loopexit.loopexit ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #4
  ret i32 %spec.select34
}

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTSN3vox6VectorIfLm3EEE", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTSN3vox5PointIfLm3EEE", !6, i64 0, !6, i64 4, !6, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass