; LLVM IR from thepowersgang/mrustc :: src/hir_typeck/impl_ref.ll (ZNK7ImplRef13get_impl_typeEv)

; 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.ImplRef::Monomorph" = type { %class.Monomorphiser, ptr, ptr }
%class.Monomorphiser = type { ptr, ptr, %"class.HIR::ItemPath", %"class.std::vector.196" }
%"class.HIR::ItemPath" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::vector.196" = type { %"struct.std::_Vector_base.197" }
%"struct.std::_Vector_base.197" = type { %"struct.std::_Vector_base<const HIR::GenericParams *, std::allocator<const HIR::GenericParams *>>::_Vector_impl" }
%"struct.std::_Vector_base<const HIR::GenericParams *, std::allocator<const HIR::GenericParams *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const HIR::GenericParams *, std::allocator<const HIR::GenericParams *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const HIR::GenericParams *, std::allocator<const HIR::GenericParams *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.HIR::TypeRef" = type { ptr }
%struct.Span = type { ptr }
%"class.std::function.201" = 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.anon.206 = type { i8 }
%"struct.HIR::PathParams" = type { %class.ThinVector, %class.ThinVector.0, %class.ThinVector.1 }
%class.ThinVector = type { ptr }
%class.ThinVector.0 = type { ptr }
%class.ThinVector.1 = type { ptr }
%struct.ImplRef = type { %"class.ImplRef::Data" }
%"class.ImplRef::Data" = type { i32, %"union.ImplRef::Data::DataUnion" }
%"union.ImplRef::Data::DataUnion" = type { %"struct.ImplRef::Data::Data_Bounded" }
%"struct.ImplRef::Data::Data_Bounded" = type { %"class.HIR::GenericParams", %"class.HIR::TypeRef", %"struct.HIR::PathParams", %"class.std::map" }
%"class.HIR::GenericParams" = type { %"class.std::vector", %"class.std::vector.2", %"class.std::vector.7", %"class.std::vector.12" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<HIR::TypeParamDef, std::allocator<HIR::TypeParamDef>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::TypeParamDef, std::allocator<HIR::TypeParamDef>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::TypeParamDef, std::allocator<HIR::TypeParamDef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::TypeParamDef, std::allocator<HIR::TypeParamDef>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<HIR::LifetimeDef, std::allocator<HIR::LifetimeDef>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::LifetimeDef, std::allocator<HIR::LifetimeDef>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::LifetimeDef, std::allocator<HIR::LifetimeDef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::LifetimeDef, std::allocator<HIR::LifetimeDef>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<HIR::ValueParamDef, std::allocator<HIR::ValueParamDef>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::ValueParamDef, std::allocator<HIR::ValueParamDef>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::ValueParamDef, std::allocator<HIR::ValueParamDef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::ValueParamDef, std::allocator<HIR::ValueParamDef>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<HIR::GenericBound, std::allocator<HIR::GenericBound>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::GenericBound, std::allocator<HIR::GenericBound>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::GenericBound, std::allocator<HIR::GenericBound>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::GenericBound, std::allocator<HIR::GenericBound>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitPath::AtyEqual>, std::_Select1st<std::pair<const RcString, HIR::TraitPath::AtyEqual>>, std::less<RcString>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitPath::AtyEqual>, std::_Select1st<std::pair<const RcString, HIR::TraitPath::AtyEqual>>, std::less<RcString>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.ImplRef::Data::Data_TraitImpl" = type { %"struct.HIR::PathParams", ptr, ptr, ptr, %"class.HIR::TypeRef" }
%"class.HIR::TraitImpl" = type { %"class.HIR::GenericParams", %"struct.HIR::PathParams", %"class.HIR::TypeRef", %"class.std::map.20", %"class.std::map.25", %"class.std::map.30", %"class.std::map.35", %"struct.HIR::SimplePath" }
%"class.std::map.20" = type { %"class.std::_Rb_tree.21" }
%"class.std::_Rb_tree.21" = type { %"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Function>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Function>>>, std::less<RcString>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Function>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Function>>>, std::less<RcString>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.25" = type { %"class.std::_Rb_tree.26" }
%"class.std::_Rb_tree.26" = type { %"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Constant>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Constant>>>, std::less<RcString>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Constant>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Constant>>>, std::less<RcString>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.30" = type { %"class.std::_Rb_tree.31" }
%"class.std::_Rb_tree.31" = type { %"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Static>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Static>>>, std::less<RcString>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Static>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Static>>>, std::less<RcString>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.35" = type { %"class.std::_Rb_tree.36" }
%"class.std::_Rb_tree.36" = type { %"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::TypeRef>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::TypeRef>>>, std::less<RcString>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::TypeRef>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::TypeRef>>>, std::less<RcString>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.HIR::SimplePath" = type { %class.ThinVector.40 }
%class.ThinVector.40 = type { ptr }
%"struct.ImplRef::Data::Data_BoundedPtr" = type { ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIPKc = external constant ptr
@.str.7 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@__PRETTY_FUNCTION__._ZNK7ImplRef13get_impl_typeEv = external hidden unnamed_addr constant [46 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

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

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

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

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

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ImplRef26get_cb_monomorph_traitimplERK4SpanRKN3HIR10PathParamsE(ptr dead_on_unwind noalias writable sret(%"class.ImplRef::Monomorph") align 8, ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

declare void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

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

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

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

declare void @__cxa_free_exception(ptr)

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

declare void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7ImplRef13get_impl_typeEv(ptr dead_on_unwind noalias writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(184) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.Span, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca %struct.Span, align 8
  %14 = alloca %"class.std::function.201", align 8
  %15 = alloca %class.anon.206, align 1
  %16 = alloca %"class.ImplRef::Monomorph", align 8
  %17 = alloca %"struct.HIR::PathParams", align 8
  %18 = alloca i8, align 1
  %19 = alloca ptr, align 8
  %20 = alloca i8, align 1
  %21 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %22 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  store i8 1, ptr %6, align 1, !tbaa !9
  br label %23

23:                                               ; preds = %184, %2
  %24 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %25 = trunc i8 %24 to i1
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  store i32 2, ptr %7, align 4
  br label %185

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %28 = getelementptr inbounds %struct.ImplRef, ptr %22, i32 0, i32 0
  store ptr %28, ptr %8, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %179, %27
  %30 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %31 = trunc i8 %30 to i1
  br i1 %31, label %33, label %32

32:                                               ; preds = %29
  store i32 5, ptr %7, align 4
  br label %180

33:                                               ; preds = %29
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = invoke noundef i32 @_ZNK7ImplRef4Data3tagEv(ptr noundef nonnull align 8 dereferenceable(184) %34)
          to label %36 unwind label %37

36:                                               ; preds = %33
  switch i32 %35, label %178 [
    i32 0, label %41
    i32 1, label %42
    i32 2, label %117
    i32 3, label %148
  ]

37:                                               ; preds = %33
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %9, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %10, align 4
  br label %182

41:                                               ; preds = %36
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 164, ptr noundef @__PRETTY_FUNCTION__._ZNK7ImplRef13get_impl_typeEv) #8
  unreachable

42:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #7
  store i8 1, ptr %11, align 1, !tbaa !9
  br label %43

43:                                               ; preds = %113, %42
  %44 = load i8, ptr %11, align 1, !tbaa !9, !range !11, !noundef !12
  %45 = trunc i8 %44 to i1
  br i1 %45, label %47, label %46

46:                                               ; preds = %43
  store i32 9, ptr %7, align 4
  br label %114

47:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7ImplRef4Data12as_TraitImplEv(ptr noundef nonnull align 8 dereferenceable(184) %48)
          to label %50 unwind label %56

50:                                               ; preds = %47
  store ptr %49, ptr %12, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %108, %50
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = load i8, ptr %11, align 1, !tbaa !9, !range !11, !noundef !12
  %54 = trunc i8 %53 to i1
  br i1 %54, label %60, label %55

55:                                               ; preds = %51
  store i32 12, ptr %7, align 4
  br label %109

56:                                               ; preds = %70, %47
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %9, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %10, align 4
  br label %111

60:                                               ; preds = %51
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.ImplRef::Data::Data_TraitImpl", ptr %61, i32 0, i32 3
  %63 = load ptr, ptr %62, align 8, !tbaa !13
  %64 = icmp eq ptr %63, null
  br i1 %64, label %65, label %86

65:                                               ; preds = %60
  br label %66

66:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  invoke void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %67 unwind label %71

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  call void @"_ZNSt8functionIFvRSoEEC2IZNK7ImplRef13get_impl_typeEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %14)
          to label %68 unwind label %75

68:                                               ; preds = %67
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  %69 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %69, ptr noundef @.str.7)
          to label %70 unwind label %80

70:                                               ; preds = %68
  invoke void @__cxa_throw(ptr %69, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #9
          to label %200 unwind label %56

71:                                               ; preds = %66
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %9, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %10, align 4
  br label %79

75:                                               ; preds = %67
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %9, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %10, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br label %79

79:                                               ; preds = %75, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %111

80:                                               ; preds = %68
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %9, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %10, align 4
  call void @__cxa_free_exception(ptr %69) #7
  br label %111

84:                                               ; No predecessors!
  br label %85

85:                                               ; preds = %84
  br label %86

86:                                               ; preds = %85, %60
  call void @llvm.lifetime.start.p0(i64 112, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #7
  invoke void @_ZN3HIR10PathParamsC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %87 unwind label %94

87:                                               ; preds = %86
  invoke void @_ZNK7ImplRef26get_cb_monomorph_traitimplERK4SpanRKN3HIR10PathParamsE(ptr dead_on_unwind writable sret(%"class.ImplRef::Monomorph") align 8 %16, ptr noundef nonnull align 8 dereferenceable(184) %22, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %88 unwind label %98

88:                                               ; preds = %87
  %89 = load ptr, ptr %12, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.ImplRef::Data::Data_TraitImpl", ptr %89, i32 0, i32 3
  %91 = load ptr, ptr %90, align 8, !tbaa !13
  %92 = getelementptr inbounds %"class.HIR::TraitImpl", ptr %91, i32 0, i32 2
  invoke void @_ZNK13Monomorphiser14monomorph_typeERK4SpanRKN3HIR7TypeRefEb(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %16, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %92, i1 noundef zeroext true)
          to label %93 unwind label %102

93:                                               ; preds = %88
  call void @_ZN13MonomorphiserD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %16) #7
  call void @_ZN3HIR10PathParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 112, ptr %16) #7
  store i32 1, ptr %7, align 4
  br label %109

94:                                               ; preds = %86
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %9, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %10, align 4
  br label %107

98:                                               ; preds = %87
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %9, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %10, align 4
  br label %106

102:                                              ; preds = %88
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %9, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %10, align 4
  call void @_ZN13MonomorphiserD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %16) #7
  br label %106

106:                                              ; preds = %102, %98
  call void @_ZN3HIR10PathParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  br label %107

107:                                              ; preds = %106, %94
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 112, ptr %16) #7
  br label %111

108:                                              ; No predecessors!
  store i8 0, ptr %11, align 1, !tbaa !9
  br label %51, !llvm.loop !20

109:                                              ; preds = %93, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  %110 = load i32, ptr %7, align 4
  switch i32 %110, label %114 [
    i32 12, label %112
  ]

111:                                              ; preds = %107, %80, %79, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  br label %182

112:                                              ; preds = %109
  br label %113

113:                                              ; preds = %112
  store i8 0, ptr %11, align 1, !tbaa !9
  br label %43, !llvm.loop !22

114:                                              ; preds = %109, %46
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  %115 = load i32, ptr %7, align 4
  switch i32 %115, label %180 [
    i32 9, label %116
  ]

116:                                              ; preds = %114
  br label %178

117:                                              ; preds = %36
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  store i8 1, ptr %18, align 1, !tbaa !9
  br label %118

118:                                              ; preds = %144, %117
  %119 = load i8, ptr %18, align 1, !tbaa !9, !range !11, !noundef !12
  %120 = trunc i8 %119 to i1
  br i1 %120, label %122, label %121

121:                                              ; preds = %118
  store i32 17, ptr %7, align 4
  br label %145

122:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7ImplRef4Data13as_BoundedPtrEv(ptr noundef nonnull align 8 dereferenceable(184) %123)
          to label %125 unwind label %131

125:                                              ; preds = %122
  store ptr %124, ptr %19, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %140, %125
  %127 = load ptr, ptr %19, align 8, !tbaa !5
  %128 = load i8, ptr %18, align 1, !tbaa !9, !range !11, !noundef !12
  %129 = trunc i8 %128 to i1
  br i1 %129, label %135, label %130

130:                                              ; preds = %126
  store i32 20, ptr %7, align 4
  br label %141

131:                                              ; preds = %135, %122
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %9, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  br label %182

135:                                              ; preds = %126
  %136 = load ptr, ptr %19, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.ImplRef::Data::Data_BoundedPtr", ptr %136, i32 0, i32 1
  %138 = load ptr, ptr %137, align 8, !tbaa !23
  invoke void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %138)
          to label %139 unwind label %131

139:                                              ; preds = %135
  store i32 1, ptr %7, align 4
  br label %141

140:                                              ; No predecessors!
  store i8 0, ptr %18, align 1, !tbaa !9
  br label %126, !llvm.loop !25

141:                                              ; preds = %139, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  %142 = load i32, ptr %7, align 4
  switch i32 %142, label %145 [
    i32 20, label %143
  ]

143:                                              ; preds = %141
  br label %144

144:                                              ; preds = %143
  store i8 0, ptr %18, align 1, !tbaa !9
  br label %118, !llvm.loop !26

145:                                              ; preds = %141, %121
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  %146 = load i32, ptr %7, align 4
  switch i32 %146, label %180 [
    i32 17, label %147
  ]

147:                                              ; preds = %145
  br label %178

148:                                              ; preds = %36
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #7
  store i8 1, ptr %20, align 1, !tbaa !9
  br label %149

149:                                              ; preds = %174, %148
  %150 = load i8, ptr %20, align 1, !tbaa !9, !range !11, !noundef !12
  %151 = trunc i8 %150 to i1
  br i1 %151, label %153, label %152

152:                                              ; preds = %149
  store i32 23, ptr %7, align 4
  br label %175

153:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = invoke noundef nonnull align 8 dereferenceable(176) ptr @_ZNK7ImplRef4Data10as_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184) %154)
          to label %156 unwind label %162

156:                                              ; preds = %153
  store ptr %155, ptr %21, align 8, !tbaa !5
  br label %157

157:                                              ; preds = %170, %156
  %158 = load ptr, ptr %21, align 8, !tbaa !5
  %159 = load i8, ptr %20, align 1, !tbaa !9, !range !11, !noundef !12
  %160 = trunc i8 %159 to i1
  br i1 %160, label %166, label %161

161:                                              ; preds = %157
  store i32 26, ptr %7, align 4
  br label %171

162:                                              ; preds = %166, %153
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %9, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  br label %182

166:                                              ; preds = %157
  %167 = load ptr, ptr %21, align 8, !tbaa !5
  %168 = getelementptr inbounds %"struct.ImplRef::Data::Data_Bounded", ptr %167, i32 0, i32 1
  invoke void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %168)
          to label %169 unwind label %162

169:                                              ; preds = %166
  store i32 1, ptr %7, align 4
  br label %171

170:                                              ; No predecessors!
  store i8 0, ptr %20, align 1, !tbaa !9
  br label %157, !llvm.loop !27

171:                                              ; preds = %169, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  %172 = load i32, ptr %7, align 4
  switch i32 %172, label %175 [
    i32 26, label %173
  ]

173:                                              ; preds = %171
  br label %174

174:                                              ; preds = %173
  store i8 0, ptr %20, align 1, !tbaa !9
  br label %149, !llvm.loop !28

175:                                              ; preds = %171, %152
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #7
  %176 = load i32, ptr %7, align 4
  switch i32 %176, label %180 [
    i32 23, label %177
  ]

177:                                              ; preds = %175
  br label %178

178:                                              ; preds = %177, %147, %116, %36
  br label %179

179:                                              ; preds = %178
  store i8 0, ptr %6, align 1, !tbaa !9
  br label %29, !llvm.loop !29

180:                                              ; preds = %175, %145, %114, %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %181 = load i32, ptr %7, align 4
  switch i32 %181, label %185 [
    i32 5, label %183
  ]

182:                                              ; preds = %162, %131, %111, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  br label %194

183:                                              ; preds = %180
  br label %184

184:                                              ; preds = %183
  store i8 0, ptr %6, align 1, !tbaa !9
  br label %23, !llvm.loop !30

185:                                              ; preds = %180, %26
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  %186 = load i32, ptr %7, align 4
  switch i32 %186, label %193 [
    i32 2, label %187
  ]

187:                                              ; preds = %185
  %188 = call ptr @__cxa_allocate_exception(i64 8) #7
  store ptr @.str.6, ptr %188, align 16, !tbaa !5
  invoke void @__cxa_throw(ptr %188, ptr @_ZTIPKc, ptr null) #9
          to label %200 unwind label %189

189:                                              ; preds = %187
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %9, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %10, align 4
  br label %194

193:                                              ; preds = %185
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void

194:                                              ; preds = %189, %182
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %195

195:                                              ; preds = %194
  %196 = load ptr, ptr %9, align 8
  %197 = load i32, ptr %10, align 4
  %198 = insertvalue { ptr, i32 } poison, ptr %196, 0
  %199 = insertvalue { ptr, i32 } %198, i32 %197, 1
  resume { ptr, i32 } %199

200:                                              ; preds = %187, %70
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZNK7ImplRef13get_impl_typeEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare void @_ZN3HIR10PathParamsC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4

declare void @_ZNK13Monomorphiser14monomorph_typeERK4SpanRKN3HIR7TypeRefEb(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) unnamed_addr #4

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

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

attributes #0 = { 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 #1 = { noreturn 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !6, i64 40}
!14 = !{!"_ZTSN7ImplRef4Data14Data_TraitImplE", !15, i64 0, !6, i64 24, !6, i64 32, !6, i64 40, !19, i64 48}
!15 = !{!"_ZTSN3HIR10PathParamsE", !16, i64 0, !17, i64 8, !18, i64 16}
!16 = !{!"_ZTS10ThinVectorIN3HIR11LifetimeRefEE", !6, i64 0}
!17 = !{!"_ZTS10ThinVectorIN3HIR7TypeRefEE", !6, i64 0}
!18 = !{!"_ZTS10ThinVectorIN3HIR12ConstGenericEE", !6, i64 0}
!19 = !{!"_ZTSN3HIR7TypeRefE", !6, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}
!23 = !{!24, !6, i64 8}
!24 = !{!"_ZTSN7ImplRef4Data15Data_BoundedPtrE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = distinct !{!25, !21}
!26 = distinct !{!26, !21}
!27 = distinct !{!27, !21}
!28 = distinct !{!28, !21}
!29 = distinct !{!29, !21}
!30 = distinct !{!30, !21}


; 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.ImplRef::Monomorph" = type { %class.Monomorphiser, ptr, ptr }
%class.Monomorphiser = type { ptr, ptr, %"class.HIR::ItemPath", %"class.std::vector.196" }
%"class.HIR::ItemPath" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::vector.196" = type { %"struct.std::_Vector_base.197" }
%"struct.std::_Vector_base.197" = type { %"struct.std::_Vector_base<const HIR::GenericParams *, std::allocator<const HIR::GenericParams *>>::_Vector_impl" }
%"struct.std::_Vector_base<const HIR::GenericParams *, std::allocator<const HIR::GenericParams *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const HIR::GenericParams *, std::allocator<const HIR::GenericParams *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const HIR::GenericParams *, std::allocator<const HIR::GenericParams *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.HIR::TypeRef" = type { ptr }
%struct.Span = type { ptr }
%"class.std::function.201" = 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.anon.206 = type { i8 }
%"struct.HIR::PathParams" = type { %class.ThinVector, %class.ThinVector.0, %class.ThinVector.1 }
%class.ThinVector = type { ptr }
%class.ThinVector.0 = type { ptr }
%class.ThinVector.1 = type { ptr }

@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIPKc = external constant ptr
@.str.7 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@__PRETTY_FUNCTION__._ZNK7ImplRef13get_impl_typeEv = external hidden unnamed_addr constant [46 x i8], align 1

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

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

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7ImplRef26get_cb_monomorph_traitimplERK4SpanRKN3HIR10PathParamsE(ptr dead_on_unwind noalias writable sret(%"class.ImplRef::Monomorph") align 8, ptr noundef nonnull align 8 dereferenceable(184), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

declare void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

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

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

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

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

declare void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7ImplRef13get_impl_typeEv(ptr dead_on_unwind noalias writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(184) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
.preheader:
  %2 = alloca %struct.Span, align 8
  %3 = alloca %struct.Span, align 8
  %4 = alloca %"class.std::function.201", align 8
  %5 = alloca %class.anon.206, align 1
  %6 = alloca %"class.ImplRef::Monomorph", align 8
  %7 = alloca %"struct.HIR::PathParams", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %8 = call noundef i32 @_ZNK7ImplRef4Data3tagEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
  switch i32 %8, label %.critedge60 [
    i32 0, label %.split67.us
    i32 1, label %.split69.us
    i32 2, label %.split71.us
    i32 3, label %.split74.us
  ], !llvm.loop !5

.split67.us:                                      ; preds = %.preheader
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 164, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7ImplRef13get_impl_typeEv) #8
  unreachable

.split69.us:                                      ; preds = %.preheader
  %9 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7ImplRef4Data12as_TraitImplEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
  %10 = getelementptr inbounds i8, ptr %9, i64 40
  %11 = load ptr, ptr %10, align 8, !tbaa !7
  %12 = icmp eq ptr %11, null
  br i1 %12, label %15, label %23

13:                                               ; preds = %18
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %50

15:                                               ; preds = %.split69.us
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @"_ZNSt8functionIFvRSoEEC2IZNK7ImplRef13get_impl_typeEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %4)
          to label %16 unwind label %19

16:                                               ; preds = %15
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %17 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull @.str.7)
          to label %18 unwind label %21

18:                                               ; preds = %16
  invoke void @__cxa_throw(ptr nonnull %17, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #9
          to label %51 unwind label %13

19:                                               ; preds = %15
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %50

21:                                               ; preds = %16
  %22 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %17) #7
  br label %50

23:                                               ; preds = %.split69.us
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  invoke void @_ZN3HIR10PathParamsC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %24 unwind label %29

24:                                               ; preds = %23
  invoke void @_ZNK7ImplRef26get_cb_monomorph_traitimplERK4SpanRKN3HIR10PathParamsE(ptr dead_on_unwind nonnull writable sret(%"class.ImplRef::Monomorph") align 8 %6, ptr noundef nonnull align 8 dereferenceable(184) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %25 unwind label %31

25:                                               ; preds = %24
  %26 = load ptr, ptr %10, align 8, !tbaa !7
  %27 = getelementptr inbounds i8, ptr %26, i64 120
  invoke void @_ZNK13Monomorphiser14monomorph_typeERK4SpanRKN3HIR7TypeRefEb(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %6, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %27, i1 noundef zeroext true)
          to label %28 unwind label %33

28:                                               ; preds = %25
  call void @_ZN13MonomorphiserD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %6) #7
  call void @_ZN3HIR10PathParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %6) #7
  br label %49

29:                                               ; preds = %23
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %36

31:                                               ; preds = %24
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %35

33:                                               ; preds = %25
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN13MonomorphiserD2Ev(ptr noundef nonnull align 8 dereferenceable(112) %6) #7
  br label %35

35:                                               ; preds = %33, %31
  %.pn = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ]
  call void @_ZN3HIR10PathParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  br label %36

36:                                               ; preds = %35, %29
  %.pn.pn = phi { ptr, i32 } [ %.pn, %35 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %6) #7
  br label %50

.split71.us:                                      ; preds = %.preheader
  %37 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7ImplRef4Data13as_BoundedPtrEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
  %38 = getelementptr inbounds i8, ptr %37, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !17
  invoke void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %39)
          to label %49 unwind label %40

40:                                               ; preds = %.split71.us
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %50

.split74.us:                                      ; preds = %.preheader
  %42 = call noundef nonnull align 8 dereferenceable(176) ptr @_ZNK7ImplRef4Data10as_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
  %43 = getelementptr inbounds i8, ptr %42, i64 96
  invoke void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %43)
          to label %49 unwind label %44

44:                                               ; preds = %.split74.us
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %50

.critedge60:                                      ; preds = %.preheader
  %46 = call ptr @__cxa_allocate_exception(i64 8) #7
  store ptr @.str.6, ptr %46, align 16, !tbaa !19
  invoke void @__cxa_throw(ptr nonnull %46, ptr nonnull @_ZTIPKc, ptr null) #9
          to label %51 unwind label %47

47:                                               ; preds = %.critedge60
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %50

49:                                               ; preds = %.split74.us, %.split71.us, %28
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  ret void

50:                                               ; preds = %40, %44, %36, %21, %19, %13, %47
  %.pn57 = phi { ptr, i32 } [ %48, %47 ], [ %45, %44 ], [ %41, %40 ], [ %14, %13 ], [ %22, %21 ], [ %20, %19 ], [ %.pn.pn, %36 ]
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn57

51:                                               ; preds = %.critedge60, %18
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZNK7ImplRef13get_impl_typeEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare void @_ZN3HIR10PathParamsC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4

declare void @_ZNK13Monomorphiser14monomorph_typeERK4SpanRKN3HIR7TypeRefEb(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8, ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext) unnamed_addr #4

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

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

attributes #0 = { 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 #1 = { noreturn 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { noreturn }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !11, i64 40}
!8 = !{!"_ZTSN7ImplRef4Data14Data_TraitImplE", !9, i64 0, !11, i64 24, !11, i64 32, !11, i64 40, !16, i64 48}
!9 = !{!"_ZTSN3HIR10PathParamsE", !10, i64 0, !14, i64 8, !15, i64 16}
!10 = !{!"_ZTS10ThinVectorIN3HIR11LifetimeRefEE", !11, i64 0}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTS10ThinVectorIN3HIR7TypeRefEE", !11, i64 0}
!15 = !{!"_ZTS10ThinVectorIN3HIR12ConstGenericEE", !11, i64 0}
!16 = !{!"_ZTSN3HIR7TypeRefE", !11, i64 0}
!17 = !{!18, !11, i64 8}
!18 = !{!"_ZTSN7ImplRef4Data15Data_BoundedPtrE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!19 = !{!11, !11, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,SCCPPass,SROAPass,SimplifyCFGPass