; LLVM IR from thepowersgang/mrustc :: src/hir_typeck/resolve_common.ll (ZNK18TraitResolveCommon20get_const_param_typeERK4Spanj)

; 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"

%struct.Span = type { ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.280 = type { ptr }
%"struct.HIR::GenericParams::PrintArgs" = type { ptr }
%class.anon.281 = type { ptr, ptr }
%class.anon.282 = type { i8 }
%struct.TraitResolveCommon = type { ptr, ptr, ptr, %"class.std::map", %class.RangeVecMap, %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath", %"struct.HIR::SimplePath" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<HIR::TypeRef, std::pair<const HIR::TypeRef, TraitResolveCommon::CachedEquality>, std::_Select1st<std::pair<const HIR::TypeRef, TraitResolveCommon::CachedEquality>>, std::less<HIR::TypeRef>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<HIR::TypeRef, std::pair<const HIR::TypeRef, TraitResolveCommon::CachedEquality>, std::_Select1st<std::pair<const HIR::TypeRef, TraitResolveCommon::CachedEquality>>, std::less<HIR::TypeRef>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%class.RangeVecMap = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>, std::allocator<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>, std::allocator<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>, std::allocator<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>, std::allocator<std::unique_ptr<std::pair<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.HIR::SimplePath" = type { %class.ThinVector }
%class.ThinVector = type { ptr }
%"class.HIR::GenericParams" = type { %"class.std::vector.3", %"class.std::vector.8", %"class.std::vector.13", %"class.std::vector.18" }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<HIR::TypeParamDef, std::allocator<HIR::TypeParamDef>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::TypeParamDef, std::allocator<HIR::TypeParamDef>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::TypeParamDef, std::allocator<HIR::TypeParamDef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::TypeParamDef, std::allocator<HIR::TypeParamDef>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<HIR::LifetimeDef, std::allocator<HIR::LifetimeDef>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::LifetimeDef, std::allocator<HIR::LifetimeDef>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::LifetimeDef, std::allocator<HIR::LifetimeDef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::LifetimeDef, std::allocator<HIR::LifetimeDef>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<HIR::ValueParamDef, std::allocator<HIR::ValueParamDef>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::ValueParamDef, std::allocator<HIR::ValueParamDef>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::ValueParamDef, std::allocator<HIR::ValueParamDef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::ValueParamDef, std::allocator<HIR::ValueParamDef>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<HIR::GenericBound, std::allocator<HIR::GenericBound>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::GenericBound, std::allocator<HIR::GenericBound>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::GenericBound, std::allocator<HIR::GenericBound>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::GenericBound, std::allocator<HIR::GenericBound>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.HIR::ValueParamDef" = type { %class.RcString, %"class.HIR::TypeRef", %"class.HIR::ExprPtr" }
%class.RcString = type { ptr }
%"class.HIR::TypeRef" = type { ptr }
%"class.HIR::ExprPtr" = type { %"class.HIR::ExprPtrInner", %"class.std::vector.284", %"class.std::vector.284", %"class.MIR::FunctionPointer", %"class.HIR::ExprStatePtr" }
%"class.HIR::ExprPtrInner" = type { ptr }
%"class.std::vector.284" = type { %"struct.std::_Vector_base.285" }
%"struct.std::_Vector_base.285" = type { %"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.MIR::FunctionPointer" = type { ptr }
%"class.HIR::ExprStatePtr" = type { ptr }

@g_debug_indent_level = external global i32, align 4
@.str.14 = external hidden unnamed_addr constant [24 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@__func__._ZNK18TraitResolveCommon20get_const_param_typeERK4Spanj = external hidden unnamed_addr constant [21 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1

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

declare noundef zeroext i1 @_Z13debug_enabledv() #1

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 noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_13GenericParams9PrintArgsE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

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

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

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

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

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

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

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

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

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

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

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK18TraitResolveCommon20get_const_param_typeERK4Spanj(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %struct.Span, align 8
  %10 = alloca %"class.std::function", align 8
  %11 = alloca %class.anon.280, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.HIR::GenericParams::PrintArgs", align 8
  %16 = alloca %"struct.HIR::GenericParams::PrintArgs", align 8
  %17 = alloca %struct.Span, align 8
  %18 = alloca %"class.std::function", align 8
  %19 = alloca %class.anon.281, align 8
  %20 = alloca %struct.Span, align 8
  %21 = alloca %"class.std::function", align 8
  %22 = alloca %class.anon.282, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %23 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = lshr i32 %24, 8
  switch i32 %25, label %32 [
    i32 0, label %26
    i32 1, label %29
  ]

26:                                               ; preds = %3
  %27 = getelementptr inbounds %struct.TraitResolveCommon, ptr %23, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !11
  store ptr %28, ptr %7, align 8, !tbaa !5
  br label %50

29:                                               ; preds = %3
  %30 = getelementptr inbounds %struct.TraitResolveCommon, ptr %23, i32 0, i32 2
  %31 = load ptr, ptr %30, align 8, !tbaa !30
  store ptr %31, ptr %7, align 8, !tbaa !5
  br label %50

32:                                               ; preds = %3
  br label %33

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr @__func__._ZNK18TraitResolveCommon20get_const_param_typeERK4Spanj, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %34)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %35 = getelementptr inbounds %class.anon.280, ptr %11, i32 0, i32 0
  store ptr %8, ptr %35, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK18TraitResolveCommon20get_const_param_typeERK4SpanjE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef %10)
          to label %36 unwind label %39

36:                                               ; preds = %33
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  %37 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef @.str.14)
          to label %38 unwind label %43

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

39:                                               ; preds = %33
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %12, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %13, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %47

43:                                               ; preds = %36
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %12, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %13, align 4
  call void @__cxa_free_exception(ptr %37) #6
  br label %47

47:                                               ; preds = %43, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %150

48:                                               ; No predecessors!
  br label %49

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49, %29, %26
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = and i32 %51, 255
  store i32 %52, ptr %14, align 4, !tbaa !9
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = icmp ne ptr %53, null
  br i1 %54, label %98, label %55

55:                                               ; preds = %50
  %56 = getelementptr inbounds %struct.TraitResolveCommon, ptr %23, i32 0, i32 1
  %57 = load ptr, ptr %56, align 8, !tbaa !11
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %76

59:                                               ; preds = %55
  br label %60

60:                                               ; preds = %59
  %61 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %61, label %62, label %73

62:                                               ; preds = %60
  %63 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !9
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %63, ptr noundef @__func__._ZNK18TraitResolveCommon20get_const_param_typeERK4Spanj)
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef @.str.16)
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %66 = getelementptr inbounds %struct.TraitResolveCommon, ptr %23, i32 0, i32 1
  %67 = load ptr, ptr %66, align 8, !tbaa !11
  %68 = call ptr @_ZNK3HIR13GenericParams8fmt_argsEv(ptr noundef nonnull align 8 dereferenceable(96) %67)
  %69 = getelementptr inbounds %"struct.HIR::GenericParams::PrintArgs", ptr %15, i32 0, i32 0
  store ptr %68, ptr %69, align 8
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_13GenericParams9PrintArgsE(ptr noundef nonnull align 8 dereferenceable(8) %65, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %70, ptr noundef @_ZSt3decRSt8ios_base)
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %73

73:                                               ; preds = %62, %60
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75, %55
  %77 = getelementptr inbounds %struct.TraitResolveCommon, ptr %23, i32 0, i32 2
  %78 = load ptr, ptr %77, align 8, !tbaa !30
  %79 = icmp ne ptr %78, null
  br i1 %79, label %80, label %97

80:                                               ; preds = %76
  br label %81

81:                                               ; preds = %80
  %82 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %82, label %83, label %94

83:                                               ; preds = %81
  %84 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !9
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %84, ptr noundef @__func__._ZNK18TraitResolveCommon20get_const_param_typeERK4Spanj)
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %85, ptr noundef @.str.17)
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %87 = getelementptr inbounds %struct.TraitResolveCommon, ptr %23, i32 0, i32 2
  %88 = load ptr, ptr %87, align 8, !tbaa !30
  %89 = call ptr @_ZNK3HIR13GenericParams8fmt_argsEv(ptr noundef nonnull align 8 dereferenceable(96) %88)
  %90 = getelementptr inbounds %"struct.HIR::GenericParams::PrintArgs", ptr %16, i32 0, i32 0
  store ptr %89, ptr %90, align 8
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_13GenericParams9PrintArgsE(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %91, ptr noundef @_ZSt3decRSt8ios_base)
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %94

94:                                               ; preds = %83, %81
  br label %95

95:                                               ; preds = %94
  br label %96

96:                                               ; preds = %95
  br label %97

97:                                               ; preds = %96, %76
  br label %98

98:                                               ; preds = %97, %50
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = icmp ne ptr %100, null
  br i1 %101, label %117, label %102

102:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %103)
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %104 = getelementptr inbounds %class.anon.281, ptr %19, i32 0, i32 0
  store ptr %6, ptr %104, align 8, !tbaa !5
  %105 = getelementptr inbounds %class.anon.281, ptr %19, i32 0, i32 1
  store ptr %14, ptr %105, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZNK18TraitResolveCommon20get_const_param_typeERK4SpanjE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef nonnull align 8 dereferenceable(16) %19) #6
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef %18)
          to label %106 unwind label %109

106:                                              ; preds = %102
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  %107 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %107, ptr noundef @.str.18)
          to label %108 unwind label %113

108:                                              ; preds = %106
  call void @__cxa_throw(ptr %107, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #7
  unreachable

109:                                              ; preds = %102
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %12, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %13, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %149

113:                                              ; preds = %106
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %12, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %13, align 4
  call void @__cxa_free_exception(ptr %107) #6
  br label %149

117:                                              ; preds = %99
  br label %118

118:                                              ; preds = %117
  br label %119

119:                                              ; preds = %118
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %14, align 4, !tbaa !9
  %122 = zext i32 %121 to i64
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = getelementptr inbounds %"class.HIR::GenericParams", ptr %123, i32 0, i32 2
  %125 = call noundef i64 @_ZNKSt6vectorIN3HIR13ValueParamDefESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %124) #6
  %126 = icmp ult i64 %122, %125
  br i1 %126, label %140, label %127

127:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %128)
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  call void @"_ZNSt8functionIFvRSoEEC2IZNK18TraitResolveCommon20get_const_param_typeERK4SpanjE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef %21)
          to label %129 unwind label %132

129:                                              ; preds = %127
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  %130 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %130, ptr noundef @.str.18)
          to label %131 unwind label %136

131:                                              ; preds = %129
  call void @__cxa_throw(ptr %130, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #7
  unreachable

132:                                              ; preds = %127
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %12, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %13, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %149

136:                                              ; preds = %129
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %12, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %13, align 4
  call void @__cxa_free_exception(ptr %130) #6
  br label %149

140:                                              ; preds = %120
  br label %141

141:                                              ; preds = %140
  br label %142

142:                                              ; preds = %141
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = getelementptr inbounds %"class.HIR::GenericParams", ptr %143, i32 0, i32 2
  %145 = load i32, ptr %14, align 4, !tbaa !9
  %146 = zext i32 %145 to i64
  %147 = call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN3HIR13ValueParamDefESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef %146)
  %148 = getelementptr inbounds %"struct.HIR::ValueParamDef", ptr %147, i32 0, i32 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  ret ptr %148

149:                                              ; preds = %136, %132, %113, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %150

150:                                              ; preds = %149, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %12, align 8
  %153 = load i32, ptr %13, align 4
  %154 = insertvalue { ptr, i32 } poison, ptr %152, 0
  %155 = insertvalue { ptr, i32 } %154, i32 %153, 1
  resume { ptr, i32 } %155
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN3HIR13ValueParamDefESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"_ZTS18TraitResolveCommon", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !22, i64 72, !28, i64 104, !28, i64 112, !28, i64 120, !28, i64 128, !28, i64 136, !28, i64 144, !28, i64 152, !28, i64 160, !28, i64 168, !28, i64 176, !28, i64 184, !28, i64 192, !28, i64 200, !28, i64 208}
!13 = !{!"_ZTSSt3mapIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityESt4lessIS1_ESaISt4pairIKS1_S3_EEE", !14, i64 0}
!14 = !{!"_ZTSSt8_Rb_treeIN3HIR7TypeRefESt4pairIKS1_N18TraitResolveCommon14CachedEqualityEESt10_Select1stIS6_ESt4lessIS1_ESaIS6_EE", !15, i64 0}
!15 = !{!"_ZTSNSt8_Rb_treeIN3HIR7TypeRefESt4pairIKS1_N18TraitResolveCommon14CachedEqualityEESt10_Select1stIS6_ESt4lessIS1_ESaIS6_EE13_Rb_tree_implISA_Lb1EEE", !16, i64 0, !18, i64 8}
!16 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN3HIR7TypeRefEEE", !17, i64 0}
!17 = !{!"_ZTSSt4lessIN3HIR7TypeRefEE"}
!18 = !{!"_ZTSSt15_Rb_tree_header", !19, i64 0, !21, i64 32}
!19 = !{!"_ZTSSt18_Rb_tree_node_base", !20, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTS11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE", !23, i64 0, !27, i64 24}
!23 = !{!"_ZTSSt6vectorISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"_ZTSN18TraitResolveCommon14CachedBoundCmpE"}
!28 = !{!"_ZTSN3HIR10SimplePathE", !29, i64 0}
!29 = !{!"_ZTS10ThinVectorI8RcStringE", !6, i64 0}
!30 = !{!12, !6, i64 16}


; 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"

%struct.Span = type { ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.280 = type { ptr }
%"struct.HIR::GenericParams::PrintArgs" = type { ptr }
%class.anon.281 = type { ptr, ptr }
%class.anon.282 = type { i8 }

@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@.str.14 = external hidden unnamed_addr constant [24 x i8], align 1
@_ZTISt13runtime_error = external constant ptr
@__func__._ZNK18TraitResolveCommon20get_const_param_typeERK4Spanj = external hidden unnamed_addr constant [21 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [17 x i8], align 1

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

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #1

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 noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_13GenericParams9PrintArgsE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK18TraitResolveCommon20get_const_param_typeERK4Spanj(ptr nocapture noundef nonnull readonly align 8 dereferenceable(216) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.Span, align 8
  %7 = alloca %"class.std::function", align 8
  %8 = alloca %class.anon.280, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.HIR::GenericParams::PrintArgs", align 8
  %11 = alloca %"struct.HIR::GenericParams::PrintArgs", align 8
  %12 = alloca %struct.Span, align 8
  %13 = alloca %"class.std::function", align 8
  %14 = alloca %class.anon.281, align 8
  %15 = alloca %struct.Span, align 8
  %16 = alloca %"class.std::function", align 8
  %17 = alloca %class.anon.282, align 1
  store i32 %2, ptr %4, align 4, !tbaa !5
  %18 = lshr i32 %2, 8
  switch i32 %18, label %20 [
    i32 0, label %29
    i32 1, label %19
  ]

19:                                               ; preds = %3
  br label %29

20:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  store ptr @__func__._ZNK18TraitResolveCommon20get_const_param_typeERK4Spanj, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  store ptr %5, ptr %8, align 8, !tbaa !9
  call void @"_ZNSt8functionIFvRSoEEC2IZNK18TraitResolveCommon20get_const_param_typeERK4SpanjE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %7)
          to label %21 unwind label %24

21:                                               ; preds = %20
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  %22 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull @.str.14)
          to label %23 unwind label %26

23:                                               ; preds = %21
  call void @__cxa_throw(ptr nonnull %22, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
  unreachable

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

26:                                               ; preds = %21
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %22) #6
  br label %28

28:                                               ; preds = %26, %24
  %.pn16 = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %85

29:                                               ; preds = %3, %19
  %.sink = phi i64 [ 16, %19 ], [ 8, %3 ]
  %30 = getelementptr inbounds i8, ptr %0, i64 %.sink
  %.012 = load ptr, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %31 = and i32 %2, 255
  store i32 %31, ptr %9, align 4, !tbaa !5
  %.not = icmp eq ptr %.012, null
  br i1 %.not, label %32, label %.critedge

32:                                               ; preds = %29
  %33 = getelementptr inbounds i8, ptr %0, i64 8
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %.not13 = icmp eq ptr %34, null
  br i1 %.not13, label %46, label %35

35:                                               ; preds = %32
  %36 = tail call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %36, label %37, label %46

37:                                               ; preds = %35
  %38 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !5
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %38, ptr noundef nonnull @__func__._ZNK18TraitResolveCommon20get_const_param_typeERK4Spanj)
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull @.str.16)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %41 = load ptr, ptr %33, align 8, !tbaa !11
  %42 = tail call ptr @_ZNK3HIR13GenericParams8fmt_argsEv(ptr noundef nonnull align 8 dereferenceable(96) %41)
  store ptr %42, ptr %10, align 8
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_13GenericParams9PrintArgsE(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull @_ZSt3decRSt8ios_base)
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %46

46:                                               ; preds = %35, %37, %32
  %47 = getelementptr inbounds i8, ptr %0, i64 16
  %48 = load ptr, ptr %47, align 8, !tbaa !30
  %.not14 = icmp eq ptr %48, null
  br i1 %.not14, label %60, label %49

49:                                               ; preds = %46
  %50 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %50, label %51, label %60

51:                                               ; preds = %49
  %52 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !5
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %52, ptr noundef nonnull @__func__._ZNK18TraitResolveCommon20get_const_param_typeERK4Spanj)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef nonnull @.str.17)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %55 = load ptr, ptr %47, align 8, !tbaa !30
  %56 = call ptr @_ZNK3HIR13GenericParams8fmt_argsEv(ptr noundef nonnull align 8 dereferenceable(96) %55)
  store ptr %56, ptr %11, align 8
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_13GenericParams9PrintArgsE(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %57, ptr noundef nonnull @_ZSt3decRSt8ios_base)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  br label %60

60:                                               ; preds = %46, %51, %49
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  store ptr %4, ptr %14, align 8, !tbaa !9
  %61 = getelementptr inbounds i8, ptr %14, i64 8
  store ptr %9, ptr %61, align 8, !tbaa !9
  call void @"_ZNSt8functionIFvRSoEEC2IZNK18TraitResolveCommon20get_const_param_typeERK4SpanjE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull %13)
          to label %62 unwind label %65

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

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

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

67:                                               ; preds = %62
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %63) #6
  br label %84

.critedge:                                        ; preds = %29
  %69 = zext nneg i32 %31 to i64
  %70 = getelementptr inbounds i8, ptr %.012, i64 48
  %71 = tail call noundef i64 @_ZNKSt6vectorIN3HIR13ValueParamDefESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %70) #6
  %72 = icmp ugt i64 %71, %69
  br i1 %72, label %81, label %73

73:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  call void @_ZN4SpanC1ERKS_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %1)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %17) #6
  call void @"_ZNSt8functionIFvRSoEEC2IZNK18TraitResolveCommon20get_const_param_typeERK4SpanjE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull %16)
          to label %74 unwind label %77

74:                                               ; preds = %73
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  %75 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %75, ptr noundef nonnull @.str.18)
          to label %76 unwind label %79

76:                                               ; preds = %74
  call void @__cxa_throw(ptr nonnull %75, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #7
  unreachable

77:                                               ; preds = %73
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %17) #6
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  br label %84

79:                                               ; preds = %74
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %75) #6
  br label %84

81:                                               ; preds = %.critedge
  %82 = tail call noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN3HIR13ValueParamDefESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %70, i64 noundef %69)
  %83 = getelementptr inbounds i8, ptr %82, i64 8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  ret ptr %83

84:                                               ; preds = %79, %77, %67, %65
  %.pn = phi { ptr, i32 } [ %80, %79 ], [ %78, %77 ], [ %68, %67 ], [ %66, %65 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  br label %85

85:                                               ; preds = %84, %28
  %.pn16.pn = phi { ptr, i32 } [ %.pn16, %28 ], [ %.pn, %84 ]
  resume { ptr, i32 } %.pn16.pn
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(88) ptr @_ZNKSt6vectorIN3HIR13ValueParamDefESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTS18TraitResolveCommon", !10, i64 0, !10, i64 8, !10, i64 16, !13, i64 24, !22, i64 72, !28, i64 104, !28, i64 112, !28, i64 120, !28, i64 128, !28, i64 136, !28, i64 144, !28, i64 152, !28, i64 160, !28, i64 168, !28, i64 176, !28, i64 184, !28, i64 192, !28, i64 200, !28, i64 208}
!13 = !{!"_ZTSSt3mapIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityESt4lessIS1_ESaISt4pairIKS1_S3_EEE", !14, i64 0}
!14 = !{!"_ZTSSt8_Rb_treeIN3HIR7TypeRefESt4pairIKS1_N18TraitResolveCommon14CachedEqualityEESt10_Select1stIS6_ESt4lessIS1_ESaIS6_EE", !15, i64 0}
!15 = !{!"_ZTSNSt8_Rb_treeIN3HIR7TypeRefESt4pairIKS1_N18TraitResolveCommon14CachedEqualityEESt10_Select1stIS6_ESt4lessIS1_ESaIS6_EE13_Rb_tree_implISA_Lb1EEE", !16, i64 0, !18, i64 8}
!16 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN3HIR7TypeRefEEE", !17, i64 0}
!17 = !{!"_ZTSSt4lessIN3HIR7TypeRefEE"}
!18 = !{!"_ZTSSt15_Rb_tree_header", !19, i64 0, !21, i64 32}
!19 = !{!"_ZTSSt18_Rb_tree_node_base", !20, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!20 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTS11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE", !23, i64 0, !27, i64 24}
!23 = !{!"_ZTSSt6vectorISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!27 = !{!"_ZTSN18TraitResolveCommon14CachedBoundCmpE"}
!28 = !{!"_ZTSN3HIR10SimplePathE", !29, i64 0}
!29 = !{!"_ZTS10ThinVectorI8RcStringE", !10, i64 0}
!30 = !{!12, !10, i64 16}


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