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

; 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.HMTypeInferrence::ResolvePlaceholders" = type { %"class.HIR::ResolvePlaceholders", ptr }
%"class.HIR::ResolvePlaceholders" = type { ptr }
%"class.RangeVecMap<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound, TraitResolveCommon::CachedBoundCmp>::const_iterator" = type { %"class.__gnu_cxx::__normal_iterator.224" }
%"class.__gnu_cxx::__normal_iterator.224" = type { ptr }
%struct.TraitResolveCommon = type { ptr, ptr, ptr, %"class.std::map.205", %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.205" = type { %"class.std::_Rb_tree.206" }
%"class.std::_Rb_tree.206" = 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.211", [8 x i8] }>
%"class.std::vector.211" = type { %"struct.std::_Vector_base.212" }
%"struct.std::_Vector_base.212" = 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 }
%"struct.std::pair.225" = type { %"struct.std::pair.227", %"struct.TraitResolveCommon::CachedBound" }
%"struct.std::pair.227" = type { %"class.HIR::TypeRef", %"class.HIR::GenericPath" }
%"class.HIR::TypeRef" = type { ptr }
%"class.HIR::GenericPath" = type { %"struct.HIR::SimplePath", %"struct.HIR::PathParams" }
%"struct.HIR::PathParams" = type { %class.ThinVector.26, %class.ThinVector.27, %class.ThinVector.28 }
%class.ThinVector.26 = type { ptr }
%class.ThinVector.27 = type { ptr }
%class.ThinVector.28 = type { ptr }
%"struct.TraitResolveCommon::CachedBound" = type { %"class.HIR::GenericParams", ptr, %"class.std::map" }
%"class.HIR::GenericParams" = type { %"class.std::vector.65", %"class.std::vector.70", %"class.std::vector.75", %"class.std::vector.80" }
%"class.std::vector.65" = type { %"struct.std::_Vector_base.66" }
%"struct.std::_Vector_base.66" = 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.70" = type { %"struct.std::_Vector_base.71" }
%"struct.std::_Vector_base.71" = 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.75" = type { %"struct.std::_Vector_base.76" }
%"struct.std::_Vector_base.76" = 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.80" = type { %"struct.std::_Vector_base.81" }
%"struct.std::_Vector_base.81" = 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.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" }
%class.TraitResolution = type { %struct.TraitResolveCommon, ptr, ptr, ptr, ptr, ptr, %"class.std::vector.216" }
%"class.std::vector.216" = type { %"struct.std::_Vector_base.217" }
%"struct.std::_Vector_base.217" = type { %"struct.std::_Vector_base<std::unique_ptr<HIR::TypeRef>, std::allocator<std::unique_ptr<HIR::TypeRef>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<HIR::TypeRef>, std::allocator<std::unique_ptr<HIR::TypeRef>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<HIR::TypeRef>, std::allocator<std::unique_ptr<HIR::TypeRef>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<HIR::TypeRef>, std::allocator<std::unique_ptr<HIR::TypeRef>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK16HMTypeInferrence22callback_resolve_inferEv(ptr dead_on_unwind noalias writable sret(%"struct.HMTypeInferrence::ResolvePlaceholders") align 8, ptr noundef nonnull align 8 dereferenceable(49)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK15TraitResolution21iterate_bounds_traitsERK4SpanRKN3HIR7TypeRefESt8functionIFbNS3_7CompareES6_RKNS3_11GenericPathERKN18TraitResolveCommon11CachedBoundEEE(ptr noundef nonnull align 8 dereferenceable(280) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef %3) #2 align 2 {
  %5 = alloca i1, align 1
  %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 %"class.RangeVecMap<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound, TraitResolveCommon::CachedBoundCmp>::const_iterator", align 8
  %12 = alloca %"class.RangeVecMap<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound, TraitResolveCommon::CachedBoundCmp>::const_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.HMTypeInferrence::ResolvePlaceholders", 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
  %17 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %18 = getelementptr inbounds %struct.TraitResolveCommon, ptr %17, i32 0, i32 4
  store ptr %18, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %19 = load ptr, ptr %10, align 8, !tbaa !5
  %20 = call ptr @_ZNK11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE5beginEv(ptr noundef nonnull align 8 dereferenceable(25) %19)
  %21 = getelementptr inbounds %"class.RangeVecMap<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound, TraitResolveCommon::CachedBoundCmp>::const_iterator", ptr %11, i32 0, i32 0
  %22 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.224", ptr %21, i32 0, i32 0
  store ptr %20, ptr %22, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  %24 = call ptr @_ZNK11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE3endEv(ptr noundef nonnull align 8 dereferenceable(25) %23)
  %25 = getelementptr inbounds %"class.RangeVecMap<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound, TraitResolveCommon::CachedBoundCmp>::const_iterator", ptr %12, i32 0, i32 0
  %26 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.224", ptr %25, i32 0, i32 0
  store ptr %24, ptr %26, align 8
  br label %27

27:                                               ; preds = %62, %4
  %28 = call noundef zeroext i1 @_ZNK11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE14const_iteratorneERKS9_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
  br i1 %28, label %30, label %29

29:                                               ; preds = %27
  store i32 2, ptr %13, align 4
  br label %64

30:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %31 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZN11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE14const_iteratordeEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  store ptr %31, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %32 = load ptr, ptr %14, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.std::pair.225", ptr %32, i32 0, i32 0
  %34 = getelementptr inbounds %"struct.std::pair.227", ptr %33, i32 0, i32 0
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  %37 = getelementptr inbounds %class.TraitResolution, ptr %17, i32 0, i32 2
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  call void @_ZNK16HMTypeInferrence22callback_resolve_inferEv(ptr dead_on_unwind writable sret(%"struct.HMTypeInferrence::ResolvePlaceholders") align 8 %16, ptr noundef nonnull align 8 dereferenceable(49) %38)
  %39 = call noundef i32 @_ZNK3HIR7TypeRef25compare_with_placeholdersERK4SpanRKS0_RKNS_19ResolvePlaceholdersE(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %16)
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  store i32 %39, ptr %15, align 4, !tbaa !33
  %40 = load i32, ptr %15, align 4, !tbaa !33
  %41 = icmp eq i32 %40, 2
  br i1 %41, label %42, label %43

42:                                               ; preds = %30
  store i32 3, ptr %13, align 4
  br label %56

43:                                               ; preds = %30
  %44 = load i32, ptr %15, align 4, !tbaa !33
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.std::pair.225", ptr %45, i32 0, i32 0
  %47 = getelementptr inbounds %"struct.std::pair.227", ptr %46, i32 0, i32 0
  %48 = load ptr, ptr %14, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.std::pair.225", ptr %48, i32 0, i32 0
  %50 = getelementptr inbounds %"struct.std::pair.227", ptr %49, i32 0, i32 1
  %51 = load ptr, ptr %14, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.std::pair.225", ptr %51, i32 0, i32 1
  %53 = call noundef zeroext i1 @_ZNKSt8functionIFbN3HIR7CompareERKNS0_7TypeRefERKNS0_11GenericPathERKN18TraitResolveCommon11CachedBoundEEEclES1_S4_S7_SB_(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %44, ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(32) %50, ptr noundef nonnull align 8 dereferenceable(152) %52)
  br i1 %53, label %54, label %55

54:                                               ; preds = %43
  store i1 true, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %56

55:                                               ; preds = %43
  store i32 0, ptr %13, align 4
  br label %56

56:                                               ; preds = %55, %54, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  %57 = load i32, ptr %13, align 4
  switch i32 %57, label %59 [
    i32 0, label %58
  ]

58:                                               ; preds = %56
  store i32 0, ptr %13, align 4
  br label %59

59:                                               ; preds = %58, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %60 = load i32, ptr %13, align 4
  switch i32 %60, label %64 [
    i32 0, label %61
    i32 3, label %62
  ]

61:                                               ; preds = %59
  br label %62

62:                                               ; preds = %61, %59
  %63 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE14const_iteratorppEv(ptr noundef nonnull align 8 dereferenceable(8) %11)
  br label %27

64:                                               ; preds = %59, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %65 = load i32, ptr %13, align 4
  switch i32 %65, label %69 [
    i32 2, label %66
    i32 1, label %67
  ]

66:                                               ; preds = %64
  store i1 false, ptr %5, align 1
  br label %67

67:                                               ; preds = %66, %64
  %68 = load i1, ptr %5, align 1
  ret i1 %68

69:                                               ; preds = %64
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNK11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE5beginEv(ptr noundef nonnull align 8 dereferenceable(25)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNK11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE3endEv(ptr noundef nonnull align 8 dereferenceable(25)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8functionIFbN3HIR7CompareERKNS0_7TypeRefERKNS0_11GenericPathERKN18TraitResolveCommon11CachedBoundEEEclES1_S4_S7_SB_(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(152)) #2 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 224}
!10 = !{!"_ZTS15TraitResolution", !11, i64 0, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !29, i64 256}
!11 = !{!"_ZTS18TraitResolveCommon", !6, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !21, i64 72, !27, i64 104, !27, i64 112, !27, i64 120, !27, i64 128, !27, i64 136, !27, i64 144, !27, i64 152, !27, i64 160, !27, i64 168, !27, i64 176, !27, i64 184, !27, i64 192, !27, i64 200, !27, i64 208}
!12 = !{!"_ZTSSt3mapIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityESt4lessIS1_ESaISt4pairIKS1_S3_EEE", !13, i64 0}
!13 = !{!"_ZTSSt8_Rb_treeIN3HIR7TypeRefESt4pairIKS1_N18TraitResolveCommon14CachedEqualityEESt10_Select1stIS6_ESt4lessIS1_ESaIS6_EE", !14, i64 0}
!14 = !{!"_ZTSNSt8_Rb_treeIN3HIR7TypeRefESt4pairIKS1_N18TraitResolveCommon14CachedEqualityEESt10_Select1stIS6_ESt4lessIS1_ESaIS6_EE13_Rb_tree_implISA_Lb1EEE", !15, i64 0, !17, i64 8}
!15 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN3HIR7TypeRefEEE", !16, i64 0}
!16 = !{!"_ZTSSt4lessIN3HIR7TypeRefEE"}
!17 = !{!"_ZTSSt15_Rb_tree_header", !18, i64 0, !20, i64 32}
!18 = !{!"_ZTSSt18_Rb_tree_node_base", !19, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_ZTS11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE", !22, i64 0, !26, i64 24}
!22 = !{!"_ZTSSt6vectorISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSN18TraitResolveCommon14CachedBoundCmpE"}
!27 = !{!"_ZTSN3HIR10SimplePathE", !28, i64 0}
!28 = !{!"_ZTS10ThinVectorI8RcStringE", !6, i64 0}
!29 = !{!"_ZTSSt6vectorISt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS2_EESaIS5_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS2_EESaIS5_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS2_EESaIS5_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS2_EESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!34, !34, i64 0}
!34 = !{!"_ZTSN3HIR7CompareE", !7, i64 0}


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

%"struct.HMTypeInferrence::ResolvePlaceholders" = type { %"class.HIR::ResolvePlaceholders", ptr }
%"class.HIR::ResolvePlaceholders" = type { ptr }
%"class.RangeVecMap<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound, TraitResolveCommon::CachedBoundCmp>::const_iterator" = type { %"class.__gnu_cxx::__normal_iterator.224" }
%"class.__gnu_cxx::__normal_iterator.224" = type { ptr }

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK16HMTypeInferrence22callback_resolve_inferEv(ptr dead_on_unwind noalias writable sret(%"struct.HMTypeInferrence::ResolvePlaceholders") align 8, ptr noundef nonnull align 8 dereferenceable(49)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK15TraitResolution21iterate_bounds_traitsERK4SpanRKN3HIR7TypeRefESt8functionIFbNS3_7CompareES6_RKNS3_11GenericPathERKN18TraitResolveCommon11CachedBoundEEE(ptr noundef nonnull align 8 dereferenceable(280) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef %3) local_unnamed_addr #2 align 2 {
  %5 = alloca %"class.RangeVecMap<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound, TraitResolveCommon::CachedBoundCmp>::const_iterator", align 8
  %6 = alloca %"class.RangeVecMap<std::pair<HIR::TypeRef, HIR::GenericPath>, TraitResolveCommon::CachedBound, TraitResolveCommon::CachedBoundCmp>::const_iterator", align 8
  %7 = alloca %"struct.HMTypeInferrence::ResolvePlaceholders", align 8
  %8 = getelementptr inbounds i8, ptr %0, i64 72
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %9 = tail call ptr @_ZNK11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE5beginEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
  store ptr %9, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %10 = tail call ptr @_ZNK11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE3endEv(ptr noundef nonnull align 8 dereferenceable(25) %8)
  store ptr %10, ptr %6, align 8
  %11 = call noundef zeroext i1 @_ZNK11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE14const_iteratorneERKS9_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %12 = getelementptr inbounds i8, ptr %0, i64 224
  br label %13

13:                                               ; preds = %.lr.ph, %22
  %14 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZN11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE14const_iteratordeEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  %15 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZNK16HMTypeInferrence22callback_resolve_inferEv(ptr dead_on_unwind nonnull writable sret(%"struct.HMTypeInferrence::ResolvePlaceholders") align 8 %7, ptr noundef nonnull align 8 dereferenceable(49) %15)
  %16 = call noundef i32 @_ZNK3HIR7TypeRef25compare_with_placeholdersERK4SpanRKS0_RKNS_19ResolvePlaceholdersE(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  %17 = icmp eq i32 %16, 2
  br i1 %17, label %22, label %18

18:                                               ; preds = %13
  %19 = getelementptr inbounds i8, ptr %14, i64 8
  %20 = getelementptr inbounds i8, ptr %14, i64 40
  %21 = call noundef zeroext i1 @_ZNKSt8functionIFbN3HIR7CompareERKNS0_7TypeRefERKNS0_11GenericPathERKN18TraitResolveCommon11CachedBoundEEEclES1_S4_S7_SB_(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %16, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(152) %20)
  br i1 %21, label %._crit_edge, label %22

22:                                               ; preds = %13, %18
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE14const_iteratorppEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
  %24 = call noundef zeroext i1 @_ZNK11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE14const_iteratorneERKS9_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  br i1 %24, label %13, label %._crit_edge

._crit_edge:                                      ; preds = %22, %18, %4
  %.lcssa = phi i1 [ false, %4 ], [ true, %18 ], [ false, %22 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  ret i1 %.lcssa
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNKSt8functionIFbN3HIR7CompareERKNS0_7TypeRefERKNS0_11GenericPathERKN18TraitResolveCommon11CachedBoundEEEclES1_S4_S7_SB_(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !8, i64 224}
!6 = !{!"_ZTS15TraitResolution", !7, i64 0, !8, i64 216, !8, i64 224, !8, i64 232, !8, i64 240, !8, i64 248, !28, i64 256}
!7 = !{!"_ZTS18TraitResolveCommon", !8, i64 0, !8, i64 8, !8, i64 16, !11, i64 24, !20, i64 72, !26, i64 104, !26, i64 112, !26, i64 120, !26, i64 128, !26, i64 136, !26, i64 144, !26, i64 152, !26, i64 160, !26, i64 168, !26, i64 176, !26, i64 184, !26, i64 192, !26, i64 200, !26, i64 208}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSSt3mapIN3HIR7TypeRefEN18TraitResolveCommon14CachedEqualityESt4lessIS1_ESaISt4pairIKS1_S3_EEE", !12, i64 0}
!12 = !{!"_ZTSSt8_Rb_treeIN3HIR7TypeRefESt4pairIKS1_N18TraitResolveCommon14CachedEqualityEESt10_Select1stIS6_ESt4lessIS1_ESaIS6_EE", !13, i64 0}
!13 = !{!"_ZTSNSt8_Rb_treeIN3HIR7TypeRefESt4pairIKS1_N18TraitResolveCommon14CachedEqualityEESt10_Select1stIS6_ESt4lessIS1_ESaIS6_EE13_Rb_tree_implISA_Lb1EEE", !14, i64 0, !16, i64 8}
!14 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN3HIR7TypeRefEEE", !15, i64 0}
!15 = !{!"_ZTSSt4lessIN3HIR7TypeRefEE"}
!16 = !{!"_ZTSSt15_Rb_tree_header", !17, i64 0, !19, i64 32}
!17 = !{!"_ZTSSt18_Rb_tree_node_base", !18, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!18 = !{!"_ZTSSt14_Rb_tree_color", !9, i64 0}
!19 = !{!"long", !9, i64 0}
!20 = !{!"_ZTS11RangeVecMapISt4pairIN3HIR7TypeRefENS1_11GenericPathEEN18TraitResolveCommon11CachedBoundENS5_14CachedBoundCmpEE", !21, i64 0, !25, i64 24}
!21 = !{!"_ZTSSt6vectorISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrISt4pairIS1_IN3HIR7TypeRefENS2_11GenericPathEEN18TraitResolveCommon11CachedBoundEESt14default_deleteIS8_EESaISB_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!25 = !{!"_ZTSN18TraitResolveCommon14CachedBoundCmpE"}
!26 = !{!"_ZTSN3HIR10SimplePathE", !27, i64 0}
!27 = !{!"_ZTS10ThinVectorI8RcStringE", !8, i64 0}
!28 = !{!"_ZTSSt6vectorISt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS2_EESaIS5_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS2_EESaIS5_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS2_EESaIS5_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS2_EESaIS5_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}


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