; LLVM IR from doyubkim/fluid-engine-dev :: src/jet (implicit_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.__gnu_cxx::__normal_iterator.15" = type { ptr }
%"class.jet::ImplicitSurfaceSet2" = type <{ %"class.jet::ImplicitSurface2.base", [7 x i8], %"class.std::vector", %"class.std::vector", %"class.jet::Bvh2", i8, [7 x i8] }>
%"class.jet::ImplicitSurface2.base" = type { %"class.jet::Surface2.base" }
%"class.jet::Surface2.base" = type <{ ptr, %"class.jet::Transform2", i8 }>
%"class.jet::Transform2" = type { %"class.jet::Vector", double, double, double }
%"class.jet::Vector" = type { double, double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<jet::ImplicitSurface2>, std::allocator<std::shared_ptr<jet::ImplicitSurface2>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<jet::ImplicitSurface2>, std::allocator<std::shared_ptr<jet::ImplicitSurface2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<jet::ImplicitSurface2>, std::allocator<std::shared_ptr<jet::ImplicitSurface2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<jet::ImplicitSurface2>, std::allocator<std::shared_ptr<jet::ImplicitSurface2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.jet::Bvh2" = type { %"class.jet::IntersectionQueryEngine2", %"class.jet::NearestNeighborQueryEngine2", %"class.jet::BoundingBox", %"class.std::vector", %"class.std::vector.0", %"class.std::vector.5" }
%"class.jet::IntersectionQueryEngine2" = type { ptr }
%"class.jet::NearestNeighborQueryEngine2" = type { ptr }
%"class.jet::BoundingBox" = type { %"class.jet::Vector", %"class.jet::Vector" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<jet::BoundingBox<double, 2>, std::allocator<jet::BoundingBox<double, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::BoundingBox<double, 2>, std::allocator<jet::BoundingBox<double, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::BoundingBox<double, 2>, std::allocator<jet::BoundingBox<double, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::BoundingBox<double, 2>, std::allocator<jet::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<jet::Bvh2<std::shared_ptr<jet::ImplicitSurface2>>::Node, std::allocator<jet::Bvh2<std::shared_ptr<jet::ImplicitSurface2>>::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::Bvh2<std::shared_ptr<jet::ImplicitSurface2>>::Node, std::allocator<jet::Bvh2<std::shared_ptr<jet::ImplicitSurface2>>::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::Bvh2<std::shared_ptr<jet::ImplicitSurface2>>::Node, std::allocator<jet::Bvh2<std::shared_ptr<jet::ImplicitSurface2>>::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::Bvh2<std::shared_ptr<jet::ImplicitSurface2>>::Node, std::allocator<jet::Bvh2<std::shared_ptr<jet::ImplicitSurface2>>::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTVN3jet19ImplicitSurfaceSet2E = external dso_local unnamed_addr constant { [15 x ptr] }, align 8

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

declare void @_ZN3jet16ImplicitSurface2C2ERKNS_10Transform2Eb(ptr noundef nonnull align 8 dereferenceable(49), ptr noundef nonnull align 8 dereferenceable(40), i1 noundef zeroext) unnamed_addr #1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3jet19ImplicitSurfaceSet2C2ERKSt6vectorISt10shared_ptrINS_8Surface2EESaIS4_EERKNS_10Transform2Eb(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(40) %2, i1 noundef zeroext %3) unnamed_addr #3 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 ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.15", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.15", align 8
  %14 = 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
  %15 = zext i1 %3 to i8
  store i8 %15, ptr %8, align 1, !tbaa !9
  %16 = load ptr, ptr %5, align 8
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %19 = trunc i8 %18 to i1
  call void @_ZN3jet16ImplicitSurface2C2ERKNS_10Transform2Eb(ptr noundef nonnull align 8 dereferenceable(49) %16, ptr noundef nonnull align 8 dereferenceable(40) %17, i1 noundef zeroext %19)
  store ptr getelementptr inbounds inrange(-16, 104) ({ [15 x ptr] }, ptr @_ZTVN3jet19ImplicitSurfaceSet2E, i32 0, i32 0, i32 2), ptr %16, align 8, !tbaa !13
  %20 = getelementptr inbounds %"class.jet::ImplicitSurfaceSet2", ptr %16, i32 0, i32 2
  call void @_ZNSt6vectorISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  %21 = getelementptr inbounds %"class.jet::ImplicitSurfaceSet2", ptr %16, i32 0, i32 3
  call void @_ZNSt6vectorISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  %22 = getelementptr inbounds %"class.jet::ImplicitSurfaceSet2", ptr %16, i32 0, i32 4
  invoke void @_ZN3jet4Bvh2ISt10shared_ptrINS_16ImplicitSurface2EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %22)
          to label %23 unwind label %35

23:                                               ; preds = %4
  %24 = getelementptr inbounds %"class.jet::ImplicitSurfaceSet2", ptr %16, i32 0, i32 5
  store i8 1, ptr %24, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %25, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %26 = load ptr, ptr %11, align 8, !tbaa !5
  %27 = call ptr @_ZNKSt6vectorISt10shared_ptrIN3jet8Surface2EESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #6
  %28 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.15", ptr %12, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %29 = load ptr, ptr %11, align 8, !tbaa !5
  %30 = call ptr @_ZNKSt6vectorISt10shared_ptrIN3jet8Surface2EESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #6
  %31 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.15", ptr %13, i32 0, i32 0
  store ptr %30, ptr %31, align 8
  br label %32

32:                                               ; preds = %43, %23
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt10shared_ptrIN3jet8Surface2EESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br i1 %33, label %39, label %34

34:                                               ; preds = %32
  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
  br label %49

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

39:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN3jet8Surface2EESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  store ptr %40, ptr %14, align 8, !tbaa !5
  %41 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN3jet19ImplicitSurfaceSet218addExplicitSurfaceERKSt10shared_ptrINS_8Surface2EE(ptr noundef nonnull align 8 dereferenceable(232) %16, ptr noundef nonnull align 8 dereferenceable(16) %41)
          to label %42 unwind label %45

42:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %43

43:                                               ; preds = %42
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN3jet8Surface2EESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br label %32

45:                                               ; preds = %39
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %9, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %10, align 4
  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 @_ZN3jet4Bvh2ISt10shared_ptrINS_16ImplicitSurface2EEED2Ev(ptr noundef nonnull align 8 dereferenceable(120) %22) #6
  br label %50

49:                                               ; preds = %34
  ret void

50:                                               ; preds = %45, %35
  call void @_ZNSt6vectorISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  call void @_ZNSt6vectorISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  call void @_ZN3jet16ImplicitSurface2D2Ev(ptr noundef nonnull align 8 dereferenceable(49) %16) #6
  br label %51

51:                                               ; preds = %50
  %52 = load ptr, ptr %9, align 8
  %53 = load i32, ptr %10, align 4
  %54 = insertvalue { ptr, i32 } poison, ptr %52, 0
  %55 = insertvalue { ptr, i32 } %54, i32 %53, 1
  resume { ptr, i32 } %55
}

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 = { 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 = { 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 #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, !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 = !{!"_ZTSN3jet19ImplicitSurfaceSet2E", !17, i64 0, !22, i64 56, !22, i64 80, !26, i64 104, !10, i64 224}
!17 = !{!"_ZTSN3jet16ImplicitSurface2E", !18, i64 0}
!18 = !{!"_ZTSN3jet8Surface2E", !19, i64 8, !10, i64 48}
!19 = !{!"_ZTSN3jet10Transform2E", !20, i64 0, !21, i64 16, !21, i64 24, !21, i64 32}
!20 = !{!"_ZTSN3jet6VectorIdLm2EEE", !21, i64 0, !21, i64 8}
!21 = !{!"double", !7, i64 0}
!22 = !{!"_ZTSSt6vectorISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSN3jet4Bvh2ISt10shared_ptrINS_16ImplicitSurface2EEEE", !27, i64 0, !28, i64 8, !29, i64 16, !22, i64 48, !30, i64 72, !34, i64 96}
!27 = !{!"_ZTSN3jet24IntersectionQueryEngine2ISt10shared_ptrINS_16ImplicitSurface2EEEE"}
!28 = !{!"_ZTSN3jet27NearestNeighborQueryEngine2ISt10shared_ptrINS_16ImplicitSurface2EEEE"}
!29 = !{!"_ZTSN3jet11BoundingBoxIdLm2EEE", !20, i64 0, !20, i64 16}
!30 = !{!"_ZTSSt6vectorIN3jet11BoundingBoxIdLm2EEESaIS2_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIN3jet11BoundingBoxIdLm2EEESaIS2_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN3jet11BoundingBoxIdLm2EEESaIS2_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN3jet11BoundingBoxIdLm2EEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTSSt6vectorIN3jet4Bvh2ISt10shared_ptrINS0_16ImplicitSurface2EEE4NodeESaIS6_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIN3jet4Bvh2ISt10shared_ptrINS0_16ImplicitSurface2EEE4NodeESaIS6_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN3jet4Bvh2ISt10shared_ptrINS0_16ImplicitSurface2EEE4NodeESaIS6_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIN3jet4Bvh2ISt10shared_ptrINS0_16ImplicitSurface2EEE4NodeESaIS6_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.__gnu_cxx::__normal_iterator.15" = type { ptr }

@_ZTVN3jet19ImplicitSurfaceSet2E = external dso_local unnamed_addr constant { [15 x ptr] }, align 8

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

declare void @_ZN3jet16ImplicitSurface2C2ERKNS_10Transform2Eb(ptr noundef nonnull align 8 dereferenceable(49), ptr noundef nonnull align 8 dereferenceable(40), i1 noundef zeroext) unnamed_addr #1

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3jet19ImplicitSurfaceSet2C2ERKSt6vectorISt10shared_ptrINS_8Surface2EESaIS4_EERKNS_10Transform2Eb(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(40) %2, i1 noundef zeroext %3) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.15", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.15", align 8
  tail call void @_ZN3jet16ImplicitSurface2C2ERKNS_10Transform2Eb(ptr noundef nonnull align 8 dereferenceable(49) %0, ptr noundef nonnull align 8 dereferenceable(40) %2, i1 noundef zeroext %3)
  store ptr getelementptr inbounds inrange(-16, 104) (i8, ptr @_ZTVN3jet19ImplicitSurfaceSet2E, i64 16), ptr %0, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @_ZNSt6vectorISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %8 = getelementptr inbounds i8, ptr %0, i64 80
  tail call void @_ZNSt6vectorISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  %9 = getelementptr inbounds i8, ptr %0, i64 104
  invoke void @_ZN3jet4Bvh2ISt10shared_ptrINS_16ImplicitSurface2EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %9)
          to label %10 unwind label %15

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

._crit_edge:                                      ; preds = %18, %10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  ret void

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

.lr.ph:                                           ; preds = %10, %18
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN3jet8Surface2EESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  invoke void @_ZN3jet19ImplicitSurfaceSet218addExplicitSurfaceERKSt10shared_ptrINS_8Surface2EE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %18 unwind label %21

18:                                               ; preds = %.lr.ph
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN3jet8Surface2EESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %20 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt10shared_ptrIN3jet8Surface2EESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %20, label %.lr.ph, label %._crit_edge

21:                                               ; preds = %.lr.ph
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @_ZN3jet4Bvh2ISt10shared_ptrINS_16ImplicitSurface2EEED2Ev(ptr noundef nonnull align 8 dereferenceable(120) %9) #6
  br label %23

23:                                               ; preds = %21, %15
  %.pn = phi { ptr, i32 } [ %22, %21 ], [ %16, %15 ]
  call void @_ZNSt6vectorISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @_ZNSt6vectorISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @_ZN3jet16ImplicitSurface2D2Ev(ptr noundef nonnull align 8 dereferenceable(49) %0) #6
  resume { ptr, i32 } %.pn
}

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 = { 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 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !16, i64 224}
!9 = !{!"_ZTSN3jet19ImplicitSurfaceSet2E", !10, i64 0, !17, i64 56, !17, i64 80, !22, i64 104, !16, i64 224}
!10 = !{!"_ZTSN3jet16ImplicitSurface2E", !11, i64 0}
!11 = !{!"_ZTSN3jet8Surface2E", !12, i64 8, !16, i64 48}
!12 = !{!"_ZTSN3jet10Transform2E", !13, i64 0, !14, i64 16, !14, i64 24, !14, i64 32}
!13 = !{!"_ZTSN3jet6VectorIdLm2EEE", !14, i64 0, !14, i64 8}
!14 = !{!"double", !15, i64 0}
!15 = !{!"omnipotent char", !7, i64 0}
!16 = !{!"bool", !15, i64 0}
!17 = !{!"_ZTSSt6vectorISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN3jet16ImplicitSurface2EESaIS3_EE17_Vector_impl_dataE", !21, i64 0, !21, i64 8, !21, i64 16}
!21 = !{!"any pointer", !15, i64 0}
!22 = !{!"_ZTSN3jet4Bvh2ISt10shared_ptrINS_16ImplicitSurface2EEEE", !23, i64 0, !24, i64 8, !25, i64 16, !17, i64 48, !26, i64 72, !30, i64 96}
!23 = !{!"_ZTSN3jet24IntersectionQueryEngine2ISt10shared_ptrINS_16ImplicitSurface2EEEE"}
!24 = !{!"_ZTSN3jet27NearestNeighborQueryEngine2ISt10shared_ptrINS_16ImplicitSurface2EEEE"}
!25 = !{!"_ZTSN3jet11BoundingBoxIdLm2EEE", !13, i64 0, !13, i64 16}
!26 = !{!"_ZTSSt6vectorIN3jet11BoundingBoxIdLm2EEESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIN3jet11BoundingBoxIdLm2EEESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN3jet11BoundingBoxIdLm2EEESaIS2_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIN3jet11BoundingBoxIdLm2EEESaIS2_EE17_Vector_impl_dataE", !21, i64 0, !21, i64 8, !21, i64 16}
!30 = !{!"_ZTSSt6vectorIN3jet4Bvh2ISt10shared_ptrINS0_16ImplicitSurface2EEE4NodeESaIS6_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIN3jet4Bvh2ISt10shared_ptrINS0_16ImplicitSurface2EEE4NodeESaIS6_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIN3jet4Bvh2ISt10shared_ptrINS0_16ImplicitSurface2EEE4NodeESaIS6_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIN3jet4Bvh2ISt10shared_ptrINS0_16ImplicitSurface2EEE4NodeESaIS6_EE17_Vector_impl_dataE", !21, i64 0, !21, i64 8, !21, i64 16}


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