; LLVM IR from EricZinda/InductorHtn :: src/FXPlatform/Prolog (HtnArithmeticOperators)

; 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" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

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

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

declare void @_ZN7HtnTerm4EvalEP14HtnTermFactory(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(72), ptr noundef) #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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12lexical_castINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdET_T0_i(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, double noundef, i32 noundef) #4

declare noundef double @_ZNK7HtnTerm9GetDoubleEv(ptr noundef nonnull align 8 dereferenceable(72)) #2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12lexical_castINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEElET_T0_i(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i64 noundef, i32 noundef) #4

declare noundef i64 @_ZNK7HtnTerm6GetIntEv(ptr noundef nonnull align 8 dereferenceable(72)) #2

declare noundef i32 @_ZNK7HtnTerm11GetTermTypeEv(ptr noundef nonnull align 8 dereferenceable(72)) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN22HtnArithmeticOperators8MultiplyEP14HtnTermFactorySt10shared_ptrI7HtnTermES4_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.std::shared_ptr", align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::shared_ptr", align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  %18 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  %19 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN7HtnTerm4EvalEP14HtnTermFactory(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %9, ptr noundef nonnull align 8 dereferenceable(72) %18, ptr noundef %19)
  %20 = call noundef zeroext i1 @_ZStneI7HtnTermEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr null) #5
  br i1 %20, label %21, label %98

21:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %22 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  %23 = invoke noundef i32 @_ZNK7HtnTerm11GetTermTypeEv(ptr noundef nonnull align 8 dereferenceable(72) %22)
          to label %24 unwind label %49

24:                                               ; preds = %21
  store i32 %23, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %25 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN7HtnTerm4EvalEP14HtnTermFactory(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %13, ptr noundef nonnull align 8 dereferenceable(72) %25, ptr noundef %26)
          to label %27 unwind label %53

27:                                               ; preds = %24
  %28 = call noundef zeroext i1 @_ZStneI7HtnTermEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr null) #5
  br i1 %28, label %29, label %92

29:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %30 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  %31 = invoke noundef i32 @_ZNK7HtnTerm11GetTermTypeEv(ptr noundef nonnull align 8 dereferenceable(72) %30)
          to label %32 unwind label %57

32:                                               ; preds = %29
  store i32 %31, ptr %14, align 4, !tbaa !9
  %33 = load i32, ptr %10, align 4, !tbaa !9
  %34 = icmp eq i32 %33, 2
  br i1 %34, label %35, label %70

35:                                               ; preds = %32
  %36 = load i32, ptr %14, align 4, !tbaa !9
  %37 = icmp eq i32 %36, 2
  br i1 %37, label %38, label %70

38:                                               ; preds = %35
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  %40 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  %41 = invoke noundef i64 @_ZNK7HtnTerm6GetIntEv(ptr noundef nonnull align 8 dereferenceable(72) %40)
          to label %42 unwind label %61

42:                                               ; preds = %38
  %43 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  %44 = invoke noundef i64 @_ZNK7HtnTerm6GetIntEv(ptr noundef nonnull align 8 dereferenceable(72) %43)
          to label %45 unwind label %61

45:                                               ; preds = %42
  %46 = mul nsw i64 %41, %44
  invoke void @_Z12lexical_castINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEElET_T0_i(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, i64 noundef %46, i32 noundef 9)
          to label %47 unwind label %61

47:                                               ; preds = %45
  invoke void @_ZN14HtnTermFactory14CreateConstantERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(33088) %39, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %48 unwind label %65

48:                                               ; preds = %47
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  store i32 1, ptr %16, align 4
  br label %90

49:                                               ; preds = %21
  %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
  br label %97

53:                                               ; preds = %24
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %11, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %12, align 4
  br label %96

57:                                               ; preds = %29
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %11, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %12, align 4
  br label %91

61:                                               ; preds = %45, %42, %38
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %11, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %12, align 4
  br label %69

65:                                               ; preds = %47
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %11, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %69

69:                                               ; preds = %65, %61
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  br label %91

70:                                               ; preds = %35, %32
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #5
  %72 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  %73 = invoke noundef double @_ZNK7HtnTerm9GetDoubleEv(ptr noundef nonnull align 8 dereferenceable(72) %72)
          to label %74 unwind label %81

74:                                               ; preds = %70
  %75 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  %76 = invoke noundef double @_ZNK7HtnTerm9GetDoubleEv(ptr noundef nonnull align 8 dereferenceable(72) %75)
          to label %77 unwind label %81

77:                                               ; preds = %74
  %78 = fmul double %73, %76
  invoke void @_Z12lexical_castINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdET_T0_i(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %17, double noundef %78, i32 noundef 9)
          to label %79 unwind label %81

79:                                               ; preds = %77
  invoke void @_ZN14HtnTermFactory14CreateConstantERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(33088) %71, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %80 unwind label %85

80:                                               ; preds = %79
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  store i32 1, ptr %16, align 4
  br label %90

81:                                               ; preds = %77, %74, %70
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %11, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %12, align 4
  br label %89

85:                                               ; preds = %79
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %11, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  br label %89

89:                                               ; preds = %85, %81
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  br label %91

90:                                               ; preds = %80, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %93

91:                                               ; preds = %89, %69, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #5
  br label %96

92:                                               ; preds = %27
  store i32 0, ptr %16, align 4
  br label %93

93:                                               ; preds = %92, %90
  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 4, ptr %10) #5
  %94 = load i32, ptr %16, align 4
  switch i32 %94, label %99 [
    i32 0, label %95
  ]

95:                                               ; preds = %93
  br label %98

96:                                               ; preds = %91, %53
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  br label %97

97:                                               ; preds = %96, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  br label %100

98:                                               ; preds = %95, %4
  call void @_ZNSt10shared_ptrI7HtnTermEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #5
  store i32 1, ptr %16, align 4
  br label %99

99:                                               ; preds = %98, %93
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  ret void

100:                                              ; preds = %97
  %101 = load ptr, ptr %11, align 8
  %102 = load i32, ptr %12, align 4
  %103 = insertvalue { ptr, i32 } poison, ptr %101, 0
  %104 = insertvalue { ptr, i32 } %103, i32 %102, 1
  resume { ptr, i32 } %104
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"_ZTS11HtnTermType", !7, i64 0}


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

%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

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

; Function Attrs: mustprogress 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 #1 align 2

declare void @_ZN7HtnTerm4EvalEP14HtnTermFactory(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(72), ptr noundef) local_unnamed_addr #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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12lexical_castINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdET_T0_i(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, double noundef, i32 noundef) local_unnamed_addr #4

declare noundef double @_ZNK7HtnTerm9GetDoubleEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z12lexical_castINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEElET_T0_i(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, i64 noundef, i32 noundef) local_unnamed_addr #4

declare noundef i64 @_ZNK7HtnTerm6GetIntEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2

declare noundef i32 @_ZNK7HtnTerm11GetTermTypeEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN22HtnArithmeticOperators8MultiplyEP14HtnTermFactorySt10shared_ptrI7HtnTermES4_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::shared_ptr", align 8
  %6 = alloca %"class.std::shared_ptr", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %9 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  call void @_ZN7HtnTerm4EvalEP14HtnTermFactory(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %5, ptr noundef nonnull align 8 dereferenceable(72) %9, ptr noundef %1)
  %10 = call noundef zeroext i1 @_ZStneI7HtnTermEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr null) #5
  br i1 %10, label %11, label %64

11:                                               ; preds = %4
  %12 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  %13 = invoke noundef i32 @_ZNK7HtnTerm11GetTermTypeEv(ptr noundef nonnull align 8 dereferenceable(72) %12)
          to label %14 unwind label %34

14:                                               ; preds = %11
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %15 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZN7HtnTerm4EvalEP14HtnTermFactory(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %6, ptr noundef nonnull align 8 dereferenceable(72) %15, ptr noundef %1)
          to label %16 unwind label %36

16:                                               ; preds = %14
  %17 = call noundef zeroext i1 @_ZStneI7HtnTermEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr null) #5
  br i1 %17, label %18, label %.critedge

18:                                               ; preds = %16
  %19 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  %20 = invoke noundef i32 @_ZNK7HtnTerm11GetTermTypeEv(ptr noundef nonnull align 8 dereferenceable(72) %19)
          to label %21 unwind label %38

21:                                               ; preds = %18
  %22 = icmp eq i32 %13, 2
  %23 = icmp eq i32 %20, 2
  %or.cond = and i1 %22, %23
  br i1 %or.cond, label %24, label %45

24:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  %25 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  %26 = invoke noundef i64 @_ZNK7HtnTerm6GetIntEv(ptr noundef nonnull align 8 dereferenceable(72) %25)
          to label %27 unwind label %40

27:                                               ; preds = %24
  %28 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  %29 = invoke noundef i64 @_ZNK7HtnTerm6GetIntEv(ptr noundef nonnull align 8 dereferenceable(72) %28)
          to label %30 unwind label %40

30:                                               ; preds = %27
  %31 = mul nsw i64 %29, %26
  invoke void @_Z12lexical_castINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEElET_T0_i(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, i64 noundef %31, i32 noundef 9)
          to label %32 unwind label %40

32:                                               ; preds = %30
  invoke void @_ZN14HtnTermFactory14CreateConstantERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(33088) %1, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %33 unwind label %42

33:                                               ; preds = %32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %61

34:                                               ; preds = %11
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %63

36:                                               ; preds = %14
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %62

38:                                               ; preds = %18
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %60

40:                                               ; preds = %30, %27, %24
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %44

42:                                               ; preds = %32
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %44

44:                                               ; preds = %42, %40
  %.pn17 = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %60

45:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  %46 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  %47 = invoke noundef double @_ZNK7HtnTerm9GetDoubleEv(ptr noundef nonnull align 8 dereferenceable(72) %46)
          to label %48 unwind label %55

48:                                               ; preds = %45
  %49 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  %50 = invoke noundef double @_ZNK7HtnTerm9GetDoubleEv(ptr noundef nonnull align 8 dereferenceable(72) %49)
          to label %51 unwind label %55

51:                                               ; preds = %48
  %52 = fmul double %47, %50
  invoke void @_Z12lexical_castINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdET_T0_i(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, double noundef %52, i32 noundef 9)
          to label %53 unwind label %55

53:                                               ; preds = %51
  invoke void @_ZN14HtnTermFactory14CreateConstantERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(33088) %1, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %54 unwind label %57

54:                                               ; preds = %53
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  br label %61

55:                                               ; preds = %51, %48, %45
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %59

57:                                               ; preds = %53
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %59

59:                                               ; preds = %57, %55
  %.pn = phi { ptr, i32 } [ %58, %57 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  br label %60

60:                                               ; preds = %59, %44, %38
  %.pn17.pn = phi { ptr, i32 } [ %.pn17, %44 ], [ %.pn, %59 ], [ %39, %38 ]
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  br label %62

61:                                               ; preds = %33, %54
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %65

62:                                               ; preds = %60, %36
  %.pn17.pn.pn = phi { ptr, i32 } [ %.pn17.pn, %60 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %63

63:                                               ; preds = %62, %34
  %.pn17.pn.pn.pn = phi { ptr, i32 } [ %.pn17.pn.pn, %62 ], [ %35, %34 ]
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn17.pn.pn.pn

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

64:                                               ; preds = %.critedge, %4
  call void @_ZNSt10shared_ptrI7HtnTermEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr null) #5
  br label %65

65:                                               ; preds = %61, %64
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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)"}


; Effective O3 passes: GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass