; LLVM IR from EricZinda/InductorHtn :: src/FXPlatform/Htn (HtnPlanner)

; 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.std::shared_ptr.110" = type { %"class.std::__shared_ptr.111" }
%"class.std::__shared_ptr.111" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.25" = type { %"class.std::__shared_ptr.26" }
%"class.std::__shared_ptr.26" = type { ptr, %"class.std::__shared_count" }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"struct.std::pair" = type { ptr, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>, std::allocator<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>, std::allocator<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>, std::allocator<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>, std::allocator<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.122" = type { ptr }
%class.HtnPlanner = type { %class.HtnDomain, %"class.std::multimap", i32, %"class.std::map.82", %"class.std::shared_ptr.87", i64 }
%class.HtnDomain = type { ptr }
%"class.std::multimap" = type { %"class.std::_Rb_tree.78" }
%"class.std::_Rb_tree.78" = type { %"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, HtnMethod *>, std::_Select1st<std::pair<const unsigned long, HtnMethod *>>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, HtnMethod *>, std::_Select1st<std::pair<const unsigned long, HtnMethod *>>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map.82" = type { %"class.std::_Rb_tree.83" }
%"class.std::_Rb_tree.83" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, HtnOperator *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, HtnOperator *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, HtnOperator *>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, HtnOperator *>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::shared_ptr.87" = type { %"class.std::__shared_ptr.88" }
%"class.std::__shared_ptr.88" = type { ptr, %"class.std::__shared_count" }
%"struct.std::pair.115" = type { i64, ptr }

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

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

declare void @_ZN15HtnGoalResolver5UnifyEP14HtnTermFactorySt10shared_ptrI7HtnTermES4_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.110") align 8, ptr noundef, ptr noundef, ptr noundef) #5

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10HtnPlanner23FindAllMethodsThatUnifyEP14HtnTermFactoryP10HtnRuleSetSt10shared_ptrI7HtnTermE(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.25") align 8 %0, ptr noundef nonnull align 8 dereferenceable(136) %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i1, align 1
  %12 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %13 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %14 = alloca %"class.std::shared_ptr.110", align 8
  %15 = alloca %"class.std::shared_ptr", align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::shared_ptr", align 8
  %19 = alloca %"struct.std::pair", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.122", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.122", align 8
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  %22 = load ptr, ptr %7, align 8
  store i1 false, ptr %11, align 1
  %23 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 24) #8
  call void @llvm.memset.p0.i64(ptr align 16 %23, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIP9HtnMethodS_IS0_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEESaIS9_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #9
  call void @_ZNSt10shared_ptrISt6vectorISt4pairIP9HtnMethodS0_IS1_IS_I7HtnTermES5_ESaIS6_EEESaIS9_EEEC2ISB_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %23)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %24 = getelementptr inbounds %class.HtnPlanner, ptr %22, i32 0, i32 1
  %25 = call ptr @_ZNSt8multimapImP9HtnMethodSt4lessImESaISt4pairIKmS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %24) #9
  %26 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %12, i32 0, i32 0
  store ptr %25, ptr %26, align 8
  br label %27

27:                                               ; preds = %66, %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %28 = getelementptr inbounds %class.HtnPlanner, ptr %22, i32 0, i32 1
  %29 = call ptr @_ZNSt8multimapImP9HtnMethodSt4lessImESaISt4pairIKmS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %28) #9
  %30 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %13, i32 0, i32 0
  store ptr %29, ptr %30, align 8
  %31 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmP9HtnMethodEES7_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br i1 %31, label %33, label %32

32:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %69

33:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #9
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmP9HtnMethodEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  %36 = getelementptr inbounds %"struct.std::pair.115", ptr %35, i32 0, i32 1
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  invoke void @_ZNK9HtnMethod4headEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %15, ptr noundef nonnull align 8 dereferenceable(80) %37)
          to label %38 unwind label %48

38:                                               ; preds = %33
  call void @_ZNSt10shared_ptrI7HtnTermEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %4) #9
  invoke void @_ZN15HtnGoalResolver5UnifyEP14HtnTermFactorySt10shared_ptrI7HtnTermES4_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.110") align 8 %14, ptr noundef %34, ptr noundef %15, ptr noundef %18)
          to label %39 unwind label %52

39:                                               ; preds = %38
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #9
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #9
  %40 = call noundef zeroext i1 @_ZStneISt6vectorISt4pairISt10shared_ptrI7HtnTermES4_ESaIS5_EEEbRKS2_IT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr null) #9
  br i1 %40, label %41, label %65

41:                                               ; preds = %39
  %42 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt6vectorISt4pairIP9HtnMethodS0_IS1_ISt10shared_ptrI7HtnTermES6_ESaIS7_EEESaISA_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #9
  %43 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmP9HtnMethodEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  %44 = getelementptr inbounds %"struct.std::pair.115", ptr %43, i32 0, i32 1
  %45 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt19__shared_ptr_accessISt6vectorISt4pairISt10shared_ptrI7HtnTermES4_ESaIS5_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %14) #9
  invoke void @_ZNSt4pairIP9HtnMethodSt6vectorIS_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEEC2IRS1_RS8_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 8 dereferenceable(24) %45)
          to label %46 unwind label %56

46:                                               ; preds = %41
  invoke void @_ZNSt6vectorISt4pairIP9HtnMethodS_IS0_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEESaIS9_EE9push_backEOS9_(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %47 unwind label %60

47:                                               ; preds = %46
  call void @_ZNSt4pairIP9HtnMethodSt6vectorIS_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #9
  br label %65

48:                                               ; preds = %33
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %16, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %17, align 4
  br label %68

52:                                               ; preds = %38
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %16, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %17, align 4
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #9
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #9
  br label %68

56:                                               ; preds = %41
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %16, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %17, align 4
  br label %64

60:                                               ; preds = %46
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %16, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %17, align 4
  call void @_ZNSt4pairIP9HtnMethodSt6vectorIS_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #9
  br label %64

64:                                               ; preds = %60, %56
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #9
  call void @_ZNSt12__shared_ptrISt6vectorISt4pairISt10shared_ptrI7HtnTermES4_ESaIS5_EELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #9
  br label %68

65:                                               ; preds = %47, %39
  call void @_ZNSt12__shared_ptrISt6vectorISt4pairISt10shared_ptrI7HtnTermES4_ESaIS5_EELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #9
  br label %66

66:                                               ; preds = %65
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKmP9HtnMethodEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #9
  br label %27, !llvm.loop !12

68:                                               ; preds = %64, %52, %48
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %88

69:                                               ; preds = %32
  %70 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt6vectorISt4pairIP9HtnMethodS0_IS1_ISt10shared_ptrI7HtnTermES6_ESaIS7_EEESaISA_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #9
  %71 = call ptr @_ZNSt6vectorISt4pairIP9HtnMethodS_IS0_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEESaIS9_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %70) #9
  %72 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.122", ptr %20, i32 0, i32 0
  store ptr %71, ptr %72, align 8
  %73 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt6vectorISt4pairIP9HtnMethodS0_IS1_ISt10shared_ptrI7HtnTermES6_ESaIS7_EEESaISA_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #9
  %74 = call ptr @_ZNSt6vectorISt4pairIP9HtnMethodS_IS0_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEESaIS9_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %73) #9
  %75 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.122", ptr %21, i32 0, i32 0
  store ptr %74, ptr %75, align 8
  %76 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.122", ptr %20, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8
  %78 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.122", ptr %21, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIP9HtnMethodSt6vectorIS2_ISt10shared_ptrI7HtnTermES8_ESaIS9_EEES5_ISC_SaISC_EEEEPFbRKSC_SI_EEvT_SL_T0_(ptr %77, ptr %79, ptr noundef @_Z14MethodComparerRKSt4pairIP9HtnMethodSt6vectorIS_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEESB_)
          to label %80 unwind label %82

80:                                               ; preds = %69
  store i1 true, ptr %11, align 1
  %81 = load i1, ptr %11, align 1
  br i1 %81, label %87, label %86

82:                                               ; preds = %69
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %16, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %17, align 4
  br label %88

86:                                               ; preds = %80
  call void @_ZNSt12__shared_ptrISt6vectorISt4pairIP9HtnMethodS0_IS1_ISt10shared_ptrI7HtnTermES6_ESaIS7_EEESaISA_EELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #9
  br label %87

87:                                               ; preds = %86, %80
  ret void

88:                                               ; preds = %82, %68
  call void @_ZNSt12__shared_ptrISt6vectorISt4pairIP9HtnMethodS0_IS1_ISt10shared_ptrI7HtnTermES6_ESaIS7_EEESaISA_EELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #9
  br label %89

89:                                               ; preds = %88
  %90 = load ptr, ptr %16, align 8
  %91 = load i32, ptr %17, align 4
  %92 = insertvalue { ptr, i32 } poison, ptr %90, 0
  %93 = insertvalue { ptr, i32 } %92, i32 %91, 1
  resume { ptr, i32 } %93
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt10shared_ptrISt6vectorISt4pairIP9HtnMethodS0_IS1_IS_I7HtnTermES5_ESaIS6_EEESaIS9_EEEC2ISB_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK9HtnMethod4headEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(80)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIP9HtnMethodS_IS0_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEESaIS9_EE9push_backEOS9_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt4pairIP9HtnMethodSt6vectorIS_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEEC2IRS1_RS8_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIP9HtnMethodSt6vectorIS2_ISt10shared_ptrI7HtnTermES8_ESaIS9_EEES5_ISC_SaISC_EEEEPFbRKSC_SI_EEvT_SL_T0_(ptr, ptr, ptr noundef) #7

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt12__shared_ptrISt6vectorISt4pairIP9HtnMethodS0_IS1_ISt10shared_ptrI7HtnTermES6_ESaIS7_EEESaISA_EELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 #7 = { 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 #8 = { builtin allocsize(0) }
attributes #9 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTSSt4pairIKmP9HtnMethodE", !11, i64 0, !6, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"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.std::shared_ptr.110" = type { %"class.std::__shared_ptr.111" }
%"class.std::__shared_ptr.111" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.25" = type { %"class.std::__shared_ptr.26" }
%"class.std::__shared_ptr.26" = type { ptr, %"class.std::__shared_count" }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"struct.std::pair" = type { ptr, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>, std::allocator<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>, std::allocator<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>, std::allocator<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>, std::allocator<std::pair<std::shared_ptr<HtnTerm>, std::shared_ptr<HtnTerm>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

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

declare void @_ZN15HtnGoalResolver5UnifyEP14HtnTermFactorySt10shared_ptrI7HtnTermES4_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.110") align 8, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10HtnPlanner23FindAllMethodsThatUnifyEP14HtnTermFactoryP10HtnRuleSetSt10shared_ptrI7HtnTermE(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.25") align 8 %0, ptr noundef nonnull align 8 dereferenceable(136) %1, ptr noundef %2, ptr nocapture noundef readnone %3, ptr noundef %4) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca %"class.std::shared_ptr.110", align 8
  %9 = alloca %"class.std::shared_ptr", align 8
  %10 = alloca %"class.std::shared_ptr", align 8
  %11 = alloca %"struct.std::pair", align 8
  %12 = tail call noalias noundef nonnull dereferenceable(24) ptr @_Znwm(i64 noundef 24) #8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %12, i8 0, i64 24, i1 false)
  tail call void @_ZNSt6vectorISt4pairIP9HtnMethodS_IS0_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEESaIS9_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #9
  tail call void @_ZNSt10shared_ptrISt6vectorISt4pairIP9HtnMethodS0_IS1_IS_I7HtnTermES5_ESaIS6_EEESaIS9_EEEC2ISB_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %13 = getelementptr inbounds i8, ptr %1, i64 8
  %14 = tail call ptr @_ZNSt8multimapImP9HtnMethodSt4lessImESaISt4pairIKmS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %13) #9
  store ptr %14, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %15 = tail call ptr @_ZNSt8multimapImP9HtnMethodSt4lessImESaISt4pairIKmS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %13) #9
  store ptr %15, ptr %7, align 8
  %16 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmP9HtnMethodEES7_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br i1 %16, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %40, %5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  %17 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt6vectorISt4pairIP9HtnMethodS0_IS1_ISt10shared_ptrI7HtnTermES6_ESaIS7_EEESaISA_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #9
  %18 = call ptr @_ZNSt6vectorISt4pairIP9HtnMethodS_IS0_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEESaIS9_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #9
  %19 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt6vectorISt4pairIP9HtnMethodS0_IS1_ISt10shared_ptrI7HtnTermES6_ESaIS7_EEESaISA_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #9
  %20 = call ptr @_ZNSt6vectorISt4pairIP9HtnMethodS_IS0_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEESaIS9_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #9
  invoke void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIP9HtnMethodSt6vectorIS2_ISt10shared_ptrI7HtnTermES8_ESaIS9_EEES5_ISC_SaISC_EEEEPFbRKSC_SI_EEvT_SL_T0_(ptr %18, ptr %20, ptr noundef nonnull @_Z14MethodComparerRKSt4pairIP9HtnMethodSt6vectorIS_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEESB_)
          to label %47 unwind label %45

.lr.ph:                                           ; preds = %5, %40
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #9
  %21 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmP9HtnMethodEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  call void @_ZNK9HtnMethod4headEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %9, ptr noundef nonnull align 8 dereferenceable(80) %23)
  call void @_ZNSt10shared_ptrI7HtnTermEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %4) #9
  invoke void @_ZN15HtnGoalResolver5UnifyEP14HtnTermFactorySt10shared_ptrI7HtnTermES4_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.110") align 8 %8, ptr noundef %2, ptr noundef nonnull %9, ptr noundef nonnull %10)
          to label %24 unwind label %33

24:                                               ; preds = %.lr.ph
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #9
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #9
  %25 = call noundef zeroext i1 @_ZStneISt6vectorISt4pairISt10shared_ptrI7HtnTermES4_ESaIS5_EEEbRKS2_IT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr null) #9
  br i1 %25, label %26, label %40

26:                                               ; preds = %24
  %27 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt6vectorISt4pairIP9HtnMethodS0_IS1_ISt10shared_ptrI7HtnTermES6_ESaIS7_EEESaISA_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #9
  %28 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKmP9HtnMethodEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  %29 = getelementptr inbounds i8, ptr %28, i64 8
  %30 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt19__shared_ptr_accessISt6vectorISt4pairISt10shared_ptrI7HtnTermES4_ESaIS5_EELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #9
  invoke void @_ZNSt4pairIP9HtnMethodSt6vectorIS_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEEC2IRS1_RS8_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(24) %30)
          to label %31 unwind label %35

31:                                               ; preds = %26
  invoke void @_ZNSt6vectorISt4pairIP9HtnMethodS_IS0_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEESaIS9_EE9push_backEOS9_(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %32 unwind label %37

32:                                               ; preds = %31
  call void @_ZNSt4pairIP9HtnMethodSt6vectorIS_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #9
  br label %40

33:                                               ; preds = %.lr.ph
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #9
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #9
  br label %44

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

37:                                               ; preds = %31
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt4pairIP9HtnMethodSt6vectorIS_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #9
  br label %39

39:                                               ; preds = %37, %35
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #9
  call void @_ZNSt12__shared_ptrISt6vectorISt4pairISt10shared_ptrI7HtnTermES4_ESaIS5_EELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  br label %44

40:                                               ; preds = %32, %24
  call void @_ZNSt12__shared_ptrISt6vectorISt4pairISt10shared_ptrI7HtnTermES4_ESaIS5_EELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #9
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKmP9HtnMethodEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #9
  %42 = call ptr @_ZNSt8multimapImP9HtnMethodSt4lessImESaISt4pairIKmS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %13) #9
  store ptr %42, ptr %7, align 8
  %43 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKmP9HtnMethodEES7_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #9
  br i1 %43, label %.lr.ph, label %._crit_edge, !llvm.loop !11

44:                                               ; preds = %39, %33
  %.pn.pn = phi { ptr, i32 } [ %.pn, %39 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  br label %48

45:                                               ; preds = %._crit_edge
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %48

47:                                               ; preds = %._crit_edge
  ret void

48:                                               ; preds = %45, %44
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %44 ], [ %46, %45 ]
  call void @_ZNSt12__shared_ptrISt6vectorISt4pairIP9HtnMethodS0_IS1_ISt10shared_ptrI7HtnTermES6_ESaIS7_EEESaISA_EELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #9
  resume { ptr, i32 } %.pn.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt10shared_ptrISt6vectorISt4pairIP9HtnMethodS0_IS1_IS_I7HtnTermES5_ESaIS6_EEESaIS9_EEEC2ISB_vEEPT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK9HtnMethod4headEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt4pairIP9HtnMethodS_IS0_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEESaIS9_EE9push_backEOS9_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt4pairIP9HtnMethodSt6vectorIS_ISt10shared_ptrI7HtnTermES5_ESaIS6_EEEC2IRS1_RS8_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISE_SF_EEEbE4typeELb1EEEOSE_OSF_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPSt4pairIP9HtnMethodSt6vectorIS2_ISt10shared_ptrI7HtnTermES8_ESaIS9_EEES5_ISC_SaISC_EEEEPFbRKSC_SI_EEvT_SL_T0_(ptr, ptr, ptr noundef) local_unnamed_addr #7

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt12__shared_ptrISt6vectorISt4pairIP9HtnMethodS0_IS1_ISt10shared_ptrI7HtnTermES6_ESaIS7_EEESaISA_EELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 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 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 #7 = { 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 #8 = { builtin allocsize(0) }
attributes #9 = { 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, !10, i64 8}
!6 = !{!"_ZTSSt4pairIKmP9HtnMethodE", !7, i64 0, !10, i64 8}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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