; LLVM IR from flashlight/flashlight :: flashlight/fl/tensor/backend/jit/eval (Evaluator)

; 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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"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 }
%"struct.std::_List_iterator" = type { ptr }
%"class.std::unordered_map.8" = type { %"class.std::_Hashtable.9" }
%"class.std::_Hashtable.9" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.fl::Evaluator" = type { ptr, %"class.std::unordered_map", %"class.std::unordered_map.8", i8, %"class.std::__cxx11::list" }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<std::function<void (std::shared_ptr<fl::Node>, std::unordered_map<std::shared_ptr<fl::Node>, float>)>, std::allocator<std::function<void (std::shared_ptr<fl::Node>, std::unordered_map<std::shared_ptr<fl::Node>, float>)>>>::_List_impl" }
%"struct.std::__cxx11::_List_base<std::function<void (std::shared_ptr<fl::Node>, std::unordered_map<std::shared_ptr<fl::Node>, float>)>, std::allocator<std::function<void (std::shared_ptr<fl::Node>, std::unordered_map<std::shared_ptr<fl::Node>, float>)>>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2fl9Evaluator4evalESt10shared_ptrINS_4NodeEE(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::unordered_map", align 8
  %6 = alloca %"class.std::shared_ptr", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::shared_ptr", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.std::_List_iterator", align 8
  %12 = alloca %"struct.std::_List_iterator", align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.std::shared_ptr", align 8
  %15 = alloca %"class.std::unordered_map.8", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr %5) #4
  call void @_ZNSt10shared_ptrIN2fl4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  invoke void @_ZN2fl12_GLOBAL__N_123getNodeToUseCountInTreeESt10shared_ptrINS_4NodeEE(ptr dead_on_unwind writable sret(%"class.std::unordered_map") align 8 %5, ptr noundef %6)
          to label %17 unwind label %31

17:                                               ; preds = %2
  %18 = getelementptr inbounds %"class.fl::Evaluator", ptr %16, i32 0, i32 1
  %19 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEEaSEOSC_(ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull align 8 dereferenceable(56) %5) #4
  call void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #4
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %5) #4
  call void @_ZNSt10shared_ptrIN2fl4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  invoke void @_ZN2fl9Evaluator8evalNodeESt10shared_ptrINS_4NodeEE(ptr noundef nonnull align 8 dereferenceable(152) %16, ptr noundef %9)
          to label %20 unwind label %35

20:                                               ; preds = %17
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %21 = getelementptr inbounds %"class.fl::Evaluator", ptr %16, i32 0, i32 4
  store ptr %21, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  %23 = call ptr @_ZNSt7__cxx114listISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS5_fSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_fEEEEESaISH_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #4
  %24 = getelementptr inbounds %"struct.std::_List_iterator", ptr %11, i32 0, i32 0
  store ptr %23, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  %26 = call ptr @_ZNSt7__cxx114listISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS5_fSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_fEEEEESaISH_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %27 = getelementptr inbounds %"struct.std::_List_iterator", ptr %12, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  br label %28

28:                                               ; preds = %45, %20
  %29 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS4_fSt4hashIS4_ESt8equal_toIS4_ESaISt4pairIKS4_fEEEEEESJ_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br i1 %29, label %39, label %30

30:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %56

31:                                               ; preds = %2
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %7, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %8, align 4
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %5) #4
  br label %59

35:                                               ; preds = %17
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %7, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %8, align 4
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #4
  br label %59

39:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %40 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS4_fSt4hashIS4_ESt8equal_toIS4_ESaISt4pairIKS4_fEEEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  store ptr %40, ptr %13, align 8, !tbaa !5
  %41 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZNSt10shared_ptrIN2fl4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  %42 = getelementptr inbounds %"class.fl::Evaluator", ptr %16, i32 0, i32 2
  invoke void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEC2ERKSC_(ptr noundef nonnull align 8 dereferenceable(56) %15, ptr noundef nonnull align 8 dereferenceable(56) %42)
          to label %43 unwind label %47

43:                                               ; preds = %39
  invoke void @_ZNKSt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS3_fSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEEEclES3_SD_(ptr noundef nonnull align 8 dereferenceable(32) %41, ptr noundef %14, ptr noundef %15)
          to label %44 unwind label %51

44:                                               ; preds = %43
  call void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #4
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %45

45:                                               ; preds = %44
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS4_fSt4hashIS4_ESt8equal_toIS4_ESaISt4pairIKS4_fEEEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  br label %28

47:                                               ; preds = %39
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %7, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %8, align 4
  br label %55

51:                                               ; preds = %43
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %7, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %8, align 4
  call void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %15) #4
  br label %55

55:                                               ; preds = %51, %47
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  br label %59

56:                                               ; preds = %30
  %57 = getelementptr inbounds %"class.fl::Evaluator", ptr %16, i32 0, i32 2
  call void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %57) #4
  %58 = getelementptr inbounds %"class.fl::Evaluator", ptr %16, i32 0, i32 1
  call void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %58) #4
  ret void

59:                                               ; preds = %55, %35, %31
  %60 = load ptr, ptr %7, align 8
  %61 = load i32, ptr %8, align 4
  %62 = insertvalue { ptr, i32 } poison, ptr %60, 0
  %63 = insertvalue { ptr, i32 } %62, i32 %61, 1
  resume { ptr, i32 } %63
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN2fl12_GLOBAL__N_123getNodeToUseCountInTreeESt10shared_ptrINS_4NodeEE(ptr dead_on_unwind noalias writable sret(%"class.std::unordered_map") align 8, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEEaSEOSC_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56)) #1 align 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 = { 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 = { 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"}


; 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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"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 }
%"struct.std::_List_iterator" = type { ptr }
%"class.std::unordered_map.8" = type { %"class.std::_Hashtable.9" }
%"class.std::_Hashtable.9" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2fl9Evaluator8evalNodeESt10shared_ptrINS_4NodeEE(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2fl9Evaluator4evalESt10shared_ptrINS_4NodeEE(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::unordered_map", align 8
  %4 = alloca %"class.std::shared_ptr", align 8
  %5 = alloca %"class.std::shared_ptr", align 8
  %6 = alloca %"struct.std::_List_iterator", align 8
  %7 = alloca %"struct.std::_List_iterator", align 8
  %8 = alloca %"class.std::shared_ptr", align 8
  %9 = alloca %"class.std::unordered_map.8", align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %3) #4
  call void @_ZNSt10shared_ptrIN2fl4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  invoke void @_ZN2fl12_GLOBAL__N_123getNodeToUseCountInTreeESt10shared_ptrINS_4NodeEE(ptr dead_on_unwind nonnull writable sret(%"class.std::unordered_map") align 8 %3, ptr noundef nonnull %4)
          to label %10 unwind label %20

10:                                               ; preds = %2
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  %12 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEEaSEOSC_(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  call void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #4
  call void @_ZNSt10shared_ptrIN2fl4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  invoke void @_ZN2fl9Evaluator8evalNodeESt10shared_ptrINS_4NodeEE(ptr noundef nonnull align 8 dereferenceable(152) %0, ptr noundef nonnull %5)
          to label %13 unwind label %22

13:                                               ; preds = %10
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  %14 = getelementptr inbounds i8, ptr %0, i64 128
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %15 = call ptr @_ZNSt7__cxx114listISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS5_fSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_fEEEEESaISH_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  store ptr %15, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %16 = call ptr @_ZNSt7__cxx114listISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS5_fSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_fEEEEESaISH_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #4
  store ptr %16, ptr %7, align 8
  %17 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS4_fSt4hashIS4_ESt8equal_toIS4_ESaISt4pairIKS4_fEEEEEESJ_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %17, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %13
  %18 = getelementptr inbounds i8, ptr %0, i64 64
  br label %24

._crit_edge:                                      ; preds = %27, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %19 = getelementptr inbounds i8, ptr %0, i64 64
  call void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %19) #4
  call void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56) %11) #4
  ret void

20:                                               ; preds = %2
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #4
  br label %35

22:                                               ; preds = %10
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  br label %35

24:                                               ; preds = %.lr.ph, %27
  %25 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt14_List_iteratorISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS4_fSt4hashIS4_ESt8equal_toIS4_ESaISt4pairIKS4_fEEEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @_ZNSt10shared_ptrIN2fl4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %1) #4
  invoke void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEC2ERKSC_(ptr noundef nonnull align 8 dereferenceable(56) %9, ptr noundef nonnull align 8 dereferenceable(56) %18)
          to label %26 unwind label %30

26:                                               ; preds = %24
  invoke void @_ZNKSt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS3_fSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEEEEclES3_SD_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull %8, ptr noundef nonnull %9)
          to label %27 unwind label %32

27:                                               ; preds = %26
  call void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #4
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS4_fSt4hashIS4_ESt8equal_toIS4_ESaISt4pairIKS4_fEEEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %29 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS4_fSt4hashIS4_ESt8equal_toIS4_ESaISt4pairIKS4_fEEEEEESJ_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %29, label %24, label %._crit_edge

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

32:                                               ; preds = %26
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #4
  br label %34

34:                                               ; preds = %32, %30
  %.pn = phi { ptr, i32 } [ %33, %32 ], [ %31, %30 ]
  call void @_ZNSt12__shared_ptrIN2fl4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %35

35:                                               ; preds = %34, %22, %20
  %.pn.pn = phi { ptr, i32 } [ %.pn, %34 ], [ %23, %22 ], [ %21, %20 ]
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN2fl12_GLOBAL__N_123getNodeToUseCountInTreeESt10shared_ptrINS_4NodeEE(ptr dead_on_unwind noalias writable sret(%"class.std::unordered_map") align 8, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEEaSEOSC_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEE5clearEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 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 = { 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 = { 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: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass