; LLVM IR from apache/mxnet :: src/lib_api.ll (ZN5mxnet3ext8CustomOp26raiseDuplicateContextErrorEv)

; 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::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = type { i8 }
%"class.mxnet::ext::CustomOp" = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, %"class.std::vector.103", %"class.std::vector.103", %"class.std::vector.103", %"class.std::vector.108", %"class.std::vector.108", %"class.std::vector.113", %"class.std::unordered_map.118", %"class.std::unordered_map.118", %"class.std::unordered_map.138" }
%"class.std::vector.103" = type { %"struct.std::_Vector_base.104" }
%"struct.std::_Vector_base.104" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.108" = type { %"struct.std::_Vector_base.109" }
%"struct.std::_Vector_base.109" = type { %"struct.std::_Vector_base<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, std::vector<mxnet::ext::MXTensor> *, std::vector<mxnet::ext::MXTensor> *, const mxnet::ext::OpResource &), std::allocator<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, std::vector<mxnet::ext::MXTensor> *, std::vector<mxnet::ext::MXTensor> *, const mxnet::ext::OpResource &)>>::_Vector_impl" }
%"struct.std::_Vector_base<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, std::vector<mxnet::ext::MXTensor> *, std::vector<mxnet::ext::MXTensor> *, const mxnet::ext::OpResource &), std::allocator<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, std::vector<mxnet::ext::MXTensor> *, std::vector<mxnet::ext::MXTensor> *, const mxnet::ext::OpResource &)>>::_Vector_impl" = type { %"struct.std::_Vector_base<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, std::vector<mxnet::ext::MXTensor> *, std::vector<mxnet::ext::MXTensor> *, const mxnet::ext::OpResource &), std::allocator<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, std::vector<mxnet::ext::MXTensor> *, std::vector<mxnet::ext::MXTensor> *, const mxnet::ext::OpResource &)>>::_Vector_impl_data" }
%"struct.std::_Vector_base<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, std::vector<mxnet::ext::MXTensor> *, std::vector<mxnet::ext::MXTensor> *, const mxnet::ext::OpResource &), std::allocator<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, std::vector<mxnet::ext::MXTensor> *, std::vector<mxnet::ext::MXTensor> *, const mxnet::ext::OpResource &)>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.113" = type { %"struct.std::_Vector_base.114" }
%"struct.std::_Vector_base.114" = type { %"struct.std::_Vector_base<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, const mxnet::ext::MXContext &, const std::vector<std::vector<unsigned int>> &, std::vector<int>, mxnet::ext::CustomStatefulOp **), std::allocator<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, const mxnet::ext::MXContext &, const std::vector<std::vector<unsigned int>> &, std::vector<int>, mxnet::ext::CustomStatefulOp **)>>::_Vector_impl" }
%"struct.std::_Vector_base<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, const mxnet::ext::MXContext &, const std::vector<std::vector<unsigned int>> &, std::vector<int>, mxnet::ext::CustomStatefulOp **), std::allocator<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, const mxnet::ext::MXContext &, const std::vector<std::vector<unsigned int>> &, std::vector<int>, mxnet::ext::CustomStatefulOp **)>>::_Vector_impl" = type { %"struct.std::_Vector_base<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, const mxnet::ext::MXContext &, const std::vector<std::vector<unsigned int>> &, std::vector<int>, mxnet::ext::CustomStatefulOp **), std::allocator<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, const mxnet::ext::MXContext &, const std::vector<std::vector<unsigned int>> &, std::vector<int>, mxnet::ext::CustomStatefulOp **)>>::_Vector_impl_data" }
%"struct.std::_Vector_base<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, const mxnet::ext::MXContext &, const std::vector<std::vector<unsigned int>> &, std::vector<int>, mxnet::ext::CustomStatefulOp **), std::allocator<mxnet::ext::MXReturnValue (*)(const std::unordered_map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>> &, const mxnet::ext::MXContext &, const std::vector<std::vector<unsigned int>> &, std::vector<int>, mxnet::ext::CustomStatefulOp **)>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map.118" = type { %"class.std::_Hashtable.119" }
%"class.std::_Hashtable.119" = 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.138" = type { %"class.std::_Hashtable.139" }
%"class.std::_Hashtable.139" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }

@_ZTISt13runtime_error = external constant ptr
@.str.22 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [83 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

declare ptr @__cxa_allocate_exception(i64)

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

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

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare void @__cxa_free_exception(ptr)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5mxnet3ext8CustomOp26raiseDuplicateContextErrorEv(ptr noundef nonnull align 8 dereferenceable(368) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator.0", align 1
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca i1, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #6
  %11 = getelementptr inbounds %"class.mxnet::ext::CustomOp", ptr %10, i32 0, i32 0
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef %12, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %13 unwind label %18

13:                                               ; preds = %1
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  store i1 true, ptr %9, align 1
  %14 = call ptr @__cxa_allocate_exception(i64 16) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef @.str.59, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %15 unwind label %22

15:                                               ; preds = %13
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.22)
          to label %16 unwind label %26

16:                                               ; preds = %15
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %17 unwind label %30

17:                                               ; preds = %16
  store i1 false, ptr %9, align 1
  invoke void @__cxa_throw(ptr %14, ptr @_ZTISt13runtime_error, ptr @_ZNSt13runtime_errorD1Ev) #7
          to label %45 unwind label %30

18:                                               ; preds = %1
  %19 = landingpad { ptr, i32 }
          cleanup
  %20 = extractvalue { ptr, i32 } %19, 0
  store ptr %20, ptr %5, align 8
  %21 = extractvalue { ptr, i32 } %19, 1
  store i32 %21, ptr %6, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #6
  br label %39

22:                                               ; preds = %13
  %23 = landingpad { ptr, i32 }
          cleanup
  %24 = extractvalue { ptr, i32 } %23, 0
  store ptr %24, ptr %5, align 8
  %25 = extractvalue { ptr, i32 } %23, 1
  store i32 %25, ptr %6, align 4
  br label %35

26:                                               ; preds = %15
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %5, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %6, align 4
  br label %34

30:                                               ; preds = %17, %16
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %5, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %6, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %34

34:                                               ; preds = %30, %26
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %35

35:                                               ; preds = %34, %22
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #6
  %36 = load i1, ptr %9, align 1
  br i1 %36, label %37, label %38

37:                                               ; preds = %35
  call void @__cxa_free_exception(ptr %14) #6
  br label %38

38:                                               ; preds = %37, %35
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  br label %39

39:                                               ; preds = %38, %18
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #6
  br label %40

40:                                               ; preds = %39
  %41 = load ptr, ptr %5, align 8
  %42 = load i32, ptr %6, align 4
  %43 = insertvalue { ptr, i32 } poison, ptr %41, 0
  %44 = insertvalue { ptr, i32 } %43, i32 %42, 1
  resume { ptr, i32 } %44

45:                                               ; preds = %17
  unreachable
}

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 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 = { "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 "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, !6, i64 0}
!10 = !{!"_ZTSN5mxnet3ext8CustomOpE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !12, i64 56, !12, i64 80, !12, i64 104, !16, i64 128, !16, i64 152, !20, i64 176, !24, i64 200, !24, i64 256, !30, i64 312}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSSt6vectorIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEEPS_INS1_8MXTensorESaISL_EESO_RKNS1_10OpResourceEESaIST_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEEPSt6vectorINS1_8MXTensorESaISM_EESP_RKNS1_10OpResourceEESaISU_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEEPSt6vectorINS1_8MXTensorESaISM_EESP_RKNS1_10OpResourceEESaISU_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEEPSt6vectorINS1_8MXTensorESaISM_EESP_RKNS1_10OpResourceEESaISU_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSSt6vectorIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEERKNS1_9MXContextERKS_IS_IjSaIjEESaISP_EES_IiSaIiEEPPNS1_16CustomStatefulOpEESaIS10_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEERKNS1_9MXContextERKSt6vectorISO_IjSaIjEESaISQ_EESO_IiSaIiEEPPNS1_16CustomStatefulOpEESaIS11_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEERKNS1_9MXContextERKSt6vectorISO_IjSaIjEESaISQ_EESO_IiSaIiEEPPNS1_16CustomStatefulOpEESaIS11_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEERKNS1_9MXContextERKSt6vectorISO_IjSaIjEESaISQ_EESO_IiSaIiEEPPNS1_16CustomStatefulOpEESaIS11_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"_ZTSSt13unordered_mapIPKcPFN5mxnet3ext13MXReturnValueERKS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_St4hashISA_ESt8equal_toISA_ESaISt4pairIKSA_SA_EEEPSt6vectorINS3_8MXTensorESaISN_EESQ_RKNS3_10OpResourceEESB_IS1_ESD_IS1_ESaISF_IKS1_SV_EEE", !25, i64 0}
!25 = !{!"_ZTSSt10_HashtableIPKcSt4pairIKS1_PFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_St4hashISD_ESt8equal_toISD_ESaIS2_IKSD_SD_EEEPSt6vectorINS5_8MXTensorESaISP_EESS_RKNS5_10OpResourceEEESaISY_ENSt8__detail10_Select1stESG_IS1_ESE_IS1_ENS10_18_Mod_range_hashingENS10_20_Default_ranged_hashENS10_20_Prime_rehash_policyENS10_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !26, i64 8, !27, i64 16, !26, i64 24, !28, i64 32, !6, i64 48}
!26 = !{!"long", !7, i64 0}
!27 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!28 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !29, i64 0, !26, i64 8}
!29 = !{!"float", !7, i64 0}
!30 = !{!"_ZTSSt13unordered_mapIPKcPFN5mxnet3ext13MXReturnValueERKS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_St4hashISA_ESt8equal_toISA_ESaISt4pairIKSA_SA_EEERKNS3_9MXContextERKSt6vectorISP_IjSaIjEESaISR_EESP_IiSaIiEEPPNS3_16CustomStatefulOpEESB_IS1_ESD_IS1_ESaISF_IKS1_S12_EEE", !31, i64 0}
!31 = !{!"_ZTSSt10_HashtableIPKcSt4pairIKS1_PFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_St4hashISD_ESt8equal_toISD_ESaIS2_IKSD_SD_EEERKNS5_9MXContextERKSt6vectorISR_IjSaIjEESaIST_EESR_IiSaIiEEPPNS5_16CustomStatefulOpEEESaIS15_ENSt8__detail10_Select1stESG_IS1_ESE_IS1_ENS17_18_Mod_range_hashingENS17_20_Default_ranged_hashENS17_20_Prime_rehash_policyENS17_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !26, i64 8, !27, i64 16, !26, i64 24, !28, i64 32, !6, i64 48}


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

@_ZTISt13runtime_error = external constant ptr
@.str.22 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.59 = external hidden unnamed_addr constant [83 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

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

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(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 #2

; Function Attrs: mustprogress noreturn uwtable
define dso_local void @_ZN5mxnet3ext8CustomOp26raiseDuplicateContextErrorEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(368) %0) local_unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator.0", align 1
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  %6 = load ptr, ptr %0, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef %6, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %7 unwind label %12

7:                                                ; preds = %1
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  %8 = call ptr @__cxa_allocate_exception(i64 16) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %5, ptr noundef nonnull @.str.59, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %9 unwind label %.thread

9:                                                ; preds = %7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.22)
          to label %10 unwind label %.thread16

10:                                               ; preds = %9
  invoke void @_ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %11 unwind label %16

11:                                               ; preds = %10
  invoke void @__cxa_throw(ptr nonnull %8, ptr nonnull @_ZTISt13runtime_error, ptr nonnull @_ZNSt13runtime_errorD1Ev) #8
          to label %21 unwind label %16

12:                                               ; preds = %1
  %13 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  br label %20

.thread:                                          ; preds = %7
  %14 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %18

.thread16:                                        ; preds = %9
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %18

16:                                               ; preds = %10, %11
  %.0 = phi i1 [ false, %11 ], [ true, %10 ]
  %17 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br i1 %.0, label %18, label %19

18:                                               ; preds = %.thread16, %.thread, %16
  %.pn.pn15 = phi { ptr, i32 } [ %14, %.thread ], [ %17, %16 ], [ %15, %.thread16 ]
  call void @__cxa_free_exception(ptr %8) #7
  br label %19

19:                                               ; preds = %18, %16
  %.pn.pn14 = phi { ptr, i32 } [ %.pn.pn15, %18 ], [ %17, %16 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  br label %20

20:                                               ; preds = %19, %12
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn14, %19 ], [ %13, %12 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn.pn.pn

21:                                               ; preds = %11
  unreachable
}

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 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 = { "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 "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 = { mustprogress noreturn 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 #7 = { nounwind }
attributes #8 = { 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 = !{!"_ZTSN5mxnet3ext8CustomOpE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !10, i64 48, !11, i64 56, !11, i64 80, !11, i64 104, !15, i64 128, !15, i64 152, !19, i64 176, !23, i64 200, !23, i64 256, !29, i64 312}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!15 = !{!"_ZTSSt6vectorIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEEPS_INS1_8MXTensorESaISL_EESO_RKNS1_10OpResourceEESaIST_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEEPSt6vectorINS1_8MXTensorESaISM_EESP_RKNS1_10OpResourceEESaISU_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEEPSt6vectorINS1_8MXTensorESaISM_EESP_RKNS1_10OpResourceEESaISU_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEEPSt6vectorINS1_8MXTensorESaISM_EESP_RKNS1_10OpResourceEESaISU_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!"_ZTSSt6vectorIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEERKNS1_9MXContextERKS_IS_IjSaIjEESaISP_EES_IiSaIiEEPPNS1_16CustomStatefulOpEESaIS10_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEERKNS1_9MXContextERKSt6vectorISO_IjSaIjEESaISQ_EESO_IiSaIiEEPPNS1_16CustomStatefulOpEESaIS11_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEERKNS1_9MXContextERKSt6vectorISO_IjSaIjEESaISQ_EESO_IiSaIiEEPPNS1_16CustomStatefulOpEESaIS11_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIPFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEERKNS1_9MXContextERKSt6vectorISO_IjSaIjEESaISQ_EESO_IiSaIiEEPPNS1_16CustomStatefulOpEESaIS11_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!23 = !{!"_ZTSSt13unordered_mapIPKcPFN5mxnet3ext13MXReturnValueERKS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_St4hashISA_ESt8equal_toISA_ESaISt4pairIKSA_SA_EEEPSt6vectorINS3_8MXTensorESaISN_EESQ_RKNS3_10OpResourceEESB_IS1_ESD_IS1_ESaISF_IKS1_SV_EEE", !24, i64 0}
!24 = !{!"_ZTSSt10_HashtableIPKcSt4pairIKS1_PFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_St4hashISD_ESt8equal_toISD_ESaIS2_IKSD_SD_EEEPSt6vectorINS5_8MXTensorESaISP_EESS_RKNS5_10OpResourceEEESaISY_ENSt8__detail10_Select1stESG_IS1_ESE_IS1_ENS10_18_Mod_range_hashingENS10_20_Default_ranged_hashENS10_20_Prime_rehash_policyENS10_17_Hashtable_traitsILb0ELb0ELb1EEEE", !7, i64 0, !25, i64 8, !26, i64 16, !25, i64 24, !27, i64 32, !7, i64 48}
!25 = !{!"long", !8, i64 0}
!26 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !7, i64 0}
!27 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !28, i64 0, !25, i64 8}
!28 = !{!"float", !8, i64 0}
!29 = !{!"_ZTSSt13unordered_mapIPKcPFN5mxnet3ext13MXReturnValueERKS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESA_St4hashISA_ESt8equal_toISA_ESaISt4pairIKSA_SA_EEERKNS3_9MXContextERKSt6vectorISP_IjSaIjEESaISR_EESP_IiSaIiEEPPNS3_16CustomStatefulOpEESB_IS1_ESD_IS1_ESaISF_IKS1_S12_EEE", !30, i64 0}
!30 = !{!"_ZTSSt10_HashtableIPKcSt4pairIKS1_PFN5mxnet3ext13MXReturnValueERKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESD_St4hashISD_ESt8equal_toISD_ESaIS2_IKSD_SD_EEERKNS5_9MXContextERKSt6vectorISR_IjSaIjEESaIST_EESR_IiSaIiEEPPNS5_16CustomStatefulOpEEESaIS15_ENSt8__detail10_Select1stESG_IS1_ESE_IS1_ENS17_18_Mod_range_hashingENS17_20_Default_ranged_hashENS17_20_Prime_rehash_policyENS17_17_Hashtable_traitsILb0ELb0ELb1EEEE", !7, i64 0, !25, i64 8, !26, i64 16, !25, i64 24, !27, i64 32, !7, i64 48}


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