; LLVM IR from flashlight/flashlight :: flashlight/fl/tensor (TensorExtension)

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

%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::__detail::_Node_iterator.27" = type { %"struct.std::__detail::_Node_iterator_base.28" }
%"struct.std::__detail::_Node_iterator_base.28" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.33 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.33 = type { i64, [8 x i8] }
%"class.fl::detail::TensorExtensionRegistrar" = type { %"class.std::unordered_map" }
%"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 }

@.str = external hidden unnamed_addr constant [109 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.1 = external hidden unnamed_addr constant [103 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

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 uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIN2fl17TensorBackendTypeES_INS0_19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS5_EEvEESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_SA_EEESB_IS1_ESD_IS1_ESaISF_IKS1_SJ_EEEixERSM_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN2fl6detail24TensorExtensionRegistrar30getTensorExtensionCreationFuncENS_17TensorBackendTypeENS_19TensorExtensionTypeE(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %1, i32 noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %8 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"struct.std::__detail::_Node_iterator.27", align 8
  %13 = alloca %"struct.std::__detail::_Node_iterator.27", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca i1, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !11
  %17 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %18 = getelementptr inbounds %"class.fl::detail::TensorExtensionRegistrar", ptr %17, i32 0, i32 0
  %19 = call ptr @_ZNSt13unordered_mapIN2fl17TensorBackendTypeES_INS0_19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS5_EEvEESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_SA_EEESB_IS1_ESD_IS1_ESaISF_IKS1_SJ_EEE4findERSM_(ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %20 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %7, i32 0, i32 0
  %21 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %20, i32 0, i32 0
  store ptr %19, ptr %21, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %22 = getelementptr inbounds %"class.fl::detail::TensorExtensionRegistrar", ptr %17, i32 0, i32 0
  %23 = call ptr @_ZNSt13unordered_mapIN2fl17TensorBackendTypeES_INS0_19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS5_EEvEESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_SA_EEESB_IS1_ESD_IS1_ESaISF_IKS1_SJ_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %22) #6
  %24 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %8, i32 0, i32 0
  %25 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %24, i32 0, i32 0
  store ptr %23, ptr %25, align 8
  %26 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKN2fl17TensorBackendTypeESt13unordered_mapINS2_19TensorExtensionTypeESt8functionIFSt10unique_ptrINS2_19TensorExtensionBaseESt14default_deleteIS9_EEvEESt4hashIS6_ESt8equal_toIS6_ESaIS1_IKS6_SE_EEEELb0EEESQ_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br i1 %26, label %27, label %34

27:                                               ; preds = %3
  %28 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef @.str)
          to label %29 unwind label %30

29:                                               ; preds = %27
  call void @__cxa_throw(ptr %28, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #7
  unreachable

30:                                               ; preds = %27
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %9, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %10, align 4
  call void @__cxa_free_exception(ptr %28) #6
  br label %72

34:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %35 = getelementptr inbounds %"class.fl::detail::TensorExtensionRegistrar", ptr %17, i32 0, i32 0
  %36 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIN2fl17TensorBackendTypeES_INS0_19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS5_EEvEESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_SA_EEESB_IS1_ESD_IS1_ESaISF_IKS1_SJ_EEEixERSM_(ptr noundef nonnull align 8 dereferenceable(56) %35, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store ptr %36, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = call ptr @_ZNSt13unordered_mapIN2fl19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS4_EEvEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S9_EEE4findERSF_(ptr noundef nonnull align 8 dereferenceable(56) %37, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %39 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.27", ptr %12, i32 0, i32 0
  %40 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.28", ptr %39, i32 0, i32 0
  store ptr %38, ptr %40, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %41 = load ptr, ptr %11, align 8, !tbaa !5
  %42 = call ptr @_ZNSt13unordered_mapIN2fl19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS4_EEvEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S9_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %41) #6
  %43 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.27", ptr %13, i32 0, i32 0
  %44 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.28", ptr %43, i32 0, i32 0
  store ptr %42, ptr %44, align 8
  %45 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKN2fl19TensorExtensionTypeESt8functionIFSt10unique_ptrINS2_19TensorExtensionBaseESt14default_deleteIS7_EEvEEELb0EEESG_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br i1 %45, label %46, label %69

46:                                               ; preds = %34
  store i1 true, ptr %16, align 1
  %47 = call ptr @__cxa_allocate_exception(i64 16) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #6
  %48 = load i32, ptr %5, align 4, !tbaa !9
  invoke void @_ZN2fl25tensorBackendTypeToStringB5cxx11ENS_17TensorBackendTypeE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, i32 noundef %48)
          to label %49 unwind label %52

49:                                               ; preds = %46
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef @.str.1, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %50 unwind label %56

50:                                               ; preds = %49
  invoke void @_ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %51 unwind label %60

51:                                               ; preds = %50
  store i1 false, ptr %16, align 1
  invoke void @__cxa_throw(ptr %47, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #7
          to label %77 unwind label %60

52:                                               ; preds = %46
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %9, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %10, align 4
  br label %65

56:                                               ; preds = %49
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %9, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %10, align 4
  br label %64

60:                                               ; preds = %51, %50
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %9, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %64

64:                                               ; preds = %60, %56
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %65

65:                                               ; preds = %64, %52
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  %66 = load i1, ptr %16, align 1
  br i1 %66, label %67, label %68

67:                                               ; preds = %65
  call void @__cxa_free_exception(ptr %47) #6
  br label %68

68:                                               ; preds = %67, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %72

69:                                               ; preds = %34
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt13unordered_mapIN2fl19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS4_EEvEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S9_EEEixERSF_(ptr noundef nonnull align 8 dereferenceable(56) %70, ptr noundef nonnull align 4 dereferenceable(4) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  ret ptr %71

72:                                               ; preds = %68, %30
  %73 = load ptr, ptr %9, align 8
  %74 = load i32, ptr %10, align 4
  %75 = insertvalue { ptr, i32 } poison, ptr %73, 0
  %76 = insertvalue { ptr, i32 } %75, i32 %74, 1
  resume { ptr, i32 } %76

77:                                               ; preds = %51
  unreachable
}

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

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

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

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #5

declare void @_ZN2fl25tensorBackendTypeToStringB5cxx11ENS_17TensorBackendTypeE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) #3

declare void @_ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 "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 = { inlinehint 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 #6 = { nounwind }
attributes #7 = { 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 = !{!"_ZTSN2fl17TensorBackendTypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN2fl19TensorExtensionTypeE", !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"

%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::__detail::_Node_iterator.27" = type { %"struct.std::__detail::_Node_iterator_base.28" }
%"struct.std::__detail::_Node_iterator_base.28" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.33 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.33 = type { i64, [8 x i8] }

@.str = external hidden unnamed_addr constant [109 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.1 = external hidden unnamed_addr constant [103 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

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 uwtable
declare dso_local noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIN2fl17TensorBackendTypeES_INS0_19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS5_EEvEESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_SA_EEESB_IS1_ESD_IS1_ESaISF_IKS1_SJ_EEEixERSM_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN2fl6detail24TensorExtensionRegistrar30getTensorExtensionCreationFuncENS_17TensorBackendTypeENS_19TensorExtensionTypeE(ptr noundef nonnull align 8 dereferenceable(56) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %7 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %8 = alloca %"struct.std::__detail::_Node_iterator.27", align 8
  %9 = alloca %"struct.std::__detail::_Node_iterator.27", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  store i32 %1, ptr %4, align 4, !tbaa !5
  store i32 %2, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %12 = call ptr @_ZNSt13unordered_mapIN2fl17TensorBackendTypeES_INS0_19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS5_EEvEESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_SA_EEESB_IS1_ESD_IS1_ESaISF_IKS1_SJ_EEE4findERSM_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 4 dereferenceable(4) %4)
  store ptr %12, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %13 = call ptr @_ZNSt13unordered_mapIN2fl17TensorBackendTypeES_INS0_19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS5_EEvEESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_SA_EEESB_IS1_ESD_IS1_ESaISF_IKS1_SJ_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  store ptr %13, ptr %7, align 8
  %14 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKN2fl17TensorBackendTypeESt13unordered_mapINS2_19TensorExtensionTypeESt8functionIFSt10unique_ptrINS2_19TensorExtensionBaseESt14default_deleteIS9_EEvEESt4hashIS6_ESt8equal_toIS6_ESaIS1_IKS6_SE_EEEELb0EEESQ_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br i1 %14, label %15, label %20

15:                                               ; preds = %3
  %16 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull @.str)
          to label %17 unwind label %18

17:                                               ; preds = %15
  call void @__cxa_throw(ptr nonnull %16, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #7
  unreachable

18:                                               ; preds = %15
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %.sink.split

20:                                               ; preds = %3
  %21 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNSt13unordered_mapIN2fl17TensorBackendTypeES_INS0_19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS5_EEvEESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_SA_EEESB_IS1_ESD_IS1_ESaISF_IKS1_SJ_EEEixERSM_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %22 = call ptr @_ZNSt13unordered_mapIN2fl19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS4_EEvEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S9_EEE4findERSF_(ptr noundef nonnull align 8 dereferenceable(56) %21, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store ptr %22, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %23 = call ptr @_ZNSt13unordered_mapIN2fl19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS4_EEvEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S9_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %21) #6
  store ptr %23, ptr %9, align 8
  %24 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKN2fl19TensorExtensionTypeESt8functionIFSt10unique_ptrINS2_19TensorExtensionBaseESt14default_deleteIS7_EEvEEELb0EEESG_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br i1 %24, label %25, label %35

25:                                               ; preds = %20
  %26 = call ptr @__cxa_allocate_exception(i64 16) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #6
  %27 = load i32, ptr %4, align 4, !tbaa !5
  invoke void @_ZN2fl25tensorBackendTypeToStringB5cxx11ENS_17TensorBackendTypeE(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %11, i32 noundef %27)
          to label %28 unwind label %.thread

28:                                               ; preds = %25
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull @.str.1, ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %29 unwind label %.thread19

29:                                               ; preds = %28
  invoke void @_ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %30 unwind label %33

30:                                               ; preds = %29
  invoke void @__cxa_throw(ptr nonnull %26, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #7
          to label %38 unwind label %33

.thread:                                          ; preds = %25
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br label %.sink.split

.thread19:                                        ; preds = %28
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br label %.sink.split

33:                                               ; preds = %29, %30
  %.0 = phi i1 [ false, %30 ], [ true, %29 ]
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br i1 %.0, label %.sink.split, label %37

35:                                               ; preds = %20
  %36 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt13unordered_mapIN2fl19TensorExtensionTypeESt8functionIFSt10unique_ptrINS0_19TensorExtensionBaseESt14default_deleteIS4_EEvEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S9_EEEixERSF_(ptr noundef nonnull align 8 dereferenceable(56) %21, ptr noundef nonnull align 4 dereferenceable(4) %5)
  ret ptr %36

.sink.split:                                      ; preds = %33, %.thread, %.thread19, %18
  %.sink = phi ptr [ %16, %18 ], [ %26, %.thread19 ], [ %26, %.thread ], [ %26, %33 ]
  %.pn14.ph = phi { ptr, i32 } [ %19, %18 ], [ %32, %.thread19 ], [ %31, %.thread ], [ %34, %33 ]
  call void @__cxa_free_exception(ptr %.sink) #6
  br label %37

37:                                               ; preds = %.sink.split, %33
  %.pn14 = phi { ptr, i32 } [ %34, %33 ], [ %.pn14.ph, %.sink.split ]
  resume { ptr, i32 } %.pn14

38:                                               ; preds = %30
  unreachable
}

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #5

declare void @_ZN2fl25tensorBackendTypeToStringB5cxx11ENS_17TensorBackendTypeE(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, i32 noundef) local_unnamed_addr #3

declare void @_ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 "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 = { inlinehint 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 #6 = { nounwind }
attributes #7 = { 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 = !{!"_ZTSN2fl17TensorBackendTypeE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN2fl19TensorExtensionTypeE", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass