; LLVM IR from thepowersgang/mrustc :: src/mir (optimise)

; 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.TraceLog = type { ptr, %"class.std::function" }
%"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.636 = type { i8 }
%class.anon.638 = type { ptr }
%"class.std::vector.25" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.190" = type { i8 }
%"class.std::function.607" = type { %"class.std::_Function_base", ptr }
%class.anon.639 = type { ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.MIR::Terminator" = type { i32, %"union.MIR::Terminator::DataUnion" }
%"union.MIR::Terminator::DataUnion" = type { %"struct.MIR::Terminator::Data_Call" }
%"struct.MIR::Terminator::Data_Call" = type { i32, i32, %"struct.MIR::LValue", %"class.MIR::CallTarget", %"class.std::vector.138" }
%"struct.MIR::LValue" = type { %"class.MIR::LValue::Storage", %"class.std::vector.106" }
%"class.MIR::LValue::Storage" = type { i64 }
%"class.std::vector.106" = type { %"struct.std::_Vector_base.107" }
%"struct.std::_Vector_base.107" = type { %"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl" }
%"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl" = type { %"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.MIR::CallTarget" = type { i32, %"union.MIR::CallTarget::DataUnion" }
%"union.MIR::CallTarget::DataUnion" = type { %"class.HIR::Path" }
%"class.HIR::Path" = type { %"class.HIR::Path::Data" }
%"class.HIR::Path::Data" = type { i32, %"union.HIR::Path::Data::DataUnion" }
%"union.HIR::Path::Data::DataUnion" = type { %"struct.HIR::Path::Data::Data_UfcsKnown" }
%"struct.HIR::Path::Data::Data_UfcsKnown" = type { %"class.HIR::TypeRef", %"class.HIR::GenericPath", %class.RcString, %"struct.HIR::PathParams", %"class.std::unique_ptr" }
%"class.HIR::TypeRef" = type { ptr }
%"class.HIR::GenericPath" = type { %"struct.HIR::SimplePath", %"struct.HIR::PathParams" }
%"struct.HIR::SimplePath" = type { %class.ThinVector }
%class.ThinVector = type { ptr }
%class.RcString = type { ptr }
%"struct.HIR::PathParams" = type { %class.ThinVector.133, %class.ThinVector.134, %class.ThinVector.135 }
%class.ThinVector.133 = type { ptr }
%class.ThinVector.134 = type { ptr }
%class.ThinVector.135 = type { 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.137" }
%"struct.std::_Head_base.137" = type { ptr }
%"class.std::vector.138" = type { %"struct.std::_Vector_base.139" }
%"struct.std::_Vector_base.139" = type { %"struct.std::_Vector_base<MIR::Param, std::allocator<MIR::Param>>::_Vector_impl" }
%"struct.std::_Vector_base<MIR::Param, std::allocator<MIR::Param>>::_Vector_impl" = type { %"struct.std::_Vector_base<MIR::Param, std::allocator<MIR::Param>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MIR::Param, std::allocator<MIR::Param>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.MIR::Terminator::Data_Incomplete" = type { i8 }
%"class.MIR::Function" = type { %"class.std::vector.20", %"class.std::vector.25", %"class.std::vector.29", %"class.MIR::EnumCachePtr" }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl" }
%"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl" = type { %"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl_data" }
%"struct.std::_Vector_base<HIR::TypeRef, std::allocator<HIR::TypeRef>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.29" = type { %"struct.std::_Vector_base.30" }
%"struct.std::_Vector_base.30" = type { %"struct.std::_Vector_base<MIR::BasicBlock, std::allocator<MIR::BasicBlock>>::_Vector_impl" }
%"struct.std::_Vector_base<MIR::BasicBlock, std::allocator<MIR::BasicBlock>>::_Vector_impl" = type { %"struct.std::_Vector_base<MIR::BasicBlock, std::allocator<MIR::BasicBlock>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MIR::BasicBlock, std::allocator<MIR::BasicBlock>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.MIR::EnumCachePtr" = type { ptr }
%"struct.MIR::BasicBlock" = type { %"class.std::vector.101", %"class.MIR::Terminator" }
%"class.std::vector.101" = type { %"struct.std::_Vector_base.102" }
%"struct.std::_Vector_base.102" = type { %"struct.std::_Vector_base<MIR::Statement, std::allocator<MIR::Statement>>::_Vector_impl" }
%"struct.std::_Vector_base<MIR::Statement, std::allocator<MIR::Statement>>::_Vector_impl" = type { %"struct.std::_Vector_base<MIR::Statement, std::allocator<MIR::Statement>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MIR::Statement, std::allocator<MIR::Statement>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@g_debug_indent_level = external global i32, align 4
@__func__._Z35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS_8FunctionE = external hidden unnamed_addr constant [36 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [9 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare noundef zeroext i1 @_Z13debug_enabledv() #1

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

; Function Attrs: nounwind
declare void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEES5_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef, ptr noundef) unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull align 8 dereferenceable(96) %1) #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca %class.TraceLog, align 8
  %7 = alloca %"class.std::function", align 8
  %8 = alloca %class.anon.636, align 1
  %9 = alloca %"class.std::function", align 8
  %10 = alloca %class.anon.638, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::vector.25", align 8
  %14 = alloca %"class.std::allocator.190", align 1
  %15 = alloca %"class.std::function.607", align 8
  %16 = alloca %class.anon.639, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.std::_Bit_reference", align 8
  %20 = alloca %"class.MIR::Terminator", align 8
  %21 = alloca %"struct.MIR::Terminator::Data_Incomplete", align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #6
  store i8 0, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #6
  %22 = call noundef zeroext i1 @_Z13debug_enabledv()
  %23 = zext i1 %22 to i64
  %24 = select i1 %22, ptr @__func__._Z35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS_8FunctionE, ptr null
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #6
  call void @"_ZNSt8functionIFvRSoEEC2IZ35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS4_8FunctionEE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %25 = getelementptr inbounds %class.anon.638, ptr %10, i32 0, i32 0
  store ptr %5, ptr %25, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvRSoEEC2IZ35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS4_8FunctionEE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  invoke void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEES5_(ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef %24, ptr noundef %7, ptr noundef %9)
          to label %26 unwind label %41

26:                                               ; preds = %2
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #6
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %"class.MIR::Function", ptr %27, i32 0, i32 2
  %29 = call noundef i64 @_ZNKSt6vectorIN3MIR10BasicBlockESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %13, i64 noundef %29, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %30 unwind label %45

30:                                               ; preds = %26
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %33 = getelementptr inbounds %class.anon.639, ptr %16, i32 0, i32 0
  store ptr %13, ptr %33, align 8, !tbaa !5
  call void @"_ZNSt8functionIFvjRKN3MIR10BasicBlockEEEC2IZ35MIR_Optimise_GarbageCollect_PartialRNS0_11TypeResolveERNS0_8FunctionEE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  invoke void @_ZN12_GLOBAL__N_112visit_blocksERN3MIR11TypeResolveERKNS0_8FunctionESt8functionIFvjRKNS0_10BasicBlockEEE(ptr noundef nonnull align 8 dereferenceable(120) %31, ptr noundef nonnull align 8 dereferenceable(96) %32, ptr noundef %15)
          to label %34 unwind label %49

34:                                               ; preds = %30
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !11
  br label %35

35:                                               ; preds = %125, %34
  %36 = load i32, ptr %17, align 4, !tbaa !11
  %37 = zext i32 %36 to i64
  %38 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  %39 = icmp ult i64 %37, %38
  br i1 %39, label %53, label %40

40:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %129

41:                                               ; preds = %2
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %11, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %12, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #6
  br label %134

45:                                               ; preds = %26
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %11, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %12, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  br label %133

49:                                               ; preds = %30
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %11, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %12, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %132

53:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %"class.MIR::Function", ptr %54, i32 0, i32 2
  %56 = load i32, ptr %17, align 4, !tbaa !11
  %57 = zext i32 %56 to i64
  %58 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNSt6vectorIN3MIR10BasicBlockESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %57) #6
  store ptr %58, ptr %18, align 8, !tbaa !5
  %59 = load ptr, ptr %18, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.MIR::BasicBlock", ptr %59, i32 0, i32 1
  %61 = invoke noundef zeroext i1 @_ZNK3MIR10Terminator13is_IncompleteEv(ptr noundef nonnull align 8 dereferenceable(168) %60)
          to label %62 unwind label %68

62:                                               ; preds = %53
  br i1 %61, label %63, label %72

63:                                               ; preds = %62
  %64 = load ptr, ptr %18, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.MIR::BasicBlock", ptr %64, i32 0, i32 0
  %66 = call noundef zeroext i1 @_ZNKSt6vectorIN3MIR9StatementESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %65) #6
  br i1 %66, label %67, label %72

67:                                               ; preds = %63
  br label %124

68:                                               ; preds = %101, %99, %96, %94, %91, %88, %53
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %11, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %12, align 4
  br label %128

72:                                               ; preds = %63, %62
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %73 = load i32, ptr %17, align 4, !tbaa !11
  %74 = zext i32 %73 to i64
  %75 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %13, i64 noundef %74)
          to label %76 unwind label %83

76:                                               ; preds = %72
  %77 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %78 = extractvalue { ptr, i64 } %75, 0
  store ptr %78, ptr %77, align 8
  %79 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %80 = extractvalue { ptr, i64 } %75, 1
  store i64 %80, ptr %79, align 8
  %81 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %19) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  br i1 %81, label %82, label %87

82:                                               ; preds = %76
  br label %123

83:                                               ; preds = %72
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %11, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  br label %128

87:                                               ; preds = %76
  br label %88

88:                                               ; preds = %87
  %89 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %90 unwind label %68

90:                                               ; preds = %88
  br i1 %89, label %91, label %104

91:                                               ; preds = %90
  %92 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !11
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %92, ptr noundef @__func__._Z35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS_8FunctionE)
          to label %94 unwind label %68

94:                                               ; preds = %91
  %95 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %93, ptr noundef @.str.152)
          to label %96 unwind label %68

96:                                               ; preds = %94
  %97 = load i32, ptr %17, align 4, !tbaa !11
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %95, i32 noundef %97)
          to label %99 unwind label %68

99:                                               ; preds = %96
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) %98, ptr noundef @_ZSt3decRSt8ios_base)
          to label %101 unwind label %68

101:                                              ; preds = %99
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %100, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %103 unwind label %68

103:                                              ; preds = %101
  br label %104

104:                                              ; preds = %103, %90
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105
  %107 = load ptr, ptr %18, align 8, !tbaa !5
  %108 = getelementptr inbounds %"struct.MIR::BasicBlock", ptr %107, i32 0, i32 0
  call void @_ZNSt6vectorIN3MIR9StatementESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %108) #6
  call void @llvm.lifetime.start.p0(i64 168, ptr %20) #6
  invoke void @_ZN3MIR10Terminator15make_IncompleteENS0_15Data_IncompleteE(ptr dead_on_unwind writable sret(%"class.MIR::Terminator") align 8 %20)
          to label %109 unwind label %114

109:                                              ; preds = %106
  %110 = load ptr, ptr %18, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.MIR::BasicBlock", ptr %110, i32 0, i32 1
  %112 = invoke noundef nonnull align 8 dereferenceable(168) ptr @_ZN3MIR10TerminatoraSEOS0_(ptr noundef nonnull align 8 dereferenceable(168) %111, ptr noundef nonnull align 8 dereferenceable(168) %20)
          to label %113 unwind label %118

113:                                              ; preds = %109
  call void @_ZN3MIR10TerminatorD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %20) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr %20) #6
  store i8 1, ptr %5, align 1, !tbaa !9
  br label %123

114:                                              ; preds = %106
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %11, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %12, align 4
  br label %122

118:                                              ; preds = %109
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %11, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %12, align 4
  call void @_ZN3MIR10TerminatorD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %20) #6
  br label %122

122:                                              ; preds = %118, %114
  call void @llvm.lifetime.end.p0(i64 168, ptr %20) #6
  br label %128

123:                                              ; preds = %113, %82
  br label %124

124:                                              ; preds = %123, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr %17, align 4, !tbaa !11
  %127 = add i32 %126, 1
  store i32 %127, ptr %17, align 4, !tbaa !11
  br label %35, !llvm.loop !13

128:                                              ; preds = %122, %83, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %132

129:                                              ; preds = %40
  %130 = load i8, ptr %5, align 1, !tbaa !9, !range !15, !noundef !16
  %131 = trunc i8 %130 to i1
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #6
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  ret i1 %131

132:                                              ; preds = %128, %49
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %13) #6
  br label %133

133:                                              ; preds = %132, %45
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #6
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #6
  br label %134

134:                                              ; preds = %133, %41
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  br label %135

135:                                              ; preds = %134
  %136 = load ptr, ptr %11, align 8
  %137 = load i32, ptr %12, align 4
  %138 = insertvalue { ptr, i32 } poison, ptr %136, 0
  %139 = insertvalue { ptr, i32 } %138, i32 %137, 1
  resume { ptr, i32 } %139
}

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3MIR10Terminator15make_IncompleteENS0_15Data_IncompleteE(ptr dead_on_unwind noalias writable sret(%"class.MIR::Terminator") align 8) #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_112visit_blocksERN3MIR11TypeResolveERKNS0_8FunctionESt8functionIFvjRKNS0_10BasicBlockEEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) #3

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 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 #5 = { 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 #6 = { 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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{i8 0, i8 2}
!16 = !{}


; 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.TraceLog = type { ptr, %"class.std::function" }
%"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.636 = type { i8 }
%class.anon.638 = type { ptr }
%"class.std::vector.25" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.190" = type { i8 }
%"class.std::function.607" = type { %"class.std::_Function_base", ptr }
%class.anon.639 = type { ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%"class.MIR::Terminator" = type { i32, %"union.MIR::Terminator::DataUnion" }
%"union.MIR::Terminator::DataUnion" = type { %"struct.MIR::Terminator::Data_Call" }
%"struct.MIR::Terminator::Data_Call" = type { i32, i32, %"struct.MIR::LValue", %"class.MIR::CallTarget", %"class.std::vector.138" }
%"struct.MIR::LValue" = type { %"class.MIR::LValue::Storage", %"class.std::vector.106" }
%"class.MIR::LValue::Storage" = type { i64 }
%"class.std::vector.106" = type { %"struct.std::_Vector_base.107" }
%"struct.std::_Vector_base.107" = type { %"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl" }
%"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl" = type { %"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MIR::LValue::Wrapper, std::allocator<MIR::LValue::Wrapper>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.MIR::CallTarget" = type { i32, %"union.MIR::CallTarget::DataUnion" }
%"union.MIR::CallTarget::DataUnion" = type { %"class.HIR::Path" }
%"class.HIR::Path" = type { %"class.HIR::Path::Data" }
%"class.HIR::Path::Data" = type { i32, %"union.HIR::Path::Data::DataUnion" }
%"union.HIR::Path::Data::DataUnion" = type { %"struct.HIR::Path::Data::Data_UfcsKnown" }
%"struct.HIR::Path::Data::Data_UfcsKnown" = type { %"class.HIR::TypeRef", %"class.HIR::GenericPath", %class.RcString, %"struct.HIR::PathParams", %"class.std::unique_ptr" }
%"class.HIR::TypeRef" = type { ptr }
%"class.HIR::GenericPath" = type { %"struct.HIR::SimplePath", %"struct.HIR::PathParams" }
%"struct.HIR::SimplePath" = type { %class.ThinVector }
%class.ThinVector = type { ptr }
%class.RcString = type { ptr }
%"struct.HIR::PathParams" = type { %class.ThinVector.133, %class.ThinVector.134, %class.ThinVector.135 }
%class.ThinVector.133 = type { ptr }
%class.ThinVector.134 = type { ptr }
%class.ThinVector.135 = type { 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.137" }
%"struct.std::_Head_base.137" = type { ptr }
%"class.std::vector.138" = type { %"struct.std::_Vector_base.139" }
%"struct.std::_Vector_base.139" = type { %"struct.std::_Vector_base<MIR::Param, std::allocator<MIR::Param>>::_Vector_impl" }
%"struct.std::_Vector_base<MIR::Param, std::allocator<MIR::Param>>::_Vector_impl" = type { %"struct.std::_Vector_base<MIR::Param, std::allocator<MIR::Param>>::_Vector_impl_data" }
%"struct.std::_Vector_base<MIR::Param, std::allocator<MIR::Param>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@g_debug_indent_level = external local_unnamed_addr global i32, align 4
@__func__._Z35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS_8FunctionE = external hidden unnamed_addr constant [36 x i8], align 1
@.str.152 = external hidden unnamed_addr constant [9 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare noundef zeroext i1 @_Z13debug_enabledv() local_unnamed_addr #1

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

; Function Attrs: nounwind
declare void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #2

declare void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEES5_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef, ptr noundef) unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS_8FunctionE(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull align 8 dereferenceable(96) %1) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca i8, align 1
  %4 = alloca %class.TraceLog, align 8
  %5 = alloca %"class.std::function", align 8
  %6 = alloca %class.anon.636, align 1
  %7 = alloca %"class.std::function", align 8
  %8 = alloca %class.anon.638, align 8
  %9 = alloca %"class.std::vector.25", align 8
  %10 = alloca %"class.std::allocator.190", align 1
  %11 = alloca %"class.std::function.607", align 8
  %12 = alloca %class.anon.639, align 8
  %13 = alloca %"struct.std::_Bit_reference", align 8
  %14 = alloca %"class.MIR::Terminator", align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  store i8 0, ptr %3, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #6
  %15 = tail call noundef zeroext i1 @_Z13debug_enabledv()
  %16 = select i1 %15, ptr @__func__._Z35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS_8FunctionE, ptr null
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @"_ZNSt8functionIFvRSoEEC2IZ35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS4_8FunctionEE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  store ptr %3, ptr %8, align 8, !tbaa !9
  call void @"_ZNSt8functionIFvRSoEEC2IZ35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS4_8FunctionEE3$_1vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  invoke void @_ZN8TraceLogC1EPKcSt8functionIFvRSoEES5_(ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef %16, ptr noundef nonnull %5, ptr noundef nonnull %7)
          to label %17 unwind label %26

17:                                               ; preds = %2
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #6
  %18 = getelementptr inbounds i8, ptr %1, i64 64
  %19 = call noundef i64 @_ZNKSt6vectorIN3MIR10BasicBlockESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #6
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %9, i64 noundef %19, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %20 unwind label %28

20:                                               ; preds = %17
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  store ptr %9, ptr %12, align 8, !tbaa !9
  call void @"_ZNSt8functionIFvjRKN3MIR10BasicBlockEEEC2IZ35MIR_Optimise_GarbageCollect_PartialRNS0_11TypeResolveERNS0_8FunctionEE3$_2vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  invoke void @_ZN12_GLOBAL__N_112visit_blocksERN3MIR11TypeResolveERKNS0_8FunctionESt8functionIFvjRKNS0_10BasicBlockEEE(ptr noundef nonnull align 8 dereferenceable(120) %0, ptr noundef nonnull align 8 dereferenceable(96) %1, ptr noundef nonnull %11)
          to label %21 unwind label %30

21:                                               ; preds = %20
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  %22 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %9) #6
  %.not = icmp eq i64 %22, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %21
  %23 = getelementptr inbounds i8, ptr %13, i64 8
  br label %32

._crit_edge:                                      ; preds = %72, %21
  %24 = load i8, ptr %3, align 1, !tbaa !5, !range !11, !noundef !12
  %25 = trunc nuw i8 %24 to i1
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #6
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  ret i1 %25

26:                                               ; preds = %2
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  br label %79

28:                                               ; preds = %17
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #6
  br label %78

30:                                               ; preds = %20
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  br label %77

32:                                               ; preds = %.lr.ph, %72
  %33 = phi i64 [ 0, %.lr.ph ], [ %74, %72 ]
  %.01426 = phi i32 [ 0, %.lr.ph ], [ %73, %72 ]
  %34 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZNSt6vectorIN3MIR10BasicBlockESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %33) #6
  %35 = getelementptr inbounds i8, ptr %34, i64 24
  %36 = call noundef zeroext i1 @_ZNK3MIR10Terminator13is_IncompleteEv(ptr noundef nonnull align 8 dereferenceable(168) %35)
  br i1 %36, label %37, label %41

37:                                               ; preds = %32
  %38 = call noundef zeroext i1 @_ZNKSt6vectorIN3MIR9StatementESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #6
  br i1 %38, label %72, label %41

39:                                               ; preds = %61, %59, %57, %55, %52, %49
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %77

41:                                               ; preds = %37, %32
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  %42 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %9, i64 noundef %33)
          to label %43 unwind label %47

43:                                               ; preds = %41
  %44 = extractvalue { ptr, i64 } %42, 0
  store ptr %44, ptr %13, align 8
  %45 = extractvalue { ptr, i64 } %42, 1
  store i64 %45, ptr %23, align 8
  %46 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  br i1 %46, label %72, label %49

47:                                               ; preds = %41
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  br label %77

49:                                               ; preds = %43
  %50 = invoke noundef zeroext i1 @_Z13debug_enabledv()
          to label %51 unwind label %39

51:                                               ; preds = %49
  br i1 %50, label %52, label %63

52:                                               ; preds = %51
  %53 = load i32, ptr @g_debug_indent_level, align 4, !tbaa !13
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_Z12debug_outputiPKc(i32 noundef %53, ptr noundef nonnull @__func__._Z35MIR_Optimise_GarbageCollect_PartialRN3MIR11TypeResolveERNS_8FunctionE)
          to label %55 unwind label %39

55:                                               ; preds = %52
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull @.str.152)
          to label %57 unwind label %39

57:                                               ; preds = %55
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %56, i32 noundef %.01426)
          to label %59 unwind label %39

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

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

63:                                               ; preds = %61, %51
  call void @_ZNSt6vectorIN3MIR9StatementESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %34) #6
  call void @llvm.lifetime.start.p0(i64 168, ptr nonnull %14) #6
  invoke void @_ZN3MIR10Terminator15make_IncompleteENS0_15Data_IncompleteE(ptr dead_on_unwind nonnull writable sret(%"class.MIR::Terminator") align 8 %14)
          to label %64 unwind label %67

64:                                               ; preds = %63
  %65 = invoke noundef nonnull align 8 dereferenceable(168) ptr @_ZN3MIR10TerminatoraSEOS0_(ptr noundef nonnull align 8 dereferenceable(168) %35, ptr noundef nonnull align 8 dereferenceable(168) %14)
          to label %66 unwind label %69

66:                                               ; preds = %64
  call void @_ZN3MIR10TerminatorD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %14) #6
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %14) #6
  store i8 1, ptr %3, align 1, !tbaa !5
  br label %72

67:                                               ; preds = %63
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %71

69:                                               ; preds = %64
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3MIR10TerminatorD2Ev(ptr noundef nonnull align 8 dereferenceable(168) %14) #6
  br label %71

71:                                               ; preds = %69, %67
  %.pn = phi { ptr, i32 } [ %70, %69 ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 168, ptr nonnull %14) #6
  br label %77

72:                                               ; preds = %66, %43, %37
  %73 = add i32 %.01426, 1
  %74 = zext i32 %73 to i64
  %75 = call noundef i64 @_ZNKSt6vectorIbSaIbEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(40) %9) #6
  %76 = icmp ugt i64 %75, %74
  br i1 %76, label %32, label %._crit_edge, !llvm.loop !15

77:                                               ; preds = %39, %47, %71, %30
  %.pn.pn.pn = phi { ptr, i32 } [ %31, %30 ], [ %.pn, %71 ], [ %40, %39 ], [ %48, %47 ]
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #6
  br label %78

78:                                               ; preds = %77, %28
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %77 ], [ %29, %28 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #6
  call void @_ZN8TraceLogD1Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #6
  br label %79

79:                                               ; preds = %78, %26
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %78 ], [ %27, %26 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3MIR10Terminator15make_IncompleteENS0_15Data_IncompleteE(ptr dead_on_unwind noalias writable sret(%"class.MIR::Terminator") align 8) local_unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_112visit_blocksERN3MIR11TypeResolveERKNS0_8FunctionESt8functionIFvjRKNS0_10BasicBlockEEE(ptr noundef nonnull align 8 dereferenceable(120), ptr noundef nonnull align 8 dereferenceable(96), ptr noundef) local_unnamed_addr #3

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 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 #5 = { 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 #6 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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