; LLVM IR from thepowersgang/mrustc :: src/hir_conv (expand_type)

; 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.Span = type { 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 = type { i8 }
%"struct.HIR::PathParams" = type { %class.ThinVector.146, %class.ThinVector.147, %class.ThinVector.148 }
%class.ThinVector.146 = type { ptr }
%class.ThinVector.147 = type { ptr }
%class.ThinVector.148 = 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.289" }
%"class.HIR::ItemPath" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::vector.289" = type { %"struct.std::_Vector_base.290" }
%"struct.std::_Vector_base.290" = 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::GenericPath" = type { %"struct.HIR::SimplePath", %"struct.HIR::PathParams" }
%"struct.HIR::SimplePath" = type { %class.ThinVector }
%class.ThinVector = type { ptr }
%"struct.HIR::TypeAlias" = type { %"class.HIR::GenericParams", %"class.HIR::TypeRef" }
%"class.HIR::GenericParams" = type { %"class.std::vector.149", %"class.std::vector.154", %"class.std::vector.159", %"class.std::vector.164" }
%"class.std::vector.149" = type { %"struct.std::_Vector_base.150" }
%"struct.std::_Vector_base.150" = 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.154" = type { %"struct.std::_Vector_base.155" }
%"struct.std::_Vector_base.155" = 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.159" = type { %"struct.std::_Vector_base.160" }
%"struct.std::_Vector_base.160" = 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.164" = type { %"struct.std::_Vector_base.165" }
%"struct.std::_Vector_base.165" = 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 }

@g_debug_indent_level = external global i32, align 4
@__FUNCTION__._Z40ConvertHIR_ExpandAliases_GetExpansion_GPRK4SpanRKN3HIR5CrateERKNS2_11GenericPathEb = external hidden unnamed_addr constant [41 x i8], align 1
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z40ConvertHIR_ExpandAliases_GetExpansion_GPRK4SpanRKN3HIR5CrateERKNS2_11GenericPathEb(ptr dead_on_unwind noalias writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(944) %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext %4) #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %struct.Span, align 8
  %15 = alloca %"class.std::function", align 8
  %16 = alloca %class.anon, align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.HIR::PathParams", align 8
  %21 = alloca %struct.MonomorphStatePtr, align 8
  %22 = alloca i1, align 1
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %23 = zext i1 %4 to i8
  store i8 %23, ptr %10, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = getelementptr inbounds %"class.HIR::GenericPath", ptr %26, i32 0, i32 0
  %28 = call noundef nonnull align 8 dereferenceable(408) ptr @_ZNK3HIR5Crate20get_typeitem_by_pathERK4SpanRKNS_10SimplePathEbb(ptr noundef nonnull align 8 dereferenceable(944) %24, ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %27, i1 noundef zeroext false, i1 noundef zeroext false)
  store ptr %28, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %29 = load ptr, ptr %11, align 8, !tbaa !5
  %30 = call noundef ptr @_ZNK3HIR8TypeItem13opt_TypeAliasEv(ptr noundef nonnull align 8 dereferenceable(408) %29)
  store ptr %30, ptr %12, align 8, !tbaa !5
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %138

33:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %34, ptr %13, align 8, !tbaa !5
  br label %35

35:                                               ; preds = %33
  %36 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %36, label %37, label %48

37:                                               ; preds = %35
  %38 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !11
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %38, ptr noundef @__FUNCTION__._Z40ConvertHIR_ExpandAliases_GetExpansion_GPRK4SpanRKN3HIR5CrateERKNS2_11GenericPathEb)
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_11GenericPathE(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 8 dereferenceable(32) %40)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef @.str)
  %43 = load ptr, ptr %13, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.HIR::TypeAlias", ptr %43, i32 0, i32 1
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(8) %44)
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef @_ZSt3decRSt8ios_base)
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %48

48:                                               ; preds = %37, %35
  br label %49

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49
  %51 = load ptr, ptr %13, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.HIR::TypeAlias", ptr %51, i32 0, i32 1
  %53 = call noundef nonnull align 8 dereferenceable(184) ptr @_ZNK3HIR7TypeRef4dataEv(ptr noundef nonnull align 8 dereferenceable(8) %52)
  %54 = call noundef zeroext i1 @_ZNK3HIR8TypeData13is_ErasedTypeEv(ptr noundef nonnull align 8 dereferenceable(184) %53)
  br i1 %54, label %55, label %78

55:                                               ; preds = %50
  br label %56

56:                                               ; preds = %55
  %57 = load ptr, ptr %13, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.HIR::TypeAlias", ptr %57, i32 0, i32 0
  %59 = call noundef zeroext i1 @_ZNK3HIR13GenericParams10is_genericEv(ptr noundef nonnull align 8 dereferenceable(96) %58)
  br i1 %59, label %60, label %73

60:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %61)
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  call void @"_ZNSt8functionIFvRSoEEC2IZ40ConvertHIR_ExpandAliases_GetExpansion_GPRK4SpanRKN3HIR5CrateERKNS7_11GenericPathEbE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef %15)
          to label %62 unwind label %65

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

64:                                               ; preds = %62
  call void @__cxa_throw(ptr %63, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #8
  unreachable

65:                                               ; preds = %60
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %17, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %18, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %137

69:                                               ; preds = %62
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %17, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %18, align 4
  call void @__cxa_free_exception(ptr %63) #7
  br label %137

73:                                               ; preds = %56
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.HIR::TypeAlias", ptr %76, i32 0, i32 1
  call void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %77)
  store i32 1, ptr %19, align 4
  br label %136

78:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #7
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.HIR::TypeAlias", ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = load i8, ptr %10, align 1, !tbaa !9, !range !13, !noundef !14
  %84 = trunc i8 %83 to i1
  call void @_ZN12_GLOBAL__N_115get_path_paramsERK4SpanRKN3HIR13GenericParamsERKNS3_11GenericPathEb(ptr dead_on_unwind writable sret(%"struct.HIR::PathParams") align 8 %20, ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef nonnull align 8 dereferenceable(96) %81, ptr noundef nonnull align 8 dereferenceable(32) %82, i1 noundef zeroext %84)
  call void @llvm.lifetime.start.p0(i64 128, ptr %21) #7
  invoke void @_ZN17MonomorphStatePtrC2EPKN3HIR7TypeRefEPKNS0_10PathParamsES6_S6_S6_(ptr noundef nonnull align 8 dereferenceable(128) %21, ptr noundef null, ptr noundef %20, ptr noundef null, ptr noundef null, ptr noundef null)
          to label %85 unwind label %116

85:                                               ; preds = %78
  store i1 false, ptr %22, align 1
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = load ptr, ptr %13, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.HIR::TypeAlias", ptr %87, i32 0, i32 1
  invoke void @_ZNK13Monomorphiser14monomorph_typeERK4SpanRKN3HIR7TypeRefEb(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %21, ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull align 8 dereferenceable(8) %88, i1 noundef zeroext true)
          to label %89 unwind label %120

89:                                               ; preds = %85
  br label %90

90:                                               ; preds = %89
  %91 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %92 unwind label %124

92:                                               ; preds = %90
  br i1 %91, label %93, label %128

93:                                               ; preds = %92
  %94 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !11
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %94, ptr noundef @__FUNCTION__._Z40ConvertHIR_ExpandAliases_GetExpansion_GPRK4SpanRKN3HIR5CrateERKNS2_11GenericPathEb)
          to label %96 unwind label %124

96:                                               ; preds = %93
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_11GenericPathE(ptr noundef nonnull align 8 dereferenceable(8) %95, ptr noundef nonnull align 8 dereferenceable(32) %97)
          to label %99 unwind label %124

99:                                               ; preds = %96
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef @.str.2)
          to label %101 unwind label %124

101:                                              ; preds = %99
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %"class.HIR::GenericPath", ptr %102, i32 0, i32 0
  %104 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_10SimplePathE(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef nonnull align 8 dereferenceable(8) %103)
          to label %105 unwind label %124

105:                                              ; preds = %101
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_10PathParamsE(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef nonnull align 8 dereferenceable(24) %20)
          to label %107 unwind label %124

107:                                              ; preds = %105
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef @.str.2)
          to label %109 unwind label %124

109:                                              ; preds = %107
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %111 unwind label %124

111:                                              ; preds = %109
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %110, ptr noundef @_ZSt3decRSt8ios_base)
          to label %113 unwind label %124

113:                                              ; preds = %111
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %112, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %115 unwind label %124

115:                                              ; preds = %113
  br label %128

116:                                              ; preds = %78
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %17, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %18, align 4
  br label %135

120:                                              ; preds = %85
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %17, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %18, align 4
  br label %134

124:                                              ; preds = %113, %111, %109, %107, %105, %101, %99, %96, %93, %90
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %17, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %18, align 4
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  br label %134

128:                                              ; preds = %115, %92
  br label %129

129:                                              ; preds = %128
  br label %130

130:                                              ; preds = %129
  store i1 true, ptr %22, align 1
  store i32 1, ptr %19, align 4
  %131 = load i1, ptr %22, align 1
  br i1 %131, label %133, label %132

132:                                              ; preds = %130
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  br label %133

133:                                              ; preds = %132, %130
  call void @_ZN13MonomorphiserD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %21) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr %21) #7
  call void @_ZN3HIR10PathParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  br label %136

134:                                              ; preds = %124, %120
  call void @_ZN13MonomorphiserD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %21) #7
  br label %135

135:                                              ; preds = %134, %116
  call void @llvm.lifetime.end.p0(i64 128, ptr %21) #7
  call void @_ZN3HIR10PathParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  br label %137

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

137:                                              ; preds = %135, %69, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %143

138:                                              ; preds = %5
  store i32 0, ptr %19, align 4
  br label %139

139:                                              ; preds = %138, %136
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  %140 = load i32, ptr %19, align 4
  switch i32 %140, label %142 [
    i32 0, label %141
  ]

141:                                              ; preds = %139
  call void @_ZN3HIR7TypeRefC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  store i32 1, ptr %19, align 4
  br label %142

142:                                              ; preds = %141, %139
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  ret void

143:                                              ; preds = %137
  %144 = load ptr, ptr %17, align 8
  %145 = load i32, ptr %18, align 4
  %146 = insertvalue { ptr, i32 } poison, ptr %144, 0
  %147 = insertvalue { ptr, i32 } %146, i32 %145, 1
  resume { ptr, i32 } %147
}

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

declare noundef nonnull align 8 dereferenceable(408) ptr @_ZNK3HIR5Crate20get_typeitem_by_pathERK4SpanRKNS_10SimplePathEbb(ptr noundef nonnull align 8 dereferenceable(944), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext, i1 noundef zeroext) #2

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

declare noundef zeroext i1 @_Z13debug_enabledv() #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_11GenericPathE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef, ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3decRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3HIR8TypeData13is_ErasedTypeEv(ptr noundef nonnull align 8 dereferenceable(184)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3HIR13GenericParams10is_genericEv(ptr noundef nonnull align 8 dereferenceable(96)) #3 align 2

declare void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_115get_path_paramsERK4SpanRKN3HIR13GenericParamsERKNS3_11GenericPathEb(ptr dead_on_unwind noalias writable sret(%"struct.HIR::PathParams") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) #0

; 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 #0 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 #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_10PathParamsE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_10SimplePathE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #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 #3 align 2

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

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

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

!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 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}


; 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.Span = type { 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 = type { i8 }
%"struct.HIR::PathParams" = type { %class.ThinVector.146, %class.ThinVector.147, %class.ThinVector.148 }
%class.ThinVector.146 = type { ptr }
%class.ThinVector.147 = type { ptr }
%class.ThinVector.148 = 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.289" }
%"class.HIR::ItemPath" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.std::vector.289" = type { %"struct.std::_Vector_base.290" }
%"struct.std::_Vector_base.290" = 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 }

@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@__FUNCTION__._Z40ConvertHIR_ExpandAliases_GetExpansion_GPRK4SpanRKN3HIR5CrateERKNS2_11GenericPathEb = external hidden unnamed_addr constant [41 x i8], align 1
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z40ConvertHIR_ExpandAliases_GetExpansion_GPRK4SpanRKN3HIR5CrateERKNS2_11GenericPathEb(ptr dead_on_unwind noalias writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(944) %2, ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext %4) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %6 = alloca %struct.Span, align 8
  %7 = alloca %"class.std::function", align 8
  %8 = alloca %class.anon, align 1
  %9 = alloca %"struct.HIR::PathParams", align 8
  %10 = alloca %struct.MonomorphStatePtr, align 8
  %11 = tail call noundef nonnull align 8 dereferenceable(408) ptr @_ZNK3HIR5Crate20get_typeitem_by_pathERK4SpanRKNS_10SimplePathEbb(ptr noundef nonnull align 8 dereferenceable(944) %2, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %3, i1 noundef zeroext false, i1 noundef zeroext false)
  %12 = tail call noundef ptr @_ZNK3HIR8TypeItem13opt_TypeAliasEv(ptr noundef nonnull align 8 dereferenceable(408) %11)
  %.not = icmp eq ptr %12, null
  br i1 %.not, label %.critedge, label %13

13:                                               ; preds = %5
  %14 = tail call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %14, label %15, label %24

15:                                               ; preds = %13
  %16 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !5
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %16, ptr noundef nonnull @__FUNCTION__._Z40ConvertHIR_ExpandAliases_GetExpansion_GPRK4SpanRKN3HIR5CrateERKNS2_11GenericPathEb)
  %18 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_11GenericPathE(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(32) %3)
  %19 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull @.str)
  %20 = getelementptr inbounds i8, ptr %12, i64 96
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull @_ZSt3decRSt8ios_base)
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %24

24:                                               ; preds = %15, %13
  %25 = getelementptr inbounds i8, ptr %12, i64 96
  %26 = tail call noundef nonnull align 8 dereferenceable(184) ptr @_ZNK3HIR7TypeRef4dataEv(ptr noundef nonnull align 8 dereferenceable(8) %25)
  %27 = tail call noundef zeroext i1 @_ZNK3HIR8TypeData13is_ErasedTypeEv(ptr noundef nonnull align 8 dereferenceable(184) %26)
  br i1 %27, label %28, label %39

28:                                               ; preds = %24
  %29 = tail call noundef zeroext i1 @_ZNK3HIR13GenericParams10is_genericEv(ptr noundef nonnull align 8 dereferenceable(96) %12)
  br i1 %29, label %30, label %38

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #7
  call void @"_ZNSt8functionIFvRSoEEC2IZ40ConvertHIR_ExpandAliases_GetExpansion_GPRK4SpanRKN3HIR5CrateERKNS7_11GenericPathEbE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %7)
          to label %31 unwind label %34

31:                                               ; preds = %30
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %32 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull @.str.1)
          to label %33 unwind label %36

33:                                               ; preds = %31
  call void @__cxa_throw(ptr nonnull %32, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #8
  unreachable

34:                                               ; preds = %30
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #7
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %72

36:                                               ; preds = %31
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %32) #7
  br label %72

38:                                               ; preds = %28
  tail call void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %25)
  br label %73

39:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  call void @_ZN12_GLOBAL__N_115get_path_paramsERK4SpanRKN3HIR13GenericParamsERKNS3_11GenericPathEb(ptr dead_on_unwind nonnull writable sret(%"struct.HIR::PathParams") align 8 %9, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(96) %12, ptr noundef nonnull align 8 dereferenceable(32) %3, i1 noundef zeroext %4)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %10) #7
  invoke void @_ZN17MonomorphStatePtrC2EPKN3HIR7TypeRefEPKNS0_10PathParamsES6_S6_S6_(ptr noundef nonnull align 8 dereferenceable(128) %10, ptr noundef null, ptr noundef nonnull %9, ptr noundef null, ptr noundef null, ptr noundef null)
          to label %40 unwind label %63

40:                                               ; preds = %39
  invoke void @_ZNK13Monomorphiser14monomorph_typeERK4SpanRKN3HIR7TypeRefEb(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %10, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %25, i1 noundef zeroext true)
          to label %41 unwind label %65

41:                                               ; preds = %40
  %42 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %43 unwind label %67

43:                                               ; preds = %41
  br i1 %42, label %44, label %69

44:                                               ; preds = %43
  %45 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !5
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %45, ptr noundef nonnull @__FUNCTION__._Z40ConvertHIR_ExpandAliases_GetExpansion_GPRK4SpanRKN3HIR5CrateERKNS2_11GenericPathEb)
          to label %47 unwind label %67

47:                                               ; preds = %44
  %48 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_11GenericPathE(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %49 unwind label %67

49:                                               ; preds = %47
  %50 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %48, ptr noundef nonnull @.str.2)
          to label %51 unwind label %67

51:                                               ; preds = %49
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_10SimplePathE(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %53 unwind label %67

53:                                               ; preds = %51
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_10PathParamsE(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %55 unwind label %67

55:                                               ; preds = %53
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull @.str.2)
          to label %57 unwind label %67

57:                                               ; preds = %55
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %59 unwind label %67

59:                                               ; preds = %57
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @_ZSt3decRSt8ios_base)
          to label %61 unwind label %67

61:                                               ; preds = %59
  %62 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %60, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %69 unwind label %67

63:                                               ; preds = %39
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %71

65:                                               ; preds = %40
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %70

67:                                               ; preds = %61, %59, %57, %55, %53, %51, %49, %47, %44, %41
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  br label %70

69:                                               ; preds = %43, %61
  call void @_ZN13MonomorphiserD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %10) #7
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %10) #7
  call void @_ZN3HIR10PathParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  br label %73

70:                                               ; preds = %67, %65
  %.pn = phi { ptr, i32 } [ %68, %67 ], [ %66, %65 ]
  call void @_ZN13MonomorphiserD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %10) #7
  br label %71

71:                                               ; preds = %70, %63
  %.pn.pn = phi { ptr, i32 } [ %.pn, %70 ], [ %64, %63 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %10) #7
  call void @_ZN3HIR10PathParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  br label %72

72:                                               ; preds = %71, %36, %34
  %.pn30 = phi { ptr, i32 } [ %37, %36 ], [ %35, %34 ], [ %.pn.pn, %71 ]
  resume { ptr, i32 } %.pn30

.critedge:                                        ; preds = %5
  tail call void @_ZN3HIR7TypeRefC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0)
  br label %73

73:                                               ; preds = %69, %38, %.critedge
  ret void
}

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

declare noundef nonnull align 8 dereferenceable(408) ptr @_ZNK3HIR5Crate20get_typeitem_by_pathERK4SpanRKNS_10SimplePathEbb(ptr noundef nonnull align 8 dereferenceable(944), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #2

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

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_11GenericPathE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt3decRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #4

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3HIR8TypeData13is_ErasedTypeEv(ptr noundef nonnull align 8 dereferenceable(184)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3HIR13GenericParams10is_genericEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #3 align 2

declare void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_115get_path_paramsERK4SpanRKN3HIR13GenericParamsERKNS3_11GenericPathEb(ptr dead_on_unwind noalias writable sret(%"struct.HIR::PathParams") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(96), ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) local_unnamed_addr #0

; 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 #0 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 #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_10PathParamsE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_10SimplePathE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #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 #3 align 2

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

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

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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