; LLVM IR from EricZinda/InductorHtn :: src/FXPlatform/Prolog/HtnTerm.ll (ZN7HtnTerm22ResolveArithmeticTermsEP14HtnTermFactory)

; 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.6" = type { %"class.std::__shared_ptr.7" }
%"class.std::__shared_ptr.7" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<HtnTerm>, std::allocator<std::shared_ptr<HtnTerm>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<HtnTerm>, std::allocator<std::shared_ptr<HtnTerm>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<HtnTerm>, std::allocator<std::shared_ptr<HtnTerm>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<HtnTerm>, std::allocator<std::shared_ptr<HtnTerm>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.43" = type { ptr }
%class.HtnTerm = type { %"class.std::enable_shared_from_this", ptr, %"class.std::vector", i8, i8, %"class.std::weak_ptr" }
%"class.std::enable_shared_from_this" = type { %"class.std::weak_ptr.0" }
%"class.std::weak_ptr.0" = type { %"class.std::__weak_ptr.1" }
%"class.std::__weak_ptr.1" = type { ptr, %"class.std::__weak_count" }
%"class.std::__weak_count" = type { ptr }
%"class.std::weak_ptr" = type { %"class.std::__weak_ptr" }
%"class.std::__weak_ptr" = type { ptr, %"class.std::__weak_count" }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; 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 #0 align 2

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

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

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

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

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

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

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

declare void @_ZN14HtnTermFactory13CreateFunctorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorISt10shared_ptrI7HtnTermESaISB_EE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.6") align 8, ptr noundef nonnull align 8 dereferenceable(33088), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7HtnTerm22ResolveArithmeticTermsEP14HtnTermFactory(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.6") align 8 %0, ptr noundef nonnull align 8 dereferenceable(72) %1, ptr noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i1, align 1
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.43", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.43", align 8
  %13 = alloca %"class.std::shared_ptr.6", align 8
  %14 = alloca %"class.std::shared_ptr.6", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::vector", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8
  %19 = call noundef zeroext i1 @_ZN7HtnTerm14isCompoundTermEv(ptr noundef nonnull align 8 dereferenceable(72) %18)
  br i1 %19, label %21, label %20

20:                                               ; preds = %3
  call void @_ZNSt23enable_shared_from_thisI7HtnTermE16shared_from_thisEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.6") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %18)
  br label %82

21:                                               ; preds = %3
  %22 = call noundef zeroext i1 @_ZNK7HtnTerm12isArithmeticEv(ptr noundef nonnull align 8 dereferenceable(72) %18)
  br i1 %22, label %23, label %34

23:                                               ; preds = %21
  store i1 false, ptr %7, align 1
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN7HtnTerm4EvalEP14HtnTermFactory(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.6") align 8 %0, ptr noundef nonnull align 8 dereferenceable(72) %18, ptr noundef %24)
  %25 = call noundef zeroext i1 @_ZStneI7HtnTermEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #5
  br i1 %25, label %26, label %27

26:                                               ; preds = %23
  store i1 true, ptr %7, align 1
  store i32 1, ptr %8, align 4
  br label %28

27:                                               ; preds = %23
  store i32 0, ptr %8, align 4
  br label %28

28:                                               ; preds = %27, %26
  %29 = load i1, ptr %7, align 1
  br i1 %29, label %31, label %30

30:                                               ; preds = %28
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #5
  br label %31

31:                                               ; preds = %30, %28
  %32 = load i32, ptr %8, align 4
  switch i32 %32, label %88 [
    i32 0, label %33
    i32 1, label %82
  ]

33:                                               ; preds = %31
  br label %34

34:                                               ; preds = %33, %21
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  call void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %35 = getelementptr inbounds %class.HtnTerm, ptr %18, i32 0, i32 2
  store ptr %35, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = call ptr @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #5
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.43", ptr %11, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = call ptr @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #5
  %41 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.43", ptr %12, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  br label %42

42:                                               ; preds = %64, %34
  %43 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrI7HtnTermESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br i1 %43, label %45, label %44

44:                                               ; preds = %42
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %67

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI7HtnTermESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  call void @_ZNSt10shared_ptrI7HtnTermEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %46) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  %47 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN7HtnTerm22ResolveArithmeticTermsEP14HtnTermFactory(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.6") align 8 %14, ptr noundef nonnull align 8 dereferenceable(72) %47, ptr noundef %48)
          to label %49 unwind label %53

49:                                               ; preds = %45
  %50 = call noundef zeroext i1 @_ZStneI7HtnTermEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr null) #5
  br i1 %50, label %51, label %61

51:                                               ; preds = %49
  invoke void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %52 unwind label %57

52:                                               ; preds = %51
  br label %63

53:                                               ; preds = %45
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %15, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %16, align 4
  br label %66

57:                                               ; preds = %61, %51
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %15, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %16, align 4
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  br label %66

61:                                               ; preds = %49
  invoke void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %62 unwind label %57

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62, %52
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  br label %64

64:                                               ; preds = %63
  %65 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI7HtnTermESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br label %42

66:                                               ; preds = %57, %53
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %81

67:                                               ; preds = %44
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %class.HtnTerm, ptr %18, i32 0, i32 1
  %70 = load ptr, ptr %69, align 8, !tbaa !9
  invoke void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %71 unwind label %73

71:                                               ; preds = %67
  invoke void @_ZN14HtnTermFactory13CreateFunctorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorISt10shared_ptrI7HtnTermESaISB_EE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.6") align 8 %0, ptr noundef nonnull align 8 dereferenceable(33088) %68, ptr noundef nonnull align 8 dereferenceable(32) %70, ptr noundef %17)
          to label %72 unwind label %77

72:                                               ; preds = %71
  call void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  store i32 1, ptr %8, align 4
  call void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  br label %82

73:                                               ; preds = %67
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %15, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %16, align 4
  br label %81

77:                                               ; preds = %71
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %15, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %16, align 4
  call void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  br label %81

81:                                               ; preds = %77, %73, %66
  call void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  br label %83

82:                                               ; preds = %72, %31, %20
  ret void

83:                                               ; preds = %81
  %84 = load ptr, ptr %15, align 8
  %85 = load i32, ptr %16, align 4
  %86 = insertvalue { ptr, i32 } poison, ptr %84, 0
  %87 = insertvalue { ptr, i32 } %86, i32 %85, 1
  resume { ptr, i32 } %87

88:                                               ; preds = %31
  unreachable
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) #2 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 #0 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "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 = { 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 16}
!10 = !{!"_ZTS7HtnTerm", !11, i64 0, !6, i64 16, !15, i64 24, !19, i64 48, !19, i64 49, !20, i64 56}
!11 = !{!"_ZTSSt23enable_shared_from_thisI7HtnTermE", !12, i64 0}
!12 = !{!"_ZTSSt8weak_ptrI7HtnTermE", !13, i64 0}
!13 = !{!"_ZTSSt10__weak_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !14, i64 8}
!14 = !{!"_ZTSSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!15 = !{!"_ZTSSt6vectorISt10shared_ptrI7HtnTermESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrI7HtnTermESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrI7HtnTermESaIS2_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrI7HtnTermESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"_ZTSSt8weak_ptrI14HtnTermFactoryE", !21, i64 0}
!21 = !{!"_ZTSSt10__weak_ptrI14HtnTermFactoryLN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !14, i64 8}


; 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.6" = type { %"class.std::__shared_ptr.7" }
%"class.std::__shared_ptr.7" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<HtnTerm>, std::allocator<std::shared_ptr<HtnTerm>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<HtnTerm>, std::allocator<std::shared_ptr<HtnTerm>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<HtnTerm>, std::allocator<std::shared_ptr<HtnTerm>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<HtnTerm>, std::allocator<std::shared_ptr<HtnTerm>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.43" = type { ptr }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; 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 #0 align 2

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

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

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

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

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

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

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

declare void @_ZN14HtnTermFactory13CreateFunctorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorISt10shared_ptrI7HtnTermESaISB_EE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.6") align 8, ptr noundef nonnull align 8 dereferenceable(33088), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7HtnTerm22ResolveArithmeticTermsEP14HtnTermFactory(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.6") align 8 %0, ptr noundef nonnull align 8 dereferenceable(72) %1, ptr noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.43", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.43", align 8
  %7 = alloca %"class.std::shared_ptr.6", align 8
  %8 = alloca %"class.std::shared_ptr.6", align 8
  %9 = alloca %"class.std::vector", align 8
  %10 = tail call noundef zeroext i1 @_ZN7HtnTerm14isCompoundTermEv(ptr noundef nonnull align 8 dereferenceable(72) %1)
  br i1 %10, label %12, label %11

11:                                               ; preds = %3
  tail call void @_ZNSt23enable_shared_from_thisI7HtnTermE16shared_from_thisEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.6") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1)
  br label %42

12:                                               ; preds = %3
  %13 = tail call noundef zeroext i1 @_ZNK7HtnTerm12isArithmeticEv(ptr noundef nonnull align 8 dereferenceable(72) %1)
  br i1 %13, label %14, label %16

14:                                               ; preds = %12
  tail call void @_ZN7HtnTerm4EvalEP14HtnTermFactory(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.6") align 8 %0, ptr noundef nonnull align 8 dereferenceable(72) %1, ptr noundef %2)
  %15 = tail call noundef zeroext i1 @_ZStneI7HtnTermEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #5
  br i1 %15, label %42, label %.thread

.thread:                                          ; preds = %14
  tail call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #5
  br label %16

16:                                               ; preds = %.thread, %12
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %17 = getelementptr inbounds i8, ptr %1, i64 24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %18 = call ptr @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  store ptr %18, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %19 = call ptr @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  store ptr %19, ptr %6, align 8
  %20 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrI7HtnTermESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %20, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %31, %16
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %21 = getelementptr inbounds i8, ptr %1, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  invoke void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %35 unwind label %37

.lr.ph:                                           ; preds = %16, %31
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI7HtnTermESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  call void @_ZNSt10shared_ptrI7HtnTermEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %23) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %24 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZN7HtnTerm22ResolveArithmeticTermsEP14HtnTermFactory(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.6") align 8 %8, ptr noundef nonnull align 8 dereferenceable(72) %24, ptr noundef %2)
          to label %.invoke unwind label %27

.invoke:                                          ; preds = %.lr.ph
  %25 = call noundef zeroext i1 @_ZStneI7HtnTermEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr null) #5
  %26 = select i1 %25, ptr %8, ptr %7
  invoke void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(16) %26)
          to label %31 unwind label %29

27:                                               ; preds = %.lr.ph
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %34

29:                                               ; preds = %.invoke
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  br label %34

31:                                               ; preds = %.invoke
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI7HtnTermESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt10shared_ptrI7HtnTermESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %33, label %.lr.ph, label %._crit_edge

34:                                               ; preds = %29, %27
  %.pn = phi { ptr, i32 } [ %30, %29 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %41

35:                                               ; preds = %._crit_edge
  invoke void @_ZN14HtnTermFactory13CreateFunctorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorISt10shared_ptrI7HtnTermESaISB_EE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.6") align 8 %0, ptr noundef nonnull align 8 dereferenceable(33088) %2, ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull %9)
          to label %36 unwind label %39

36:                                               ; preds = %35
  call void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  br label %42

37:                                               ; preds = %._crit_edge
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %41

39:                                               ; preds = %35
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  br label %41

41:                                               ; preds = %39, %37, %34
  %.pn.pn = phi { ptr, i32 } [ %.pn, %34 ], [ %40, %39 ], [ %38, %37 ]
  call void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn.pn

42:                                               ; preds = %14, %36, %11
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10shared_ptrI7HtnTermESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 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 #0 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { "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 = { 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 16}
!6 = !{!"_ZTS7HtnTerm", !7, i64 0, !10, i64 16, !14, i64 24, !18, i64 48, !18, i64 49, !19, i64 56}
!7 = !{!"_ZTSSt23enable_shared_from_thisI7HtnTermE", !8, i64 0}
!8 = !{!"_ZTSSt8weak_ptrI7HtnTermE", !9, i64 0}
!9 = !{!"_ZTSSt10__weak_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"_ZTSSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0}
!14 = !{!"_ZTSSt6vectorISt10shared_ptrI7HtnTermESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrI7HtnTermESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrI7HtnTermESaIS2_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrI7HtnTermESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!18 = !{!"bool", !11, i64 0}
!19 = !{!"_ZTSSt8weak_ptrI14HtnTermFactoryE", !20, i64 0}
!20 = !{!"_ZTSSt10__weak_ptrI14HtnTermFactoryLN9__gnu_cxx12_Lock_policyE2EE", !10, i64 0, !13, i64 8}


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