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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.HIR::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.std::pair.40" = type { %"class.HIR::TypeRef", %"struct.TraitResolveCommon::CachedEquality" }
%"class.HIR::TypeRef" = type { ptr }
%"struct.TraitResolveCommon::CachedEquality" = type { %"class.HIR::GenericParams", %"class.HIR::TypeRef" }
%"struct.std::pair.38" = type <{ %"struct.std::_Rb_tree_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_iterator" = type { ptr }
%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 }

@__dso_handle = external hidden global i8
@g_debug_indent_level = external global i32, align 4
@__FUNCTION__._ZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_ = external hidden unnamed_addr constant [27 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs = external hidden global %"class.HIR::GenericParams", align 8
@_ZGVZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs = external hidden global i64, align 8

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #0

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

declare noundef zeroext i1 @_Z13debug_enabledv() #2

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) #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) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef, ptr noundef) #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) #4 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)) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 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)) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #4 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.std::pair.40", align 8
  %12 = alloca %"struct.TraitResolveCommon::CachedEquality", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::pair.38", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %16 = load ptr, ptr %6, align 8
  br label %17

17:                                               ; preds = %5
  %18 = call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %18, label %19, label %28

19:                                               ; preds = %17
  %20 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !9
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %20, ptr noundef @__FUNCTION__._ZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_)
  %22 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef @.str.5)
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef @.str.6)
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef @_ZSt3decRSt8ios_base)
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %28

28:                                               ; preds = %19, %17
  br label %29

29:                                               ; preds = %28
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %41, label %32

32:                                               ; preds = %29
  %33 = load atomic i8, ptr @_ZGVZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs acquire, align 8
  %34 = icmp eq i8 %33, 0
  br i1 %34, label %35, label %40, !prof !11

35:                                               ; preds = %32
  %36 = call i32 @__cxa_guard_acquire(ptr @_ZGVZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs) #0
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %40

38:                                               ; preds = %35
  call void @_ZN3HIR13GenericParamsC2Ev(ptr noundef nonnull align 8 dereferenceable(96) @_ZZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs) #0
  %39 = call i32 @__cxa_atexit(ptr @_ZN3HIR13GenericParamsD2Ev, ptr @_ZZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs) #0
  br label %40

40:                                               ; preds = %38, %35, %32
  store ptr @_ZZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs, ptr %8, align 8, !tbaa !5
  br label %41

41:                                               ; preds = %40, %29
  %42 = getelementptr inbounds %struct.TraitResolveCommon, ptr %16, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 112, ptr %11) #0
  call void @llvm.lifetime.start.p0(i64 104, ptr %12) #0
  %43 = getelementptr inbounds %"struct.TraitResolveCommon::CachedEquality", ptr %12, i32 0, i32 0
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNK3HIR13GenericParams5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::GenericParams") align 8 %43, ptr noundef nonnull align 8 dereferenceable(96) %44)
  %45 = getelementptr inbounds %"struct.TraitResolveCommon::CachedEquality", ptr %12, i32 0, i32 1
  invoke void @_ZN3HIR7TypeRefC2EOS0_(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %46 unwind label %54

46:                                               ; preds = %41
  invoke void @_ZSt9make_pairIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr dead_on_unwind writable sret(%"struct.std::pair.40") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(104) %12)
          to label %47 unwind label %58

47:                                               ; preds = %46
  %48 = invoke { ptr, i8 } @_ZNSt3mapIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityESt4lessIS1_ESaISt4pairIKS1_S3_EEE6insertIS6_IS1_S3_EEENSt9enable_ifIXsr16is_constructibleIS8_T_EE5valueES6_ISt17_Rb_tree_iteratorIS8_EbEE4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(48) %42, ptr noundef nonnull align 8 dereferenceable(112) %11)
          to label %49 unwind label %62

49:                                               ; preds = %47
  %50 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 0
  %51 = extractvalue { ptr, i8 } %48, 0
  store ptr %51, ptr %50, align 8
  %52 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 1
  %53 = extractvalue { ptr, i8 } %48, 1
  store i8 %53, ptr %52, align 8
  call void @_ZNSt4pairIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityEED2Ev(ptr noundef nonnull align 8 dereferenceable(112) %11) #0
  call void @_ZN18TraitResolveCommon14CachedEqualityD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %12) #0
  call void @llvm.lifetime.end.p0(i64 104, ptr %12) #0
  call void @llvm.lifetime.end.p0(i64 112, ptr %11) #0
  ret void

54:                                               ; preds = %41
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %13, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %14, align 4
  call void @_ZN3HIR13GenericParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(96) %43) #0
  br label %67

58:                                               ; preds = %46
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %13, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %14, align 4
  br label %66

62:                                               ; preds = %47
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %13, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %14, align 4
  call void @_ZNSt4pairIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityEED2Ev(ptr noundef nonnull align 8 dereferenceable(112) %11) #0
  br label %66

66:                                               ; preds = %62, %58
  call void @_ZN18TraitResolveCommon14CachedEqualityD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %12) #0
  br label %67

67:                                               ; preds = %66, %54
  call void @llvm.lifetime.end.p0(i64 104, ptr %12) #0
  call void @llvm.lifetime.end.p0(i64 112, ptr %11) #0
  br label %68

68:                                               ; preds = %67
  %69 = load ptr, ptr %13, align 8
  %70 = load i32, ptr %14, align 4
  %71 = insertvalue { ptr, i32 } poison, ptr %69, 0
  %72 = insertvalue { ptr, i32 } %71, i32 %70, 1
  resume { ptr, i32 } %72
}

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3HIR13GenericParamsC2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3HIR13GenericParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #5 align 2

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #0

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityESt4lessIS1_ESaISt4pairIKS1_S3_EEE6insertIS6_IS1_S3_EEENSt9enable_ifIXsr16is_constructibleIS8_T_EE5valueES6_ISt17_Rb_tree_iteratorIS8_EbEE4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(112)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.40") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(104)) #4

declare void @_ZNK3HIR13GenericParams5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::GenericParams") align 8, ptr noundef nonnull align 8 dereferenceable(96)) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityEED2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN18TraitResolveCommon14CachedEqualityD2Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #5 align 2

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

!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 = !{!"branch_weights", i32 1, i32 1048575}


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

%"class.HIR::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.std::pair.40" = type { %"class.HIR::TypeRef", %"struct.TraitResolveCommon::CachedEquality" }
%"class.HIR::TypeRef" = type { ptr }
%"struct.TraitResolveCommon::CachedEquality" = type { %"class.HIR::GenericParams", %"class.HIR::TypeRef" }

@__dso_handle = external hidden global i8
@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@__FUNCTION__._ZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_ = external hidden unnamed_addr constant [27 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@_ZZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs = external hidden global %"class.HIR::GenericParams", align 8
@_ZGVZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs = external hidden global i64, align 8

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #0

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

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #2

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) #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 #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef, ptr noundef) local_unnamed_addr #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 #4 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)) #3

; 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 #4 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)) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_(ptr noundef nonnull align 8 dereferenceable(216) %0, ptr nocapture noundef nonnull readnone align 8 dereferenceable(8) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"struct.std::pair.40", align 8
  %7 = alloca %"struct.TraitResolveCommon::CachedEquality", align 8
  %8 = tail call noundef zeroext i1 @_Z13debug_enabledv()
  br i1 %8, label %9, label %18

9:                                                ; preds = %5
  %10 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !5
  %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %10, ptr noundef nonnull @__FUNCTION__._ZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_)
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull @.str.5)
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull @.str.6)
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull @_ZSt3decRSt8ios_base)
  %17 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %18

18:                                               ; preds = %5, %9
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %19, label %26

19:                                               ; preds = %18
  %20 = load atomic i8, ptr @_ZGVZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs acquire, align 8
  %21 = icmp eq i8 %20, 0
  br i1 %21, label %22, label %26, !prof !9

22:                                               ; preds = %19
  %23 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs) #7
  %.not7 = icmp eq i32 %23, 0
  br i1 %.not7, label %26, label %24

24:                                               ; preds = %22
  tail call void @_ZN3HIR13GenericParamsC2Ev(ptr noundef nonnull align 8 dereferenceable(96) @_ZZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs) #7
  %25 = tail call i32 @__cxa_atexit(ptr nonnull @_ZN3HIR13GenericParamsD2Ev, ptr nonnull @_ZZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs, ptr nonnull @__dso_handle) #7
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs) #7
  br label %26

26:                                               ; preds = %19, %22, %24, %18
  %.0 = phi ptr [ %2, %18 ], [ @_ZZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs, %24 ], [ @_ZZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs, %22 ], [ @_ZZN18TraitResolveCommon26prep_indexes__add_equalityERK4SpanPKN3HIR13GenericParamsENS3_7TypeRefES7_E11empty_hrtbs, %19 ]
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %7) #7
  call void @_ZNK3HIR13GenericParams5cloneEv(ptr dead_on_unwind nonnull writable sret(%"class.HIR::GenericParams") align 8 %7, ptr noundef nonnull align 8 dereferenceable(96) %.0)
  %27 = getelementptr inbounds i8, ptr %7, i64 96
  call void @_ZN3HIR7TypeRefC2EOS0_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %4)
  invoke void @_ZSt9make_pairIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.40") align 8 %6, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(104) %7)
          to label %28 unwind label %32

28:                                               ; preds = %26
  %29 = getelementptr inbounds i8, ptr %0, i64 24
  %30 = invoke { ptr, i8 } @_ZNSt3mapIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityESt4lessIS1_ESaISt4pairIKS1_S3_EEE6insertIS6_IS1_S3_EEENSt9enable_ifIXsr16is_constructibleIS8_T_EE5valueES6_ISt17_Rb_tree_iteratorIS8_EbEE4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(48) %29, ptr noundef nonnull align 8 dereferenceable(112) %6)
          to label %31 unwind label %34

31:                                               ; preds = %28
  call void @_ZNSt4pairIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityEED2Ev(ptr noundef nonnull align 8 dereferenceable(112) %6) #7
  call void @_ZN18TraitResolveCommon14CachedEqualityD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %7) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %6) #7
  ret void

32:                                               ; preds = %26
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %36

34:                                               ; preds = %28
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityEED2Ev(ptr noundef nonnull align 8 dereferenceable(112) %6) #7
  br label %36

36:                                               ; preds = %34, %32
  %.pn = phi { ptr, i32 } [ %35, %34 ], [ %33, %32 ]
  call void @_ZN18TraitResolveCommon14CachedEqualityD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %7) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %6) #7
  resume { ptr, i32 } %.pn
}

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3HIR13GenericParamsC2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3HIR13GenericParamsD2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #5 align 2

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3mapIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityESt4lessIS1_ESaISt4pairIKS1_S3_EEE6insertIS6_IS1_S3_EEENSt9enable_ifIXsr16is_constructibleIS8_T_EE5valueES6_ISt17_Rb_tree_iteratorIS8_EbEE4typeEOSE_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(112)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZSt9make_pairIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityEESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS5_INS6_IT0_E4typeEE6__typeEEOS7_OSC_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.40") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #4

declare void @_ZNK3HIR13GenericParams5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::GenericParams") align 8, ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityEED2Ev(ptr noundef nonnull align 8 dereferenceable(112)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN18TraitResolveCommon14CachedEqualityD2Ev(ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #5 align 2

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

!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 = !{!"branch_weights", i32 1, i32 1048575}


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