; LLVM IR from thepowersgang/mrustc :: src/hir_typeck/common.ll (ZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefE)

; 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.60" = 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.253 = type { i8 }
%class.anon.254 = type { ptr, ptr }
%class.anon.255 = type { ptr }
%class.anon.256 = type { ptr, ptr }
%class.anon.257 = type { ptr }
%class.anon.258 = type { ptr }
%"struct.HIR::PathParams" = type { %class.ThinVector.2, %class.ThinVector.3, %class.ThinVector.4 }
%class.ThinVector.2 = type { ptr }
%class.ThinVector.3 = type { ptr }
%class.ThinVector.4 = type { ptr }

@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZTISt13runtime_error = external constant ptr

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK10ThinVectorIN3HIR7TypeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; 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 uwtable
define dso_local void @_ZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefE(ptr dead_on_unwind noalias writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(12) %3) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.Span, align 8
  %12 = alloca %"class.std::function.60", align 8
  %13 = alloca %class.anon.253, align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca %struct.Span, align 8
  %18 = alloca %"class.std::function.60", align 8
  %19 = alloca %class.anon.254, align 8
  %20 = alloca %struct.Span, align 8
  %21 = alloca %"class.std::function.60", align 8
  %22 = alloca %class.anon.255, align 8
  %23 = alloca ptr, align 8
  %24 = alloca %struct.Span, align 8
  %25 = alloca %"class.std::function.60", align 8
  %26 = alloca %class.anon.256, align 8
  %27 = alloca %struct.Span, align 8
  %28 = alloca %"class.std::function.60", align 8
  %29 = alloca %class.anon.257, align 8
  %30 = alloca %struct.Span, align 8
  %31 = alloca %"class.std::function.60", align 8
  %32 = alloca %class.anon.258, align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %33 = load ptr, ptr %6, align 8
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = call noundef zeroext i1 @_ZNK3HIR10GenericRef7is_selfEv(ptr noundef nonnull align 8 dereferenceable(12) %34)
  br i1 %35, label %36, label %66

36:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %37 = load ptr, ptr %33, align 8, !tbaa !9
  %38 = getelementptr inbounds ptr, ptr %37, i64 8
  %39 = load ptr, ptr %38, align 8
  %40 = call noundef ptr %39(ptr noundef nonnull align 8 dereferenceable(96) %33)
  store ptr %40, ptr %9, align 8, !tbaa !5
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %45

43:                                               ; preds = %36
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %44)
  store i32 1, ptr %10, align 4
  br label %62

45:                                               ; preds = %36
  br label %46

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %47)
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefEE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef %12)
          to label %48 unwind label %51

48:                                               ; preds = %46
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  %49 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef @.str.2)
          to label %50 unwind label %55

50:                                               ; preds = %48
  call void @__cxa_throw(ptr %49, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

51:                                               ; preds = %46
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %14, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %15, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %65

55:                                               ; preds = %48
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %14, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %15, align 4
  call void @__cxa_free_exception(ptr %49) #5
  br label %65

59:                                               ; No predecessors!
  br label %60

60:                                               ; preds = %59
  br label %61

61:                                               ; preds = %60
  store i32 0, ptr %10, align 4
  br label %62

62:                                               ; preds = %61, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %63 = load i32, ptr %10, align 4
  switch i32 %63, label %222 [
    i32 0, label %64
    i32 1, label %216
  ]

64:                                               ; preds = %62
  br label %215

65:                                               ; preds = %55, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %217

66:                                               ; preds = %4
  %67 = load ptr, ptr %8, align 8, !tbaa !5
  %68 = call noundef i32 @_ZNK3HIR10GenericRef5groupEv(ptr noundef nonnull align 8 dereferenceable(12) %67)
  switch i32 %68, label %197 [
    i32 0, label %69
    i32 1, label %133
  ]

69:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %70 = load ptr, ptr %33, align 8, !tbaa !9
  %71 = getelementptr inbounds ptr, ptr %70, i64 9
  %72 = load ptr, ptr %71, align 8
  %73 = call noundef ptr %72(ptr noundef nonnull align 8 dereferenceable(96) %33)
  store ptr %73, ptr %16, align 8, !tbaa !5
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %110

76:                                               ; preds = %69
  br label %77

77:                                               ; preds = %76
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %78)
  %80 = zext i32 %79 to i64
  %81 = load ptr, ptr %16, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.HIR::PathParams", ptr %81, i32 0, i32 1
  %83 = call noundef i64 @_ZNK10ThinVectorIN3HIR7TypeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %82)
  %84 = icmp ult i64 %80, %83
  br i1 %84, label %101, label %85

85:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %86)
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %87 = getelementptr inbounds %class.anon.254, ptr %19, i32 0, i32 0
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %88, ptr %87, align 8, !tbaa !5
  %89 = getelementptr inbounds %class.anon.254, ptr %19, i32 0, i32 1
  store ptr %16, ptr %89, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefEE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef %18)
          to label %90 unwind label %93

90:                                               ; preds = %85
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  %91 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %91, ptr noundef @.str.2)
          to label %92 unwind label %97

92:                                               ; preds = %90
  call void @__cxa_throw(ptr %91, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

93:                                               ; preds = %85
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %14, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %15, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %132

97:                                               ; preds = %90
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %14, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %15, align 4
  call void @__cxa_free_exception(ptr %91) #5
  br label %132

101:                                              ; preds = %77
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %16, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.HIR::PathParams", ptr %104, i32 0, i32 1
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %106)
  %108 = zext i32 %107 to i64
  %109 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK10ThinVectorIN3HIR7TypeRefEEixEm(ptr noundef nonnull align 8 dereferenceable(8) %105, i64 noundef %108)
  call void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %109)
  store i32 1, ptr %10, align 4
  br label %129

110:                                              ; preds = %69
  br label %111

111:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %112)
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  %113 = getelementptr inbounds %class.anon.255, ptr %22, i32 0, i32 0
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %114, ptr %113, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefEE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef %21)
          to label %115 unwind label %118

115:                                              ; preds = %111
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  %116 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %116, ptr noundef @.str.2)
          to label %117 unwind label %122

117:                                              ; preds = %115
  call void @__cxa_throw(ptr %116, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

118:                                              ; preds = %111
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %14, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %15, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %132

122:                                              ; preds = %115
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %14, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %15, align 4
  call void @__cxa_free_exception(ptr %116) #5
  br label %132

126:                                              ; No predecessors!
  br label %127

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127
  store i32 0, ptr %10, align 4
  br label %129

129:                                              ; preds = %128, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %130 = load i32, ptr %10, align 4
  switch i32 %130, label %222 [
    i32 0, label %131
    i32 1, label %216
  ]

131:                                              ; preds = %129
  br label %214

132:                                              ; preds = %122, %118, %97, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %217

133:                                              ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %134 = load ptr, ptr %33, align 8, !tbaa !9
  %135 = getelementptr inbounds ptr, ptr %134, i64 10
  %136 = load ptr, ptr %135, align 8
  %137 = call noundef ptr %136(ptr noundef nonnull align 8 dereferenceable(96) %33)
  store ptr %137, ptr %23, align 8, !tbaa !5
  %138 = load ptr, ptr %23, align 8, !tbaa !5
  %139 = icmp ne ptr %138, null
  br i1 %139, label %140, label %174

140:                                              ; preds = %133
  br label %141

141:                                              ; preds = %140
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %142)
  %144 = zext i32 %143 to i64
  %145 = load ptr, ptr %23, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.HIR::PathParams", ptr %145, i32 0, i32 1
  %147 = call noundef i64 @_ZNK10ThinVectorIN3HIR7TypeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %146)
  %148 = icmp ult i64 %144, %147
  br i1 %148, label %165, label %149

149:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %150)
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  %151 = getelementptr inbounds %class.anon.256, ptr %26, i32 0, i32 0
  %152 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %152, ptr %151, align 8, !tbaa !5
  %153 = getelementptr inbounds %class.anon.256, ptr %26, i32 0, i32 1
  store ptr %23, ptr %153, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefEE3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(16) %26) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef %25)
          to label %154 unwind label %157

154:                                              ; preds = %149
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  %155 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %155, ptr noundef @.str.2)
          to label %156 unwind label %161

156:                                              ; preds = %154
  call void @__cxa_throw(ptr %155, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

157:                                              ; preds = %149
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %14, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %15, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %196

161:                                              ; preds = %154
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %14, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %15, align 4
  call void @__cxa_free_exception(ptr %155) #5
  br label %196

165:                                              ; preds = %141
  br label %166

166:                                              ; preds = %165
  br label %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %23, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.HIR::PathParams", ptr %168, i32 0, i32 1
  %170 = load ptr, ptr %8, align 8, !tbaa !5
  %171 = call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %170)
  %172 = zext i32 %171 to i64
  %173 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK10ThinVectorIN3HIR7TypeRefEEixEm(ptr noundef nonnull align 8 dereferenceable(8) %169, i64 noundef %172)
  call void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %173)
  store i32 1, ptr %10, align 4
  br label %193

174:                                              ; preds = %133
  br label %175

175:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #5
  %176 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %176)
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %177 = getelementptr inbounds %class.anon.257, ptr %29, i32 0, i32 0
  %178 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %178, ptr %177, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefEE3$_4vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef %28)
          to label %179 unwind label %182

179:                                              ; preds = %175
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  %180 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %180, ptr noundef @.str.2)
          to label %181 unwind label %186

181:                                              ; preds = %179
  call void @__cxa_throw(ptr %180, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

182:                                              ; preds = %175
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %14, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %15, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %28) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  br label %196

186:                                              ; preds = %179
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %14, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %15, align 4
  call void @__cxa_free_exception(ptr %180) #5
  br label %196

190:                                              ; No predecessors!
  br label %191

191:                                              ; preds = %190
  br label %192

192:                                              ; preds = %191
  store i32 0, ptr %10, align 4
  br label %193

193:                                              ; preds = %192, %167
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  %194 = load i32, ptr %10, align 4
  switch i32 %194, label %222 [
    i32 0, label %195
    i32 1, label %216
  ]

195:                                              ; preds = %193
  br label %214

196:                                              ; preds = %186, %182, %161, %157
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %217

197:                                              ; preds = %66
  br label %198

198:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #5
  %199 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %199)
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %200 = getelementptr inbounds %class.anon.258, ptr %32, i32 0, i32 0
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %201, ptr %200, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefEE3$_5vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %31, ptr noundef nonnull align 8 dereferenceable(8) %32) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef %31)
          to label %202 unwind label %205

202:                                              ; preds = %198
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  %203 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %203, ptr noundef @.str.2)
          to label %204 unwind label %209

204:                                              ; preds = %202
  call void @__cxa_throw(ptr %203, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

205:                                              ; preds = %198
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %14, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %15, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %31) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #5
  br label %217

209:                                              ; preds = %202
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %14, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %15, align 4
  call void @__cxa_free_exception(ptr %203) #5
  br label %217

213:                                              ; No predecessors!
  br label %214

214:                                              ; preds = %213, %195, %131
  br label %215

215:                                              ; preds = %214, %64
  unreachable

216:                                              ; preds = %193, %129, %62
  ret void

217:                                              ; preds = %209, %205, %196, %132, %65
  %218 = load ptr, ptr %14, align 8
  %219 = load i32, ptr %15, align 4
  %220 = insertvalue { ptr, i32 } poison, ptr %218, 0
  %221 = insertvalue { ptr, i32 } %220, i32 %219, 1
  resume { ptr, i32 } %221

222:                                              ; preds = %193, %129, %62
  unreachable
}

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

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

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

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

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

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

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

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

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

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

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


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

%"class.HIR::TypeRef" = type { ptr }
%struct.Span = type { ptr }
%"class.std::function.60" = 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.253 = type { i8 }
%class.anon.254 = type { ptr, ptr }
%class.anon.255 = type { ptr }
%class.anon.256 = type { ptr, ptr }
%class.anon.257 = type { ptr }
%class.anon.258 = type { ptr }

@.str.2 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZTISt13runtime_error = external constant ptr

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK10ThinVectorIN3HIR7TypeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; 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 uwtable
define dso_local void @_ZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefE(ptr dead_on_unwind noalias writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(12) %3) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.Span, align 8
  %6 = alloca %"class.std::function.60", align 8
  %7 = alloca %class.anon.253, align 1
  %8 = alloca ptr, align 8
  %9 = alloca %struct.Span, align 8
  %10 = alloca %"class.std::function.60", align 8
  %11 = alloca %class.anon.254, align 8
  %12 = alloca %struct.Span, align 8
  %13 = alloca %"class.std::function.60", align 8
  %14 = alloca %class.anon.255, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %struct.Span, align 8
  %17 = alloca %"class.std::function.60", align 8
  %18 = alloca %class.anon.256, align 8
  %19 = alloca %struct.Span, align 8
  %20 = alloca %"class.std::function.60", align 8
  %21 = alloca %class.anon.257, align 8
  %22 = alloca %struct.Span, align 8
  %23 = alloca %"class.std::function.60", align 8
  %24 = alloca %class.anon.258, align 8
  %25 = tail call noundef zeroext i1 @_ZNK3HIR10GenericRef7is_selfEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
  br i1 %25, label %26, label %40

26:                                               ; preds = %4
  %27 = load ptr, ptr %1, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 64
  %29 = load ptr, ptr %28, align 8
  %30 = tail call noundef ptr %29(ptr noundef nonnull align 8 dereferenceable(96) %1)
  %.not30 = icmp eq ptr %30, null
  br i1 %.not30, label %32, label %31

31:                                               ; preds = %26
  tail call void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %30)
  br label %116

32:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefEE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull %6)
          to label %33 unwind label %36

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

35:                                               ; preds = %33
  call void @__cxa_throw(ptr nonnull %34, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

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

38:                                               ; preds = %33
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %34) #5
  br label %117

40:                                               ; preds = %4
  %41 = tail call noundef i32 @_ZNK3HIR10GenericRef5groupEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
  switch i32 %41, label %108 [
    i32 0, label %42
    i32 1, label %75
  ]

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %43 = load ptr, ptr %1, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 72
  %45 = load ptr, ptr %44, align 8
  %46 = tail call noundef ptr %45(ptr noundef nonnull align 8 dereferenceable(96) %1)
  store ptr %46, ptr %8, align 8, !tbaa !8
  %.not27 = icmp eq ptr %46, null
  br i1 %.not27, label %66, label %47

47:                                               ; preds = %42
  %48 = tail call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
  %49 = zext i32 %48 to i64
  %50 = getelementptr inbounds i8, ptr %46, i64 8
  %51 = tail call noundef i64 @_ZNK10ThinVectorIN3HIR7TypeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %50)
  %52 = icmp ugt i64 %51, %49
  br i1 %52, label %62, label %53

53:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  store ptr %3, ptr %11, align 8, !tbaa !8
  %54 = getelementptr inbounds i8, ptr %11, i64 8
  store ptr %8, ptr %54, align 8, !tbaa !8
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefEE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull %10)
          to label %55 unwind label %58

55:                                               ; preds = %53
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  %56 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %56, ptr noundef nonnull @.str.2)
          to label %57 unwind label %60

57:                                               ; preds = %55
  call void @__cxa_throw(ptr nonnull %56, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

58:                                               ; preds = %53
  %59 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %74

60:                                               ; preds = %55
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %56) #5
  br label %74

62:                                               ; preds = %47
  %63 = tail call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
  %64 = zext i32 %63 to i64
  %65 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK10ThinVectorIN3HIR7TypeRefEEixEm(ptr noundef nonnull align 8 dereferenceable(8) %50, i64 noundef %64)
  tail call void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %65)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %116

66:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #5
  store ptr %3, ptr %14, align 8, !tbaa !8
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefEE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull %13)
          to label %67 unwind label %70

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

69:                                               ; preds = %67
  call void @__cxa_throw(ptr nonnull %68, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

70:                                               ; preds = %66
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  br label %74

72:                                               ; preds = %67
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %68) #5
  br label %74

74:                                               ; preds = %72, %70, %60, %58
  %.pn28 = phi { ptr, i32 } [ %61, %60 ], [ %59, %58 ], [ %73, %72 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %117

75:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #5
  %76 = load ptr, ptr %1, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 80
  %78 = load ptr, ptr %77, align 8
  %79 = tail call noundef ptr %78(ptr noundef nonnull align 8 dereferenceable(96) %1)
  store ptr %79, ptr %15, align 8, !tbaa !8
  %.not = icmp eq ptr %79, null
  br i1 %.not, label %99, label %80

80:                                               ; preds = %75
  %81 = tail call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
  %82 = zext i32 %81 to i64
  %83 = getelementptr inbounds i8, ptr %79, i64 8
  %84 = tail call noundef i64 @_ZNK10ThinVectorIN3HIR7TypeRefEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %83)
  %85 = icmp ugt i64 %84, %82
  br i1 %85, label %95, label %86

86:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #5
  store ptr %3, ptr %18, align 8, !tbaa !8
  %87 = getelementptr inbounds i8, ptr %18, i64 8
  store ptr %15, ptr %87, align 8, !tbaa !8
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefEE3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(16) %18) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull %17)
          to label %88 unwind label %91

88:                                               ; preds = %86
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  %89 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %89, ptr noundef nonnull @.str.2)
          to label %90 unwind label %93

90:                                               ; preds = %88
  call void @__cxa_throw(ptr nonnull %89, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

91:                                               ; preds = %86
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #5
  br label %107

93:                                               ; preds = %88
  %94 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %89) #5
  br label %107

95:                                               ; preds = %80
  %96 = tail call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
  %97 = zext i32 %96 to i64
  %98 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK10ThinVectorIN3HIR7TypeRefEEixEm(ptr noundef nonnull align 8 dereferenceable(8) %83, i64 noundef %97)
  tail call void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %98)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  br label %116

99:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #5
  store ptr %3, ptr %21, align 8, !tbaa !8
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefEE3$_4vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull %20)
          to label %100 unwind label %103

100:                                              ; preds = %99
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #5
  %101 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %101, ptr noundef nonnull @.str.2)
          to label %102 unwind label %105

102:                                              ; preds = %100
  call void @__cxa_throw(ptr nonnull %101, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

103:                                              ; preds = %99
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #5
  br label %107

105:                                              ; preds = %100
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %101) #5
  br label %107

107:                                              ; preds = %105, %103, %93, %91
  %.pn = phi { ptr, i32 } [ %94, %93 ], [ %92, %91 ], [ %106, %105 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #5
  br label %117

108:                                              ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #5
  store ptr %3, ptr %24, align 8, !tbaa !8
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP8get_typeERK4SpanRKN3HIR10GenericRefEE3$_5vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull %23)
          to label %109 unwind label %112

109:                                              ; preds = %108
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #5
  %110 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %110, ptr noundef nonnull @.str.2)
          to label %111 unwind label %114

111:                                              ; preds = %109
  call void @__cxa_throw(ptr nonnull %110, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

112:                                              ; preds = %108
  %113 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #5
  br label %117

114:                                              ; preds = %109
  %115 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %110) #5
  br label %117

116:                                              ; preds = %95, %62, %31
  ret void

117:                                              ; preds = %36, %38, %114, %112, %107, %74
  %.pn31.pn = phi { ptr, i32 } [ %115, %114 ], [ %113, %112 ], [ %.pn, %107 ], [ %.pn28, %74 ], [ %39, %38 ], [ %37, %36 ]
  resume { ptr, i32 } %.pn31.pn
}

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

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #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 = { 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 = { nounwind }
attributes #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}


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