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

; 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.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" }
%"struct.ImplRef::Data::Data_BoundedPtr" = type { ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_ = external hidden unnamed_addr constant [56 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIPKc = external constant ptr

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK7ImplRef18more_specific_thanERKS_(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef nonnull align 8 dereferenceable(184) %1) #0 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8
  %16 = getelementptr inbounds %struct.ImplRef, ptr %15, i32 0, i32 0
  %17 = call noundef i32 @_ZNK7ImplRef4Data3tagEv(ptr noundef nonnull align 8 dereferenceable(184) %16)
  switch i32 %17, label %154 [
    i32 0, label %18
    i32 1, label %19
    i32 2, label %66
    i32 3, label %113
  ]

18:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 54, ptr noundef @__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_) #5
  unreachable

19:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %20 = getelementptr inbounds %struct.ImplRef, ptr %15, i32 0, i32 0
  %21 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7ImplRef4Data12as_TraitImplEv(ptr noundef nonnull align 8 dereferenceable(184) %20)
  store ptr %21, ptr %6, align 8, !tbaa !5
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.ImplRef::Data::Data_TraitImpl", ptr %23, i32 0, i32 3
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  %26 = icmp eq ptr %25, null
  br i1 %26, label %27, label %28

27:                                               ; preds = %19
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %63

28:                                               ; preds = %19
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.ImplRef, ptr %29, i32 0, i32 0
  %31 = call noundef i32 @_ZNK7ImplRef4Data3tagEv(ptr noundef nonnull align 8 dereferenceable(184) %30)
  switch i32 %31, label %62 [
    i32 0, label %32
    i32 1, label %33
    i32 2, label %52
    i32 3, label %57
  ]

32:                                               ; preds = %28
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 32, ptr noundef @__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_) #5
  unreachable

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ImplRef, ptr %34, i32 0, i32 0
  %36 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7ImplRef4Data12as_TraitImplEv(ptr noundef nonnull align 8 dereferenceable(184) %35)
  store ptr %36, ptr %8, align 8, !tbaa !5
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.ImplRef::Data::Data_TraitImpl", ptr %38, i32 0, i32 3
  %40 = load ptr, ptr %39, align 8, !tbaa !9
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %43

42:                                               ; preds = %33
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %51

43:                                               ; preds = %33
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.ImplRef::Data::Data_TraitImpl", ptr %44, i32 0, i32 3
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.ImplRef::Data::Data_TraitImpl", ptr %47, i32 0, i32 3
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = call noundef zeroext i1 @_ZNK3HIR9TraitImpl18more_specific_thanERKS0_(ptr noundef nonnull align 8 dereferenceable(328) %46, ptr noundef nonnull align 8 dereferenceable(328) %49)
  store i1 %50, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %51

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

52:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ImplRef, ptr %53, i32 0, i32 0
  %55 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7ImplRef4Data13as_BoundedPtrEv(ptr noundef nonnull align 8 dereferenceable(184) %54)
  store ptr %55, ptr %9, align 8, !tbaa !5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %63

57:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.ImplRef, ptr %58, i32 0, i32 0
  %60 = call noundef nonnull align 8 dereferenceable(176) ptr @_ZNK7ImplRef4Data10as_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184) %59)
  store ptr %60, ptr %10, align 8, !tbaa !5
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %63

62:                                               ; preds = %28
  store i32 0, ptr %7, align 4
  br label %63

63:                                               ; preds = %62, %57, %52, %51, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %64 = load i32, ptr %7, align 4
  switch i32 %64, label %158 [
    i32 0, label %65
    i32 1, label %156
  ]

65:                                               ; preds = %63
  br label %154

66:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %67 = getelementptr inbounds %struct.ImplRef, ptr %15, i32 0, i32 0
  %68 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7ImplRef4Data13as_BoundedPtrEv(ptr noundef nonnull align 8 dereferenceable(184) %67)
  store ptr %68, ptr %11, align 8, !tbaa !5
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.ImplRef, ptr %70, i32 0, i32 0
  %72 = call noundef zeroext i1 @_ZNK7ImplRef4Data13is_BoundedPtrEv(ptr noundef nonnull align 8 dereferenceable(184) %71)
  br i1 %72, label %74, label %73

73:                                               ; preds = %66
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %112

74:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ImplRef, ptr %75, i32 0, i32 0
  %77 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7ImplRef4Data13as_BoundedPtrEv(ptr noundef nonnull align 8 dereferenceable(184) %76)
  store ptr %77, ptr %12, align 8, !tbaa !5
  %78 = load ptr, ptr %11, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.ImplRef::Data::Data_BoundedPtr", ptr %78, i32 0, i32 1
  %80 = load ptr, ptr %79, align 8, !tbaa !16
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.ImplRef::Data::Data_BoundedPtr", ptr %81, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !16
  %84 = call noundef zeroext i1 @_ZNK3HIR7TypeRefeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef nonnull align 8 dereferenceable(8) %83)
  br i1 %84, label %85, label %86

85:                                               ; preds = %74
  br label %88

86:                                               ; preds = %74
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 38, ptr noundef @__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_) #5
  unreachable

87:                                               ; No predecessors!
  br label %88

88:                                               ; preds = %87, %85
  %89 = load ptr, ptr %11, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.ImplRef::Data::Data_BoundedPtr", ptr %89, i32 0, i32 2
  %91 = load ptr, ptr %90, align 8, !tbaa !18
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.ImplRef::Data::Data_BoundedPtr", ptr %92, i32 0, i32 2
  %94 = load ptr, ptr %93, align 8, !tbaa !18
  %95 = call noundef zeroext i1 @_ZNK3HIR10PathParamseqERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %91, ptr noundef nonnull align 8 dereferenceable(24) %94)
  br i1 %95, label %96, label %97

96:                                               ; preds = %88
  br label %99

97:                                               ; preds = %88
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 39, ptr noundef @__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_) #5
  unreachable

98:                                               ; No predecessors!
  br label %99

99:                                               ; preds = %98, %96
  %100 = load ptr, ptr %11, align 8, !tbaa !5
  %101 = getelementptr inbounds %"struct.ImplRef::Data::Data_BoundedPtr", ptr %100, i32 0, i32 3
  %102 = load ptr, ptr %101, align 8, !tbaa !19
  %103 = call noundef i64 @_ZNKSt3mapI8RcStringN3HIR9TraitPath8AtyEqualESt4lessIS0_ESaISt4pairIKS0_S3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %102) #6
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.ImplRef::Data::Data_BoundedPtr", ptr %104, i32 0, i32 3
  %106 = load ptr, ptr %105, align 8, !tbaa !19
  %107 = call noundef i64 @_ZNKSt3mapI8RcStringN3HIR9TraitPath8AtyEqualESt4lessIS0_ESaISt4pairIKS0_S3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %106) #6
  %108 = icmp ugt i64 %103, %107
  br i1 %108, label %109, label %110

109:                                              ; preds = %99
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %111

110:                                              ; preds = %99
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %111

111:                                              ; preds = %110, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %112

112:                                              ; preds = %111, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %156

113:                                              ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %114 = getelementptr inbounds %struct.ImplRef, ptr %15, i32 0, i32 0
  %115 = call noundef nonnull align 8 dereferenceable(176) ptr @_ZNK7ImplRef4Data10as_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184) %114)
  store ptr %115, ptr %13, align 8, !tbaa !5
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.ImplRef, ptr %117, i32 0, i32 0
  %119 = call noundef zeroext i1 @_ZNK7ImplRef4Data10is_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184) %118)
  br i1 %119, label %121, label %120

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

121:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ImplRef, ptr %122, i32 0, i32 0
  %124 = call noundef nonnull align 8 dereferenceable(176) ptr @_ZNK7ImplRef4Data10as_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184) %123)
  store ptr %124, ptr %14, align 8, !tbaa !5
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.ImplRef::Data::Data_Bounded", ptr %125, i32 0, i32 1
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.ImplRef::Data::Data_Bounded", ptr %127, i32 0, i32 1
  %129 = call noundef zeroext i1 @_ZNK3HIR7TypeRefeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef nonnull align 8 dereferenceable(8) %128)
  br i1 %129, label %130, label %131

130:                                              ; preds = %121
  br label %133

131:                                              ; preds = %121
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 48, ptr noundef @__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_) #5
  unreachable

132:                                              ; No predecessors!
  br label %133

133:                                              ; preds = %132, %130
  %134 = load ptr, ptr %13, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.ImplRef::Data::Data_Bounded", ptr %134, i32 0, i32 2
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.ImplRef::Data::Data_Bounded", ptr %136, i32 0, i32 2
  %138 = call noundef zeroext i1 @_ZNK3HIR10PathParamseqERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %135, ptr noundef nonnull align 8 dereferenceable(24) %137)
  br i1 %138, label %139, label %140

139:                                              ; preds = %133
  br label %142

140:                                              ; preds = %133
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 49, ptr noundef @__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_) #5
  unreachable

141:                                              ; No predecessors!
  br label %142

142:                                              ; preds = %141, %139
  %143 = load ptr, ptr %13, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.ImplRef::Data::Data_Bounded", ptr %143, i32 0, i32 3
  %145 = call noundef i64 @_ZNKSt3mapI8RcStringN3HIR9TraitPath8AtyEqualESt4lessIS0_ESaISt4pairIKS0_S3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %144) #6
  %146 = load ptr, ptr %14, align 8, !tbaa !5
  %147 = getelementptr inbounds %"struct.ImplRef::Data::Data_Bounded", ptr %146, i32 0, i32 3
  %148 = call noundef i64 @_ZNKSt3mapI8RcStringN3HIR9TraitPath8AtyEqualESt4lessIS0_ESaISt4pairIKS0_S3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %147) #6
  %149 = icmp ugt i64 %145, %148
  br i1 %149, label %150, label %151

150:                                              ; preds = %142
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %152

151:                                              ; preds = %142
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %152

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

153:                                              ; preds = %152, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %156

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

156:                                              ; preds = %153, %112, %63
  %157 = load i1, ptr %3, align 1
  ret i1 %157

158:                                              ; preds = %63
  unreachable
}

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

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

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

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

declare noundef zeroext i1 @_ZNK3HIR9TraitImpl18more_specific_thanERKS0_(ptr noundef nonnull align 8 dereferenceable(328), ptr noundef nonnull align 8 dereferenceable(328)) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7ImplRef4Data13as_BoundedPtrEv(ptr noundef nonnull align 8 dereferenceable(184)) #1 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)) #1 align 2

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

declare noundef zeroext i1 @_ZNK3HIR7TypeRefeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

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

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 #2 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "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 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 40}
!10 = !{!"_ZTSN7ImplRef4Data14Data_TraitImplE", !11, i64 0, !6, i64 24, !6, i64 32, !6, i64 40, !15, i64 48}
!11 = !{!"_ZTSN3HIR10PathParamsE", !12, i64 0, !13, i64 8, !14, i64 16}
!12 = !{!"_ZTS10ThinVectorIN3HIR11LifetimeRefEE", !6, i64 0}
!13 = !{!"_ZTS10ThinVectorIN3HIR7TypeRefEE", !6, i64 0}
!14 = !{!"_ZTS10ThinVectorIN3HIR12ConstGenericEE", !6, i64 0}
!15 = !{!"_ZTSN3HIR7TypeRefE", !6, i64 0}
!16 = !{!17, !6, i64 8}
!17 = !{!"_ZTSN7ImplRef4Data15Data_BoundedPtrE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!17, !6, i64 16}
!19 = !{!17, !6, i64 24}


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

@.str = external hidden unnamed_addr constant [39 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_ = external hidden unnamed_addr constant [56 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIPKc = external constant ptr

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK7ImplRef18more_specific_thanERKS_(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef nonnull align 8 dereferenceable(184) %1) local_unnamed_addr #0 align 2 {
  %3 = tail call noundef i32 @_ZNK7ImplRef4Data3tagEv(ptr noundef nonnull align 8 dereferenceable(184) %0)
  switch i32 %3, label %71 [
    i32 0, label %4
    i32 1, label %5
    i32 2, label %25
    i32 3, label %51
  ]

4:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 54, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_) #4
  unreachable

5:                                                ; preds = %2
  %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 !5
  %9 = icmp eq ptr %8, null
  br i1 %9, label %.thread, label %10

10:                                               ; preds = %5
  %11 = tail call noundef i32 @_ZNK7ImplRef4Data3tagEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
  switch i32 %11, label %71 [
    i32 0, label %12
    i32 1, label %13
    i32 2, label %21
    i32 3, label %23
  ]

12:                                               ; preds = %10
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 32, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_) #4
  unreachable

13:                                               ; preds = %10
  %14 = tail call noundef nonnull align 8 dereferenceable(56) ptr @_ZNK7ImplRef4Data12as_TraitImplEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
  %15 = getelementptr inbounds i8, ptr %14, i64 40
  %16 = load ptr, ptr %15, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %.thread, label %18

18:                                               ; preds = %13
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = tail call noundef zeroext i1 @_ZNK3HIR9TraitImpl18more_specific_thanERKS0_(ptr noundef nonnull align 8 dereferenceable(328) %19, ptr noundef nonnull align 8 dereferenceable(328) %16)
  br label %.thread

21:                                               ; preds = %10
  %22 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7ImplRef4Data13as_BoundedPtrEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
  br label %.thread

23:                                               ; preds = %10
  %24 = tail call noundef nonnull align 8 dereferenceable(176) ptr @_ZNK7ImplRef4Data10as_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
  br label %.thread

25:                                               ; preds = %2
  %26 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7ImplRef4Data13as_BoundedPtrEv(ptr noundef nonnull align 8 dereferenceable(184) %0)
  %27 = tail call noundef zeroext i1 @_ZNK7ImplRef4Data13is_BoundedPtrEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
  br i1 %27, label %28, label %.thread

28:                                               ; preds = %25
  %29 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK7ImplRef4Data13as_BoundedPtrEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
  %30 = getelementptr inbounds i8, ptr %26, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !15
  %32 = getelementptr inbounds i8, ptr %29, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  %34 = tail call noundef zeroext i1 @_ZNK3HIR7TypeRefeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(8) %33)
  br i1 %34, label %36, label %35

35:                                               ; preds = %28
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 38, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_) #4
  unreachable

36:                                               ; preds = %28
  %37 = getelementptr inbounds i8, ptr %26, i64 16
  %38 = load ptr, ptr %37, align 8, !tbaa !17
  %39 = getelementptr inbounds i8, ptr %29, i64 16
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %41 = tail call noundef zeroext i1 @_ZNK3HIR10PathParamseqERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %38, ptr noundef nonnull align 8 dereferenceable(24) %40)
  br i1 %41, label %43, label %42

42:                                               ; preds = %36
  tail call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 39, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_) #4
  unreachable

43:                                               ; preds = %36
  %44 = getelementptr inbounds i8, ptr %26, i64 24
  %45 = load ptr, ptr %44, align 8, !tbaa !18
  %46 = tail call noundef i64 @_ZNKSt3mapI8RcStringN3HIR9TraitPath8AtyEqualESt4lessIS0_ESaISt4pairIKS0_S3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %45) #5
  %47 = getelementptr inbounds i8, ptr %29, i64 24
  %48 = load ptr, ptr %47, align 8, !tbaa !18
  %49 = tail call noundef i64 @_ZNKSt3mapI8RcStringN3HIR9TraitPath8AtyEqualESt4lessIS0_ESaISt4pairIKS0_S3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %48) #5
  %50 = icmp ugt i64 %46, %49
  br label %.thread

51:                                               ; preds = %2
  %52 = tail call noundef nonnull align 8 dereferenceable(176) ptr @_ZNK7ImplRef4Data10as_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184) %0)
  %53 = tail call noundef zeroext i1 @_ZNK7ImplRef4Data10is_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
  br i1 %53, label %54, label %.thread

54:                                               ; preds = %51
  %55 = tail call noundef nonnull align 8 dereferenceable(176) ptr @_ZNK7ImplRef4Data10as_BoundedEv(ptr noundef nonnull align 8 dereferenceable(184) %1)
  %56 = getelementptr inbounds i8, ptr %52, i64 96
  %57 = getelementptr inbounds i8, ptr %55, i64 96
  %58 = tail call noundef zeroext i1 @_ZNK3HIR7TypeRefeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull align 8 dereferenceable(8) %57)
  br i1 %58, label %60, label %59

59:                                               ; preds = %54
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 48, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_) #4
  unreachable

60:                                               ; preds = %54
  %61 = getelementptr inbounds i8, ptr %52, i64 104
  %62 = getelementptr inbounds i8, ptr %55, i64 104
  %63 = tail call noundef zeroext i1 @_ZNK3HIR10PathParamseqERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %61, ptr noundef nonnull align 8 dereferenceable(24) %62)
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 49, ptr noundef nonnull @__PRETTY_FUNCTION__._ZNK7ImplRef18more_specific_thanERKS_) #4
  unreachable

65:                                               ; preds = %60
  %66 = getelementptr inbounds i8, ptr %52, i64 128
  %67 = tail call noundef i64 @_ZNKSt3mapI8RcStringN3HIR9TraitPath8AtyEqualESt4lessIS0_ESaISt4pairIKS0_S3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %66) #5
  %68 = getelementptr inbounds i8, ptr %55, i64 128
  %69 = tail call noundef i64 @_ZNKSt3mapI8RcStringN3HIR9TraitPath8AtyEqualESt4lessIS0_ESaISt4pairIKS0_S3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %68) #5
  %70 = icmp ugt i64 %67, %69
  br label %.thread

71:                                               ; preds = %10, %2
  %72 = tail call ptr @__cxa_allocate_exception(i64 8) #5
  store ptr @.str.6, ptr %72, align 16, !tbaa !19
  tail call void @__cxa_throw(ptr nonnull %72, ptr nonnull @_ZTIPKc, ptr null) #6
  unreachable

.thread:                                          ; preds = %18, %13, %5, %21, %23, %65, %51, %43, %25
  %.6 = phi i1 [ %50, %43 ], [ false, %25 ], [ %70, %65 ], [ false, %51 ], [ true, %13 ], [ %20, %18 ], [ false, %5 ], [ false, %21 ], [ false, %23 ]
  ret i1 %.6
}

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #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 #1 align 2

declare noundef zeroext i1 @_ZNK3HIR9TraitImpl18more_specific_thanERKS0_(ptr noundef nonnull align 8 dereferenceable(328), ptr noundef nonnull align 8 dereferenceable(328)) local_unnamed_addr #3

; 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 #1 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 #1 align 2

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

declare noundef zeroext i1 @_ZNK3HIR7TypeRefeqERKS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 #2 = { 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 #3 = { "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 = { noreturn nounwind }
attributes #5 = { nounwind }
attributes #6 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !9, i64 40}
!6 = !{!"_ZTSN7ImplRef4Data14Data_TraitImplE", !7, i64 0, !9, i64 24, !9, i64 32, !9, i64 40, !14, i64 48}
!7 = !{!"_ZTSN3HIR10PathParamsE", !8, i64 0, !12, i64 8, !13, i64 16}
!8 = !{!"_ZTS10ThinVectorIN3HIR11LifetimeRefEE", !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTS10ThinVectorIN3HIR7TypeRefEE", !9, i64 0}
!13 = !{!"_ZTS10ThinVectorIN3HIR12ConstGenericEE", !9, i64 0}
!14 = !{!"_ZTSN3HIR7TypeRefE", !9, i64 0}
!15 = !{!16, !9, i64 8}
!16 = !{!"_ZTSN7ImplRef4Data15Data_BoundedPtrE", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!17 = !{!16, !9, i64 16}
!18 = !{!16, !9, i64 24}
!19 = !{!9, !9, i64 0}


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