; LLVM IR from AcademySoftwareFoundation/openvdb :: nanovdb/nanovdb/examples/ex_read_nanovdb_sphere_accessor (main)

; 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.nanovdb::GridHandle" = type { %"class.std::vector", %"class.nanovdb::HostBuffer" }
%"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.nanovdb::HostBuffer" = type { %"class.std::shared_ptr", i64, ptr }
%"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::__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.0" = type { i8 }
%"class.nanovdb::ReadAccessor" = type { [3 x %"class.nanovdb::math::Coord"], ptr, [3 x ptr] }
%"class.nanovdb::math::Coord" = type { [3 x i32] }

@_ZTISt9exception = external constant ptr
@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [50 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = 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.nanovdb::GridHandle", align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator.0", align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.nanovdb::HostBuffer", align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.nanovdb::ReadAccessor", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.nanovdb::math::Coord", align 4
  %12 = alloca ptr, align 8
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 56, ptr %2) #10
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %13 unwind label %23

13:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #10
  invoke void @_ZN7nanovdb10HostBufferC2Em(ptr noundef nonnull align 8 dereferenceable(32) %7, i64 noundef 0)
          to label %14 unwind label %27

14:                                               ; preds = %13
  invoke void @_ZN7nanovdb2io8readGridINS_10HostBufferEEENS_10GridHandleIT_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiiRKS4_(ptr dead_on_unwind writable sret(%"class.nanovdb::GridHandle") align 8 %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 0, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %15 unwind label %31

15:                                               ; preds = %14
  call void @_ZN7nanovdb10HostBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %16 = invoke noundef ptr @_ZN7nanovdb10GridHandleINS_10HostBufferEE4gridIfEEPNS_4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS7_INS_8LeafNodeIT_NS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEEEj(ptr noundef nonnull align 8 dereferenceable(56) %2, i32 noundef 0)
          to label %17 unwind label %37

17:                                               ; preds = %15
  store ptr %16, ptr %8, align 8, !tbaa !5
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = icmp ne ptr %18, null
  br i1 %19, label %45, label %20

20:                                               ; preds = %17
  %21 = call ptr @__cxa_allocate_exception(i64 16) #10
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef @.str.1)
          to label %22 unwind label %41

22:                                               ; preds = %20
  invoke void @__cxa_throw(ptr %21, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #11
          to label %110 unwind label %37

23:                                               ; preds = %0
  %24 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %5, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %6, align 4
  br label %36

27:                                               ; preds = %13
  %28 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %5, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %6, align 4
  br label %35

31:                                               ; preds = %14
  %32 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %5, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %6, align 4
  call void @_ZN7nanovdb10HostBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #10
  br label %35

35:                                               ; preds = %31, %27
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #10
  br label %36

36:                                               ; preds = %35, %23
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #10
  br label %75

37:                                               ; preds = %22, %15
  %38 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %5, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %6, align 4
  br label %74

41:                                               ; preds = %20
  %42 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %5, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %6, align 4
  call void @__cxa_free_exception(ptr %21) #10
  br label %74

45:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 72, ptr %9) #10
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZNK7nanovdb4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS3_INS_8LeafNodeIfNS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEE11getAccessorEv(ptr dead_on_unwind writable sret(%"class.nanovdb::ReadAccessor") align 8 %9, ptr noundef nonnull align 32 dereferenceable(672) %46)
          to label %47 unwind label %52

47:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #10
  store i32 97, ptr %10, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %65, %47
  %49 = load i32, ptr %10, align 4, !tbaa !9
  %50 = icmp slt i32 %49, 104
  br i1 %50, label %56, label %51

51:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  br label %72

52:                                               ; preds = %45
  %53 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %5, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %6, align 4
  br label %73

56:                                               ; preds = %48
  %57 = load i32, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #10
  %58 = load i32, ptr %10, align 4, !tbaa !9
  invoke void @_ZN7nanovdb4math5CoordC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %11, i32 noundef %58, i32 noundef 0, i32 noundef 0)
          to label %59 unwind label %68

59:                                               ; preds = %56
  %60 = invoke noundef float @_ZNK7nanovdb12ReadAccessorIfLi0ELi1ELi2EE8getValueERKNS_4math5CoordE(ptr noundef nonnull align 8 dereferenceable(72) %9, ptr noundef nonnull align 4 dereferenceable(12) %11)
          to label %61 unwind label %68

61:                                               ; preds = %59
  %62 = fpext float %60 to double
  %63 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %57, double noundef %62)
          to label %64 unwind label %68

64:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #10
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %10, align 4, !tbaa !9
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %10, align 4, !tbaa !9
  br label %48, !llvm.loop !11

68:                                               ; preds = %61, %59, %56
  %69 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %5, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  br label %73

72:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 72, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @_ZN7nanovdb10GridHandleINS_10HostBufferEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr %2) #10
  br label %96

73:                                               ; preds = %68, %52
  call void @llvm.lifetime.end.p0(i64 72, ptr %9) #10
  br label %74

74:                                               ; preds = %73, %41, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @_ZN7nanovdb10GridHandleINS_10HostBufferEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %2) #10
  br label %75

75:                                               ; preds = %74, %36
  call void @llvm.lifetime.end.p0(i64 56, ptr %2) #10
  br label %76

76:                                               ; preds = %75
  %77 = load i32, ptr %6, align 4
  %78 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #10
  %79 = icmp eq i32 %77, %78
  br i1 %79, label %80, label %102

80:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %81 = load ptr, ptr %5, align 8
  %82 = call ptr @__cxa_begin_catch(ptr %81) #10
  store ptr %82, ptr %12, align 8
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.3)
          to label %84 unwind label %97

84:                                               ; preds = %80
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = load ptr, ptr %85, align 8, !tbaa !13
  %87 = getelementptr inbounds ptr, ptr %86, i64 2
  %88 = load ptr, ptr %87, align 8
  %89 = call noundef ptr %88(ptr noundef nonnull align 8 dereferenceable(8) %85) #10
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef %89)
          to label %91 unwind label %97

91:                                               ; preds = %84
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef @.str.4)
          to label %93 unwind label %97

93:                                               ; preds = %91
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %95 unwind label %97

95:                                               ; preds = %93
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  br label %96

96:                                               ; preds = %95, %72
  ret i32 0

97:                                               ; preds = %93, %91, %84, %80
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %5, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %6, align 4
  invoke void @__cxa_end_catch()
          to label %101 unwind label %107

101:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  br label %102

102:                                              ; preds = %101, %76
  %103 = load ptr, ptr %5, align 8
  %104 = load i32, ptr %6, align 4
  %105 = insertvalue { ptr, i32 } poison, ptr %103, 0
  %106 = insertvalue { ptr, i32 } %105, i32 %104, 1
  resume { ptr, i32 } %106

107:                                              ; preds = %97
  %108 = landingpad { ptr, i32 }
          catch ptr null
  %109 = extractvalue { ptr, i32 } %108, 0
  call void @__clang_call_terminate(ptr %109) #12
  unreachable

110:                                              ; preds = %22
  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 uwtable
declare dso_local void @_ZN7nanovdb2io8readGridINS_10HostBufferEEENS_10GridHandleIT_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiiRKS4_(ptr dead_on_unwind noalias writable sret(%"class.nanovdb::GridHandle") align 8, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7nanovdb10GridHandleINS_10HostBufferEE4gridIfEEPNS_4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS7_INS_8LeafNodeIT_NS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEEEj(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #2 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 #6

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7nanovdb4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS3_INS_8LeafNodeIfNS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEE11getAccessorEv(ptr dead_on_unwind noalias writable sret(%"class.nanovdb::ReadAccessor") align 8, ptr noundef nonnull align 32 dereferenceable(672)) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK7nanovdb12ReadAccessorIfLi0ELi1ELi2EE8getValueERKNS_4math5CoordE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 4 dereferenceable(12)) #2 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 #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7nanovdb10GridHandleINS_10HostBufferEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #7 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) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 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)) #4

declare void @__cxa_end_catch()

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

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 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 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "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 = { 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 #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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, 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.nanovdb::GridHandle" = type { %"class.std::vector", %"class.nanovdb::HostBuffer" }
%"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.nanovdb::HostBuffer" = type { %"class.std::shared_ptr", i64, ptr }
%"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::__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.0" = type { i8 }
%"class.nanovdb::ReadAccessor" = type { [3 x %"class.nanovdb::math::Coord"], ptr, [3 x ptr] }
%"class.nanovdb::math::Coord" = type { [3 x i32] }

@_ZTISt9exception = external constant ptr
@.str = external hidden unnamed_addr constant [17 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [50 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.2 = external hidden unnamed_addr constant [32 x i8], align 1
@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = 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.nanovdb::GridHandle", align 8
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator.0", align 1
  %4 = alloca %"class.nanovdb::HostBuffer", align 8
  %5 = alloca %"class.nanovdb::ReadAccessor", align 8
  %6 = alloca %"class.nanovdb::math::Coord", align 4
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %1) #11
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #11
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #11
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %7 unwind label %15

7:                                                ; preds = %0
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #11
  invoke void @_ZN7nanovdb10HostBufferC2Em(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef 0)
          to label %8 unwind label %17

8:                                                ; preds = %7
  invoke void @_ZN7nanovdb2io8readGridINS_10HostBufferEEENS_10GridHandleIT_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiiRKS4_(ptr dead_on_unwind nonnull writable sret(%"class.nanovdb::GridHandle") align 8 %1, ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef 0, i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %9 unwind label %19

9:                                                ; preds = %8
  call void @_ZN7nanovdb10HostBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #11
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #11
  %10 = invoke noundef ptr @_ZN7nanovdb10GridHandleINS_10HostBufferEE4gridIfEEPNS_4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS7_INS_8LeafNodeIT_NS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEEEj(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef 0)
          to label %11 unwind label %23

11:                                               ; preds = %9
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %12, label %27

12:                                               ; preds = %11
  %13 = call ptr @__cxa_allocate_exception(i64 16) #11
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull @.str.1)
          to label %14 unwind label %25

14:                                               ; preds = %12
  invoke void @__cxa_throw(ptr nonnull %13, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #12
          to label %80 unwind label %23

15:                                               ; preds = %0
  %16 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %22

17:                                               ; preds = %7
  %18 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %21

19:                                               ; preds = %8
  %20 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZN7nanovdb10HostBufferD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #11
  br label %21

21:                                               ; preds = %19, %17
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %18, %17 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #11
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #11
  br label %22

22:                                               ; preds = %21, %15
  %.pn.pn = phi { ptr, i32 } [ %.pn, %21 ], [ %16, %15 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #11
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #11
  br label %56

23:                                               ; preds = %14, %9
  %24 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %55

25:                                               ; preds = %12
  %26 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @__cxa_free_exception(ptr %13) #11
  br label %55

27:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #11
  invoke void @_ZNK7nanovdb4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS3_INS_8LeafNodeIfNS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEE11getAccessorEv(ptr dead_on_unwind nonnull writable sret(%"class.nanovdb::ReadAccessor") align 8 %5, ptr noundef nonnull align 32 dereferenceable(672) %10)
          to label %.preheader.preheader unwind label %29

.preheader.preheader:                             ; preds = %27
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #11
  call void @_ZN7nanovdb4math5CoordC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 97, i32 noundef 0, i32 noundef 0)
  %28 = invoke noundef float @_ZNK7nanovdb12ReadAccessorIfLi0ELi1ELi2EE8getValueERKNS_4math5CoordE(ptr noundef nonnull align 8 dereferenceable(72) %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
          to label %.preheader.1 unwind label %52

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

.preheader.1:                                     ; preds = %.preheader.preheader
  %31 = fpext float %28 to double
  %32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 97, double noundef %31)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #11
  call void @_ZN7nanovdb4math5CoordC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 98, i32 noundef 0, i32 noundef 0)
  %33 = invoke noundef float @_ZNK7nanovdb12ReadAccessorIfLi0ELi1ELi2EE8getValueERKNS_4math5CoordE(ptr noundef nonnull align 8 dereferenceable(72) %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
          to label %.preheader.2 unwind label %52

.preheader.2:                                     ; preds = %.preheader.1
  %34 = fpext float %33 to double
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 98, double noundef %34)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #11
  call void @_ZN7nanovdb4math5CoordC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 99, i32 noundef 0, i32 noundef 0)
  %36 = invoke noundef float @_ZNK7nanovdb12ReadAccessorIfLi0ELi1ELi2EE8getValueERKNS_4math5CoordE(ptr noundef nonnull align 8 dereferenceable(72) %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
          to label %.preheader.3 unwind label %52

.preheader.3:                                     ; preds = %.preheader.2
  %37 = fpext float %36 to double
  %38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 99, double noundef %37)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #11
  call void @_ZN7nanovdb4math5CoordC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 100, i32 noundef 0, i32 noundef 0)
  %39 = invoke noundef float @_ZNK7nanovdb12ReadAccessorIfLi0ELi1ELi2EE8getValueERKNS_4math5CoordE(ptr noundef nonnull align 8 dereferenceable(72) %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
          to label %.preheader.4 unwind label %52

.preheader.4:                                     ; preds = %.preheader.3
  %40 = fpext float %39 to double
  %41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 100, double noundef %40)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #11
  call void @_ZN7nanovdb4math5CoordC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 101, i32 noundef 0, i32 noundef 0)
  %42 = invoke noundef float @_ZNK7nanovdb12ReadAccessorIfLi0ELi1ELi2EE8getValueERKNS_4math5CoordE(ptr noundef nonnull align 8 dereferenceable(72) %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
          to label %.preheader.5 unwind label %52

.preheader.5:                                     ; preds = %.preheader.4
  %43 = fpext float %42 to double
  %44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 101, double noundef %43)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #11
  call void @_ZN7nanovdb4math5CoordC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 102, i32 noundef 0, i32 noundef 0)
  %45 = invoke noundef float @_ZNK7nanovdb12ReadAccessorIfLi0ELi1ELi2EE8getValueERKNS_4math5CoordE(ptr noundef nonnull align 8 dereferenceable(72) %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
          to label %.preheader.6 unwind label %52

.preheader.6:                                     ; preds = %.preheader.5
  %46 = fpext float %45 to double
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 102, double noundef %46)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #11
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #11
  call void @_ZN7nanovdb4math5CoordC2Eiii(ptr noundef nonnull align 4 dereferenceable(12) %6, i32 noundef 103, i32 noundef 0, i32 noundef 0)
  %48 = invoke noundef float @_ZNK7nanovdb12ReadAccessorIfLi0ELi1ELi2EE8getValueERKNS_4math5CoordE(ptr noundef nonnull align 8 dereferenceable(72) %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
          to label %49 unwind label %52

49:                                               ; preds = %.preheader.6
  %50 = fpext float %48 to double
  %51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 103, double noundef %50)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #11
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #11
  call void @_ZN7nanovdb10GridHandleINS_10HostBufferEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %1) #11
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %1) #11
  br label %73

52:                                               ; preds = %.preheader.6, %.preheader.5, %.preheader.4, %.preheader.3, %.preheader.2, %.preheader.1, %.preheader.preheader
  %53 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #11
  br label %54

54:                                               ; preds = %52, %29
  %.pn20 = phi { ptr, i32 } [ %53, %52 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #11
  br label %55

55:                                               ; preds = %54, %25, %23
  %.pn20.pn = phi { ptr, i32 } [ %.pn20, %54 ], [ %24, %23 ], [ %26, %25 ]
  call void @_ZN7nanovdb10GridHandleINS_10HostBufferEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %1) #11
  br label %56

56:                                               ; preds = %55, %22
  %.pn20.pn.pn = phi { ptr, i32 } [ %.pn20.pn, %55 ], [ %.pn.pn, %22 ]
  %.415 = extractvalue { ptr, i32 } %.pn20.pn.pn, 1
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %1) #11
  %57 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #11
  %58 = icmp eq i32 %.415, %57
  br i1 %58, label %59, label %76

59:                                               ; preds = %56
  %.4 = extractvalue { ptr, i32 } %.pn20.pn.pn, 0
  %60 = call ptr @__cxa_begin_catch(ptr %.4) #11
  %61 = 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.3)
          to label %62 unwind label %74

62:                                               ; preds = %59
  %63 = load ptr, ptr %60, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %63, i64 16
  %65 = load ptr, ptr %64, align 8
  %66 = call noundef ptr %65(ptr noundef nonnull align 8 dereferenceable(8) %60) #11
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %61, ptr noundef %66)
          to label %68 unwind label %74

68:                                               ; preds = %62
  %69 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %67, ptr noundef nonnull @.str.4)
          to label %70 unwind label %74

70:                                               ; preds = %68
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %69, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %72 unwind label %74

72:                                               ; preds = %70
  call void @__cxa_end_catch()
  br label %73

73:                                               ; preds = %72, %49
  ret i32 0

74:                                               ; preds = %70, %68, %62, %59
  %75 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %76 unwind label %77

76:                                               ; preds = %74, %56
  %.merged = phi { ptr, i32 } [ %.pn20.pn.pn, %56 ], [ %75, %74 ]
  resume { ptr, i32 } %.merged

77:                                               ; preds = %74
  %78 = landingpad { ptr, i32 }
          catch ptr null
  %79 = extractvalue { ptr, i32 } %78, 0
  call void @__clang_call_terminate(ptr %79) #13
  unreachable

80:                                               ; preds = %14
  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 uwtable
declare dso_local void @_ZN7nanovdb2io8readGridINS_10HostBufferEEENS_10GridHandleIT_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiiRKS4_(ptr dead_on_unwind noalias writable sret(%"class.nanovdb::GridHandle") align 8, ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 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 #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN7nanovdb10GridHandleINS_10HostBufferEE4gridIfEEPNS_4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS7_INS_8LeafNodeIT_NS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEEEj(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #2 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 #5

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 #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7nanovdb4GridINS_4TreeINS_8RootNodeINS_12InternalNodeINS3_INS_8LeafNodeIfNS_4math5CoordENS_4MaskELj3EEELj4EEELj5EEEEEEEE11getAccessorEv(ptr dead_on_unwind noalias writable sret(%"class.nanovdb::ReadAccessor") align 8, ptr noundef nonnull align 32 dereferenceable(672)) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZNK7nanovdb12ReadAccessorIfLi0ELi1ELi2EE8getValueERKNS_4math5CoordE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 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 #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7nanovdb10GridHandleINS_10HostBufferEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #8 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 #4

; 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 #2 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)) #4

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

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 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 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "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 = { 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 #8 = { 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 #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, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


; Effective O3 passes: GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass