; LLVM IR from thepowersgang/mrustc :: src/hir_typeck/impl_ref.ll (ZNK7ImplRef21type_is_specialisableEPKc)

; 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.std::_Rb_tree_const_iterator" = type { ptr }
%class.RcString = type { ptr }
%struct.ImplRef = type { %"class.ImplRef::Data" }
%"class.ImplRef::Data" = type { i32, %"union.ImplRef::Data::DataUnion" }
%"union.ImplRef::Data::DataUnion" = type { %"struct.ImplRef::Data::Data_Bounded" }
%"struct.ImplRef::Data::Data_Bounded" = type { %"class.HIR::GenericParams", %"class.HIR::TypeRef", %"struct.HIR::PathParams", %"class.std::map" }
%"class.HIR::GenericParams" = type { %"class.std::vector", %"class.std::vector.2", %"class.std::vector.7", %"class.std::vector.12" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = 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.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = 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.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = 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 }
%"class.HIR::TypeRef" = type { ptr }
%"struct.HIR::PathParams" = type { %class.ThinVector, %class.ThinVector.0, %class.ThinVector.1 }
%class.ThinVector = type { ptr }
%class.ThinVector.0 = type { ptr }
%class.ThinVector.1 = type { ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitPath::AtyEqual>, std::_Select1st<std::pair<const RcString, HIR::TraitPath::AtyEqual>>, std::less<RcString>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitPath::AtyEqual>, std::_Select1st<std::pair<const RcString, HIR::TraitPath::AtyEqual>>, std::less<RcString>>::_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 }
%"struct.ImplRef::Data::Data_TraitImpl" = type { %"struct.HIR::PathParams", ptr, ptr, ptr, %"class.HIR::TypeRef" }
%"class.HIR::TraitImpl" = type { %"class.HIR::GenericParams", %"struct.HIR::PathParams", %"class.HIR::TypeRef", %"class.std::map.20", %"class.std::map.25", %"class.std::map.30", %"class.std::map.35", %"struct.HIR::SimplePath" }
%"class.std::map.20" = type { %"class.std::_Rb_tree.21" }
%"class.std::_Rb_tree.21" = type { %"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Function>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Function>>>, std::less<RcString>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Function>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Function>>>, std::less<RcString>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.25" = type { %"class.std::_Rb_tree.26" }
%"class.std::_Rb_tree.26" = type { %"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Constant>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Constant>>>, std::less<RcString>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Constant>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Constant>>>, std::less<RcString>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.30" = type { %"class.std::_Rb_tree.31" }
%"class.std::_Rb_tree.31" = type { %"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Static>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Static>>>, std::less<RcString>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Static>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::Static>>>, std::less<RcString>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::map.35" = type { %"class.std::_Rb_tree.36" }
%"class.std::_Rb_tree.36" = type { %"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::TypeRef>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::TypeRef>>>, std::less<RcString>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<RcString, std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::TypeRef>>, std::_Select1st<std::pair<const RcString, HIR::TraitImpl::ImplEnt<HIR::TypeRef>>>, std::less<RcString>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.HIR::SimplePath" = type { %class.ThinVector.40 }
%class.ThinVector.40 = type { ptr }
%"struct.std::pair" = type { %class.RcString, %"struct.HIR::TraitImpl::ImplEnt" }
%"struct.HIR::TraitImpl::ImplEnt" = type { i8, %"class.HIR::TypeRef" }

@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIPKc = external constant ptr
@__PRETTY_FUNCTION__._ZNK7ImplRef21type_is_specialisableEPKc = external hidden unnamed_addr constant [56 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7ImplRef4Data12as_TraitImplEv(ptr noundef nonnull align 8 dereferenceable(184)) #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(176) ptr @_ZNK7ImplRef4Data10as_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184)) #0 align 2

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK7ImplRef21type_is_specialisableEPKc(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = alloca %class.RcString, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %16 = alloca i8, align 1
  %17 = alloca ptr, align 8
  %18 = alloca i8, align 1
  %19 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %20 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 1, ptr %6, align 1, !tbaa !9
  br label %21

21:                                               ; preds = %139, %2
  %22 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %23 = trunc i8 %22 to i1
  br i1 %23, label %25, label %24

24:                                               ; preds = %21
  store i32 2, ptr %7, align 4
  br label %140

25:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %26 = getelementptr inbounds %struct.ImplRef, ptr %20, i32 0, i32 0
  store ptr %26, ptr %8, align 8, !tbaa !5
  br label %27

27:                                               ; preds = %135, %25
  %28 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %29 = trunc i8 %28 to i1
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  store i32 5, ptr %7, align 4
  br label %136

31:                                               ; preds = %27
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = call noundef i32 @_ZNK7ImplRef4Data3tagEv(ptr noundef nonnull align 8 dereferenceable(184) %32)
  switch i32 %33, label %134 [
    i32 0, label %34
    i32 1, label %35
    i32 2, label %90
    i32 3, label %112
  ]

34:                                               ; preds = %31
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 104, ptr noundef @__PRETTY_FUNCTION__._ZNK7ImplRef21type_is_specialisableEPKc) #6
  unreachable

35:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  store i8 1, ptr %9, align 1, !tbaa !9
  br label %36

36:                                               ; preds = %86, %35
  %37 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %38 = trunc i8 %37 to i1
  br i1 %38, label %40, label %39

39:                                               ; preds = %36
  store i32 9, ptr %7, align 4
  br label %87

40:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7ImplRef4Data12as_TraitImplEv(ptr noundef nonnull align 8 dereferenceable(184) %41)
  store ptr %42, ptr %10, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %82, %40
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = load i8, ptr %9, align 1, !tbaa !9, !range !11, !noundef !12
  %46 = trunc i8 %45 to i1
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 12, ptr %7, align 4
  br label %83

48:                                               ; preds = %43
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.ImplRef::Data::Data_TraitImpl", ptr %49, i32 0, i32 3
  %51 = load ptr, ptr %50, align 8, !tbaa !13
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %54

53:                                               ; preds = %48
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %83

54:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.ImplRef::Data::Data_TraitImpl", ptr %55, i32 0, i32 3
  %57 = load ptr, ptr %56, align 8, !tbaa !13
  %58 = getelementptr inbounds %"class.HIR::TraitImpl", ptr %57, i32 0, i32 6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN8RcStringC2EPKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef %59)
  %60 = invoke ptr @_ZNKSt3mapI8RcStringN3HIR9TraitImpl7ImplEntINS1_7TypeRefEEESt4lessIS0_ESaISt4pairIKS0_S5_EEE4findERS9_(ptr noundef nonnull align 8 dereferenceable(48) %58, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %61 unwind label %71

61:                                               ; preds = %54
  %62 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %11, i32 0, i32 0
  store ptr %60, ptr %62, align 8
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.ImplRef::Data::Data_TraitImpl", ptr %63, i32 0, i32 3
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %66 = getelementptr inbounds %"class.HIR::TraitImpl", ptr %65, i32 0, i32 6
  %67 = call ptr @_ZNKSt3mapI8RcStringN3HIR9TraitImpl7ImplEntINS1_7TypeRefEEESt4lessIS0_ESaISt4pairIKS0_S5_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %66) #5
  %68 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %15, i32 0, i32 0
  store ptr %67, ptr %68, align 8
  %69 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorISt4pairIK8RcStringN3HIR9TraitImpl7ImplEntINS3_7TypeRefEEEEESB_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br i1 %69, label %70, label %75

70:                                               ; preds = %61
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %81

71:                                               ; preds = %54
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %13, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %14, align 4
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  br label %146

75:                                               ; preds = %61
  %76 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIK8RcStringN3HIR9TraitImpl7ImplEntINS3_7TypeRefEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  %77 = getelementptr inbounds %"struct.std::pair", ptr %76, i32 0, i32 1
  %78 = getelementptr inbounds %"struct.HIR::TraitImpl::ImplEnt", ptr %77, i32 0, i32 0
  %79 = load i8, ptr %78, align 8, !tbaa !20, !range !11, !noundef !12
  %80 = trunc i8 %79 to i1
  store i1 %80, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %81

81:                                               ; preds = %75, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %83

82:                                               ; No predecessors!
  store i8 0, ptr %9, align 1, !tbaa !9
  br label %43, !llvm.loop !24

83:                                               ; preds = %81, %53, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %84 = load i32, ptr %7, align 4
  switch i32 %84, label %87 [
    i32 12, label %85
  ]

85:                                               ; preds = %83
  br label %86

86:                                               ; preds = %85
  store i8 0, ptr %9, align 1, !tbaa !9
  br label %36, !llvm.loop !26

87:                                               ; preds = %83, %39
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  %88 = load i32, ptr %7, align 4
  switch i32 %88, label %136 [
    i32 9, label %89
  ]

89:                                               ; preds = %87
  br label %134

90:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  store i8 1, ptr %16, align 1, !tbaa !9
  br label %91

91:                                               ; preds = %108, %90
  %92 = load i8, ptr %16, align 1, !tbaa !9, !range !11, !noundef !12
  %93 = trunc i8 %92 to i1
  br i1 %93, label %95, label %94

94:                                               ; preds = %91
  store i32 15, ptr %7, align 4
  br label %109

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7ImplRef4Data13as_BoundedPtrEv(ptr noundef nonnull align 8 dereferenceable(184) %96)
  store ptr %97, ptr %17, align 8, !tbaa !5
  br label %98

98:                                               ; preds = %104, %95
  %99 = load ptr, ptr %17, align 8, !tbaa !5
  %100 = load i8, ptr %16, align 1, !tbaa !9, !range !11, !noundef !12
  %101 = trunc i8 %100 to i1
  br i1 %101, label %103, label %102

102:                                              ; preds = %98
  store i32 18, ptr %7, align 4
  br label %105

103:                                              ; preds = %98
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %105

104:                                              ; No predecessors!
  store i8 0, ptr %16, align 1, !tbaa !9
  br label %98, !llvm.loop !27

105:                                              ; preds = %103, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  %106 = load i32, ptr %7, align 4
  switch i32 %106, label %109 [
    i32 18, label %107
  ]

107:                                              ; preds = %105
  br label %108

108:                                              ; preds = %107
  store i8 0, ptr %16, align 1, !tbaa !9
  br label %91, !llvm.loop !28

109:                                              ; preds = %105, %94
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  %110 = load i32, ptr %7, align 4
  switch i32 %110, label %136 [
    i32 15, label %111
  ]

111:                                              ; preds = %109
  br label %134

112:                                              ; preds = %31
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  store i8 1, ptr %18, align 1, !tbaa !9
  br label %113

113:                                              ; preds = %130, %112
  %114 = load i8, ptr %18, align 1, !tbaa !9, !range !11, !noundef !12
  %115 = trunc i8 %114 to i1
  br i1 %115, label %117, label %116

116:                                              ; preds = %113
  store i32 21, ptr %7, align 4
  br label %131

117:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = call noundef nonnull align 8 dereferenceable(176) ptr @_ZNK7ImplRef4Data10as_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184) %118)
  store ptr %119, ptr %19, align 8, !tbaa !5
  br label %120

120:                                              ; preds = %126, %117
  %121 = load ptr, ptr %19, align 8, !tbaa !5
  %122 = load i8, ptr %18, align 1, !tbaa !9, !range !11, !noundef !12
  %123 = trunc i8 %122 to i1
  br i1 %123, label %125, label %124

124:                                              ; preds = %120
  store i32 24, ptr %7, align 4
  br label %127

125:                                              ; preds = %120
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %127

126:                                              ; No predecessors!
  store i8 0, ptr %18, align 1, !tbaa !9
  br label %120, !llvm.loop !29

127:                                              ; preds = %125, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  %128 = load i32, ptr %7, align 4
  switch i32 %128, label %131 [
    i32 24, label %129
  ]

129:                                              ; preds = %127
  br label %130

130:                                              ; preds = %129
  store i8 0, ptr %18, align 1, !tbaa !9
  br label %113, !llvm.loop !30

131:                                              ; preds = %127, %116
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  %132 = load i32, ptr %7, align 4
  switch i32 %132, label %136 [
    i32 21, label %133
  ]

133:                                              ; preds = %131
  br label %134

134:                                              ; preds = %133, %111, %89, %31
  br label %135

135:                                              ; preds = %134
  store i8 0, ptr %6, align 1, !tbaa !9
  br label %27, !llvm.loop !31

136:                                              ; preds = %131, %109, %87, %30
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %137 = load i32, ptr %7, align 4
  switch i32 %137, label %140 [
    i32 5, label %138
  ]

138:                                              ; preds = %136
  br label %139

139:                                              ; preds = %138
  store i8 0, ptr %6, align 1, !tbaa !9
  br label %21, !llvm.loop !32

140:                                              ; preds = %136, %24
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #5
  %141 = load i32, ptr %7, align 4
  switch i32 %141, label %151 [
    i32 2, label %142
    i32 1, label %144
  ]

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

144:                                              ; preds = %140
  %145 = load i1, ptr %3, align 1
  ret i1 %145

146:                                              ; preds = %71
  %147 = load ptr, ptr %13, align 8
  %148 = load i32, ptr %14, align 4
  %149 = insertvalue { ptr, i32 } poison, ptr %147, 0
  %150 = insertvalue { ptr, i32 } %149, i32 %148, 1
  resume { ptr, i32 } %150

151:                                              ; preds = %140
  unreachable
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorISt4pairIK8RcStringN3HIR9TraitImpl7ImplEntINS3_7TypeRefEEEEESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3mapI8RcStringN3HIR9TraitImpl7ImplEntINS1_7TypeRefEEESt4lessIS0_ESaISt4pairIKS0_S5_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

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

attributes #0 = { 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 #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn 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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !6, i64 40}
!14 = !{!"_ZTSN7ImplRef4Data14Data_TraitImplE", !15, i64 0, !6, i64 24, !6, i64 32, !6, i64 40, !19, i64 48}
!15 = !{!"_ZTSN3HIR10PathParamsE", !16, i64 0, !17, i64 8, !18, i64 16}
!16 = !{!"_ZTS10ThinVectorIN3HIR11LifetimeRefEE", !6, i64 0}
!17 = !{!"_ZTS10ThinVectorIN3HIR7TypeRefEE", !6, i64 0}
!18 = !{!"_ZTS10ThinVectorIN3HIR12ConstGenericEE", !6, i64 0}
!19 = !{!"_ZTSN3HIR7TypeRefE", !6, i64 0}
!20 = !{!21, !10, i64 8}
!21 = !{!"_ZTSSt4pairIK8RcStringN3HIR9TraitImpl7ImplEntINS2_7TypeRefEEEE", !22, i64 0, !23, i64 8}
!22 = !{!"_ZTS8RcString", !6, i64 0}
!23 = !{!"_ZTSN3HIR9TraitImpl7ImplEntINS_7TypeRefEEE", !10, i64 0, !19, i64 8}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !25}
!29 = distinct !{!29, !25}
!30 = distinct !{!30, !25}
!31 = distinct !{!31, !25}
!32 = distinct !{!32, !25}


; 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.std::_Rb_tree_const_iterator" = type { ptr }
%class.RcString = type { ptr }

@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIPKc = external constant ptr
@__PRETTY_FUNCTION__._ZNK7ImplRef21type_is_specialisableEPKc = external hidden unnamed_addr constant [56 x i8], align 1

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7ImplRef4Data12as_TraitImplEv(ptr noundef nonnull align 8 dereferenceable(184)) local_unnamed_addr #0 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(176) ptr @_ZNK7ImplRef4Data10as_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184)) local_unnamed_addr #0 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK7ImplRef21type_is_specialisableEPKc(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
.preheader.preheader:
  %2 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %3 = alloca %class.RcString, align 8
  %4 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %5 = tail call noundef i32 @_ZNK7ImplRef4Data3tagEv(ptr noundef nonnull align 8 dereferenceable(184) %0)
  switch i32 %5, label %.loopexit [
    i32 0, label %.split59.us
    i32 1, label %.split61.us
    i32 2, label %.split63.us
    i32 3, label %.split65.us
  ], !llvm.loop !5

.split59.us:                                      ; preds = %.preheader.preheader
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 104, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7ImplRef21type_is_specialisableEPKc) #5
  unreachable

.split61.us:                                      ; preds = %.preheader.preheader
  %6 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7ImplRef4Data12as_TraitImplEv(ptr noundef nonnull align 8 dereferenceable(184) %0)
  %7 = getelementptr inbounds i8, ptr %6, i64 40
  %8 = load ptr, ptr %7, align 8, !tbaa !7
  %9 = icmp eq ptr %8, null
  br i1 %9, label %29, label %10

10:                                               ; preds = %.split61.us
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %11 = getelementptr inbounds i8, ptr %8, i64 272
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @_ZN8RcStringC2EPKc(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef %1)
  %12 = invoke ptr @_ZNKSt3mapI8RcStringN3HIR9TraitImpl7ImplEntINS1_7TypeRefEEESt4lessIS0_ESaISt4pairIKS0_S5_EEE4findERS9_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %13 unwind label %18

13:                                               ; preds = %10
  store ptr %12, ptr %2, align 8
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %14 = load ptr, ptr %7, align 8, !tbaa !7
  %15 = getelementptr inbounds i8, ptr %14, i64 272
  %16 = call ptr @_ZNKSt3mapI8RcStringN3HIR9TraitImpl7ImplEntINS1_7TypeRefEEESt4lessIS0_ESaISt4pairIKS0_S5_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %15) #6
  store ptr %16, ptr %4, align 8
  %17 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorISt4pairIK8RcStringN3HIR9TraitImpl7ImplEntINS3_7TypeRefEEEEESB_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br i1 %17, label %25, label %20

18:                                               ; preds = %10
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN8RcStringD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  resume { ptr, i32 } %19

20:                                               ; preds = %13
  %21 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorISt4pairIK8RcStringN3HIR9TraitImpl7ImplEntINS3_7TypeRefEEEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = load i8, ptr %22, align 8, !tbaa !17, !range !22, !noundef !23
  %24 = trunc nuw i8 %23 to i1
  br label %25

25:                                               ; preds = %13, %20
  %.3 = phi i1 [ %24, %20 ], [ false, %13 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  br label %29

.split63.us:                                      ; preds = %.preheader.preheader
  %26 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7ImplRef4Data13as_BoundedPtrEv(ptr noundef nonnull align 8 dereferenceable(184) %0)
  br label %29

.split65.us:                                      ; preds = %.preheader.preheader
  %27 = tail call noundef nonnull align 8 dereferenceable(176) ptr @_ZNK7ImplRef4Data10as_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184) %0)
  br label %29

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

29:                                               ; preds = %.split63.us, %.split65.us, %25, %.split61.us
  %.13.ph = phi i1 [ true, %.split61.us ], [ %.3, %25 ], [ false, %.split63.us ], [ false, %.split65.us ]
  ret i1 %.13.ph
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorISt4pairIK8RcStringN3HIR9TraitImpl7ImplEntINS3_7TypeRefEEEEESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3mapI8RcStringN3HIR9TraitImpl7ImplEntINS1_7TypeRefEEESt4lessIS0_ESaISt4pairIKS0_S5_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { noreturn nounwind }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !11, i64 40}
!8 = !{!"_ZTSN7ImplRef4Data14Data_TraitImplE", !9, i64 0, !11, i64 24, !11, i64 32, !11, i64 40, !16, i64 48}
!9 = !{!"_ZTSN3HIR10PathParamsE", !10, i64 0, !14, i64 8, !15, i64 16}
!10 = !{!"_ZTS10ThinVectorIN3HIR11LifetimeRefEE", !11, i64 0}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTS10ThinVectorIN3HIR7TypeRefEE", !11, i64 0}
!15 = !{!"_ZTS10ThinVectorIN3HIR12ConstGenericEE", !11, i64 0}
!16 = !{!"_ZTSN3HIR7TypeRefE", !11, i64 0}
!17 = !{!18, !21, i64 8}
!18 = !{!"_ZTSSt4pairIK8RcStringN3HIR9TraitImpl7ImplEntINS2_7TypeRefEEEE", !19, i64 0, !20, i64 8}
!19 = !{!"_ZTS8RcString", !11, i64 0}
!20 = !{!"_ZTSN3HIR9TraitImpl7ImplEntINS_7TypeRefEEE", !21, i64 0, !16, i64 8}
!21 = !{!"bool", !12, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!11, !11, i64 0}


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