; LLVM IR from yangfengzzz/Arche-webgpu :: vox.geometry (surface_set2)

; 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::Transform2" = type { %"struct.vox::Vector", double, double, double }
%"struct.vox::Vector" = type { double, double }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.vox::SurfaceSet2" = type <{ %"class.vox::Surface2.base", [7 x i8], %"class.std::vector", %"class.std::vector", %"class.vox::Bvh2", i8, [7 x i8] }>
%"class.vox::Surface2.base" = type <{ ptr, %"class.vox::Transform2", i8 }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<vox::Surface2>, std::allocator<std::shared_ptr<vox::Surface2>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<vox::Surface2>, std::allocator<std::shared_ptr<vox::Surface2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<vox::Surface2>, std::allocator<std::shared_ptr<vox::Surface2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<vox::Surface2>, std::allocator<std::shared_ptr<vox::Surface2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.vox::Bvh2" = type { %"class.vox::IntersectionQueryEngine2", %"class.vox::NearestNeighborQueryEngine2", %"struct.vox::BoundingBox", %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5" }
%"class.vox::IntersectionQueryEngine2" = type { ptr }
%"class.vox::NearestNeighborQueryEngine2" = type { ptr }
%"struct.vox::BoundingBox" = type { %"struct.vox::Point", %"struct.vox::Point" }
%"struct.vox::Point" = type { double, double }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<vox::BoundingBox<double, 2>, std::allocator<vox::BoundingBox<double, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<vox::BoundingBox<double, 2>, std::allocator<vox::BoundingBox<double, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vox::BoundingBox<double, 2>, std::allocator<vox::BoundingBox<double, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vox::BoundingBox<double, 2>, std::allocator<vox::BoundingBox<double, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<vox::Bvh2<std::shared_ptr<vox::Surface2>>::Node, std::allocator<vox::Bvh2<std::shared_ptr<vox::Surface2>>::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<vox::Bvh2<std::shared_ptr<vox::Surface2>>::Node, std::allocator<vox::Bvh2<std::shared_ptr<vox::Surface2>>::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<vox::Bvh2<std::shared_ptr<vox::Surface2>>::Node, std::allocator<vox::Bvh2<std::shared_ptr<vox::Surface2>>::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vox::Bvh2<std::shared_ptr<vox::Surface2>>::Node, std::allocator<vox::Bvh2<std::shared_ptr<vox::Surface2>>::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTVN3vox11SurfaceSet2E = external dso_local unnamed_addr constant { [14 x ptr] }, align 8

declare void @_ZN3vox8Surface2C2ENS_10Transform2IdEEb(ptr noundef nonnull align 8 dereferenceable(49), ptr noundef, i1 noundef zeroext) unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vox4Bvh2ISt10shared_ptrINS_8Surface2EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: nounwind
declare void @_ZN3vox8Surface2D2Ev(ptr noundef nonnull align 8 dereferenceable(49)) unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3vox11SurfaceSet2C2ESt6vectorISt10shared_ptrINS_8Surface2EESaIS4_EERKNS_10Transform2IdEEb(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(40) %2, i1 noundef zeroext %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca %"class.vox::Transform2", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca ptr, align 8
  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
  %16 = zext i1 %3 to i8
  store i8 %16, ptr %8, align 1, !tbaa !9
  %17 = load ptr, ptr %5, align 8
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN3vox10Transform2IdEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %9, ptr noundef nonnull align 8 dereferenceable(40) %18)
  %19 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %20 = trunc i8 %19 to i1
  call void @_ZN3vox8Surface2C2ENS_10Transform2IdEEb(ptr noundef nonnull align 8 dereferenceable(49) %17, ptr noundef %9, i1 noundef zeroext %20)
  store ptr getelementptr inbounds inrange(-16, 96) ({ [14 x ptr] }, ptr @_ZTVN3vox11SurfaceSet2E, i32 0, i32 0, i32 2), ptr %17, align 8, !tbaa !13
  %21 = getelementptr inbounds %"class.vox::SurfaceSet2", ptr %17, i32 0, i32 2
  call void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EEC2EOS5_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %22 = getelementptr inbounds %"class.vox::SurfaceSet2", ptr %17, i32 0, i32 3
  call void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #7
  %23 = getelementptr inbounds %"class.vox::SurfaceSet2", ptr %17, i32 0, i32 4
  invoke void @_ZN3vox4Bvh2ISt10shared_ptrINS_8Surface2EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %23)
          to label %24 unwind label %36

24:                                               ; preds = %4
  %25 = getelementptr inbounds %"class.vox::SurfaceSet2", ptr %17, i32 0, i32 5
  store i8 1, ptr %25, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %26 = getelementptr inbounds %"class.vox::SurfaceSet2", ptr %17, i32 0, i32 2
  store ptr %26, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %27 = load ptr, ptr %12, align 8, !tbaa !5
  %28 = call ptr @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #7
  %29 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %28, ptr %29, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %30 = load ptr, ptr %12, align 8, !tbaa !5
  %31 = call ptr @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #7
  %32 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %31, ptr %32, align 8
  br label %33

33:                                               ; preds = %58, %24
  %34 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN3vox8Surface2EESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br i1 %34, label %40, label %35

35:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %60

36:                                               ; preds = %4
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %10, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %11, align 4
  br label %67

40:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %41 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3vox8Surface2EESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  store ptr %41, ptr %15, align 8, !tbaa !5
  %42 = load ptr, ptr %15, align 8, !tbaa !5
  %43 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3vox8Surface2ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %42) #7
  %44 = load ptr, ptr %43, align 8, !tbaa !13
  %45 = getelementptr inbounds ptr, ptr %44, i64 3
  %46 = load ptr, ptr %45, align 8
  %47 = invoke noundef zeroext i1 %46(ptr noundef nonnull align 8 dereferenceable(49) %43)
          to label %48 unwind label %53

48:                                               ; preds = %40
  br i1 %47, label %57, label %49

49:                                               ; preds = %48
  %50 = getelementptr inbounds %"class.vox::SurfaceSet2", ptr %17, i32 0, i32 3
  %51 = load ptr, ptr %15, align 8, !tbaa !5
  invoke void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %50, ptr noundef nonnull align 8 dereferenceable(16) %51)
          to label %52 unwind label %53

52:                                               ; preds = %49
  br label %57

53:                                               ; preds = %49, %40
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %10, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %66

57:                                               ; preds = %52, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %58

58:                                               ; preds = %57
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3vox8Surface2EESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br label %33

60:                                               ; preds = %35
  invoke void @_ZN3vox11SurfaceSet213invalidateBvhEv(ptr noundef nonnull align 8 dereferenceable(232) %17)
          to label %61 unwind label %62

61:                                               ; preds = %60
  ret void

62:                                               ; preds = %60
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %10, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %11, align 4
  br label %66

66:                                               ; preds = %62, %53
  call void @_ZN3vox4Bvh2ISt10shared_ptrINS_8Surface2EEED2Ev(ptr noundef nonnull align 8 dereferenceable(120) %23) #7
  br label %67

67:                                               ; preds = %66, %36
  call void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #7
  call void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  call void @_ZN3vox8Surface2D2Ev(ptr noundef nonnull align 8 dereferenceable(49) %17) #7
  br label %68

68:                                               ; preds = %67
  %69 = load ptr, ptr %10, align 8
  %70 = load i32, ptr %11, align 4
  %71 = insertvalue { ptr, i32 } poison, ptr %69, 0
  %72 = insertvalue { ptr, i32 } %71, i32 %70, 1
  resume { ptr, i32 } %72
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3vox10Transform2IdEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EEC2EOS5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN3vox8Surface2EESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3vox8Surface2EESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3vox8Surface2ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3vox8Surface2EESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox11SurfaceSet213invalidateBvhEv(ptr noundef nonnull align 8 dereferenceable(232)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3vox4Bvh2ISt10shared_ptrINS_8Surface2EEED2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #6 align 2

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 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 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 = { 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { 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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !10, i64 224}
!16 = !{!"_ZTSN3vox11SurfaceSet2E", !17, i64 0, !21, i64 56, !21, i64 80, !25, i64 104, !10, i64 224}
!17 = !{!"_ZTSN3vox8Surface2E", !18, i64 8, !10, i64 48}
!18 = !{!"_ZTSN3vox10Transform2IdEE", !19, i64 0, !20, i64 16, !20, i64 24, !20, i64 32}
!19 = !{!"_ZTSN3vox6VectorIdLm2EEE", !20, i64 0, !20, i64 8}
!20 = !{!"double", !7, i64 0}
!21 = !{!"_ZTSSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3vox8Surface2EESaIS3_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3vox8Surface2EESaIS3_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3vox8Surface2EESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSN3vox4Bvh2ISt10shared_ptrINS_8Surface2EEEE", !26, i64 0, !27, i64 8, !28, i64 16, !21, i64 48, !30, i64 72, !34, i64 96}
!26 = !{!"_ZTSN3vox24IntersectionQueryEngine2ISt10shared_ptrINS_8Surface2EEEE"}
!27 = !{!"_ZTSN3vox27NearestNeighborQueryEngine2ISt10shared_ptrINS_8Surface2EEEE"}
!28 = !{!"_ZTSN3vox11BoundingBoxIdLm2EEE", !29, i64 0, !29, i64 16}
!29 = !{!"_ZTSN3vox5PointIdLm2EEE", !20, i64 0, !20, i64 8}
!30 = !{!"_ZTSSt6vectorIN3vox11BoundingBoxIdLm2EEESaIS2_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIN3vox11BoundingBoxIdLm2EEESaIS2_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN3vox11BoundingBoxIdLm2EEESaIS2_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN3vox11BoundingBoxIdLm2EEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTSSt6vectorIN3vox4Bvh2ISt10shared_ptrINS0_8Surface2EEE4NodeESaIS6_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIN3vox4Bvh2ISt10shared_ptrINS0_8Surface2EEE4NodeESaIS6_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN3vox4Bvh2ISt10shared_ptrINS0_8Surface2EEE4NodeESaIS6_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIN3vox4Bvh2ISt10shared_ptrINS0_8Surface2EEE4NodeESaIS6_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}


; 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::Transform2" = type { %"struct.vox::Vector", double, double, double }
%"struct.vox::Vector" = type { double, double }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZTVN3vox11SurfaceSet2E = external dso_local unnamed_addr constant { [14 x ptr] }, align 8

declare void @_ZN3vox8Surface2C2ENS_10Transform2IdEEb(ptr noundef nonnull align 8 dereferenceable(49), ptr noundef, i1 noundef zeroext) unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vox4Bvh2ISt10shared_ptrINS_8Surface2EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: nounwind
declare void @_ZN3vox8Surface2D2Ev(ptr noundef nonnull align 8 dereferenceable(49)) unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3vox11SurfaceSet2C2ESt6vectorISt10shared_ptrINS_8Surface2EESaIS4_EERKNS_10Transform2IdEEb(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(40) %2, i1 noundef zeroext %3) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.vox::Transform2", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @_ZN3vox10Transform2IdEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef nonnull align 8 dereferenceable(40) %2)
  call void @_ZN3vox8Surface2C2ENS_10Transform2IdEEb(ptr noundef nonnull align 8 dereferenceable(49) %0, ptr noundef nonnull %5, i1 noundef zeroext %3)
  store ptr getelementptr inbounds inrange(-16, 96) (i8, ptr @_ZTVN3vox11SurfaceSet2E, i64 16), ptr %0, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 56
  call void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EEC2EOS5_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %9 = getelementptr inbounds i8, ptr %0, i64 80
  call void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %10 = getelementptr inbounds i8, ptr %0, i64 104
  invoke void @_ZN3vox4Bvh2ISt10shared_ptrINS_8Surface2EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %10)
          to label %11 unwind label %16

11:                                               ; preds = %4
  %12 = getelementptr inbounds i8, ptr %0, i64 224
  store i8 1, ptr %12, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %13 = call ptr @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  store ptr %13, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %14 = call ptr @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  store ptr %14, ptr %7, align 8
  %15 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN3vox8Surface2EESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %28, %11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN3vox11SurfaceSet213invalidateBvhEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  ret void

16:                                               ; preds = %4
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %31

.lr.ph:                                           ; preds = %11, %28
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3vox8Surface2EESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %19 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN3vox8Surface2ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 24
  %22 = load ptr, ptr %21, align 8
  %23 = invoke noundef zeroext i1 %22(ptr noundef nonnull align 8 dereferenceable(49) %19)
          to label %24 unwind label %26

24:                                               ; preds = %.lr.ph
  br i1 %23, label %28, label %25

25:                                               ; preds = %24
  invoke void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %28 unwind label %26

26:                                               ; preds = %25, %.lr.ph
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN3vox4Bvh2ISt10shared_ptrINS_8Surface2EEED2Ev(ptr noundef nonnull align 8 dereferenceable(120) %10) #7
  br label %31

28:                                               ; preds = %25, %24
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3vox8Surface2EESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %30 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN3vox8Surface2EESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %30, label %.lr.ph, label %._crit_edge

31:                                               ; preds = %26, %16
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %17, %16 ]
  call void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @_ZN3vox8Surface2D2Ev(ptr noundef nonnull align 8 dereferenceable(49) %0) #7
  resume { ptr, i32 } %.pn
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3vox10Transform2IdEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EEC2EOS5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrIN3vox8Surface2EESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3vox8Surface2EESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN3vox8Surface2ELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN3vox8Surface2EESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox11SurfaceSet213invalidateBvhEv(ptr noundef nonnull align 8 dereferenceable(232)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3vox4Bvh2ISt10shared_ptrINS_8Surface2EEED2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #6 align 2

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 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 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 = { 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !15, i64 224}
!9 = !{!"_ZTSN3vox11SurfaceSet2E", !10, i64 0, !16, i64 56, !16, i64 80, !21, i64 104, !15, i64 224}
!10 = !{!"_ZTSN3vox8Surface2E", !11, i64 8, !15, i64 48}
!11 = !{!"_ZTSN3vox10Transform2IdEE", !12, i64 0, !13, i64 16, !13, i64 24, !13, i64 32}
!12 = !{!"_ZTSN3vox6VectorIdLm2EEE", !13, i64 0, !13, i64 8}
!13 = !{!"double", !14, i64 0}
!14 = !{!"omnipotent char", !7, i64 0}
!15 = !{!"bool", !14, i64 0}
!16 = !{!"_ZTSSt6vectorISt10shared_ptrIN3vox8Surface2EESaIS3_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3vox8Surface2EESaIS3_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3vox8Surface2EESaIS3_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3vox8Surface2EESaIS3_EE17_Vector_impl_dataE", !20, i64 0, !20, i64 8, !20, i64 16}
!20 = !{!"any pointer", !14, i64 0}
!21 = !{!"_ZTSN3vox4Bvh2ISt10shared_ptrINS_8Surface2EEEE", !22, i64 0, !23, i64 8, !24, i64 16, !16, i64 48, !26, i64 72, !30, i64 96}
!22 = !{!"_ZTSN3vox24IntersectionQueryEngine2ISt10shared_ptrINS_8Surface2EEEE"}
!23 = !{!"_ZTSN3vox27NearestNeighborQueryEngine2ISt10shared_ptrINS_8Surface2EEEE"}
!24 = !{!"_ZTSN3vox11BoundingBoxIdLm2EEE", !25, i64 0, !25, i64 16}
!25 = !{!"_ZTSN3vox5PointIdLm2EEE", !13, i64 0, !13, i64 8}
!26 = !{!"_ZTSSt6vectorIN3vox11BoundingBoxIdLm2EEESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIN3vox11BoundingBoxIdLm2EEESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN3vox11BoundingBoxIdLm2EEESaIS2_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIN3vox11BoundingBoxIdLm2EEESaIS2_EE17_Vector_impl_dataE", !20, i64 0, !20, i64 8, !20, i64 16}
!30 = !{!"_ZTSSt6vectorIN3vox4Bvh2ISt10shared_ptrINS0_8Surface2EEE4NodeESaIS6_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIN3vox4Bvh2ISt10shared_ptrINS0_8Surface2EEE4NodeESaIS6_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN3vox4Bvh2ISt10shared_ptrINS0_8Surface2EEE4NodeESaIS6_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN3vox4Bvh2ISt10shared_ptrINS0_8Surface2EEE4NodeESaIS6_EE17_Vector_impl_dataE", !20, i64 0, !20, i64 8, !20, i64 16}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass