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

; 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::ConstGeneric" = type { i32, %"union.HIR::ConstGeneric::DataUnion" }
%"union.HIR::ConstGeneric::DataUnion" = type { %"class.std::unique_ptr.27", [8 x i8] }
%"class.std::unique_ptr.27" = type { %"struct.std::__uniq_ptr_data.28" }
%"struct.std::__uniq_ptr_data.28" = type { %"class.std::__uniq_ptr_impl.29" }
%"class.std::__uniq_ptr_impl.29" = type { %"class.std::tuple.30" }
%"class.std::tuple.30" = type { %"struct.std::_Tuple_impl.31" }
%"struct.std::_Tuple_impl.31" = type { %"struct.std::_Head_base.34" }
%"struct.std::_Head_base.34" = 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.259 = type { ptr, ptr }
%class.anon.260 = type { ptr }
%class.anon.261 = type { ptr, ptr }
%class.anon.262 = type { ptr }
%class.anon.263 = 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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK10ThinVectorIN3HIR12ConstGenericEE4sizeEv(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 nounwind uwtable
declare dso_local noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefE(ptr dead_on_unwind noalias writable sret(%"class.HIR::ConstGeneric") 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 %struct.Span, align 8
  %11 = alloca %"class.std::function.60", align 8
  %12 = alloca %class.anon.259, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %struct.Span, align 8
  %17 = alloca %"class.std::function.60", align 8
  %18 = alloca %class.anon.260, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %struct.Span, align 8
  %21 = alloca %"class.std::function.60", align 8
  %22 = alloca %class.anon.261, align 8
  %23 = alloca %struct.Span, align 8
  %24 = alloca %"class.std::function.60", align 8
  %25 = alloca %class.anon.262, align 8
  %26 = alloca %struct.Span, align 8
  %27 = alloca %"class.std::function.60", align 8
  %28 = alloca %class.anon.263, 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
  %29 = load ptr, ptr %6, align 8
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = call noundef i32 @_ZNK3HIR10GenericRef5groupEv(ptr noundef nonnull align 8 dereferenceable(12) %30)
  switch i32 %31, label %160 [
    i32 0, label %32
    i32 1, label %96
  ]

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

39:                                               ; preds = %32
  br label %40

40:                                               ; preds = %39
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %41)
  %43 = zext i32 %42 to i64
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.HIR::PathParams", ptr %44, i32 0, i32 2
  %46 = call noundef i64 @_ZNK10ThinVectorIN3HIR12ConstGenericEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %45)
  %47 = icmp ult i64 %43, %46
  br i1 %47, label %64, label %48

48:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %49)
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  %50 = getelementptr inbounds %class.anon.259, ptr %12, i32 0, i32 0
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %51, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds %class.anon.259, ptr %12, i32 0, i32 1
  store ptr %9, ptr %52, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(16) %12) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef %11)
          to label %53 unwind label %56

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

55:                                               ; preds = %53
  call void @__cxa_throw(ptr %54, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

56:                                               ; preds = %48
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %13, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %14, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %95

60:                                               ; preds = %53
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %13, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %14, align 4
  call void @__cxa_free_exception(ptr %54) #5
  br label %95

64:                                               ; preds = %40
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.HIR::PathParams", ptr %67, i32 0, i32 2
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %69)
  %71 = zext i32 %70 to i64
  %72 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK10ThinVectorIN3HIR12ConstGenericEEixEm(ptr noundef nonnull align 8 dereferenceable(8) %68, i64 noundef %71)
  call void @_ZNK3HIR12ConstGeneric5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::ConstGeneric") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %72)
  store i32 1, ptr %15, align 4
  br label %92

73:                                               ; preds = %32
  br label %74

74:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %75)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %76 = getelementptr inbounds %class.anon.260, ptr %18, i32 0, i32 0
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %77, ptr %76, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef %17)
          to label %78 unwind label %81

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

80:                                               ; preds = %78
  call void @__cxa_throw(ptr %79, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

81:                                               ; preds = %74
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %13, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %14, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %95

85:                                               ; preds = %78
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %13, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %14, align 4
  call void @__cxa_free_exception(ptr %79) #5
  br label %95

89:                                               ; No predecessors!
  br label %90

90:                                               ; preds = %89
  br label %91

91:                                               ; preds = %90
  store i32 0, ptr %15, align 4
  br label %92

92:                                               ; preds = %91, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  %93 = load i32, ptr %15, align 4
  switch i32 %93, label %184 [
    i32 0, label %94
    i32 1, label %178
  ]

94:                                               ; preds = %92
  br label %177

95:                                               ; preds = %85, %81, %60, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %179

96:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %97 = load ptr, ptr %29, align 8, !tbaa !9
  %98 = getelementptr inbounds ptr, ptr %97, i64 10
  %99 = load ptr, ptr %98, align 8
  %100 = call noundef ptr %99(ptr noundef nonnull align 8 dereferenceable(96) %29)
  store ptr %100, ptr %19, align 8, !tbaa !5
  %101 = load ptr, ptr %19, align 8, !tbaa !5
  %102 = icmp ne ptr %101, null
  br i1 %102, label %103, label %137

103:                                              ; preds = %96
  br label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %105)
  %107 = zext i32 %106 to i64
  %108 = load ptr, ptr %19, align 8, !tbaa !5
  %109 = getelementptr inbounds %"struct.HIR::PathParams", ptr %108, i32 0, i32 2
  %110 = call noundef i64 @_ZNK10ThinVectorIN3HIR12ConstGenericEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %109)
  %111 = icmp ult i64 %107, %110
  br i1 %111, label %128, label %112

112:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %113 = 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) %113)
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %114 = getelementptr inbounds %class.anon.261, ptr %22, i32 0, i32 0
  %115 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %115, ptr %114, align 8, !tbaa !5
  %116 = getelementptr inbounds %class.anon.261, ptr %22, i32 0, i32 1
  store ptr %19, ptr %116, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(16) %22) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef %21)
          to label %117 unwind label %120

117:                                              ; preds = %112
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  call void @llvm.lifetime.end.p0(i64 16, 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
  %118 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %118, ptr noundef @.str.2)
          to label %119 unwind label %124

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

120:                                              ; preds = %112
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %13, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %14, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  call void @llvm.lifetime.end.p0(i64 16, 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 %159

124:                                              ; preds = %117
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %13, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %14, align 4
  call void @__cxa_free_exception(ptr %118) #5
  br label %159

128:                                              ; preds = %104
  br label %129

129:                                              ; preds = %128
  br label %130

130:                                              ; preds = %129
  %131 = load ptr, ptr %19, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.HIR::PathParams", ptr %131, i32 0, i32 2
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %133)
  %135 = zext i32 %134 to i64
  %136 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK10ThinVectorIN3HIR12ConstGenericEEixEm(ptr noundef nonnull align 8 dereferenceable(8) %132, i64 noundef %135)
  call void @_ZNK3HIR12ConstGeneric5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::ConstGeneric") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %136)
  store i32 1, ptr %15, align 4
  br label %156

137:                                              ; preds = %96
  br label %138

138:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %139)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %140 = getelementptr inbounds %class.anon.262, ptr %25, i32 0, i32 0
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %141, ptr %140, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef %24)
          to label %142 unwind label %145

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

144:                                              ; preds = %142
  call void @__cxa_throw(ptr %143, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

145:                                              ; preds = %138
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %13, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %14, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %159

149:                                              ; preds = %142
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %13, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %14, align 4
  call void @__cxa_free_exception(ptr %143) #5
  br label %159

153:                                              ; No predecessors!
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  store i32 0, ptr %15, align 4
  br label %156

156:                                              ; preds = %155, %130
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  %157 = load i32, ptr %15, align 4
  switch i32 %157, label %184 [
    i32 0, label %158
    i32 1, label %178
  ]

158:                                              ; preds = %156
  br label %177

159:                                              ; preds = %149, %145, %124, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %179

160:                                              ; preds = %4
  br label %161

161:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(8) %162)
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %163 = getelementptr inbounds %class.anon.263, ptr %28, i32 0, i32 0
  %164 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %164, ptr %163, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_4vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef %27)
          to label %165 unwind label %168

165:                                              ; preds = %161
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  %166 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %166, ptr noundef @.str.2)
          to label %167 unwind label %172

167:                                              ; preds = %165
  call void @__cxa_throw(ptr %166, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

168:                                              ; preds = %161
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %13, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %14, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  br label %179

172:                                              ; preds = %165
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %13, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %14, align 4
  call void @__cxa_free_exception(ptr %166) #5
  br label %179

176:                                              ; No predecessors!
  br label %177

177:                                              ; preds = %176, %158, %94
  unreachable

178:                                              ; preds = %156, %92
  ret void

179:                                              ; preds = %172, %168, %159, %95
  %180 = load ptr, ptr %13, align 8
  %181 = load i32, ptr %14, align 4
  %182 = insertvalue { ptr, i32 } poison, ptr %180, 0
  %183 = insertvalue { ptr, i32 } %182, i32 %181, 1
  resume { ptr, i32 } %183

184:                                              ; preds = %156, %92
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_0vEEOT_"(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(24) ptr @_ZNK10ThinVectorIN3HIR12ConstGenericEEixEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_1vEEOT_"(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 @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_2vEEOT_"(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 @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_3vEEOT_"(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 @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_4vEEOT_"(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::ConstGeneric" = type { i32, %"union.HIR::ConstGeneric::DataUnion" }
%"union.HIR::ConstGeneric::DataUnion" = type { %"class.std::unique_ptr.27", [8 x i8] }
%"class.std::unique_ptr.27" = type { %"struct.std::__uniq_ptr_data.28" }
%"struct.std::__uniq_ptr_data.28" = type { %"class.std::__uniq_ptr_impl.29" }
%"class.std::__uniq_ptr_impl.29" = type { %"class.std::tuple.30" }
%"class.std::tuple.30" = type { %"struct.std::_Tuple_impl.31" }
%"struct.std::_Tuple_impl.31" = type { %"struct.std::_Head_base.34" }
%"struct.std::_Head_base.34" = 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.259 = type { ptr, ptr }
%class.anon.260 = type { ptr }
%class.anon.261 = type { ptr, ptr }
%class.anon.262 = type { ptr }
%class.anon.263 = 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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK10ThinVectorIN3HIR12ConstGenericEE4sizeEv(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 nounwind uwtable
declare dso_local noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefE(ptr dead_on_unwind noalias writable sret(%"class.HIR::ConstGeneric") 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 %struct.Span, align 8
  %7 = alloca %"class.std::function.60", align 8
  %8 = alloca %class.anon.259, align 8
  %9 = alloca %struct.Span, align 8
  %10 = alloca %"class.std::function.60", align 8
  %11 = alloca %class.anon.260, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %struct.Span, align 8
  %14 = alloca %"class.std::function.60", align 8
  %15 = alloca %class.anon.261, align 8
  %16 = alloca %struct.Span, align 8
  %17 = alloca %"class.std::function.60", align 8
  %18 = alloca %class.anon.262, align 8
  %19 = alloca %struct.Span, align 8
  %20 = alloca %"class.std::function.60", align 8
  %21 = alloca %class.anon.263, align 8
  %22 = tail call noundef i32 @_ZNK3HIR10GenericRef5groupEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
  switch i32 %22, label %89 [
    i32 0, label %23
    i32 1, label %56
  ]

23:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %24 = load ptr, ptr %1, align 8, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %24, i64 72
  %26 = load ptr, ptr %25, align 8
  %27 = tail call noundef ptr %26(ptr noundef nonnull align 8 dereferenceable(96) %1)
  store ptr %27, ptr %5, align 8, !tbaa !8
  %.not21 = icmp eq ptr %27, null
  br i1 %.not21, label %47, label %28

28:                                               ; preds = %23
  %29 = tail call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
  %30 = zext i32 %29 to i64
  %31 = getelementptr inbounds i8, ptr %27, i64 16
  %32 = tail call noundef i64 @_ZNK10ThinVectorIN3HIR12ConstGenericEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %31)
  %33 = icmp ugt i64 %32, %30
  br i1 %33, label %43, label %34

34:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  store ptr %3, ptr %8, align 8, !tbaa !8
  %35 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %5, ptr %35, align 8, !tbaa !8
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %7)
          to label %36 unwind label %39

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

38:                                               ; preds = %36
  call void @__cxa_throw(ptr nonnull %37, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

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

41:                                               ; preds = %36
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %37) #5
  br label %55

43:                                               ; preds = %28
  %44 = tail call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
  %45 = zext i32 %44 to i64
  %46 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK10ThinVectorIN3HIR12ConstGenericEEixEm(ptr noundef nonnull align 8 dereferenceable(8) %31, i64 noundef %45)
  tail call void @_ZNK3HIR12ConstGeneric5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::ConstGeneric") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %46)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %97

47:                                               ; preds = %23
  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 8, ptr nonnull %11) #5
  store ptr %3, ptr %11, align 8, !tbaa !8
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull %10)
          to label %48 unwind label %51

48:                                               ; preds = %47
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 8, 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
  %49 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull @.str.2)
          to label %50 unwind label %53

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

51:                                               ; preds = %47
  %52 = 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 8, 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 %55

53:                                               ; preds = %48
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %49) #5
  br label %55

55:                                               ; preds = %53, %51, %41, %39
  %.pn22 = phi { ptr, i32 } [ %42, %41 ], [ %40, %39 ], [ %54, %53 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %98

56:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  %57 = load ptr, ptr %1, align 8, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %57, i64 80
  %59 = load ptr, ptr %58, align 8
  %60 = tail call noundef ptr %59(ptr noundef nonnull align 8 dereferenceable(96) %1)
  store ptr %60, ptr %12, align 8, !tbaa !8
  %.not = icmp eq ptr %60, null
  br i1 %.not, label %80, label %61

61:                                               ; preds = %56
  %62 = tail call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
  %63 = zext i32 %62 to i64
  %64 = getelementptr inbounds i8, ptr %60, i64 16
  %65 = tail call noundef i64 @_ZNK10ThinVectorIN3HIR12ConstGenericEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(8) %64)
  %66 = icmp ugt i64 %65, %63
  br i1 %66, label %76, label %67

67:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #5
  store ptr %3, ptr %15, align 8, !tbaa !8
  %68 = getelementptr inbounds i8, ptr %15, i64 8
  store ptr %12, ptr %68, align 8, !tbaa !8
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull %14)
          to label %69 unwind label %72

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

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

72:                                               ; preds = %67
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #5
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #5
  br label %88

74:                                               ; preds = %69
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %70) #5
  br label %88

76:                                               ; preds = %61
  %77 = tail call noundef i32 @_ZNK3HIR10GenericRef3idxEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
  %78 = zext i32 %77 to i64
  %79 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK10ThinVectorIN3HIR12ConstGenericEEixEm(ptr noundef nonnull align 8 dereferenceable(8) %64, i64 noundef %78)
  tail call void @_ZNK3HIR12ConstGeneric5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::ConstGeneric") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %79)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  br label %97

80:                                               ; preds = %56
  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 8, ptr nonnull %18) #5
  store ptr %3, ptr %18, align 8, !tbaa !8
  call void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_3vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull %17)
          to label %81 unwind label %84

81:                                               ; preds = %80
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @llvm.lifetime.end.p0(i64 8, 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
  %82 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %82, ptr noundef nonnull @.str.2)
          to label %83 unwind label %86

83:                                               ; preds = %81
  call void @__cxa_throw(ptr nonnull %82, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

84:                                               ; preds = %80
  %85 = 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 8, 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 %88

86:                                               ; preds = %81
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %82) #5
  br label %88

88:                                               ; preds = %86, %84, %74, %72
  %.pn = phi { ptr, i32 } [ %75, %74 ], [ %73, %72 ], [ %87, %86 ], [ %85, %84 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  br label %98

89:                                               ; preds = %4
  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 @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_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 %90 unwind label %93

90:                                               ; preds = %89
  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
  %91 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %91, ptr noundef nonnull @.str.2)
          to label %92 unwind label %95

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

93:                                               ; preds = %89
  %94 = 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 %98

95:                                               ; preds = %90
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %91) #5
  br label %98

97:                                               ; preds = %76, %43
  ret void

98:                                               ; preds = %95, %93, %88, %55
  %.pn24 = phi { ptr, i32 } [ %96, %95 ], [ %94, %93 ], [ %.pn, %88 ], [ %.pn22, %55 ]
  resume { ptr, i32 } %.pn24
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_0vEEOT_"(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(24) ptr @_ZNK10ThinVectorIN3HIR12ConstGenericEEixEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_1vEEOT_"(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 @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_2vEEOT_"(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 @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_3vEEOT_"(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 @"_ZNSt8functionIFvRSoEEC2IZNK15MonomorphiserPP9get_valueERK4SpanRKN3HIR10GenericRefEE3$_4vEEOT_"(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