; LLVM IR from thepowersgang/mrustc :: src/mir/helpers.ll (ZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS1_4PathE)

; 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::TypeRef" = type { ptr }
%struct.MonomorphStatePtr = type { %class.MonomorphiserPP, ptr, ptr, ptr, ptr }
%class.MonomorphiserPP = type { %class.Monomorphiser }
%class.Monomorphiser = type { ptr, ptr, %"class.HIR::ItemPath", %"class.std::vector.236" }
%"class.HIR::ItemPath" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::vector.236" = type { %"struct.std::_Vector_base.237" }
%"struct.std::_Vector_base.237" = 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.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.anon.263 = type { ptr }
%class.anon.264 = type { ptr, ptr }
%class.anon.265 = type { ptr }
%"class.HIR::Path" = type { %"class.HIR::Path::Data" }
%"class.HIR::Path::Data" = type { i32, %"union.HIR::Path::Data::DataUnion" }
%"union.HIR::Path::Data::DataUnion" = type { %"struct.HIR::Path::Data::Data_UfcsKnown" }
%"struct.HIR::Path::Data::Data_UfcsKnown" = type { %"class.HIR::TypeRef", %"class.HIR::GenericPath", %class.RcString, %"struct.HIR::PathParams", %"class.std::unique_ptr" }
%"class.HIR::GenericPath" = type { %"struct.HIR::SimplePath", %"struct.HIR::PathParams" }
%"struct.HIR::SimplePath" = type { %class.ThinVector }
%class.ThinVector = type { ptr }
%class.RcString = type { ptr }
%"struct.HIR::PathParams" = type { %class.ThinVector.41, %class.ThinVector.42, %class.ThinVector.43 }
%class.ThinVector.41 = type { ptr }
%class.ThinVector.42 = type { ptr }
%class.ThinVector.43 = type { ptr }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.45" }
%"struct.std::_Head_base.45" = type { ptr }
%"class.MIR::TypeResolve" = type { i32, ptr, ptr, ptr, %struct.FmtLambda, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32 }
%struct.FmtLambda = type { %"class.std::function" }
%"class.HIR::Static" = type { %"class.HIR::GenericParams", %"struct.HIR::Linkage", i8, %"class.HIR::TypeRef", %"class.HIR::ExprPtr", %struct.EncodedLiteral, i8, i8, i8, %"class.std::map.230" }
%"class.HIR::GenericParams" = type { %"class.std::vector.197", %"class.std::vector.202", %"class.std::vector.207", %"class.std::vector.212" }
%"class.std::vector.197" = type { %"struct.std::_Vector_base.198" }
%"struct.std::_Vector_base.198" = 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.202" = type { %"struct.std::_Vector_base.203" }
%"struct.std::_Vector_base.203" = 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.207" = type { %"struct.std::_Vector_base.208" }
%"struct.std::_Vector_base.208" = 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.212" = type { %"struct.std::_Vector_base.213" }
%"struct.std::_Vector_base.213" = 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 }
%"struct.HIR::Linkage" = type { i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"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.HIR::ExprPtr" = type { %"class.HIR::ExprPtrInner", %"class.std::vector", %"class.std::vector", %"class.MIR::FunctionPointer", %"class.HIR::ExprStatePtr" }
%"class.HIR::ExprPtrInner" = 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 }
%"class.MIR::FunctionPointer" = type { ptr }
%"class.HIR::ExprStatePtr" = type { ptr }
%struct.EncodedLiteral = type { %"class.std::vector.220", %"class.std::vector.225" }
%"class.std::vector.220" = type { %"struct.std::_Vector_base.221" }
%"struct.std::_Vector_base.221" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned char, std::allocator<unsigned char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.225" = type { %"struct.std::_Vector_base.226" }
%"struct.std::_Vector_base.226" = type { %"struct.std::_Vector_base<Reloc, std::allocator<Reloc>>::_Vector_impl" }
%"struct.std::_Vector_base<Reloc, std::allocator<Reloc>>::_Vector_impl" = type { %"struct.std::_Vector_base<Reloc, std::allocator<Reloc>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Reloc, std::allocator<Reloc>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map.230" = type { %"class.std::_Rb_tree.231" }
%"class.std::_Rb_tree.231" = type { %"struct.std::_Rb_tree<HIR::Path, std::pair<const HIR::Path, EncodedLiteral>, std::_Select1st<std::pair<const HIR::Path, EncodedLiteral>>, std::less<HIR::Path>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<HIR::Path, std::pair<const HIR::Path, EncodedLiteral>, std::_Select1st<std::pair<const HIR::Path, EncodedLiteral>>, std::less<HIR::Path>>::_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 }

@.str.6 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [74 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS1_4PathE = external hidden unnamed_addr constant [101 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIPKc = external constant ptr
@__FUNCTION__._ZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS1_4PathE = external hidden unnamed_addr constant [16 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3MIR11TypeResolve9print_bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS1_4PathE(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(88) %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.HIR::TypeRef", align 8
  %15 = alloca %struct.MonomorphStatePtr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i8, align 1
  %19 = alloca ptr, align 8
  %20 = alloca %"class.std::function", align 8
  %21 = alloca %class.anon.263, align 8
  %22 = alloca i8, align 1
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca %"class.std::function", align 8
  %26 = alloca %class.anon.264, align 8
  %27 = alloca i8, align 1
  %28 = alloca ptr, align 8
  %29 = alloca %"class.std::function", align 8
  %30 = alloca %class.anon.265, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %31 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  store i8 1, ptr %8, align 1, !tbaa !9
  br label %32

32:                                               ; preds = %195, %3
  %33 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %34 = trunc i8 %33 to i1
  br i1 %34, label %36, label %35

35:                                               ; preds = %32
  store i32 2, ptr %9, align 4
  br label %196

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %"class.HIR::Path", ptr %37, i32 0, i32 0
  store ptr %38, ptr %10, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %190, %36
  %40 = load i8, ptr %8, align 1, !tbaa !9, !range !11, !noundef !12
  %41 = trunc i8 %40 to i1
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 5, ptr %9, align 4
  br label %191

43:                                               ; preds = %39
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = call noundef i32 @_ZNK3HIR4Path4Data3tagEv(ptr noundef nonnull align 8 dereferenceable(88) %44)
  switch i32 %45, label %189 [
    i32 0, label %46
    i32 1, label %47
    i32 3, label %101
    i32 4, label %130
    i32 2, label %160
  ]

46:                                               ; preds = %43
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.7, i32 noundef 55, ptr noundef @__PRETTY_FUNCTION__._ZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS1_4PathE) #7
  unreachable

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

48:                                               ; preds = %97, %47
  %49 = load i8, ptr %11, align 1, !tbaa !9, !range !11, !noundef !12
  %50 = trunc i8 %49 to i1
  br i1 %50, label %52, label %51

51:                                               ; preds = %48
  store i32 9, ptr %9, align 4
  br label %98

52:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3HIR4Path4Data10as_GenericEv(ptr noundef nonnull align 8 dereferenceable(88) %53)
  store ptr %54, ptr %12, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %93, %52
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = load i8, ptr %11, align 1, !tbaa !9, !range !11, !noundef !12
  %58 = trunc i8 %57 to i1
  br i1 %58, label %60, label %59

59:                                               ; preds = %55
  store i32 12, ptr %9, align 4
  br label %94

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %61 = getelementptr inbounds %"class.MIR::TypeResolve", ptr %31, i32 0, i32 3
  %62 = load ptr, ptr %61, align 8, !tbaa !13
  %63 = getelementptr inbounds %"class.MIR::TypeResolve", ptr %31, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !19
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.HIR::GenericPath", ptr %65, i32 0, i32 0
  %67 = call noundef nonnull align 8 dereferenceable(360) ptr @_ZNK3HIR5Crate18get_static_by_pathERK4SpanRKNS_10SimplePathE(ptr noundef nonnull align 8 dereferenceable(944) %62, ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull align 8 dereferenceable(8) %66)
  store ptr %67, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 128, ptr %15) #6
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = getelementptr inbounds %"class.HIR::GenericPath", ptr %68, i32 0, i32 1
  call void @_ZN17MonomorphStatePtrC2EPKN3HIR7TypeRefEPKNS0_10PathParamsES6_S6_S6_(ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef null, ptr noundef null, ptr noundef %69, ptr noundef null, ptr noundef null)
  %70 = getelementptr inbounds %"class.MIR::TypeResolve", ptr %31, i32 0, i32 1
  %71 = load ptr, ptr %70, align 8, !tbaa !19
  %72 = load ptr, ptr %13, align 8, !tbaa !5
  %73 = getelementptr inbounds %"class.HIR::Static", ptr %72, i32 0, i32 3
  invoke void @_ZNK13Monomorphiser14monomorph_typeERK4SpanRKN3HIR7TypeRefEb(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %14, ptr noundef nonnull align 8 dereferenceable(96) %15, ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull align 8 dereferenceable(8) %73, i1 noundef zeroext true)
          to label %74 unwind label %84

74:                                               ; preds = %60
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIR7TypeRefaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %75, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %77 unwind label %88

77:                                               ; preds = %74
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  call void @_ZN13MonomorphiserD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %15) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  %78 = getelementptr inbounds %"class.MIR::TypeResolve", ptr %31, i32 0, i32 2
  %79 = load ptr, ptr %78, align 8, !tbaa !20
  %80 = getelementptr inbounds %"class.MIR::TypeResolve", ptr %31, i32 0, i32 1
  %81 = load ptr, ptr %80, align 8, !tbaa !19
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZNK18StaticTraitResolve23expand_associated_typesERK4SpanRN3HIR7TypeRefE(ptr noundef nonnull align 8 dereferenceable(424) %79, ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull align 8 dereferenceable(8) %82)
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %83, ptr %4, align 8
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %94

84:                                               ; preds = %60
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %16, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %17, align 4
  br label %92

88:                                               ; preds = %74
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %16, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %17, align 4
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br label %92

92:                                               ; preds = %88, %84
  call void @_ZN13MonomorphiserD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %15) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  br label %193

93:                                               ; No predecessors!
  store i8 0, ptr %11, align 1, !tbaa !9
  br label %55, !llvm.loop !21

94:                                               ; preds = %77, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %95 = load i32, ptr %9, align 4
  switch i32 %95, label %98 [
    i32 12, label %96
  ]

96:                                               ; preds = %94
  br label %97

97:                                               ; preds = %96
  store i8 0, ptr %11, align 1, !tbaa !9
  br label %48, !llvm.loop !23

98:                                               ; preds = %94, %51
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  %99 = load i32, ptr %9, align 4
  switch i32 %99, label %191 [
    i32 9, label %100
  ]

100:                                              ; preds = %98
  br label %189

101:                                              ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  store i8 1, ptr %18, align 1, !tbaa !9
  br label %102

102:                                              ; preds = %128, %101
  %103 = load i8, ptr %18, align 1, !tbaa !9, !range !11, !noundef !12
  %104 = trunc i8 %103 to i1
  br i1 %104, label %106, label %105

105:                                              ; preds = %102
  store i32 15, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  br label %129

106:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK3HIR4Path4Data12as_UfcsKnownEv(ptr noundef nonnull align 8 dereferenceable(88) %107)
  store ptr %108, ptr %19, align 8, !tbaa !5
  br label %109

109:                                              ; preds = %126, %106
  %110 = load ptr, ptr %19, align 8, !tbaa !5
  %111 = load i8, ptr %18, align 1, !tbaa !9, !range !11, !noundef !12
  %112 = trunc i8 %111 to i1
  br i1 %112, label %114, label %113

113:                                              ; preds = %109
  store i32 18, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %127

114:                                              ; preds = %109
  br label %115

115:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %116 = getelementptr inbounds %class.anon.263, ptr %21, i32 0, i32 0
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %117, ptr %116, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS6_4PathEE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #6
  invoke void @_ZNK3MIR11TypeResolve10print_todoESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120) %31, ptr noundef %20)
          to label %118 unwind label %120

118:                                              ; preds = %115
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  %119 = call ptr @__cxa_allocate_exception(i64 8) #6
  store ptr @.str.8, ptr %119, align 16, !tbaa !5
  call void @__cxa_throw(ptr %119, ptr @_ZTIPKc, ptr null) #8
  unreachable

120:                                              ; preds = %115
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %16, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %17, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  br label %193

124:                                              ; No predecessors!
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125
  store i8 0, ptr %18, align 1, !tbaa !9
  br label %109, !llvm.loop !24

127:                                              ; preds = %113
  br label %128

128:                                              ; preds = %127
  store i8 0, ptr %18, align 1, !tbaa !9
  br label %102, !llvm.loop !25

129:                                              ; preds = %105
  br label %189

130:                                              ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  store i8 1, ptr %22, align 1, !tbaa !9
  br label %131

131:                                              ; preds = %158, %130
  %132 = load i8, ptr %22, align 1, !tbaa !9, !range !11, !noundef !12
  %133 = trunc i8 %132 to i1
  br i1 %133, label %135, label %134

134:                                              ; preds = %131
  store i32 23, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  br label %159

135:                                              ; preds = %131
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK3HIR4Path4Data14as_UfcsUnknownEv(ptr noundef nonnull align 8 dereferenceable(88) %136)
  store ptr %137, ptr %23, align 8, !tbaa !5
  br label %138

138:                                              ; preds = %156, %135
  %139 = load ptr, ptr %23, align 8, !tbaa !5
  %140 = load i8, ptr %22, align 1, !tbaa !9, !range !11, !noundef !12
  %141 = trunc i8 %140 to i1
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  store i32 26, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %157

143:                                              ; preds = %138
  br label %144

144:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  store ptr @__FUNCTION__._ZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS1_4PathE, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #6
  %145 = getelementptr inbounds %class.anon.264, ptr %26, i32 0, i32 0
  store ptr %24, ptr %145, align 8, !tbaa !5
  %146 = getelementptr inbounds %class.anon.264, ptr %26, i32 0, i32 1
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %147, ptr %146, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS6_4PathEE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(16) %26) #6
  invoke void @_ZNK3MIR11TypeResolve9print_bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120) %31, ptr noundef %25)
          to label %148 unwind label %150

148:                                              ; preds = %144
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #6
  %149 = call ptr @__cxa_allocate_exception(i64 8) #6
  store ptr @.str.8, ptr %149, align 16, !tbaa !5
  call void @__cxa_throw(ptr %149, ptr @_ZTIPKc, ptr null) #8
  unreachable

150:                                              ; preds = %144
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %16, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %17, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  br label %193

154:                                              ; No predecessors!
  br label %155

155:                                              ; preds = %154
  br label %156

156:                                              ; preds = %155
  store i8 0, ptr %22, align 1, !tbaa !9
  br label %138, !llvm.loop !26

157:                                              ; preds = %142
  br label %158

158:                                              ; preds = %157
  store i8 0, ptr %22, align 1, !tbaa !9
  br label %131, !llvm.loop !27

159:                                              ; preds = %134
  br label %189

160:                                              ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #6
  store i8 1, ptr %27, align 1, !tbaa !9
  br label %161

161:                                              ; preds = %187, %160
  %162 = load i8, ptr %27, align 1, !tbaa !9, !range !11, !noundef !12
  %163 = trunc i8 %162 to i1
  br i1 %163, label %165, label %164

164:                                              ; preds = %161
  store i32 31, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #6
  br label %188

165:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %166 = load ptr, ptr %10, align 8, !tbaa !5
  %167 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK3HIR4Path4Data15as_UfcsInherentEv(ptr noundef nonnull align 8 dereferenceable(88) %166)
  store ptr %167, ptr %28, align 8, !tbaa !5
  br label %168

168:                                              ; preds = %185, %165
  %169 = load ptr, ptr %28, align 8, !tbaa !5
  %170 = load i8, ptr %27, align 1, !tbaa !9, !range !11, !noundef !12
  %171 = trunc i8 %170 to i1
  br i1 %171, label %173, label %172

172:                                              ; preds = %168
  store i32 34, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %186

173:                                              ; preds = %168
  br label %174

174:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %175 = getelementptr inbounds %class.anon.265, ptr %30, i32 0, i32 0
  %176 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %176, ptr %175, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS6_4PathEE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef nonnull align 8 dereferenceable(8) %30) #6
  invoke void @_ZNK3MIR11TypeResolve10print_todoESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120) %31, ptr noundef %29)
          to label %177 unwind label %179

177:                                              ; preds = %174
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  %178 = call ptr @__cxa_allocate_exception(i64 8) #6
  store ptr @.str.8, ptr %178, align 16, !tbaa !5
  call void @__cxa_throw(ptr %178, ptr @_ZTIPKc, ptr null) #8
  unreachable

179:                                              ; preds = %174
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %16, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %17, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #6
  br label %193

183:                                              ; No predecessors!
  br label %184

184:                                              ; preds = %183
  br label %185

185:                                              ; preds = %184
  store i8 0, ptr %27, align 1, !tbaa !9
  br label %168, !llvm.loop !28

186:                                              ; preds = %172
  br label %187

187:                                              ; preds = %186
  store i8 0, ptr %27, align 1, !tbaa !9
  br label %161, !llvm.loop !29

188:                                              ; preds = %164
  br label %189

189:                                              ; preds = %188, %159, %129, %100, %43
  br label %190

190:                                              ; preds = %189
  store i8 0, ptr %8, align 1, !tbaa !9
  br label %39, !llvm.loop !30

191:                                              ; preds = %98, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  %192 = load i32, ptr %9, align 4
  switch i32 %192, label %196 [
    i32 5, label %194
  ]

193:                                              ; preds = %179, %150, %120, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  br label %202

194:                                              ; preds = %191
  br label %195

195:                                              ; preds = %194
  store i8 0, ptr %8, align 1, !tbaa !9
  br label %32, !llvm.loop !31

196:                                              ; preds = %191, %35
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  %197 = load i32, ptr %9, align 4
  switch i32 %197, label %207 [
    i32 2, label %198
    i32 1, label %200
  ]

198:                                              ; preds = %196
  %199 = call ptr @__cxa_allocate_exception(i64 8) #6
  store ptr @.str.8, ptr %199, align 16, !tbaa !5
  call void @__cxa_throw(ptr %199, ptr @_ZTIPKc, ptr null) #8
  unreachable

200:                                              ; preds = %196
  %201 = load ptr, ptr %4, align 8
  ret ptr %201

202:                                              ; preds = %193
  %203 = load ptr, ptr %16, align 8
  %204 = load i32, ptr %17, align 4
  %205 = insertvalue { ptr, i32 } poison, ptr %203, 0
  %206 = insertvalue { ptr, i32 } %205, i32 %204, 1
  resume { ptr, i32 } %206

207:                                              ; preds = %196
  unreachable
}

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

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

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

declare noundef nonnull align 8 dereferenceable(360) ptr @_ZNK3HIR5Crate18get_static_by_pathERK4SpanRKNS_10SimplePathE(ptr noundef nonnull align 8 dereferenceable(944), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIR7TypeRefaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3MIR11TypeResolve10print_todoESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef) #1 align 2

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

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS6_4PathEE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #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 = { 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 }
attributes #7 = { noreturn nounwind }
attributes #8 = { 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 24}
!14 = !{!"_ZTSN3MIR11TypeResolveE", !15, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !16, i64 32, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !15, i64 112, !15, i64 116}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTS9FmtLambda", !17, i64 0}
!17 = !{!"_ZTSSt8functionIFvRSoEE", !18, i64 0, !6, i64 24}
!18 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!19 = !{!14, !6, i64 8}
!20 = !{!14, !6, i64 16}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}
!25 = distinct !{!25, !22}
!26 = distinct !{!26, !22}
!27 = distinct !{!27, !22}
!28 = distinct !{!28, !22}
!29 = distinct !{!29, !22}
!30 = distinct !{!30, !22}
!31 = distinct !{!31, !22}


; 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::TypeRef" = type { ptr }
%struct.MonomorphStatePtr = type { %class.MonomorphiserPP, ptr, ptr, ptr, ptr }
%class.MonomorphiserPP = type { %class.Monomorphiser }
%class.Monomorphiser = type { ptr, ptr, %"class.HIR::ItemPath", %"class.std::vector.236" }
%"class.HIR::ItemPath" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::vector.236" = type { %"struct.std::_Vector_base.237" }
%"struct.std::_Vector_base.237" = 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.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.anon.263 = type { ptr }
%class.anon.264 = type { ptr, ptr }
%class.anon.265 = type { ptr }

@.str.6 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [74 x i8], align 1
@__PRETTY_FUNCTION__._ZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS1_4PathE = external hidden unnamed_addr constant [101 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIPKc = external constant ptr
@__FUNCTION__._ZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS1_4PathE = external hidden unnamed_addr constant [16 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3MIR11TypeResolve9print_bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS1_4PathE(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull returned align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(88) %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
.preheader.preheader:
  %3 = alloca %"class.HIR::TypeRef", align 8
  %4 = alloca %struct.MonomorphStatePtr, align 8
  %5 = alloca %"class.std::function", align 8
  %6 = alloca %class.anon.263, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::function", align 8
  %9 = alloca %class.anon.264, align 8
  %10 = alloca %"class.std::function", align 8
  %11 = alloca %class.anon.265, align 8
  %12 = tail call noundef i32 @_ZNK3HIR4Path4Data3tagEv(ptr noundef nonnull align 8 dereferenceable(88) %2)
  switch i32 %12, label %.loopexit [
    i32 0, label %.split60.us
    i32 1, label %.split62.us
    i32 3, label %.split64.us
    i32 4, label %.split66.us
    i32 2, label %.split68.us
  ], !llvm.loop !5

.split60.us:                                      ; preds = %.preheader.preheader
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i32 noundef 55, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS1_4PathE) #6
  unreachable

.split62.us:                                      ; preds = %.preheader.preheader
  %13 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3HIR4Path4Data10as_GenericEv(ptr noundef nonnull align 8 dereferenceable(88) %2)
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = load ptr, ptr %14, align 8, !tbaa !7
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !16
  %18 = tail call noundef nonnull align 8 dereferenceable(360) ptr @_ZNK3HIR5Crate18get_static_by_pathERK4SpanRKNS_10SimplePathE(ptr noundef nonnull align 8 dereferenceable(944) %15, ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #7
  %19 = getelementptr inbounds i8, ptr %13, i64 8
  call void @_ZN17MonomorphStatePtrC2EPKN3HIR7TypeRefEPKNS0_10PathParamsES6_S6_S6_(ptr noundef nonnull align 8 dereferenceable(128) %4, ptr noundef null, ptr noundef null, ptr noundef nonnull %19, ptr noundef null, ptr noundef null)
  %20 = load ptr, ptr %16, align 8, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %18, i64 176
  invoke void @_ZNK13Monomorphiser14monomorph_typeERK4SpanRKN3HIR7TypeRefEb(ptr dead_on_unwind nonnull writable sret(%"class.HIR::TypeRef") align 8 %3, ptr noundef nonnull align 8 dereferenceable(96) %4, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21, i1 noundef zeroext true)
          to label %42 unwind label %22

22:                                               ; preds = %.split62.us
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN13MonomorphiserD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %4) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %40

.split64.us:                                      ; preds = %.preheader.preheader
  %24 = tail call noundef nonnull align 8 dereferenceable(80) ptr @_ZNK3HIR4Path4Data12as_UfcsKnownEv(ptr noundef nonnull align 8 dereferenceable(88) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  store ptr %2, ptr %6, align 8, !tbaa !17
  call void @"_ZNSt8functionIFvRSoEEC2IZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS6_4PathEE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  invoke void @_ZNK3MIR11TypeResolve10print_todoESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull %5)
          to label %25 unwind label %27

25:                                               ; preds = %.split64.us
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %26 = call ptr @__cxa_allocate_exception(i64 8) #7
  store ptr @.str.8, ptr %26, align 16, !tbaa !17
  call void @__cxa_throw(ptr nonnull %26, ptr nonnull @_ZTIPKc, ptr null) #8
  unreachable

27:                                               ; preds = %.split64.us
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %40

.split66.us:                                      ; preds = %.preheader.preheader
  %29 = tail call noundef nonnull align 8 dereferenceable(40) ptr @_ZNK3HIR4Path4Data14as_UfcsUnknownEv(ptr noundef nonnull align 8 dereferenceable(88) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  store ptr @__FUNCTION__._ZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS1_4PathE, ptr %7, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  store ptr %7, ptr %9, align 8, !tbaa !17
  %30 = getelementptr inbounds i8, ptr %9, i64 8
  store ptr %2, ptr %30, align 8, !tbaa !17
  call void @"_ZNSt8functionIFvRSoEEC2IZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS6_4PathEE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(16) %9) #7
  invoke void @_ZNK3MIR11TypeResolve9print_bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull %8)
          to label %31 unwind label %33

31:                                               ; preds = %.split66.us
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  %32 = call ptr @__cxa_allocate_exception(i64 8) #7
  store ptr @.str.8, ptr %32, align 16, !tbaa !17
  call void @__cxa_throw(ptr nonnull %32, ptr nonnull @_ZTIPKc, ptr null) #8
  unreachable

33:                                               ; preds = %.split66.us
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %40

.split68.us:                                      ; preds = %.preheader.preheader
  %35 = tail call noundef nonnull align 8 dereferenceable(64) ptr @_ZNK3HIR4Path4Data15as_UfcsInherentEv(ptr noundef nonnull align 8 dereferenceable(88) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  store ptr %2, ptr %11, align 8, !tbaa !17
  call void @"_ZNSt8functionIFvRSoEEC2IZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS6_4PathEE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  invoke void @_ZNK3MIR11TypeResolve10print_todoESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull %10)
          to label %36 unwind label %38

36:                                               ; preds = %.split68.us
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  %37 = call ptr @__cxa_allocate_exception(i64 8) #7
  store ptr @.str.8, ptr %37, align 16, !tbaa !17
  call void @__cxa_throw(ptr nonnull %37, ptr nonnull @_ZTIPKc, ptr null) #8
  unreachable

38:                                               ; preds = %.split68.us
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %40

40:                                               ; preds = %38, %33, %27, %22
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %34, %33 ], [ %28, %27 ], [ %23, %22 ]
  resume { ptr, i32 } %.pn

.loopexit:                                        ; preds = %.preheader.preheader
  %41 = tail call ptr @__cxa_allocate_exception(i64 8) #7
  store ptr @.str.8, ptr %41, align 16, !tbaa !17
  tail call void @__cxa_throw(ptr nonnull %41, ptr nonnull @_ZTIPKc, ptr null) #8
  unreachable

42:                                               ; preds = %.split62.us
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIR7TypeRefaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @_ZN13MonomorphiserD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %4) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %44 = getelementptr inbounds i8, ptr %0, i64 16
  %45 = load ptr, ptr %44, align 8, !tbaa !18
  %46 = load ptr, ptr %16, align 8, !tbaa !16
  call void @_ZNK18StaticTraitResolve23expand_associated_typesERK4SpanRN3HIR7TypeRefE(ptr noundef nonnull align 8 dereferenceable(424) %45, ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(8) %1)
  ret ptr %1
}

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

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

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

declare noundef nonnull align 8 dereferenceable(360) ptr @_ZNK3HIR5Crate18get_static_by_pathERK4SpanRKNS_10SimplePathE(ptr noundef nonnull align 8 dereferenceable(944), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIR7TypeRefaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3MIR11TypeResolve10print_todoESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef) local_unnamed_addr #1 align 2

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZNK3MIR11TypeResolve15get_static_typeERN3HIR7TypeRefERKNS6_4PathEE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #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 = { 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 = { noreturn nounwind }
attributes #7 = { nounwind }
attributes #8 = { 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, !12, i64 24}
!8 = !{!"_ZTSN3MIR11TypeResolveE", !9, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32, !12, i64 64, !12, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !12, i64 104, !9, i64 112, !9, i64 116}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"any pointer", !10, i64 0}
!13 = !{!"_ZTS9FmtLambda", !14, i64 0}
!14 = !{!"_ZTSSt8functionIFvRSoEE", !15, i64 0, !12, i64 24}
!15 = !{!"_ZTSSt14_Function_base", !10, i64 0, !12, i64 16}
!16 = !{!8, !12, i64 8}
!17 = !{!12, !12, i64 0}
!18 = !{!8, !12, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass