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

; 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.__gnu_cxx::__normal_iterator.25" = type { ptr }
%"class.HIR::TypeRef" = type { ptr }
%struct.Span = type { ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.90 = type { ptr, ptr }
%class.HMTypeInferrence = type <{ %"class.std::vector", %"class.std::vector.0", i8, [7 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<HMTypeInferrence::IVar, std::allocator<HMTypeInferrence::IVar>>::_Vector_impl" }
%"struct.std::_Vector_base<HMTypeInferrence::IVar, std::allocator<HMTypeInferrence::IVar>>::_Vector_impl" = type { %"struct.std::_Vector_base<HMTypeInferrence::IVar, std::allocator<HMTypeInferrence::IVar>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HMTypeInferrence::IVar, std::allocator<HMTypeInferrence::IVar>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<HMTypeInferrence::IVarValue, std::allocator<HMTypeInferrence::IVarValue>>::_Vector_impl" }
%"struct.std::_Vector_base<HMTypeInferrence::IVarValue, std::allocator<HMTypeInferrence::IVarValue>>::_Vector_impl" = type { %"struct.std::_Vector_base<HMTypeInferrence::IVarValue, std::allocator<HMTypeInferrence::IVarValue>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HMTypeInferrence::IVarValue, std::allocator<HMTypeInferrence::IVarValue>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.HMTypeInferrence::IVar" = type { i32, %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.6" }
%"struct.std::_Head_base.6" = type { ptr }

@g_debug_indent_level = external global i32, align 4
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@__FUNCTION__._ZN16HMTypeInferrence13compact_ivarsEv = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [81 x i8], align 1
@__PRETTY_FUNCTION__._ZN16HMTypeInferrence13compact_ivarsEv = external hidden unnamed_addr constant [39 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZTISt13runtime_error = external constant ptr

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

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

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

declare noundef zeroext i1 @_Z13debug_enabledv() #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)) #3

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16HMTypeInferrence13compact_ivarsEv(ptr noundef nonnull align 8 dereferenceable(49) %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.HIR::TypeRef", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.Span, align 8
  %14 = alloca %"class.std::function", align 8
  %15 = alloca %class.anon.90, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %16 = load ptr, ptr %2, align 8
  call void @_ZN16HMTypeInferrence15check_for_loopsEv(ptr noundef nonnull align 8 dereferenceable(49) %16)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %17 = getelementptr inbounds %class.HMTypeInferrence, ptr %16, i32 0, i32 0
  store ptr %17, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = call ptr @_ZNSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  %20 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.25", ptr %5, i32 0, i32 0
  store ptr %19, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = call ptr @_ZNSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #8
  %23 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.25", ptr %6, i32 0, i32 0
  store ptr %22, ptr %23, align 8
  br label %24

24:                                               ; preds = %134, %1
  %25 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN16HMTypeInferrence4IVarESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br i1 %25, label %27, label %26

26:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  br label %137

27:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN16HMTypeInferrence4IVarESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  store ptr %28, ptr %7, align 8, !tbaa !5
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = call noundef zeroext i1 @_ZNK16HMTypeInferrence4IVar8is_aliasEv(ptr noundef nonnull align 8 dereferenceable(16) %29)
  br i1 %30, label %74, label %31

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.HMTypeInferrence::IVar", ptr %32, i32 0, i32 1
  %34 = call noundef ptr @_ZNKSt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %33) #8
  call void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %34)
  br label %35

35:                                               ; preds = %31
  %36 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %37 unwind label %62

37:                                               ; preds = %35
  br i1 %36, label %38, label %66

38:                                               ; preds = %37
  %39 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !9
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %39, ptr noundef @__FUNCTION__._ZN16HMTypeInferrence13compact_ivarsEv)
          to label %41 unwind label %62

41:                                               ; preds = %38
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef @.str.3)
          to label %43 unwind label %62

43:                                               ; preds = %41
  %44 = load i32, ptr %3, align 4, !tbaa !9
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %42, i32 noundef %44)
          to label %46 unwind label %62

46:                                               ; preds = %43
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef @.str.4)
          to label %48 unwind label %62

48:                                               ; preds = %46
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.HMTypeInferrence::IVar", ptr %49, i32 0, i32 1
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS1_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #8
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(8) %51)
          to label %53 unwind label %62

53:                                               ; preds = %48
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef @.str.5)
          to label %55 unwind label %62

55:                                               ; preds = %53
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %57 unwind label %62

57:                                               ; preds = %55
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef @_ZSt3decRSt8ios_base)
          to label %59 unwind label %62

59:                                               ; preds = %57
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %61 unwind label %62

61:                                               ; preds = %59
  br label %66

62:                                               ; preds = %68, %59, %57, %55, %53, %48, %46, %43, %41, %38, %35
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %9, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %10, align 4
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %136

66:                                               ; preds = %61, %37
  br label %67

67:                                               ; preds = %66
  br label %68

68:                                               ; preds = %67
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.HMTypeInferrence::IVar", ptr %69, i32 0, i32 1
  %71 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS1_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %70) #8
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIR7TypeRefaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %73 unwind label %62

73:                                               ; preds = %68
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %131

74:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.HMTypeInferrence::IVar", ptr %75, i32 0, i32 0
  %77 = load i32, ptr %76, align 8, !tbaa !11
  store i32 %77, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !9
  %78 = load i32, ptr %11, align 4, !tbaa !9
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds %class.HMTypeInferrence, ptr %16, i32 0, i32 0
  %81 = call noundef i64 @_ZNKSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %80) #8
  %82 = icmp ult i64 %79, %81
  br i1 %82, label %83, label %84

83:                                               ; preds = %74
  br label %86

84:                                               ; preds = %74
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.7, i32 noundef 211, ptr noundef @__PRETTY_FUNCTION__._ZN16HMTypeInferrence13compact_ivarsEv) #9
  unreachable

85:                                               ; No predecessors!
  br label %86

86:                                               ; preds = %85, %83
  br label %87

87:                                               ; preds = %123, %86
  %88 = getelementptr inbounds %class.HMTypeInferrence, ptr %16, i32 0, i32 0
  %89 = load i32, ptr %11, align 4, !tbaa !9
  %90 = zext i32 %89 to i64
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %88, i64 noundef %90)
  %92 = call noundef zeroext i1 @_ZNK16HMTypeInferrence4IVar8is_aliasEv(ptr noundef nonnull align 8 dereferenceable(16) %91)
  br i1 %92, label %93, label %126

93:                                               ; preds = %87
  %94 = getelementptr inbounds %class.HMTypeInferrence, ptr %16, i32 0, i32 0
  %95 = load i32, ptr %11, align 4, !tbaa !9
  %96 = zext i32 %95 to i64
  %97 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef %96)
  %98 = getelementptr inbounds %"struct.HMTypeInferrence::IVar", ptr %97, i32 0, i32 0
  %99 = load i32, ptr %98, align 8, !tbaa !11
  store i32 %99, ptr %11, align 4, !tbaa !9
  %100 = load i32, ptr %12, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds %class.HMTypeInferrence, ptr %16, i32 0, i32 0
  %103 = call noundef i64 @_ZNKSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #8
  %104 = icmp uge i64 %101, %103
  br i1 %104, label %105, label %123

105:                                              ; preds = %93
  call void @_ZNK16HMTypeInferrence4dumpEv(ptr noundef nonnull align 8 dereferenceable(49) %16)
  br label %106

106:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #8
  %107 = getelementptr inbounds %class.anon.90, ptr %15, i32 0, i32 0
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %108, ptr %107, align 8, !tbaa !5
  %109 = getelementptr inbounds %class.anon.90, ptr %15, i32 0, i32 1
  store ptr %11, ptr %109, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZN16HMTypeInferrence13compact_ivarsEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(16) %15) #8
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %14)
          to label %110 unwind label %113

110:                                              ; preds = %106
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  %111 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %111, ptr noundef @.str.8)
          to label %112 unwind label %117

112:                                              ; preds = %110
  call void @__cxa_throw(ptr %111, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #10
  unreachable

113:                                              ; preds = %106
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %9, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %10, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %130

117:                                              ; preds = %110
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %9, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %10, align 4
  call void @__cxa_free_exception(ptr %111) #8
  br label %130

121:                                              ; No predecessors!
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122, %93
  %124 = load i32, ptr %12, align 4, !tbaa !9
  %125 = add i32 %124, 1
  store i32 %125, ptr %12, align 4, !tbaa !9
  br label %87, !llvm.loop !19

126:                                              ; preds = %87
  %127 = load i32, ptr %11, align 4, !tbaa !9
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.HMTypeInferrence::IVar", ptr %128, i32 0, i32 0
  store i32 %127, ptr %129, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %131

130:                                              ; preds = %117, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %136

131:                                              ; preds = %126, %73
  %132 = load i32, ptr %3, align 4, !tbaa !9
  %133 = add i32 %132, 1
  store i32 %133, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %134

134:                                              ; preds = %131
  %135 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN16HMTypeInferrence4IVarESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #8
  br label %24

136:                                              ; preds = %130, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  br label %138

137:                                              ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  ret void

138:                                              ; preds = %136
  %139 = load ptr, ptr %9, align 8
  %140 = load i32, ptr %10, align 4
  %141 = insertvalue { ptr, i32 } poison, ptr %139, 0
  %142 = insertvalue { ptr, i32 } %141, i32 %140, 1
  resume { ptr, i32 } %142
}

declare void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

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

declare void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

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

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

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7

declare void @__cxa_throw(ptr, ptr, ptr)

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 #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 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN16HMTypeInferrence4IVarE", !10, i64 0, !13, i64 8}
!13 = !{!"_ZTSSt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS1_EE", !14, i64 0}
!14 = !{!"_ZTSSt15__uniq_ptr_dataIN3HIR7TypeRefESt14default_deleteIS1_ELb1ELb1EE", !15, i64 0}
!15 = !{!"_ZTSSt15__uniq_ptr_implIN3HIR7TypeRefESt14default_deleteIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt5tupleIJPN3HIR7TypeRefESt14default_deleteIS1_EEE", !17, i64 0}
!17 = !{!"_ZTSSt11_Tuple_implILm0EJPN3HIR7TypeRefESt14default_deleteIS1_EEE", !18, i64 0}
!18 = !{!"_ZTSSt10_Head_baseILm0EPN3HIR7TypeRefELb0EE", !6, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; 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.__gnu_cxx::__normal_iterator.25" = type { ptr }
%"class.HIR::TypeRef" = type { ptr }
%struct.Span = type { ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.90 = type { ptr, ptr }

@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@__FUNCTION__._ZN16HMTypeInferrence13compact_ivarsEv = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [81 x i8], align 1
@__PRETTY_FUNCTION__._ZN16HMTypeInferrence13compact_ivarsEv = external hidden unnamed_addr constant [39 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZTISt13runtime_error = external constant ptr

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

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

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

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #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 #3

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16HMTypeInferrence13compact_ivarsEv(ptr noundef nonnull align 8 dereferenceable(49) %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.25", align 8
  %4 = alloca %"class.HIR::TypeRef", align 8
  %5 = alloca i32, align 4
  %6 = alloca %struct.Span, align 8
  %7 = alloca %"class.std::function", align 8
  %8 = alloca %class.anon.90, align 8
  tail call void @_ZN16HMTypeInferrence15check_for_loopsEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %9 = tail call ptr @_ZNSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  store ptr %9, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %10 = tail call ptr @_ZNSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  store ptr %10, ptr %3, align 8
  %11 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN16HMTypeInferrence4IVarESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  br i1 %11, label %.lr.ph27, label %._crit_edge28

._crit_edge28:                                    ; preds = %74, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  ret void

.lr.ph27:                                         ; preds = %1, %74
  %.01824 = phi i32 [ %75, %74 ], [ 0, %1 ]
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN16HMTypeInferrence4IVarESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #8
  %13 = call noundef zeroext i1 @_ZNK16HMTypeInferrence4IVar8is_aliasEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
  br i1 %13, label %44, label %14

14:                                               ; preds = %.lr.ph27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %15 = getelementptr inbounds i8, ptr %12, i64 8
  %16 = call noundef ptr @_ZNKSt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  call void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind nonnull writable sret(%"class.HIR::TypeRef") align 8 %4, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %17 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %18 unwind label %39

18:                                               ; preds = %14
  br i1 %17, label %19, label %41

19:                                               ; preds = %18
  %20 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !5
  %21 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %20, ptr noundef nonnull @__FUNCTION__._ZN16HMTypeInferrence13compact_ivarsEv)
          to label %22 unwind label %39

22:                                               ; preds = %19
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull @.str.3)
          to label %24 unwind label %39

24:                                               ; preds = %22
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %23, i32 noundef %.01824)
          to label %26 unwind label %39

26:                                               ; preds = %24
  %27 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str.4)
          to label %28 unwind label %39

28:                                               ; preds = %26
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS1_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %29)
          to label %31 unwind label %39

31:                                               ; preds = %28
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull @.str.5)
          to label %33 unwind label %39

33:                                               ; preds = %31
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIRlsERSoRKNS_7TypeRefE(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %35 unwind label %39

35:                                               ; preds = %33
  %36 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull @_ZSt3decRSt8ios_base)
          to label %37 unwind label %39

37:                                               ; preds = %35
  %38 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %41 unwind label %39

39:                                               ; preds = %37, %35, %33, %31, %28, %26, %24, %22, %19, %14
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %78

41:                                               ; preds = %37, %18
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS1_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #8
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN3HIR7TypeRefaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @_ZN3HIR7TypeRefD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %74

44:                                               ; preds = %.lr.ph27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %45 = load i32, ptr %12, align 8, !tbaa !9
  %46 = zext i32 %45 to i64
  %47 = call noundef i64 @_ZNKSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  %48 = icmp ugt i64 %47, %46
  br i1 %48, label %.preheader, label %51

.preheader:                                       ; preds = %44
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %46)
  %50 = call noundef zeroext i1 @_ZNK16HMTypeInferrence4IVar8is_aliasEv(ptr noundef nonnull align 8 dereferenceable(16) %49)
  br i1 %50, label %.lr.ph, label %._crit_edge

51:                                               ; preds = %44
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i32 noundef 211, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN16HMTypeInferrence13compact_ivarsEv) #9
  unreachable

52:                                               ; preds = %.lr.ph
  %53 = add i32 %.023, 1
  %54 = zext i32 %60 to i64
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %54)
  %56 = call noundef zeroext i1 @_ZNK16HMTypeInferrence4IVar8is_aliasEv(ptr noundef nonnull align 8 dereferenceable(16) %55)
  br i1 %56, label %.lr.ph, label %._crit_edge, !llvm.loop !18

.lr.ph:                                           ; preds = %.preheader, %52
  %57 = phi i32 [ %60, %52 ], [ %45, %.preheader ]
  %.023 = phi i32 [ %53, %52 ], [ 0, %.preheader ]
  %58 = zext i32 %57 to i64
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %58)
  %60 = load i32, ptr %59, align 8, !tbaa !9
  store i32 %60, ptr %5, align 4, !tbaa !5
  %61 = zext i32 %.023 to i64
  %62 = call noundef i64 @_ZNKSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  %.not = icmp ugt i64 %62, %61
  br i1 %.not, label %52, label %63

63:                                               ; preds = %.lr.ph
  call void @_ZNK16HMTypeInferrence4dumpEv(ptr noundef nonnull align 8 dereferenceable(49) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  call void @_ZN4SpanC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  store ptr %12, ptr %8, align 8, !tbaa !20
  %64 = getelementptr inbounds i8, ptr %8, i64 8
  store ptr %5, ptr %64, align 8, !tbaa !20
  call void @"_ZNSt8functionIFvRSoEEC2IZN16HMTypeInferrence13compact_ivarsEvE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(16) %8) #8
  invoke void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull %7)
          to label %65 unwind label %68

65:                                               ; preds = %63
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @_ZN4SpanD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  %66 = call ptr @__cxa_allocate_exception(i64 16) #8
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull @.str.8)
          to label %67 unwind label %70

67:                                               ; preds = %65
  call void @__cxa_throw(ptr nonnull %66, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #10
  unreachable

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

70:                                               ; preds = %65
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %66) #8
  br label %73

._crit_edge:                                      ; preds = %52, %.preheader
  %72 = phi i32 [ %45, %.preheader ], [ %60, %52 ]
  store i32 %72, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  br label %74

73:                                               ; preds = %70, %68
  %.pn = phi { ptr, i32 } [ %71, %70 ], [ %69, %68 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  br label %78

74:                                               ; preds = %._crit_edge, %41
  %75 = add i32 %.01824, 1
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN16HMTypeInferrence4IVarESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #8
  %77 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN16HMTypeInferrence4IVarESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  br i1 %77, label %.lr.ph27, label %._crit_edge28

78:                                               ; preds = %73, %39
  %.pn.pn = phi { ptr, i32 } [ %.pn, %73 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn.pn
}

declare void @_ZNK3HIR7TypeRef5cloneEv(ptr dead_on_unwind writable sret(%"class.HIR::TypeRef") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorIN16HMTypeInferrence4IVarESaIS1_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #0 align 2

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

declare void @_ZNK4Span3bugESt8functionIFvRSoEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #7

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

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

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { 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 #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 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN16HMTypeInferrence4IVarE", !6, i64 0, !11, i64 8}
!11 = !{!"_ZTSSt10unique_ptrIN3HIR7TypeRefESt14default_deleteIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt15__uniq_ptr_dataIN3HIR7TypeRefESt14default_deleteIS1_ELb1ELb1EE", !13, i64 0}
!13 = !{!"_ZTSSt15__uniq_ptr_implIN3HIR7TypeRefESt14default_deleteIS1_EE", !14, i64 0}
!14 = !{!"_ZTSSt5tupleIJPN3HIR7TypeRefESt14default_deleteIS1_EEE", !15, i64 0}
!15 = !{!"_ZTSSt11_Tuple_implILm0EJPN3HIR7TypeRefESt14default_deleteIS1_EEE", !16, i64 0}
!16 = !{!"_ZTSSt10_Head_baseILm0EPN3HIR7TypeRefELb0EE", !17, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!17, !17, i64 0}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass