; 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.fl::Tensor" = type { ptr, %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.90" }
%"struct.std::_Head_base.90" = type { ptr }
%"class.fl::Evaluator" = type { ptr, %"class.std::unordered_map", %"class.std::unordered_map.8", i8, %"class.std::__cxx11::list" }
%"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::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.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 }

@_ZTISt13runtime_error = external constant ptr
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1

; 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(...)

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2fl9Evaluator10evalScalarESt10shared_ptrINS_10ScalarNodeEE(ptr dead_on_unwind noalias writable sret(%"class.fl::Tensor") align 8 %0, ptr noundef nonnull align 8 dereferenceable(152) %1, ptr noundef %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  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
  %15 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %16 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2fl10ScalarNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  %17 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK2fl4Node5shapeEv(ptr noundef nonnull align 8 dereferenceable(152) %16)
  store ptr %17, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %18 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2fl10ScalarNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  %19 = call noundef i32 @_ZNK2fl10ScalarNode8dataTypeEv(ptr noundef nonnull align 8 dereferenceable(176) %18)
  store i32 %19, ptr %8, align 4, !tbaa !9
  %20 = load i32, ptr %8, align 4, !tbaa !9
  switch i32 %20, label %51 [
    i32 0, label %21
    i32 1, label %21
    i32 2, label %21
    i32 3, label %31
    i32 4, label %31
    i32 5, label %31
    i32 6, label %31
    i32 7, label %31
    i32 8, label %31
    i32 9, label %31
    i32 10, label %41
  ]

21:                                               ; preds = %3, %3, %3
  %22 = getelementptr inbounds %"class.fl::Evaluator", ptr %15, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %25 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2fl10ScalarNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  %26 = call noundef double @_ZNK2fl10ScalarNode6scalarIdEET_v(ptr noundef nonnull align 8 dereferenceable(176) %25)
  store double %26, ptr %9, align 8, !tbaa !27
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = load ptr, ptr %23, align 8, !tbaa !29
  %29 = getelementptr inbounds ptr, ptr %28, i64 13
  %30 = load ptr, ptr %29, align 8
  call void %30(ptr dead_on_unwind writable sret(%"class.fl::Tensor") align 8 %0, ptr noundef nonnull align 8 dereferenceable(64) %23, ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(8) %9, i32 noundef %27)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  store i32 1, ptr %10, align 4
  br label %58

31:                                               ; preds = %3, %3, %3, %3, %3, %3, %3
  %32 = getelementptr inbounds %"class.fl::Evaluator", ptr %15, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %35 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2fl10ScalarNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  %36 = call noundef i64 @_ZNK2fl10ScalarNode6scalarIxEET_v(ptr noundef nonnull align 8 dereferenceable(176) %35)
  store i64 %36, ptr %11, align 8, !tbaa !31
  %37 = load i32, ptr %8, align 4, !tbaa !9
  %38 = load ptr, ptr %33, align 8, !tbaa !29
  %39 = getelementptr inbounds ptr, ptr %38, i64 29
  %40 = load ptr, ptr %39, align 8
  call void %40(ptr dead_on_unwind writable sret(%"class.fl::Tensor") align 8 %0, ptr noundef nonnull align 8 dereferenceable(64) %33, ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef %37)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  store i32 1, ptr %10, align 4
  br label %58

41:                                               ; preds = %3
  %42 = getelementptr inbounds %"class.fl::Evaluator", ptr %15, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %45 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN2fl10ScalarNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  %46 = call noundef i64 @_ZNK2fl10ScalarNode6scalarIyEET_v(ptr noundef nonnull align 8 dereferenceable(176) %45)
  store i64 %46, ptr %12, align 8, !tbaa !31
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = load ptr, ptr %43, align 8, !tbaa !29
  %49 = getelementptr inbounds ptr, ptr %48, i64 31
  %50 = load ptr, ptr %49, align 8
  call void %50(ptr dead_on_unwind writable sret(%"class.fl::Tensor") align 8 %0, ptr noundef nonnull align 8 dereferenceable(64) %43, ptr noundef nonnull align 8 dereferenceable(24) %44, ptr noundef nonnull align 8 dereferenceable(8) %12, i32 noundef %47)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  store i32 1, ptr %10, align 4
  br label %58

51:                                               ; preds = %3
  %52 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %52, ptr noundef @.str.1)
          to label %53 unwind label %54

53:                                               ; preds = %51
  call void @__cxa_throw(ptr %52, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #6
  unreachable

54:                                               ; preds = %51
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %13, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %14, align 4
  call void @__cxa_free_exception(ptr %52) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %59

58:                                               ; preds = %41, %31, %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void

59:                                               ; preds = %54
  %60 = load ptr, ptr %13, align 8
  %61 = load i32, ptr %14, 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 nounwind uwtable
declare dso_local noundef ptr @_ZNKSt19__shared_ptr_accessIN2fl10ScalarNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1)) #4 align 2

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK2fl4Node5shapeEv(ptr noundef nonnull align 8 dereferenceable(152)) #1

declare noundef i32 @_ZNK2fl10ScalarNode8dataTypeEv(ptr noundef nonnull align 8 dereferenceable(176)) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK2fl10ScalarNode6scalarIdEET_v(ptr noundef nonnull align 8 dereferenceable(176)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK2fl10ScalarNode6scalarIxEET_v(ptr noundef nonnull align 8 dereferenceable(176)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK2fl10ScalarNode6scalarIyEET_v(ptr noundef nonnull align 8 dereferenceable(176)) #3 align 2

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

!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 = !{!"_ZTSN2fl5dtypeE", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSN2fl9EvaluatorE", !6, i64 0, !13, i64 8, !19, i64 64, !21, i64 120, !22, i64 128}
!13 = !{!"_ZTSSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEE", !14, i64 0}
!14 = !{!"_ZTSSt10_HashtableISt10shared_ptrIN2fl4NodeEESt4pairIKS3_jESaIS6_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENS8_18_Mod_range_hashingENS8_20_Default_ranged_hashENS8_20_Prime_rehash_policyENS8_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !15, i64 8, !16, i64 16, !15, i64 24, !17, i64 32, !6, i64 48}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!17 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !18, i64 0, !15, i64 8}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTSSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEE", !20, i64 0}
!20 = !{!"_ZTSSt10_HashtableISt10shared_ptrIN2fl4NodeEESt4pairIKS3_fESaIS6_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENS8_18_Mod_range_hashingENS8_20_Default_ranged_hashENS8_20_Prime_rehash_policyENS8_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !15, i64 8, !16, i64 16, !15, i64 24, !17, i64 32, !6, i64 48}
!21 = !{!"bool", !7, i64 0}
!22 = !{!"_ZTSNSt7__cxx114listISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS5_fSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_fEEEEESaISH_EEE", !23, i64 0}
!23 = !{!"_ZTSNSt7__cxx1110_List_baseISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS5_fSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_fEEEEESaISH_EEE", !24, i64 0}
!24 = !{!"_ZTSNSt7__cxx1110_List_baseISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS5_fSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_fEEEEESaISH_EE10_List_implE", !25, i64 0}
!25 = !{!"_ZTSNSt8__detail17_List_node_headerE", !26, i64 0, !15, i64 16}
!26 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!27 = !{!28, !28, i64 0}
!28 = !{!"double", !7, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !8, i64 0}
!31 = !{!32, !32, i64 0}
!32 = !{!"long long", !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.fl::Tensor" = type { ptr, %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.90" }
%"struct.std::_Head_base.90" = type { ptr }

@_ZTISt13runtime_error = external constant ptr
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1

; 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(...)

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2fl9Evaluator10evalScalarESt10shared_ptrINS_10ScalarNodeEE(ptr dead_on_unwind noalias writable sret(%"class.fl::Tensor") align 8 %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(152) %1, ptr noundef nonnull %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca double, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN2fl10ScalarNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  %8 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK2fl4Node5shapeEv(ptr noundef nonnull align 8 dereferenceable(152) %7)
  %9 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN2fl10ScalarNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  %10 = tail call noundef i32 @_ZNK2fl10ScalarNode8dataTypeEv(ptr noundef nonnull align 8 dereferenceable(176) %9)
  switch i32 %10, label %32 [
    i32 0, label %11
    i32 1, label %11
    i32 2, label %11
    i32 3, label %18
    i32 4, label %18
    i32 5, label %18
    i32 6, label %18
    i32 7, label %18
    i32 8, label %18
    i32 9, label %18
    i32 10, label %25
  ]

11:                                               ; preds = %3, %3, %3
  %12 = load ptr, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %13 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN2fl10ScalarNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  %14 = tail call noundef double @_ZNK2fl10ScalarNode6scalarIdEET_v(ptr noundef nonnull align 8 dereferenceable(176) %13)
  store double %14, ptr %4, align 8, !tbaa !24
  %15 = load ptr, ptr %12, align 8, !tbaa !26
  %16 = getelementptr inbounds i8, ptr %15, i64 104
  %17 = load ptr, ptr %16, align 8
  call void %17(ptr dead_on_unwind writable sret(%"class.fl::Tensor") align 8 %0, ptr noundef nonnull align 8 dereferenceable(64) %12, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %37

18:                                               ; preds = %3, %3, %3, %3, %3, %3, %3
  %19 = load ptr, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %20 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN2fl10ScalarNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  %21 = tail call noundef i64 @_ZNK2fl10ScalarNode6scalarIxEET_v(ptr noundef nonnull align 8 dereferenceable(176) %20)
  store i64 %21, ptr %5, align 8, !tbaa !28
  %22 = load ptr, ptr %19, align 8, !tbaa !26
  %23 = getelementptr inbounds i8, ptr %22, i64 232
  %24 = load ptr, ptr %23, align 8
  call void %24(ptr dead_on_unwind writable sret(%"class.fl::Tensor") align 8 %0, ptr noundef nonnull align 8 dereferenceable(64) %19, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %5, i32 noundef %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  br label %37

25:                                               ; preds = %3
  %26 = load ptr, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %27 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN2fl10ScalarNodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %2) #5
  %28 = tail call noundef i64 @_ZNK2fl10ScalarNode6scalarIyEET_v(ptr noundef nonnull align 8 dereferenceable(176) %27)
  store i64 %28, ptr %6, align 8, !tbaa !28
  %29 = load ptr, ptr %26, align 8, !tbaa !26
  %30 = getelementptr inbounds i8, ptr %29, i64 248
  %31 = load ptr, ptr %30, align 8
  call void %31(ptr dead_on_unwind writable sret(%"class.fl::Tensor") align 8 %0, ptr noundef nonnull align 8 dereferenceable(64) %26, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %37

32:                                               ; preds = %3
  %33 = tail call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt13runtime_errorC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull @.str.1)
          to label %34 unwind label %35

34:                                               ; preds = %32
  tail call void @__cxa_throw(ptr nonnull %33, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #6
  unreachable

35:                                               ; preds = %32
  %36 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %33) #5
  resume { ptr, i32 } %36

37:                                               ; preds = %25, %18, %11
  ret void
}

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

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK2fl4Node5shapeEv(ptr noundef nonnull align 8 dereferenceable(152)) local_unnamed_addr #1

declare noundef i32 @_ZNK2fl10ScalarNode8dataTypeEv(ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK2fl10ScalarNode6scalarIdEET_v(ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK2fl10ScalarNode6scalarIxEET_v(ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK2fl10ScalarNode6scalarIyEET_v(ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #3 align 2

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

!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, !7, i64 0}
!6 = !{!"_ZTSN2fl9EvaluatorE", !7, i64 0, !10, i64 8, !16, i64 64, !18, i64 120, !19, i64 128}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt13unordered_mapISt10shared_ptrIN2fl4NodeEEjSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_jEEE", !11, i64 0}
!11 = !{!"_ZTSSt10_HashtableISt10shared_ptrIN2fl4NodeEESt4pairIKS3_jESaIS6_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENS8_18_Mod_range_hashingENS8_20_Default_ranged_hashENS8_20_Prime_rehash_policyENS8_17_Hashtable_traitsILb0ELb0ELb1EEEE", !7, i64 0, !12, i64 8, !13, i64 16, !12, i64 24, !14, i64 32, !7, i64 48}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !7, i64 0}
!14 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !15, i64 0, !12, i64 8}
!15 = !{!"float", !8, i64 0}
!16 = !{!"_ZTSSt13unordered_mapISt10shared_ptrIN2fl4NodeEEfSt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_fEEE", !17, i64 0}
!17 = !{!"_ZTSSt10_HashtableISt10shared_ptrIN2fl4NodeEESt4pairIKS3_fESaIS6_ENSt8__detail10_Select1stESt8equal_toIS3_ESt4hashIS3_ENS8_18_Mod_range_hashingENS8_20_Default_ranged_hashENS8_20_Prime_rehash_policyENS8_17_Hashtable_traitsILb0ELb0ELb1EEEE", !7, i64 0, !12, i64 8, !13, i64 16, !12, i64 24, !14, i64 32, !7, i64 48}
!18 = !{!"bool", !8, i64 0}
!19 = !{!"_ZTSNSt7__cxx114listISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS5_fSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_fEEEEESaISH_EEE", !20, i64 0}
!20 = !{!"_ZTSNSt7__cxx1110_List_baseISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS5_fSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_fEEEEESaISH_EEE", !21, i64 0}
!21 = !{!"_ZTSNSt7__cxx1110_List_baseISt8functionIFvSt10shared_ptrIN2fl4NodeEESt13unordered_mapIS5_fSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_fEEEEESaISH_EE10_List_implE", !22, i64 0}
!22 = !{!"_ZTSNSt8__detail17_List_node_headerE", !23, i64 0, !12, i64 16}
!23 = !{!"_ZTSNSt8__detail15_List_node_baseE", !7, i64 0, !7, i64 8}
!24 = !{!25, !25, i64 0}
!25 = !{!"double", !8, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"vtable pointer", !9, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"long long", !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass