; LLVM IR from AcademySoftwareFoundation/openvdb :: nanovdb/nanovdb/examples/ex_map_pool_buffer (map_pool_buffer)

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.MapPoolBuffer = type { i64, %"class.std::shared_ptr", %"class.std::shared_ptr.0" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%"class.nanovdb::GridHandle" = type { %"class.std::vector", %class.MapPoolBuffer }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<nanovdb::GridHandleMetaData, std::allocator<nanovdb::GridHandleMetaData>>::_Vector_impl" }
%"struct.std::_Vector_base<nanovdb::GridHandleMetaData, std::allocator<nanovdb::GridHandleMetaData>>::_Vector_impl" = type { %"struct.std::_Vector_base<nanovdb::GridHandleMetaData, std::allocator<nanovdb::GridHandleMetaData>>::_Vector_impl_data" }
%"struct.std::_Vector_base<nanovdb::GridHandleMetaData, std::allocator<nanovdb::GridHandleMetaData>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<nanovdb::GridHandle<MapPoolBuffer>, std::allocator<nanovdb::GridHandle<MapPoolBuffer>>>::_Vector_impl" }
%"struct.std::_Vector_base<nanovdb::GridHandle<MapPoolBuffer>, std::allocator<nanovdb::GridHandle<MapPoolBuffer>>>::_Vector_impl" = type { %"struct.std::_Vector_base<nanovdb::GridHandle<MapPoolBuffer>, std::allocator<nanovdb::GridHandle<MapPoolBuffer>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<nanovdb::GridHandle<MapPoolBuffer>, std::allocator<nanovdb::GridHandle<MapPoolBuffer>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.nanovdb::math::Vec3" = type { [3 x double] }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.8" = type { i8 }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.nanovdb::math::Coord" = type { [3 x i32] }

@_ZTISt9exception = external constant ptr
@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [18 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %class.MapPoolBuffer, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %"class.nanovdb::GridHandle", align 8
  %6 = alloca %"class.std::vector.3", align 8
  %7 = alloca %"class.nanovdb::GridHandle", align 8
  %8 = alloca %"class.nanovdb::math::Vec3", align 8
  %9 = alloca %"class.nanovdb::math::Vec3", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.8", align 1
  %12 = alloca %"class.nanovdb::GridHandle", align 8
  %13 = alloca %"class.nanovdb::math::Vec3", align 8
  %14 = alloca %"class.nanovdb::math::Vec3", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator.8", align 1
  %17 = alloca %"class.nanovdb::GridHandle", align 8
  %18 = alloca %class.MapPoolBuffer, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"class.std::vector.11", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca ptr, align 8
  %24 = alloca %"class.nanovdb::GridHandle", align 8
  %25 = alloca %class.MapPoolBuffer, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"class.nanovdb::math::Coord", align 4
  %28 = alloca %"class.std::__cxx11::basic_string", align 8
  %29 = alloca %"class.std::allocator.8", align 1
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca %"class.std::vector.11", align 8
  %33 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %34 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %35 = alloca ptr, align 8
  %36 = alloca %"class.nanovdb::GridHandle", align 8
  %37 = alloca %class.MapPoolBuffer, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 40, ptr %2) #10
  call void @_ZN13MapPoolBufferC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #10
  invoke void @_ZN13MapPoolBuffer10initializeEv(ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %38 unwind label %67

38:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 64, ptr %5) #10
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferEC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %5) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #10
  call void @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #10
  call void @llvm.lifetime.start.p0(i64 64, ptr %7) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #10
  invoke void @_ZN7nanovdb4math4Vec3IdEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %8, double noundef -2.000000e+01, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %39 unwind label %71

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #10
  invoke void @_ZN7nanovdb4math4Vec3IdEC2Ed(ptr noundef nonnull align 8 dereferenceable(24) %9, double noundef 0.000000e+00)
          to label %40 unwind label %75

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %41 unwind label %79

41:                                               ; preds = %40
  invoke void @_ZN7nanovdb5tools20createLevelSetSphereIf13MapPoolBufferEENS_4util9enable_ifIXsr4util7is_sameIT_fdEE5valueENS_10GridHandleIT0_EEE4typeEdRKNS_4math4Vec3IdEEddSF_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_9StatsModeENS_9CheckModeERKS7_(ptr dead_on_unwind writable sret(%"class.nanovdb::GridHandle") align 8 %7, double noundef 1.000000e+02, ptr noundef nonnull align 8 dereferenceable(24) %8, double noundef 1.000000e+00, double noundef 3.000000e+00, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 1, i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %42 unwind label %83

42:                                               ; preds = %41
  invoke void @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(64) %7)
          to label %43 unwind label %87

43:                                               ; preds = %42
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %7) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #10
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #10
  invoke void @_ZN7nanovdb4math4Vec3IdEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %13, double noundef 2.000000e+01, double noundef 0.000000e+00, double noundef 0.000000e+00)
          to label %44 unwind label %95

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #10
  invoke void @_ZN7nanovdb4math4Vec3IdEC2Ed(ptr noundef nonnull align 8 dereferenceable(24) %14, double noundef 0.000000e+00)
          to label %45 unwind label %99

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %46 unwind label %103

46:                                               ; preds = %45
  invoke void @_ZN7nanovdb5tools20createLevelSetSphereId13MapPoolBufferEENS_4util9enable_ifIXsr4util7is_sameIT_fdEE5valueENS_10GridHandleIT0_EEE4typeEdRKNS_4math4Vec3IdEEddSF_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_9StatsModeENS_9CheckModeERKS7_(ptr dead_on_unwind writable sret(%"class.nanovdb::GridHandle") align 8 %12, double noundef 1.000000e+02, ptr noundef nonnull align 8 dereferenceable(24) %13, double noundef 1.000000e+00, double noundef 3.000000e+00, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(32) %15, i32 noundef 1, i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %47 unwind label %107

47:                                               ; preds = %46
  invoke void @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(64) %12)
          to label %48 unwind label %111

48:                                               ; preds = %47
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %12) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #10
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #10
  call void @llvm.lifetime.start.p0(i64 40, ptr %18) #10
  %49 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #10
  %50 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE6bufferEv(ptr noundef nonnull align 8 dereferenceable(64) %49)
          to label %51 unwind label %119

51:                                               ; preds = %48
  %52 = getelementptr inbounds %class.MapPoolBuffer, ptr %50, i32 0, i32 0
  %53 = load i64, ptr %52, align 8, !tbaa !5
  invoke void @_ZNK13MapPoolBuffer4copyEm(ptr dead_on_unwind writable sret(%class.MapPoolBuffer) align 8 %18, ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %53)
          to label %54 unwind label %119

54:                                               ; preds = %51
  invoke void @_ZN7nanovdb10GridHandleI13MapPoolBufferEC2IS1_TnNS_4util10disable_ifIXsr12BufferTraitsIT_EE13hasDeviceDualEiE4typeELi0EEEOS6_(ptr noundef nonnull align 8 dereferenceable(64) %17, ptr noundef nonnull align 8 dereferenceable(40) %18)
          to label %55 unwind label %123

55:                                               ; preds = %54
  %56 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(64) %5, ptr noundef nonnull align 8 dereferenceable(64) %17) #10
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %17) #10
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #10
  invoke void @_ZNK13MapPoolBuffer11getGridKeysEv(ptr dead_on_unwind writable sret(%"class.std::vector.11") align 8 %20, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %57 unwind label %128

57:                                               ; preds = %55
  store ptr %20, ptr %19, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #10
  %58 = load ptr, ptr %19, align 8, !tbaa !16
  %59 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %58) #10
  %60 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %59, ptr %60, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  %61 = load ptr, ptr %19, align 8, !tbaa !16
  %62 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %61) #10
  %63 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %62, ptr %63, align 8
  br label %64

64:                                               ; preds = %151, %57
  %65 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #10
  br i1 %65, label %132, label %66

66:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  br label %168

67:                                               ; preds = %0
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %3, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %4, align 4
  br label %297

71:                                               ; preds = %38
  %72 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %3, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %4, align 4
  br label %94

75:                                               ; preds = %39
  %76 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %3, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %4, align 4
  br label %93

79:                                               ; preds = %40
  %80 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %3, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %4, align 4
  br label %92

83:                                               ; preds = %41
  %84 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %3, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %4, align 4
  br label %91

87:                                               ; preds = %42
  %88 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %3, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %4, align 4
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %7) #10
  br label %91

91:                                               ; preds = %87, %83
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #10
  br label %92

92:                                               ; preds = %91, %79
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #10
  br label %93

93:                                               ; preds = %92, %75
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #10
  br label %94

94:                                               ; preds = %93, %71
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #10
  br label %211

95:                                               ; preds = %43
  %96 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %3, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %4, align 4
  br label %118

99:                                               ; preds = %44
  %100 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %3, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %4, align 4
  br label %117

103:                                              ; preds = %45
  %104 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %3, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %4, align 4
  br label %116

107:                                              ; preds = %46
  %108 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %3, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %4, align 4
  br label %115

111:                                              ; preds = %47
  %112 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %3, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %4, align 4
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %12) #10
  br label %115

115:                                              ; preds = %111, %107
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #10
  br label %116

116:                                              ; preds = %115, %103
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #10
  br label %117

117:                                              ; preds = %116, %99
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #10
  br label %118

118:                                              ; preds = %117, %95
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #10
  br label %211

119:                                              ; preds = %51, %48
  %120 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %3, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %4, align 4
  br label %127

123:                                              ; preds = %54
  %124 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %125 = extractvalue { ptr, i32 } %124, 0
  store ptr %125, ptr %3, align 8
  %126 = extractvalue { ptr, i32 } %124, 1
  store i32 %126, ptr %4, align 4
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #10
  br label %127

127:                                              ; preds = %123, %119
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #10
  br label %211

128:                                              ; preds = %55
  %129 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %3, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %4, align 4
  br label %167

132:                                              ; preds = %64
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #10
  store ptr %133, ptr %23, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 64, ptr %24) #10
  call void @llvm.lifetime.start.p0(i64 40, ptr %25) #10
  %134 = load ptr, ptr %23, align 8, !tbaa !16
  %135 = load i64, ptr %134, align 8, !tbaa !17
  invoke void @_ZNK13MapPoolBuffer4copyEm(ptr dead_on_unwind writable sret(%class.MapPoolBuffer) align 8 %25, ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %135)
          to label %136 unwind label %153

136:                                              ; preds = %132
  invoke void @_ZN7nanovdb10GridHandleI13MapPoolBufferEC2IS1_TnNS_4util10disable_ifIXsr12BufferTraitsIT_EE13hasDeviceDualEiE4typeELi0EEEOS6_(ptr noundef nonnull align 8 dereferenceable(64) %24, ptr noundef nonnull align 8 dereferenceable(40) %25)
          to label %137 unwind label %157

137:                                              ; preds = %136
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %25) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %25) #10
  %138 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE6bufferEv(ptr noundef nonnull align 8 dereferenceable(64) %24)
          to label %139 unwind label %162

139:                                              ; preds = %137
  %140 = getelementptr inbounds %class.MapPoolBuffer, ptr %138, i32 0, i32 0
  %141 = load i64, ptr %140, align 8, !tbaa !5
  %142 = trunc i64 %141 to i32
  %143 = invoke noundef ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE4dataEv(ptr noundef nonnull align 8 dereferenceable(64) %24)
          to label %144 unwind label %162

144:                                              ; preds = %139
  %145 = invoke noundef ptr @_ZNK7nanovdb10GridHandleI13MapPoolBufferE12gridMetaDataEj(ptr noundef nonnull align 8 dereferenceable(64) %24, i32 noundef 0)
          to label %146 unwind label %162

146:                                              ; preds = %144
  %147 = invoke noundef ptr @_ZNK7nanovdb12GridMetaData13shortGridNameEv(ptr noundef nonnull align 32 dereferenceable(768) %145)
          to label %148 unwind label %162

148:                                              ; preds = %146
  %149 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %142, ptr noundef %143, ptr noundef %147)
          to label %150 unwind label %162

150:                                              ; preds = %148
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %24) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  br label %151

151:                                              ; preds = %150
  %152 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %21) #10
  br label %64

153:                                              ; preds = %132
  %154 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %155 = extractvalue { ptr, i32 } %154, 0
  store ptr %155, ptr %3, align 8
  %156 = extractvalue { ptr, i32 } %154, 1
  store i32 %156, ptr %4, align 4
  br label %161

157:                                              ; preds = %136
  %158 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %3, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %4, align 4
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %25) #10
  br label %161

161:                                              ; preds = %157, %153
  call void @llvm.lifetime.end.p0(i64 40, ptr %25) #10
  br label %166

162:                                              ; preds = %148, %146, %144, %139, %137
  %163 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %3, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %4, align 4
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %24) #10
  br label %166

166:                                              ; preds = %162, %161
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #10
  br label %167

167:                                              ; preds = %166, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  br label %211

168:                                              ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #10
  %169 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #10
  %170 = invoke noundef ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE4gridIfEEPNS_4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS7_INS_8LeafNodeIT_NS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEEEj(ptr noundef nonnull align 8 dereferenceable(64) %169, i32 noundef 0)
          to label %171 unwind label %177

171:                                              ; preds = %168
  store ptr %170, ptr %26, align 8, !tbaa !16
  %172 = load ptr, ptr %26, align 8, !tbaa !16
  %173 = icmp ne ptr %172, null
  br i1 %173, label %185, label %174

174:                                              ; preds = %171
  %175 = call ptr @__cxa_allocate_exception(i64 16) #10
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %175, ptr noundef @.str.3)
          to label %176 unwind label %181

176:                                              ; preds = %174
  invoke void @__cxa_throw(ptr %175, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #11
          to label %306 unwind label %177

177:                                              ; preds = %185, %176, %168
  %178 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %3, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %4, align 4
  br label %210

181:                                              ; preds = %174
  %182 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %3, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %4, align 4
  call void @__cxa_free_exception(ptr %175) #10
  br label %210

185:                                              ; preds = %171
  %186 = load ptr, ptr %26, align 8, !tbaa !16
  %187 = invoke noundef nonnull align 32 dereferenceable(64) ptr @_ZN7nanovdb4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS3_INS_8LeafNodeIfNS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEE4treeEv(ptr noundef nonnull align 32 dereferenceable(672) %186)
          to label %188 unwind label %177

188:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 12, ptr %27) #10
  invoke void @_ZN7nanovdb4math5CoordC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %27, i32 noundef 99, i32 noundef 0, i32 noundef 0)
          to label %189 unwind label %197

189:                                              ; preds = %188
  %190 = invoke noundef float @_ZNK7nanovdb4TreeINS_8RootNodeINS_12InternalNodeINS2_INS_8LeafNodeIfNS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEE8getValueERKS5_(ptr noundef nonnull align 32 dereferenceable(64) %187, ptr noundef nonnull align 4 dereferenceable(12) %27)
          to label %191 unwind label %197

191:                                              ; preds = %189
  %192 = fpext float %190 to double
  %193 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, double noundef %192)
          to label %194 unwind label %197

194:                                              ; preds = %191
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %29)
          to label %195 unwind label %201

195:                                              ; preds = %194
  invoke void @_ZN7nanovdb2io10writeGridsI13MapPoolBufferTtTpTyESt6vectorEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT0_IJNS_10GridHandleIT_EEEENS0_5CodecEi(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull align 8 dereferenceable(24) %6, i16 noundef zeroext 0, i32 noundef 2)
          to label %196 unwind label %205

196:                                              ; preds = %195
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  call void @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #10
  br label %233

197:                                              ; preds = %191, %189, %188
  %198 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %3, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %27) #10
  br label %210

201:                                              ; preds = %194
  %202 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %3, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %4, align 4
  br label %209

205:                                              ; preds = %195
  %206 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %3, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %4, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #10
  br label %209

209:                                              ; preds = %205, %201
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %29) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #10
  br label %210

210:                                              ; preds = %209, %197, %181, %177
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  br label %211

211:                                              ; preds = %210, %167, %127, %118, %94
  call void @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #10
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %4, align 4
  %214 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #10
  %215 = icmp eq i32 %213, %214
  br i1 %215, label %216, label %296

216:                                              ; preds = %212
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %217 = load ptr, ptr %3, align 8
  %218 = call ptr @__cxa_begin_catch(ptr %217) #10
  store ptr %218, ptr %30, align 8
  %219 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.6)
          to label %220 unwind label %244

220:                                              ; preds = %216
  %221 = load ptr, ptr %30, align 8, !tbaa !16
  %222 = load ptr, ptr %221, align 8, !tbaa !18
  %223 = getelementptr inbounds ptr, ptr %222, i64 2
  %224 = load ptr, ptr %223, align 8
  %225 = call noundef ptr %224(ptr noundef nonnull align 8 dereferenceable(8) %221) #10
  %226 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %219, ptr noundef %225)
          to label %227 unwind label %244

227:                                              ; preds = %220
  %228 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %226, ptr noundef @.str.7)
          to label %229 unwind label %244

229:                                              ; preds = %227
  %230 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %228, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %231 unwind label %244

231:                                              ; preds = %229
  invoke void @__cxa_end_catch()
          to label %232 unwind label %248

232:                                              ; preds = %231
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  br label %233

233:                                              ; preds = %232, %196
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr %32) #10
  invoke void @_ZNK13MapPoolBuffer11getGridKeysEv(ptr dead_on_unwind writable sret(%"class.std::vector.11") align 8 %32, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %234 unwind label %254

234:                                              ; preds = %233
  store ptr %32, ptr %31, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #10
  %235 = load ptr, ptr %31, align 8, !tbaa !16
  %236 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %235) #10
  %237 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %33, i32 0, i32 0
  store ptr %236, ptr %237, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #10
  %238 = load ptr, ptr %31, align 8, !tbaa !16
  %239 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %238) #10
  %240 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %34, i32 0, i32 0
  store ptr %239, ptr %240, align 8
  br label %241

241:                                              ; preds = %277, %234
  %242 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef nonnull align 8 dereferenceable(8) %34) #10
  br i1 %242, label %258, label %243

243:                                              ; preds = %241
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  br label %294

244:                                              ; preds = %229, %227, %220, %216
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %3, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %4, align 4
  invoke void @__cxa_end_catch()
          to label %252 unwind label %303

248:                                              ; preds = %231
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %3, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %4, align 4
  br label %253

252:                                              ; preds = %244
  br label %253

253:                                              ; preds = %252, %248
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  br label %296

254:                                              ; preds = %233
  %255 = landingpad { ptr, i32 }
          cleanup
  %256 = extractvalue { ptr, i32 } %255, 0
  store ptr %256, ptr %3, align 8
  %257 = extractvalue { ptr, i32 } %255, 1
  store i32 %257, ptr %4, align 4
  br label %293

258:                                              ; preds = %241
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #10
  %259 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #10
  store ptr %259, ptr %35, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 64, ptr %36) #10
  call void @llvm.lifetime.start.p0(i64 40, ptr %37) #10
  %260 = load ptr, ptr %35, align 8, !tbaa !16
  %261 = load i64, ptr %260, align 8, !tbaa !17
  invoke void @_ZNK13MapPoolBuffer4copyEm(ptr dead_on_unwind writable sret(%class.MapPoolBuffer) align 8 %37, ptr noundef nonnull align 8 dereferenceable(40) %2, i64 noundef %261)
          to label %262 unwind label %279

262:                                              ; preds = %258
  invoke void @_ZN7nanovdb10GridHandleI13MapPoolBufferEC2IS1_TnNS_4util10disable_ifIXsr12BufferTraitsIT_EE13hasDeviceDualEiE4typeELi0EEEOS6_(ptr noundef nonnull align 8 dereferenceable(64) %36, ptr noundef nonnull align 8 dereferenceable(40) %37)
          to label %263 unwind label %283

263:                                              ; preds = %262
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %37) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %37) #10
  %264 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE6bufferEv(ptr noundef nonnull align 8 dereferenceable(64) %36)
          to label %265 unwind label %288

265:                                              ; preds = %263
  %266 = getelementptr inbounds %class.MapPoolBuffer, ptr %264, i32 0, i32 0
  %267 = load i64, ptr %266, align 8, !tbaa !5
  %268 = trunc i64 %267 to i32
  %269 = invoke noundef ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE4dataEv(ptr noundef nonnull align 8 dereferenceable(64) %36)
          to label %270 unwind label %288

270:                                              ; preds = %265
  %271 = invoke noundef ptr @_ZNK7nanovdb10GridHandleI13MapPoolBufferE12gridMetaDataEj(ptr noundef nonnull align 8 dereferenceable(64) %36, i32 noundef 0)
          to label %272 unwind label %288

272:                                              ; preds = %270
  %273 = invoke noundef ptr @_ZNK7nanovdb12GridMetaData13shortGridNameEv(ptr noundef nonnull align 32 dereferenceable(768) %271)
          to label %274 unwind label %288

274:                                              ; preds = %272
  %275 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %268, ptr noundef %269, ptr noundef %273)
          to label %276 unwind label %288

276:                                              ; preds = %274
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %36) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %36) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #10
  br label %277

277:                                              ; preds = %276
  %278 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #10
  br label %241

279:                                              ; preds = %258
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %3, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %4, align 4
  br label %287

283:                                              ; preds = %262
  %284 = landingpad { ptr, i32 }
          cleanup
  %285 = extractvalue { ptr, i32 } %284, 0
  store ptr %285, ptr %3, align 8
  %286 = extractvalue { ptr, i32 } %284, 1
  store i32 %286, ptr %4, align 4
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %37) #10
  br label %287

287:                                              ; preds = %283, %279
  call void @llvm.lifetime.end.p0(i64 40, ptr %37) #10
  br label %292

288:                                              ; preds = %274, %272, %270, %265, %263
  %289 = landingpad { ptr, i32 }
          cleanup
  %290 = extractvalue { ptr, i32 } %289, 0
  store ptr %290, ptr %3, align 8
  %291 = extractvalue { ptr, i32 } %289, 1
  store i32 %291, ptr %4, align 4
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %36) #10
  br label %292

292:                                              ; preds = %288, %287
  call void @llvm.lifetime.end.p0(i64 64, ptr %36) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %32) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %32) #10
  br label %293

293:                                              ; preds = %292, %254
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  br label %296

294:                                              ; preds = %243
  store i32 0, ptr %1, align 4
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %5) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #10
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %2) #10
  %295 = load i32, ptr %1, align 4
  ret i32 %295

296:                                              ; preds = %293, %253, %212
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %5) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #10
  br label %297

297:                                              ; preds = %296, %67
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %2) #10
  br label %298

298:                                              ; preds = %297
  %299 = load ptr, ptr %3, align 8
  %300 = load i32, ptr %4, align 4
  %301 = insertvalue { ptr, i32 } poison, ptr %299, 0
  %302 = insertvalue { ptr, i32 } %301, i32 %300, 1
  resume { ptr, i32 } %302

303:                                              ; preds = %244
  %304 = landingpad { ptr, i32 }
          catch ptr null
  %305 = extractvalue { ptr, i32 } %304, 0
  call void @__clang_call_terminate(ptr %305) #12
  unreachable

306:                                              ; preds = %176
  unreachable
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7nanovdb5tools20createLevelSetSphereIf13MapPoolBufferEENS_4util9enable_ifIXsr4util7is_sameIT_fdEE5valueENS_10GridHandleIT0_EEE4typeEdRKNS_4math4Vec3IdEEddSF_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_9StatsModeENS_9CheckModeERKS7_(ptr dead_on_unwind noalias writable sret(%"class.nanovdb::GridHandle") align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(40)) #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 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
declare dso_local void @_ZN7nanovdb5tools20createLevelSetSphereId13MapPoolBufferEENS_4util9enable_ifIXsr4util7is_sameIT_fdEE5valueENS_10GridHandleIT0_EEE4typeEdRKNS_4math4Vec3IdEEddSF_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_9StatsModeENS_9CheckModeERKS7_(ptr dead_on_unwind noalias writable sret(%"class.nanovdb::GridHandle") align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(40)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK13MapPoolBuffer4copyEm(ptr dead_on_unwind noalias writable sret(%class.MapPoolBuffer) align 8, ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7nanovdb10GridHandleI13MapPoolBufferEC2IS1_TnNS_4util10disable_ifIXsr12BufferTraitsIT_EE13hasDeviceDualEiE4typeELi0EEEOS6_(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK13MapPoolBuffer11getGridKeysEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.11") align 8, ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

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

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

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

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

declare i32 @printf(ptr noundef, ...) #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE4dataEv(ptr noundef nonnull align 8 dereferenceable(64)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK7nanovdb10GridHandleI13MapPoolBufferE12gridMetaDataEj(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK7nanovdb12GridMetaData13shortGridNameEv(ptr noundef nonnull align 32 dereferenceable(768)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE4gridIfEEPNS_4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS7_INS_8LeafNodeIT_NS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEEEj(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) #3 align 2

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #5

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 32 dereferenceable(64) ptr @_ZN7nanovdb4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS3_INS_8LeafNodeIfNS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEE4treeEv(ptr noundef nonnull align 32 dereferenceable(672)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK7nanovdb4TreeINS_8RootNodeINS_12InternalNodeINS2_INS_8LeafNodeIfNS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEE8getValueERKS5_(ptr noundef nonnull align 32 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(12)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7nanovdb2io10writeGridsI13MapPoolBufferTtTpTyESt6vectorEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT0_IJNS_10GridHandleIT_EEEENS0_5CodecEi(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24), i16 noundef zeroext, i32 noundef) #3

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #8

declare ptr @__cxa_begin_catch(ptr)

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #9

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

attributes #0 = { mustprogress norecurse 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 = { 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 = { "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 = { 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 #7 = { 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 #8 = { nounwind memory(none) }
attributes #9 = { noinline noreturn nounwind uwtable "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 #10 = { nounwind }
attributes #11 = { noreturn }
attributes #12 = { noreturn 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 = !{!"_ZTS13MapPoolBuffer", !7, i64 0, !10, i64 8, !14, i64 24}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt10shared_ptrIN7nanovdb10HostBufferEE", !11, i64 0}
!11 = !{!"_ZTSSt12__shared_ptrIN7nanovdb10HostBufferELN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0, !13, i64 8}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0}
!14 = !{!"_ZTSSt10shared_ptrI23MapPoolAllocatorContextE", !15, i64 0}
!15 = !{!"_ZTSSt12__shared_ptrI23MapPoolAllocatorContextLN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0, !13, i64 8}
!16 = !{!12, !12, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"vtable pointer", !9, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%class.MapPoolBuffer = type { i64, %"class.std::shared_ptr", %"class.std::shared_ptr.0" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%"class.nanovdb::GridHandle" = type { %"class.std::vector", %class.MapPoolBuffer }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<nanovdb::GridHandleMetaData, std::allocator<nanovdb::GridHandleMetaData>>::_Vector_impl" }
%"struct.std::_Vector_base<nanovdb::GridHandleMetaData, std::allocator<nanovdb::GridHandleMetaData>>::_Vector_impl" = type { %"struct.std::_Vector_base<nanovdb::GridHandleMetaData, std::allocator<nanovdb::GridHandleMetaData>>::_Vector_impl_data" }
%"struct.std::_Vector_base<nanovdb::GridHandleMetaData, std::allocator<nanovdb::GridHandleMetaData>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<nanovdb::GridHandle<MapPoolBuffer>, std::allocator<nanovdb::GridHandle<MapPoolBuffer>>>::_Vector_impl" }
%"struct.std::_Vector_base<nanovdb::GridHandle<MapPoolBuffer>, std::allocator<nanovdb::GridHandle<MapPoolBuffer>>>::_Vector_impl" = type { %"struct.std::_Vector_base<nanovdb::GridHandle<MapPoolBuffer>, std::allocator<nanovdb::GridHandle<MapPoolBuffer>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<nanovdb::GridHandle<MapPoolBuffer>, std::allocator<nanovdb::GridHandle<MapPoolBuffer>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.nanovdb::math::Vec3" = type { [3 x double] }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.8" = type { i8 }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.nanovdb::math::Coord" = type { [3 x i32] }

@_ZTISt9exception = external constant ptr
@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [18 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %class.MapPoolBuffer, align 8
  %2 = alloca %"class.nanovdb::GridHandle", align 8
  %3 = alloca %"class.std::vector.3", align 8
  %4 = alloca %"class.nanovdb::GridHandle", align 8
  %5 = alloca %"class.nanovdb::math::Vec3", align 8
  %6 = alloca %"class.nanovdb::math::Vec3", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.8", align 1
  %9 = alloca %"class.nanovdb::GridHandle", align 8
  %10 = alloca %"class.nanovdb::math::Vec3", align 8
  %11 = alloca %"class.nanovdb::math::Vec3", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.8", align 1
  %14 = alloca %"class.nanovdb::GridHandle", align 8
  %15 = alloca %class.MapPoolBuffer, align 8
  %16 = alloca %"class.std::vector.11", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %19 = alloca %"class.nanovdb::GridHandle", align 8
  %20 = alloca %class.MapPoolBuffer, align 8
  %21 = alloca %"class.nanovdb::math::Coord", align 4
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator.8", align 1
  %24 = alloca %"class.std::vector.11", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %27 = alloca %"class.nanovdb::GridHandle", align 8
  %28 = alloca %class.MapPoolBuffer, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %1) #11
  call void @_ZN13MapPoolBufferC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #11
  invoke void @_ZN13MapPoolBuffer10initializeEv(ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %29 unwind label %48

29:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %2) #11
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferEC2Ev(ptr noundef nonnull align 8 dereferenceable(64) %2) #11
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #11
  call void @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #11
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #11
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #11
  call void @_ZN7nanovdb4math4Vec3IdEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %5, double noundef -2.000000e+01, double noundef 0.000000e+00, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #11
  call void @_ZN7nanovdb4math4Vec3IdEC2Ed(ptr noundef nonnull align 8 dereferenceable(24) %6, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #11
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #11
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %30 unwind label %52

30:                                               ; preds = %29
  invoke void @_ZN7nanovdb5tools20createLevelSetSphereIf13MapPoolBufferEENS_4util9enable_ifIXsr4util7is_sameIT_fdEE5valueENS_10GridHandleIT0_EEE4typeEdRKNS_4math4Vec3IdEEddSF_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_9StatsModeENS_9CheckModeERKS7_(ptr dead_on_unwind nonnull writable sret(%"class.nanovdb::GridHandle") align 8 %4, double noundef 1.000000e+02, ptr noundef nonnull align 8 dereferenceable(24) %5, double noundef 1.000000e+00, double noundef 3.000000e+00, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef 1, i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %31 unwind label %54

31:                                               ; preds = %30
  invoke void @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(64) %4)
          to label %32 unwind label %56

32:                                               ; preds = %31
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %4) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #11
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #11
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #11
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #11
  call void @_ZN7nanovdb4math4Vec3IdEC2Eddd(ptr noundef nonnull align 8 dereferenceable(24) %10, double noundef 2.000000e+01, double noundef 0.000000e+00, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #11
  call void @_ZN7nanovdb4math4Vec3IdEC2Ed(ptr noundef nonnull align 8 dereferenceable(24) %11, double noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #11
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #11
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %33 unwind label %60

33:                                               ; preds = %32
  invoke void @_ZN7nanovdb5tools20createLevelSetSphereId13MapPoolBufferEENS_4util9enable_ifIXsr4util7is_sameIT_fdEE5valueENS_10GridHandleIT0_EEE4typeEdRKNS_4math4Vec3IdEEddSF_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_9StatsModeENS_9CheckModeERKS7_(ptr dead_on_unwind nonnull writable sret(%"class.nanovdb::GridHandle") align 8 %9, double noundef 1.000000e+02, ptr noundef nonnull align 8 dereferenceable(24) %10, double noundef 1.000000e+00, double noundef 3.000000e+00, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(32) %12, i32 noundef 1, i32 noundef 1, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %34 unwind label %62

34:                                               ; preds = %33
  invoke void @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(64) %9)
          to label %35 unwind label %64

35:                                               ; preds = %34
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %9) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #11
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #11
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #11
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %15) #11
  %36 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #11
  %37 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE6bufferEv(ptr noundef nonnull align 8 dereferenceable(64) %36)
  %38 = load i64, ptr %37, align 8, !tbaa !5
  invoke void @_ZNK13MapPoolBuffer4copyEm(ptr dead_on_unwind nonnull writable sret(%class.MapPoolBuffer) align 8 %15, ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %38)
          to label %39 unwind label %68

39:                                               ; preds = %35
  invoke void @_ZN7nanovdb10GridHandleI13MapPoolBufferEC2IS1_TnNS_4util10disable_ifIXsr12BufferTraitsIT_EE13hasDeviceDualEiE4typeELi0EEEOS6_(ptr noundef nonnull align 8 dereferenceable(64) %14, ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %40 unwind label %70

40:                                               ; preds = %39
  %41 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferEaSEOS2_(ptr noundef nonnull align 8 dereferenceable(64) %2, ptr noundef nonnull align 8 dereferenceable(64) %14) #11
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %14) #11
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #11
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #11
  invoke void @_ZNK13MapPoolBuffer11getGridKeysEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.11") align 8 %16, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %42 unwind label %73

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #11
  %43 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #11
  store ptr %43, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #11
  %44 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #11
  store ptr %44, ptr %18, align 8
  %45 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #11
  br i1 %45, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %85, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #11
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #11
  %46 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #11
  %47 = invoke noundef ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE4gridIfEEPNS_4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS7_INS_8LeafNodeIT_NS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEEEj(ptr noundef nonnull align 8 dereferenceable(64) %46, i32 noundef 0)
          to label %98 unwind label %102

48:                                               ; preds = %0
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  %51 = extractvalue { ptr, i32 } %49, 1
  br label %175

52:                                               ; preds = %29
  %53 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %59

54:                                               ; preds = %30
  %55 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %58

56:                                               ; preds = %31
  %57 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %4) #11
  br label %58

58:                                               ; preds = %56, %54
  %.pn = phi { ptr, i32 } [ %57, %56 ], [ %55, %54 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #11
  br label %59

59:                                               ; preds = %58, %52
  %.pn.pn = phi { ptr, i32 } [ %.pn, %58 ], [ %53, %52 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #11
  br label %121

60:                                               ; preds = %32
  %61 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %67

62:                                               ; preds = %33
  %63 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %66

64:                                               ; preds = %34
  %65 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %9) #11
  br label %66

66:                                               ; preds = %64, %62
  %.pn33 = phi { ptr, i32 } [ %65, %64 ], [ %63, %62 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #11
  br label %67

67:                                               ; preds = %66, %60
  %.pn33.pn = phi { ptr, i32 } [ %.pn33, %66 ], [ %61, %60 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #11
  br label %121

68:                                               ; preds = %35
  %69 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %72

70:                                               ; preds = %39
  %71 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #11
  br label %72

72:                                               ; preds = %70, %68
  %.pn36 = phi { ptr, i32 } [ %71, %70 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #11
  br label %121

73:                                               ; preds = %40
  %74 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %121

.lr.ph:                                           ; preds = %42, %85
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #11
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %19) #11
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %20) #11
  %76 = load i64, ptr %75, align 8, !tbaa !16
  invoke void @_ZNK13MapPoolBuffer4copyEm(ptr dead_on_unwind nonnull writable sret(%class.MapPoolBuffer) align 8 %20, ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %76)
          to label %77 unwind label %90

77:                                               ; preds = %.lr.ph
  invoke void @_ZN7nanovdb10GridHandleI13MapPoolBufferEC2IS1_TnNS_4util10disable_ifIXsr12BufferTraitsIT_EE13hasDeviceDualEiE4typeELi0EEEOS6_(ptr noundef nonnull align 8 dereferenceable(64) %19, ptr noundef nonnull align 8 dereferenceable(40) %20)
          to label %78 unwind label %92

78:                                               ; preds = %77
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %20) #11
  %79 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE6bufferEv(ptr noundef nonnull align 8 dereferenceable(64) %19)
  %80 = load i64, ptr %79, align 8, !tbaa !5
  %81 = trunc i64 %80 to i32
  %82 = invoke noundef ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE4dataEv(ptr noundef nonnull align 8 dereferenceable(64) %19)
          to label %83 unwind label %95

83:                                               ; preds = %78
  %84 = invoke noundef ptr @_ZNK7nanovdb10GridHandleI13MapPoolBufferE12gridMetaDataEj(ptr noundef nonnull align 8 dereferenceable(64) %19, i32 noundef 0)
          to label %85 unwind label %95

85:                                               ; preds = %83
  %86 = call noundef ptr @_ZNK7nanovdb12GridMetaData13shortGridNameEv(ptr noundef nonnull align 32 dereferenceable(768) %84)
  %87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %81, ptr noundef %82, ptr noundef %86)
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %19) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %19) #11
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #11
  %89 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #11
  br i1 %89, label %.lr.ph, label %._crit_edge

90:                                               ; preds = %.lr.ph
  %91 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %94

92:                                               ; preds = %77
  %93 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %20) #11
  br label %94

94:                                               ; preds = %92, %90
  %.pn41 = phi { ptr, i32 } [ %93, %92 ], [ %91, %90 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %20) #11
  br label %97

95:                                               ; preds = %83, %78
  %96 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %19) #11
  br label %97

97:                                               ; preds = %95, %94
  %.pn43 = phi { ptr, i32 } [ %96, %95 ], [ %.pn41, %94 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %19) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #11
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #11
  br label %121

98:                                               ; preds = %._crit_edge
  %.not = icmp eq ptr %47, null
  br i1 %.not, label %99, label %106

99:                                               ; preds = %98
  %100 = call ptr @__cxa_allocate_exception(i64 16) #11
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %100, ptr noundef nonnull @.str.3)
          to label %101 unwind label %104

101:                                              ; preds = %99
  invoke void @__cxa_throw(ptr nonnull %100, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #12
          to label %181 unwind label %102

102:                                              ; preds = %101, %._crit_edge
  %103 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %121

104:                                              ; preds = %99
  %105 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @__cxa_free_exception(ptr %100) #11
  br label %121

106:                                              ; preds = %98
  %107 = call noundef nonnull align 32 dereferenceable(64) ptr @_ZN7nanovdb4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS3_INS_8LeafNodeIfNS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEE4treeEv(ptr noundef nonnull align 32 dereferenceable(672) %47)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %21) #11
  call void @_ZN7nanovdb4math5CoordC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %21, i32 noundef 99, i32 noundef 0, i32 noundef 0)
  %108 = invoke noundef float @_ZNK7nanovdb4TreeINS_8RootNodeINS_12InternalNodeINS2_INS_8LeafNodeIfNS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEE8getValueERKS5_(ptr noundef nonnull align 32 dereferenceable(64) %107, ptr noundef nonnull align 4 dereferenceable(12) %21)
          to label %109 unwind label %114

109:                                              ; preds = %106
  %110 = fpext float %108 to double
  %111 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, double noundef %110)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #11
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %22) #11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %23) #11
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #11
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %112 unwind label %116

112:                                              ; preds = %109
  invoke void @_ZN7nanovdb2io10writeGridsI13MapPoolBufferTtTpTyESt6vectorEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT0_IJNS_10GridHandleIT_EEEENS0_5CodecEi(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(24) %3, i16 noundef zeroext 0, i32 noundef 2)
          to label %113 unwind label %118

113:                                              ; preds = %112
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #11
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #11
  call void @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #11
  br label %138

114:                                              ; preds = %106
  %115 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %21) #11
  br label %121

116:                                              ; preds = %109
  %117 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %120

118:                                              ; preds = %112
  %119 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #11
  br label %120

120:                                              ; preds = %118, %116
  %.pn38 = phi { ptr, i32 } [ %119, %118 ], [ %117, %116 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %23) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #11
  br label %121

121:                                              ; preds = %102, %104, %114, %120, %73, %97, %72, %67, %59
  %.pn43.pn.pn = phi { ptr, i32 } [ %.pn36, %72 ], [ %.pn33.pn, %67 ], [ %.pn.pn, %59 ], [ %.pn43, %97 ], [ %74, %73 ], [ %.pn38, %120 ], [ %115, %114 ], [ %103, %102 ], [ %105, %104 ]
  %.10 = extractvalue { ptr, i32 } %.pn43.pn.pn, 0
  %.1023 = extractvalue { ptr, i32 } %.pn43.pn.pn, 1
  call void @_ZNSt6vectorIN7nanovdb10GridHandleI13MapPoolBufferEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #11
  %122 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #11
  %123 = icmp eq i32 %.1023, %122
  br i1 %123, label %124, label %174

124:                                              ; preds = %121
  %125 = call ptr @__cxa_begin_catch(ptr %.10) #11
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.6)
          to label %127 unwind label %143

127:                                              ; preds = %124
  %128 = load ptr, ptr %125, align 8, !tbaa !17
  %129 = getelementptr inbounds i8, ptr %128, i64 16
  %130 = load ptr, ptr %129, align 8
  %131 = call noundef ptr %130(ptr noundef nonnull align 8 dereferenceable(8) %125) #11
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef %131)
          to label %133 unwind label %143

133:                                              ; preds = %127
  %134 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %132, ptr noundef nonnull @.str.7)
          to label %135 unwind label %143

135:                                              ; preds = %133
  %136 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %137 unwind label %143

137:                                              ; preds = %135
  invoke void @__cxa_end_catch()
          to label %138 unwind label %145

138:                                              ; preds = %137, %113
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %24) #11
  invoke void @_ZNK13MapPoolBuffer11getGridKeysEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.11") align 8 %24, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %139 unwind label %148

139:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %25) #11
  %140 = call ptr @_ZNSt6vectorImSaImEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #11
  store ptr %140, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %26) #11
  %141 = call ptr @_ZNSt6vectorImSaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #11
  store ptr %141, ptr %26, align 8
  %142 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #11
  br i1 %142, label %.lr.ph55, label %._crit_edge56

._crit_edge56:                                    ; preds = %160, %139
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #11
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %24) #11
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %2) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #11
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #11
  ret i32 0

143:                                              ; preds = %135, %133, %127, %124
  %144 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %147 unwind label %178

145:                                              ; preds = %137
  %146 = landingpad { ptr, i32 }
          cleanup
  br label %147

147:                                              ; preds = %143, %145
  %.pn47 = phi { ptr, i32 } [ %146, %145 ], [ %144, %143 ]
  %.11 = extractvalue { ptr, i32 } %.pn47, 0
  %.1124 = extractvalue { ptr, i32 } %.pn47, 1
  br label %174

148:                                              ; preds = %138
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %173

.lr.ph55:                                         ; preds = %139, %160
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #11
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %27) #11
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %28) #11
  %151 = load i64, ptr %150, align 8, !tbaa !16
  invoke void @_ZNK13MapPoolBuffer4copyEm(ptr dead_on_unwind nonnull writable sret(%class.MapPoolBuffer) align 8 %28, ptr noundef nonnull align 8 dereferenceable(40) %1, i64 noundef %151)
          to label %152 unwind label %165

152:                                              ; preds = %.lr.ph55
  invoke void @_ZN7nanovdb10GridHandleI13MapPoolBufferEC2IS1_TnNS_4util10disable_ifIXsr12BufferTraitsIT_EE13hasDeviceDualEiE4typeELi0EEEOS6_(ptr noundef nonnull align 8 dereferenceable(64) %27, ptr noundef nonnull align 8 dereferenceable(40) %28)
          to label %153 unwind label %167

153:                                              ; preds = %152
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %28) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %28) #11
  %154 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE6bufferEv(ptr noundef nonnull align 8 dereferenceable(64) %27)
  %155 = load i64, ptr %154, align 8, !tbaa !5
  %156 = trunc i64 %155 to i32
  %157 = invoke noundef ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE4dataEv(ptr noundef nonnull align 8 dereferenceable(64) %27)
          to label %158 unwind label %170

158:                                              ; preds = %153
  %159 = invoke noundef ptr @_ZNK7nanovdb10GridHandleI13MapPoolBufferE12gridMetaDataEj(ptr noundef nonnull align 8 dereferenceable(64) %27, i32 noundef 0)
          to label %160 unwind label %170

160:                                              ; preds = %158
  %161 = call noundef ptr @_ZNK7nanovdb12GridMetaData13shortGridNameEv(ptr noundef nonnull align 32 dereferenceable(768) %159)
  %162 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %156, ptr noundef %157, ptr noundef %161)
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %27) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %27) #11
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPmSt6vectorImSaImEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #11
  %164 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #11
  br i1 %164, label %.lr.ph55, label %._crit_edge56

165:                                              ; preds = %.lr.ph55
  %166 = landingpad { ptr, i32 }
          cleanup
  br label %169

167:                                              ; preds = %152
  %168 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %28) #11
  br label %169

169:                                              ; preds = %167, %165
  %.pn49 = phi { ptr, i32 } [ %168, %167 ], [ %166, %165 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %28) #11
  br label %172

170:                                              ; preds = %158, %153
  %171 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %27) #11
  br label %172

172:                                              ; preds = %170, %169
  %.pn51 = phi { ptr, i32 } [ %171, %170 ], [ %.pn49, %169 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %27) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %26) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %25) #11
  call void @_ZNSt6vectorImSaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #11
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %24) #11
  br label %173

173:                                              ; preds = %172, %148
  %.pn51.pn = phi { ptr, i32 } [ %.pn51, %172 ], [ %149, %148 ]
  %.14 = extractvalue { ptr, i32 } %.pn51.pn, 0
  %.1427 = extractvalue { ptr, i32 } %.pn51.pn, 1
  br label %174

174:                                              ; preds = %173, %147, %121
  %.1528 = phi i32 [ %.1427, %173 ], [ %.1124, %147 ], [ %.1023, %121 ]
  %.15 = phi ptr [ %.14, %173 ], [ %.11, %147 ], [ %.10, %121 ]
  call void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64) %2) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %2) #11
  br label %175

175:                                              ; preds = %174, %48
  %.1629 = phi i32 [ %.1528, %174 ], [ %51, %48 ]
  %.16 = phi ptr [ %.15, %174 ], [ %50, %48 ]
  call void @_ZN13MapPoolBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %1) #11
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %1) #11
  %176 = insertvalue { ptr, i32 } poison, ptr %.16, 0
  %177 = insertvalue { ptr, i32 } %176, i32 %.1629, 1
  resume { ptr, i32 } %177

178:                                              ; preds = %143
  %179 = landingpad { ptr, i32 }
          catch ptr null
  %180 = extractvalue { ptr, i32 } %179, 0
  call void @__clang_call_terminate(ptr %180) #13
  unreachable

181:                                              ; preds = %101
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13MapPoolBuffer10initializeEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7nanovdb5tools20createLevelSetSphereIf13MapPoolBufferEENS_4util9enable_ifIXsr4util7is_sameIT_fdEE5valueENS_10GridHandleIT0_EEE4typeEdRKNS_4math4Vec3IdEEddSF_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_9StatsModeENS_9CheckModeERKS7_(ptr dead_on_unwind noalias writable sret(%"class.nanovdb::GridHandle") align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7nanovdb10GridHandleI13MapPoolBufferED2Ev(ptr noundef nonnull align 8 dereferenceable(64)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7nanovdb5tools20createLevelSetSphereId13MapPoolBufferEENS_4util9enable_ifIXsr4util7is_sameIT_fdEE5valueENS_10GridHandleIT0_EEE4typeEdRKNS_4math4Vec3IdEEddSF_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_9StatsModeENS_9CheckModeERKS7_(ptr dead_on_unwind noalias writable sret(%"class.nanovdb::GridHandle") align 8, double noundef, ptr noundef nonnull align 8 dereferenceable(24), double noundef, double noundef, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK13MapPoolBuffer4copyEm(ptr dead_on_unwind noalias writable sret(%class.MapPoolBuffer) align 8, ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7nanovdb10GridHandleI13MapPoolBufferEC2IS1_TnNS_4util10disable_ifIXsr12BufferTraitsIT_EE13hasDeviceDualEiE4typeELi0EEEOS6_(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK13MapPoolBuffer11getGridKeysEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.11") align 8, ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorImSaImEE3endEv(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_cxxneIPmSt6vectorImSaImEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK7nanovdb10GridHandleI13MapPoolBufferE12gridMetaDataEj(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) local_unnamed_addr #6 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7nanovdb10GridHandleI13MapPoolBufferE4gridIfEEPNS_4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS7_INS_8LeafNodeIT_NS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEEEj(ptr noundef nonnull align 8 dereferenceable(64), i32 noundef) local_unnamed_addr #3 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #7

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #8

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 32 dereferenceable(64) ptr @_ZN7nanovdb4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS3_INS_8LeafNodeIfNS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEE4treeEv(ptr noundef nonnull align 32 dereferenceable(672)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK7nanovdb4TreeINS_8RootNodeINS_12InternalNodeINS2_INS_8LeafNodeIfNS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEE8getValueERKS5_(ptr noundef nonnull align 32 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7nanovdb2io10writeGridsI13MapPoolBufferTtTpTyESt6vectorEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT0_IJNS_10GridHandleIT_EEEENS0_5CodecEi(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24), i16 noundef zeroext, i32 noundef) local_unnamed_addr #3

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #9

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #10

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

attributes #0 = { mustprogress norecurse 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 = { 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 = { nofree 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 #6 = { 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 #7 = { "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 #8 = { 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 #9 = { nofree nosync nounwind memory(none) }
attributes #10 = { noinline noreturn nounwind uwtable "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 #11 = { nounwind }
attributes #12 = { noreturn }
attributes #13 = { noreturn 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 = !{!"_ZTS13MapPoolBuffer", !7, i64 0, !10, i64 8, !14, i64 24}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt10shared_ptrIN7nanovdb10HostBufferEE", !11, i64 0}
!11 = !{!"_ZTSSt12__shared_ptrIN7nanovdb10HostBufferELN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0, !13, i64 8}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0}
!14 = !{!"_ZTSSt10shared_ptrI23MapPoolAllocatorContextE", !15, i64 0}
!15 = !{!"_ZTSSt12__shared_ptrI23MapPoolAllocatorContextLN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0, !13, i64 8}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !9, i64 0}


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