; LLVM IR from thepowersgang/mrustc :: src/hir/deserialise.ll (ZN15HirDeserialiser18deserialise_moduleEv)

; 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.HIR::serialise::Reader::CloseOnDrop" = type { ptr }
%"class.HIR::Module" = type { %"class.std::vector.281", %"class.std::unordered_map.286", %"class.std::unordered_map.300", %"class.std::unordered_map.314", %"class.std::vector.328" }
%"class.std::vector.281" = type { %"struct.std::_Vector_base.282" }
%"struct.std::_Vector_base.282" = type { %"struct.std::_Vector_base<HIR::SimplePath, std::allocator<HIR::SimplePath>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::SimplePath, std::allocator<HIR::SimplePath>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::SimplePath, std::allocator<HIR::SimplePath>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::SimplePath, std::allocator<HIR::SimplePath>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map.286" = type { %"class.std::_Hashtable.287" }
%"class.std::_Hashtable.287" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unordered_map.300" = type { %"class.std::_Hashtable.301" }
%"class.std::_Hashtable.301" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.314" = type { %"class.std::_Hashtable.315" }
%"class.std::_Hashtable.315" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::vector.328" = type { %"struct.std::_Vector_base.329" }
%"struct.std::_Vector_base.329" = type { %"struct.std::_Vector_base<std::pair<RcString, std::unique_ptr<HIR::Static>>, std::allocator<std::pair<RcString, std::unique_ptr<HIR::Static>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<RcString, std::unique_ptr<HIR::Static>>, std::allocator<std::pair<RcString, std::unique_ptr<HIR::Static>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<RcString, std::unique_ptr<HIR::Static>>, std::allocator<std::pair<RcString, std::unique_ptr<HIR::Static>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<RcString, std::unique_ptr<HIR::Static>>, std::allocator<std::pair<RcString, std::unique_ptr<HIR::Static>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.TraceLog = type { ptr, %"class.std::function" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.HirDeserialiser = type { %class.RcString, %"class.std::vector", ptr }
%class.RcString = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@__func__._ZN15HirDeserialiser18deserialise_moduleEv = external hidden unnamed_addr constant [19 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [12 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef zeroext i1 @_Z13debug_enabledv() #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_117des_debug_enabledEv() #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3HIR9serialise6Reader11open_objectEPKc(ptr dead_on_unwind noalias writable sret(%"class.HIR::serialise::Reader::CloseOnDrop") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) #3 align 2

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

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

declare void @_ZN8TraceLogC1EPKc(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15HirDeserialiser18deserialise_moduleEv(ptr dead_on_unwind noalias writable sret(%"class.HIR::Module") align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.TraceLog, align 8
  %6 = alloca %"class.HIR::serialise::Reader::CloseOnDrop", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i1, align 1
  %10 = alloca %"class.std::unordered_map.286", align 8
  %11 = alloca %"class.std::unordered_map.300", align 8
  %12 = alloca %"class.std::unordered_map.314", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %13 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #6
  %14 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %14, label %15, label %17

15:                                               ; preds = %2
  %16 = call noundef zeroext i1 @_ZN12_GLOBAL__N_117des_debug_enabledEv()
  br label %17

17:                                               ; preds = %15, %2
  %18 = phi i1 [ false, %2 ], [ %16, %15 ]
  %19 = zext i1 %18 to i64
  %20 = select i1 %18, ptr @__func__._ZN15HirDeserialiser18deserialise_moduleEv, ptr null
  call void @_ZN8TraceLogC1EPKc(ptr noundef nonnull align 8 dereferenceable(40) %5, ptr noundef %20)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %21 = getelementptr inbounds %class.HirDeserialiser, ptr %13, i32 0, i32 2
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  invoke void @_ZN3HIR9serialise6Reader11open_objectEPKc(ptr dead_on_unwind writable sret(%"class.HIR::serialise::Reader::CloseOnDrop") align 8 %6, ptr noundef nonnull align 8 dereferenceable(96) %22, ptr noundef @.str.43)
          to label %23 unwind label %35

23:                                               ; preds = %17
  store i1 false, ptr %9, align 1
  invoke void @_ZN3HIR6ModuleC2Ev(ptr noundef nonnull align 8 dereferenceable(216) %0)
          to label %24 unwind label %39

24:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 56, ptr %10) #6
  invoke void @_ZN15HirDeserialiser20deserialise_istrumapISt10unique_ptrIN3HIR6VisEntINS2_9ValueItemEEESt14default_deleteIS5_EEEESt13unordered_mapI8RcStringT_St4hashISA_ESt8equal_toISA_ESaISt4pairIKSA_SB_EEEv(ptr dead_on_unwind writable sret(%"class.std::unordered_map.286") align 8 %10, ptr noundef nonnull align 8 dereferenceable(40) %13)
          to label %25 unwind label %43

25:                                               ; preds = %24
  %26 = getelementptr inbounds %"class.HIR::Module", ptr %0, i32 0, i32 1
  %27 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapI8RcStringSt10unique_ptrIN3HIR6VisEntINS2_9ValueItemEEESt14default_deleteIS5_EESt4hashIS0_ESt8equal_toIS0_ESaISt4pairIKS0_S8_EEEaSEOSH_(ptr noundef nonnull align 8 dereferenceable(56) %26, ptr noundef nonnull align 8 dereferenceable(56) %10) #6
  call void @_ZNSt13unordered_mapI8RcStringSt10unique_ptrIN3HIR6VisEntINS2_9ValueItemEEESt14default_deleteIS5_EESt4hashIS0_ESt8equal_toIS0_ESaISt4pairIKS0_S8_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr %11) #6
  invoke void @_ZN15HirDeserialiser20deserialise_istrumapISt10unique_ptrIN3HIR6VisEntINS2_8TypeItemEEESt14default_deleteIS5_EEEESt13unordered_mapI8RcStringT_St4hashISA_ESt8equal_toISA_ESaISt4pairIKSA_SB_EEEv(ptr dead_on_unwind writable sret(%"class.std::unordered_map.300") align 8 %11, ptr noundef nonnull align 8 dereferenceable(40) %13)
          to label %28 unwind label %47

28:                                               ; preds = %25
  %29 = getelementptr inbounds %"class.HIR::Module", ptr %0, i32 0, i32 2
  %30 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapI8RcStringSt10unique_ptrIN3HIR6VisEntINS2_8TypeItemEEESt14default_deleteIS5_EESt4hashIS0_ESt8equal_toIS0_ESaISt4pairIKS0_S8_EEEaSEOSH_(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(56) %11) #6
  call void @_ZNSt13unordered_mapI8RcStringSt10unique_ptrIN3HIR6VisEntINS2_8TypeItemEEESt14default_deleteIS5_EESt4hashIS0_ESt8equal_toIS0_ESaISt4pairIKS0_S8_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr %12) #6
  invoke void @_ZN15HirDeserialiser20deserialise_istrumapISt10unique_ptrIN3HIR6VisEntINS2_9MacroItemEEESt14default_deleteIS5_EEEESt13unordered_mapI8RcStringT_St4hashISA_ESt8equal_toISA_ESaISt4pairIKSA_SB_EEEv(ptr dead_on_unwind writable sret(%"class.std::unordered_map.314") align 8 %12, ptr noundef nonnull align 8 dereferenceable(40) %13)
          to label %31 unwind label %51

31:                                               ; preds = %28
  %32 = getelementptr inbounds %"class.HIR::Module", ptr %0, i32 0, i32 3
  %33 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapI8RcStringSt10unique_ptrIN3HIR6VisEntINS2_9MacroItemEEESt14default_deleteIS5_EESt4hashIS0_ESt8equal_toIS0_ESaISt4pairIKS0_S8_EEEaSEOSH_(ptr noundef nonnull align 8 dereferenceable(56) %32, ptr noundef nonnull align 8 dereferenceable(56) %12) #6
  call void @_ZNSt13unordered_mapI8RcStringSt10unique_ptrIN3HIR6VisEntINS2_9MacroItemEEESt14default_deleteIS5_EESt4hashIS0_ESt8equal_toIS0_ESaISt4pairIKS0_S8_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #6
  store i1 true, ptr %9, align 1
  %34 = load i1, ptr %9, align 1
  br i1 %34, label %56, label %55

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

39:                                               ; preds = %23
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %7, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %8, align 4
  br label %58

43:                                               ; preds = %24
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %7, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 56, ptr %10) #6
  br label %57

47:                                               ; preds = %25
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %7, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #6
  br label %57

51:                                               ; preds = %28
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %7, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #6
  br label %57

55:                                               ; preds = %31
  call void @_ZN3HIR6ModuleD2Ev(ptr noundef nonnull align 8 dereferenceable(216) %0) #6
  br label %56

56:                                               ; preds = %55, %31
  call void @_ZN3HIR9serialise6Reader11CloseOnDropD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #6
  ret void

57:                                               ; preds = %51, %47, %43
  call void @_ZN3HIR6ModuleD2Ev(ptr noundef nonnull align 8 dereferenceable(216) %0) #6
  br label %58

58:                                               ; preds = %57, %39
  call void @_ZN3HIR9serialise6Reader11CloseOnDropD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br label %59

59:                                               ; preds = %58, %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %5) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #6
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %7, align 8
  %62 = load i32, ptr %8, align 4
  %63 = insertvalue { ptr, i32 } poison, ptr %61, 0
  %64 = insertvalue { ptr, i32 } %63, i32 %62, 1
  resume { ptr, i32 } %64
}

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 32}
!10 = !{!"_ZTS15HirDeserialiser", !11, i64 0, !12, i64 8, !6, i64 32}
!11 = !{!"_ZTS8RcString", !6, i64 0}
!12 = !{!"_ZTSSt6vectorIN3HIR7TypeRefESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIN3HIR7TypeRefESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN3HIR7TypeRefESaIS1_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN3HIR7TypeRefESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}


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

%"class.HIR::serialise::Reader::CloseOnDrop" = type { ptr }
%"class.HIR::Module" = type { %"class.std::vector.281", %"class.std::unordered_map.286", %"class.std::unordered_map.300", %"class.std::unordered_map.314", %"class.std::vector.328" }
%"class.std::vector.281" = type { %"struct.std::_Vector_base.282" }
%"struct.std::_Vector_base.282" = type { %"struct.std::_Vector_base<HIR::SimplePath, std::allocator<HIR::SimplePath>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::SimplePath, std::allocator<HIR::SimplePath>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::SimplePath, std::allocator<HIR::SimplePath>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::SimplePath, std::allocator<HIR::SimplePath>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map.286" = type { %"class.std::_Hashtable.287" }
%"class.std::_Hashtable.287" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unordered_map.300" = type { %"class.std::_Hashtable.301" }
%"class.std::_Hashtable.301" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.314" = type { %"class.std::_Hashtable.315" }
%"class.std::_Hashtable.315" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::vector.328" = type { %"struct.std::_Vector_base.329" }
%"struct.std::_Vector_base.329" = type { %"struct.std::_Vector_base<std::pair<RcString, std::unique_ptr<HIR::Static>>, std::allocator<std::pair<RcString, std::unique_ptr<HIR::Static>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<RcString, std::unique_ptr<HIR::Static>>, std::allocator<std::pair<RcString, std::unique_ptr<HIR::Static>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<RcString, std::unique_ptr<HIR::Static>>, std::allocator<std::pair<RcString, std::unique_ptr<HIR::Static>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<RcString, std::unique_ptr<HIR::Static>>, std::allocator<std::pair<RcString, std::unique_ptr<HIR::Static>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.TraceLog = type { ptr, %"class.std::function" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }

@__func__._ZN15HirDeserialiser18deserialise_moduleEv = external hidden unnamed_addr constant [19 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [12 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_117des_debug_enabledEv() local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3HIR9serialise6Reader11open_objectEPKc(ptr dead_on_unwind noalias writable sret(%"class.HIR::serialise::Reader::CloseOnDrop") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) local_unnamed_addr #3 align 2

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

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

declare void @_ZN8TraceLogC1EPKc(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN15HirDeserialiser18deserialise_moduleEv(ptr dead_on_unwind noalias writable sret(%"class.HIR::Module") align 8 %0, ptr noundef nonnull align 8 dereferenceable(40) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.TraceLog, align 8
  %4 = alloca %"class.HIR::serialise::Reader::CloseOnDrop", align 8
  %5 = alloca %"class.std::unordered_map.286", align 8
  %6 = alloca %"class.std::unordered_map.300", align 8
  %7 = alloca %"class.std::unordered_map.314", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #6
  %8 = tail call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %8, label %9, label %12

9:                                                ; preds = %2
  %10 = tail call noundef zeroext i1 @_ZN12_GLOBAL__N_117des_debug_enabledEv()
  %11 = select i1 %10, ptr @__func__._ZN15HirDeserialiser18deserialise_moduleEv, ptr null
  br label %12

12:                                               ; preds = %9, %2
  %13 = phi ptr [ null, %2 ], [ %11, %9 ]
  call void @_ZN8TraceLogC1EPKc(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef %13)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %14 = getelementptr inbounds i8, ptr %1, i64 32
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN3HIR9serialise6Reader11open_objectEPKc(ptr dead_on_unwind nonnull writable sret(%"class.HIR::serialise::Reader::CloseOnDrop") align 8 %4, ptr noundef nonnull align 8 dereferenceable(96) %15, ptr noundef nonnull @.str.43)
          to label %16 unwind label %26

16:                                               ; preds = %12
  call void @_ZN3HIR6ModuleC2Ev(ptr noundef nonnull align 8 dereferenceable(216) %0)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #6
  invoke void @_ZN15HirDeserialiser20deserialise_istrumapISt10unique_ptrIN3HIR6VisEntINS2_9ValueItemEEESt14default_deleteIS5_EEEESt13unordered_mapI8RcStringT_St4hashISA_ESt8equal_toISA_ESaISt4pairIKSA_SB_EEEv(ptr dead_on_unwind nonnull writable sret(%"class.std::unordered_map.286") align 8 %5, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %17 unwind label %28

17:                                               ; preds = %16
  %18 = getelementptr inbounds i8, ptr %0, i64 24
  %19 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapI8RcStringSt10unique_ptrIN3HIR6VisEntINS2_9ValueItemEEESt14default_deleteIS5_EESt4hashIS0_ESt8equal_toIS0_ESaISt4pairIKS0_S8_EEEaSEOSH_(ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull align 8 dereferenceable(56) %5) #6
  call void @_ZNSt13unordered_mapI8RcStringSt10unique_ptrIN3HIR6VisEntINS2_9ValueItemEEESt14default_deleteIS5_EESt4hashIS0_ESt8equal_toIS0_ESaISt4pairIKS0_S8_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #6
  invoke void @_ZN15HirDeserialiser20deserialise_istrumapISt10unique_ptrIN3HIR6VisEntINS2_8TypeItemEEESt14default_deleteIS5_EEEESt13unordered_mapI8RcStringT_St4hashISA_ESt8equal_toISA_ESaISt4pairIKSA_SB_EEEv(ptr dead_on_unwind nonnull writable sret(%"class.std::unordered_map.300") align 8 %6, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %20 unwind label %30

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %0, i64 80
  %22 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapI8RcStringSt10unique_ptrIN3HIR6VisEntINS2_8TypeItemEEESt14default_deleteIS5_EESt4hashIS0_ESt8equal_toIS0_ESaISt4pairIKS0_S8_EEEaSEOSH_(ptr noundef nonnull align 8 dereferenceable(56) %21, ptr noundef nonnull align 8 dereferenceable(56) %6) #6
  call void @_ZNSt13unordered_mapI8RcStringSt10unique_ptrIN3HIR6VisEntINS2_8TypeItemEEESt14default_deleteIS5_EESt4hashIS0_ESt8equal_toIS0_ESaISt4pairIKS0_S8_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #6
  invoke void @_ZN15HirDeserialiser20deserialise_istrumapISt10unique_ptrIN3HIR6VisEntINS2_9MacroItemEEESt14default_deleteIS5_EEEESt13unordered_mapI8RcStringT_St4hashISA_ESt8equal_toISA_ESaISt4pairIKSA_SB_EEEv(ptr dead_on_unwind nonnull writable sret(%"class.std::unordered_map.314") align 8 %7, ptr noundef nonnull align 8 dereferenceable(40) %1)
          to label %23 unwind label %32

23:                                               ; preds = %20
  %24 = getelementptr inbounds i8, ptr %0, i64 136
  %25 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapI8RcStringSt10unique_ptrIN3HIR6VisEntINS2_9MacroItemEEESt14default_deleteIS5_EESt4hashIS0_ESt8equal_toIS0_ESaISt4pairIKS0_S8_EEEaSEOSH_(ptr noundef nonnull align 8 dereferenceable(56) %24, ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  call void @_ZNSt13unordered_mapI8RcStringSt10unique_ptrIN3HIR6VisEntINS2_9MacroItemEEESt14default_deleteIS5_EESt4hashIS0_ESt8equal_toIS0_ESaISt4pairIKS0_S8_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #6
  call void @_ZN3HIR9serialise6Reader11CloseOnDropD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #6
  ret void

26:                                               ; preds = %12
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %35

28:                                               ; preds = %16
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #6
  br label %34

30:                                               ; preds = %17
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #6
  br label %34

32:                                               ; preds = %20
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #6
  br label %34

34:                                               ; preds = %32, %30, %28
  %.pn = phi { ptr, i32 } [ %33, %32 ], [ %31, %30 ], [ %29, %28 ]
  call void @_ZN3HIR6ModuleD2Ev(ptr noundef nonnull align 8 dereferenceable(216) %0) #6
  call void @_ZN3HIR9serialise6Reader11CloseOnDropD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br label %35

35:                                               ; preds = %34, %26
  %.pn.pn = phi { ptr, i32 } [ %.pn, %34 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn
}

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 32}
!6 = !{!"_ZTS15HirDeserialiser", !7, i64 0, !11, i64 8, !8, i64 32}
!7 = !{!"_ZTS8RcString", !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSSt6vectorIN3HIR7TypeRefESaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIN3HIR7TypeRefESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN3HIR7TypeRefESaIS1_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN3HIR7TypeRefESaIS1_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass