; 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 }

; 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 noundef double @_ZNK7HtnTerm9GetDoubleEv(ptr noundef nonnull align 8 dereferenceable(72)) #2

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

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 @_ZN22HtnArithmeticOperators5EqualEP14HtnTermFactorySt10shared_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 i32, align 4
  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
  %16 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  %17 = 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) %16, ptr noundef %17)
  %18 = call noundef zeroext i1 @_ZStneI7HtnTermEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr null) #5
  br i1 %18, label %19, label %85

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

22:                                               ; preds = %19
  store i32 %21, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  %23 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  %24 = 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) %23, ptr noundef %24)
          to label %25 unwind label %55

25:                                               ; preds = %22
  %26 = call noundef zeroext i1 @_ZStneI7HtnTermEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr null) #5
  br i1 %26, label %27, label %79

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

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

33:                                               ; preds = %30
  %34 = load i32, ptr %14, align 4, !tbaa !9
  %35 = icmp eq i32 %34, 2
  br i1 %35, label %36, label %63

36:                                               ; preds = %33
  %37 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  %38 = invoke noundef i64 @_ZNK7HtnTerm6GetIntEv(ptr noundef nonnull align 8 dereferenceable(72) %37)
          to label %39 unwind label %59

39:                                               ; preds = %36
  %40 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  %41 = invoke noundef i64 @_ZNK7HtnTerm6GetIntEv(ptr noundef nonnull align 8 dereferenceable(72) %40)
          to label %42 unwind label %59

42:                                               ; preds = %39
  %43 = icmp eq i64 %38, %41
  br i1 %43, label %44, label %47

44:                                               ; preds = %42
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN14HtnTermFactory4TrueEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(33088) %45)
          to label %46 unwind label %59

46:                                               ; preds = %44
  br label %50

47:                                               ; preds = %42
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN14HtnTermFactory5FalseEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(33088) %48)
          to label %49 unwind label %59

49:                                               ; preds = %47
  br label %50

50:                                               ; preds = %49, %46
  store i32 1, ptr %15, align 4
  br label %78

51:                                               ; preds = %19
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %11, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %12, align 4
  br label %84

55:                                               ; preds = %22
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %11, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %12, align 4
  br label %83

59:                                               ; preds = %74, %71, %66, %63, %47, %44, %39, %36, %27
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %11, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %12, align 4
  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 %83

63:                                               ; preds = %33, %30
  %64 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  %65 = invoke noundef double @_ZNK7HtnTerm9GetDoubleEv(ptr noundef nonnull align 8 dereferenceable(72) %64)
          to label %66 unwind label %59

66:                                               ; preds = %63
  %67 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  %68 = invoke noundef double @_ZNK7HtnTerm9GetDoubleEv(ptr noundef nonnull align 8 dereferenceable(72) %67)
          to label %69 unwind label %59

69:                                               ; preds = %66
  %70 = fcmp oeq double %65, %68
  br i1 %70, label %71, label %74

71:                                               ; preds = %69
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN14HtnTermFactory4TrueEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(33088) %72)
          to label %73 unwind label %59

73:                                               ; preds = %71
  br label %77

74:                                               ; preds = %69
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN14HtnTermFactory5FalseEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(33088) %75)
          to label %76 unwind label %59

76:                                               ; preds = %74
  br label %77

77:                                               ; preds = %76, %73
  store i32 1, ptr %15, align 4
  br label %78

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

79:                                               ; preds = %25
  store i32 0, ptr %15, align 4
  br label %80

80:                                               ; preds = %79, %78
  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
  %81 = load i32, ptr %15, align 4
  switch i32 %81, label %86 [
    i32 0, label %82
  ]

82:                                               ; preds = %80
  br label %85

83:                                               ; preds = %59, %55
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  br label %84

84:                                               ; preds = %83, %51
  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 %87

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

86:                                               ; preds = %85, %80
  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

87:                                               ; preds = %84
  %88 = load ptr, ptr %11, align 8
  %89 = load i32, ptr %12, align 4
  %90 = insertvalue { ptr, i32 } poison, ptr %88, 0
  %91 = insertvalue { ptr, i32 } %90, i32 %89, 1
  resume { ptr, i32 } %91
}

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

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

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 }

; 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 noundef double @_ZNK7HtnTerm9GetDoubleEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2

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

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 @_ZN22HtnArithmeticOperators5EqualEP14HtnTermFactorySt10shared_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
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %7 = 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) %7, ptr noundef %1)
  %8 = call noundef zeroext i1 @_ZStneI7HtnTermEbRKSt10shared_ptrIT_EDn(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr null) #5
  br i1 %8, label %9, label %46

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

12:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %13 = 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) %13, ptr noundef %1)
          to label %14 unwind label %32

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

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

19:                                               ; preds = %16
  %20 = icmp eq i32 %11, 2
  %21 = icmp eq i32 %18, 2
  %or.cond = and i1 %20, %21
  %22 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  br i1 %or.cond, label %23, label %36

23:                                               ; preds = %19
  %24 = invoke noundef i64 @_ZNK7HtnTerm6GetIntEv(ptr noundef nonnull align 8 dereferenceable(72) %22)
          to label %25 unwind label %34

25:                                               ; preds = %23
  %26 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  %27 = invoke noundef i64 @_ZNK7HtnTerm6GetIntEv(ptr noundef nonnull align 8 dereferenceable(72) %26)
          to label %28 unwind label %34

28:                                               ; preds = %25
  %29 = icmp eq i64 %24, %27
  br i1 %29, label %.invoke17, label %.invoke

30:                                               ; preds = %9
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %45

32:                                               ; preds = %12
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %44

34:                                               ; preds = %.invoke17, %.invoke, %38, %36, %25, %23, %16
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrI7HtnTermLN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  br label %44

36:                                               ; preds = %19
  %37 = invoke noundef double @_ZNK7HtnTerm9GetDoubleEv(ptr noundef nonnull align 8 dereferenceable(72) %22)
          to label %38 unwind label %34

38:                                               ; preds = %36
  %39 = call noundef ptr @_ZNKSt19__shared_ptr_accessI7HtnTermLN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #5
  %40 = invoke noundef double @_ZNK7HtnTerm9GetDoubleEv(ptr noundef nonnull align 8 dereferenceable(72) %39)
          to label %41 unwind label %34

41:                                               ; preds = %38
  %42 = fcmp oeq double %37, %40
  br i1 %42, label %.invoke17, label %.invoke

.invoke17:                                        ; preds = %28, %41
  invoke void @_ZN14HtnTermFactory4TrueEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(33088) %1)
          to label %43 unwind label %34

.invoke:                                          ; preds = %28, %41
  invoke void @_ZN14HtnTermFactory5FalseEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %0, ptr noundef nonnull align 8 dereferenceable(33088) %1)
          to label %43 unwind label %34

43:                                               ; preds = %.invoke17, %.invoke
  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 %47

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

45:                                               ; preds = %44, %30
  %.pn.pn = phi { ptr, i32 } [ %.pn, %44 ], [ %31, %30 ]
  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 } %.pn.pn

.critedge:                                        ; preds = %14
  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 %46

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

47:                                               ; preds = %43, %46
  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
}

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

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

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,SROAPass,SimplifyCFGPass,TailCallElimPass