; LLVM IR from NVIDIA/FasterTransformer :: src/fastertransformer/utils (Tensor)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::__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::initializer_list.11" = type { ptr, i64 }
%"struct.std::pair" = type { i32, %"class.std::__cxx11::basic_string" }
%"struct.std::hash" = type { i8 }
%"struct.std::equal_to" = type { i8 }
%"class.std::allocator.12" = type { i8 }
%"struct.fastertransformer::Tensor" = type { i32, i32, %"class.std::vector", ptr, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@__dso_handle = external hidden global i8
@_ZZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11 = external hidden global %"class.std::unordered_map", align 8
@_ZGVZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11 = external hidden global i64, align 8
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK17fastertransformer6Tensor13whereToStringB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(64) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::initializer_list.11", align 8
  %6 = alloca [3 x %"struct.std::pair"], align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i1, align 1
  %14 = alloca %"struct.std::hash", align 1
  %15 = alloca %"struct.std::equal_to", align 1
  %16 = alloca %"class.std::allocator.12", align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8
  %18 = load atomic i8, ptr @_ZGVZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11 acquire, align 8
  %19 = icmp eq i8 %18, 0
  br i1 %19, label %20, label %44, !prof !9

20:                                               ; preds = %2
  %21 = call i32 @__cxa_guard_acquire(ptr @_ZGVZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11) #0
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %44

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 120, ptr %6) #0
  store i1 true, ptr %13, align 1
  store ptr %6, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #0
  store i32 0, ptr %8, align 4, !tbaa !10
  invoke void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IS1_RA4_KcTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_(ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 1 dereferenceable(4) @.str.16)
          to label %24 unwind label %47

24:                                               ; preds = %23
  %25 = getelementptr inbounds %"struct.std::pair", ptr %6, i64 1
  store ptr %25, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #0
  store i32 1, ptr %11, align 4, !tbaa !10
  invoke void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IS1_RA11_KcTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_(ptr noundef nonnull align 8 dereferenceable(40) %25, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 1 dereferenceable(11) @.str.17)
          to label %26 unwind label %51

26:                                               ; preds = %24
  %27 = getelementptr inbounds %"struct.std::pair", ptr %6, i64 2
  store ptr %27, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #0
  store i32 2, ptr %12, align 4, !tbaa !10
  invoke void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IS1_RA4_KcTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_(ptr noundef nonnull align 8 dereferenceable(40) %27, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 1 dereferenceable(4) @.str.18)
          to label %28 unwind label %55

28:                                               ; preds = %26
  store i1 false, ptr %13, align 1
  %29 = getelementptr inbounds %"class.std::initializer_list.11", ptr %5, i32 0, i32 0
  store ptr %6, ptr %29, align 8, !tbaa !12
  %30 = getelementptr inbounds %"class.std::initializer_list.11", ptr %5, i32 0, i32 1
  store i64 3, ptr %30, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #0
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #0
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #0
  call void @_ZNSaISt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #0
  %31 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8
  %33 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 1
  %34 = load i64, ptr %33, align 8
  invoke void @_ZNSt13unordered_mapIN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S7_EEEC2ESt16initializer_listISE_EmRKS9_RKSB_RKSF_(ptr noundef nonnull align 8 dereferenceable(56) @_ZZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11, ptr %32, i64 %34, i64 noundef 0, ptr noundef nonnull align 1 dereferenceable(1) %14, ptr noundef nonnull align 1 dereferenceable(1) %15, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %35 unwind label %59

35:                                               ; preds = %28
  call void @_ZNSt15__new_allocatorISt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #0
  %36 = getelementptr inbounds [3 x %"struct.std::pair"], ptr %6, i32 0, i32 0
  %37 = getelementptr inbounds %"struct.std::pair", ptr %36, i64 3
  br label %38

38:                                               ; preds = %38, %35
  %39 = phi ptr [ %37, %35 ], [ %40, %38 ]
  %40 = getelementptr inbounds %"struct.std::pair", ptr %39, i64 -1
  call void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %40) #0
  %41 = icmp eq ptr %40, %36
  br i1 %41, label %42, label %38

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #0
  call void @llvm.lifetime.end.p0(i64 120, ptr %6) #0
  %43 = call i32 @__cxa_atexit(ptr @_ZNSt13unordered_mapIN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S7_EEED2Ev, ptr @_ZZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11) #0
  br label %44

44:                                               ; preds = %42, %20, %2
  %45 = getelementptr inbounds %"struct.fastertransformer::Tensor", ptr %17, i32 0, i32 0
  %46 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt13unordered_mapIN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S7_EEE2atERSD_(ptr noundef nonnull align 8 dereferenceable(56) @_ZZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11, ptr noundef nonnull align 4 dereferenceable(4) %45)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %46)
  ret void

47:                                               ; preds = %23
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %9, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %10, align 4
  br label %72

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

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

59:                                               ; preds = %28
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %9, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %10, align 4
  call void @_ZNSt15__new_allocatorISt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #0
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #0
  %63 = getelementptr inbounds [3 x %"struct.std::pair"], ptr %6, i32 0, i32 0
  %64 = getelementptr inbounds %"struct.std::pair", ptr %63, i64 3
  br label %65

65:                                               ; preds = %65, %59
  %66 = phi ptr [ %64, %59 ], [ %67, %65 ]
  %67 = getelementptr inbounds %"struct.std::pair", ptr %66, i64 -1
  call void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %67) #0
  %68 = icmp eq ptr %67, %63
  br i1 %68, label %69, label %65

69:                                               ; preds = %65
  br label %70

70:                                               ; preds = %69, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #0
  br label %71

71:                                               ; preds = %70, %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #0
  br label %72

72:                                               ; preds = %71, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #0
  %73 = load i1, ptr %13, align 1
  br i1 %73, label %74, label %82

74:                                               ; preds = %72
  %75 = load ptr, ptr %7, align 8
  %76 = icmp eq ptr %6, %75
  br i1 %76, label %81, label %77

77:                                               ; preds = %77, %74
  %78 = phi ptr [ %75, %74 ], [ %79, %77 ]
  %79 = getelementptr inbounds %"struct.std::pair", ptr %78, i64 -1
  call void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %79) #0
  %80 = icmp eq ptr %79, %6
  br i1 %80, label %81, label %77

81:                                               ; preds = %77, %74
  br label %82

82:                                               ; preds = %81, %72
  call void @llvm.lifetime.end.p0(i64 120, ptr %6) #0
  call void @__cxa_guard_abort(ptr @_ZGVZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11) #0
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %9, align 8
  %85 = load i32, ptr %10, align 4
  %86 = insertvalue { ptr, i32 } poison, ptr %84, 0
  %87 = insertvalue { ptr, i32 } %86, i32 %85, 1
  resume { ptr, i32 } %87
}

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IS1_RA11_KcTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(11)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

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

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #0

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #0

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

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

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

!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 = !{!"branch_weights", i32 1, i32 1048575}
!10 = !{!11, !11, i64 0}
!11 = !{!"_ZTSN17fastertransformer15memorytype_enumE", !7, i64 0}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTSSt16initializer_listISt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !6, i64 0, !14, i64 8}
!14 = !{!"long", !7, i64 0}
!15 = !{!13, !14, i64 8}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::__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] }
%"struct.std::pair" = type { i32, %"class.std::__cxx11::basic_string" }
%"struct.std::hash" = type { i8 }
%"struct.std::equal_to" = type { i8 }
%"class.std::allocator.12" = type { i8 }

@__dso_handle = external hidden global i8
@_ZZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11 = external hidden global %"class.std::unordered_map", align 8
@_ZGVZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11 = external hidden global i64, align 8
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK17fastertransformer6Tensor13whereToStringB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(64) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [3 x %"struct.std::pair"], align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"struct.std::hash", align 1
  %8 = alloca %"struct.std::equal_to", align 1
  %9 = alloca %"class.std::allocator.12", align 1
  %10 = load atomic i8, ptr @_ZGVZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11 acquire, align 8
  %11 = icmp eq i8 %10, 0
  br i1 %11, label %12, label %24, !prof !5

12:                                               ; preds = %2
  %13 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11) #5
  %.not14 = icmp eq i32 %13, 0
  br i1 %.not14, label %24, label %14

14:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store i32 0, ptr %4, align 4, !tbaa !6
  invoke void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IS1_RA4_KcTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 1 dereferenceable(4) @.str.16)
          to label %15 unwind label %.thread

15:                                               ; preds = %14
  %16 = getelementptr inbounds i8, ptr %3, i64 40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 1, ptr %5, align 4, !tbaa !6
  invoke void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IS1_RA11_KcTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_(ptr noundef nonnull align 8 dereferenceable(40) %16, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 1 dereferenceable(11) @.str.17)
          to label %17 unwind label %.thread24

17:                                               ; preds = %15
  %18 = getelementptr inbounds i8, ptr %3, i64 80
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 2, ptr %6, align 4, !tbaa !6
  invoke void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IS1_RA4_KcTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_(ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 1 dereferenceable(4) @.str.18)
          to label %19 unwind label %31

19:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaISt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt13unordered_mapIN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S7_EEEC2ESt16initializer_listISE_EmRKS9_RKSB_RKSF_(ptr noundef nonnull align 8 dereferenceable(56) @_ZZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11, ptr nonnull %3, i64 3, i64 noundef 0, ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %20 unwind label %.thread30

20:                                               ; preds = %19
  call void @_ZNSt15__new_allocatorISt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  %21 = getelementptr inbounds i8, ptr %3, i64 80
  call void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %21) #5
  %22 = getelementptr inbounds i8, ptr %3, i64 40
  call void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %22) #5
  call void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %3) #5
  %23 = call i32 @__cxa_atexit(ptr nonnull @_ZNSt13unordered_mapIN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S7_EEED2Ev, ptr nonnull @_ZZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11, ptr nonnull @__dso_handle) #5
  call void @__cxa_guard_release(ptr nonnull @_ZGVZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11) #5
  br label %24

24:                                               ; preds = %20, %12, %2
  %25 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt13unordered_mapIN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S7_EEE2atERSD_(ptr noundef nonnull align 8 dereferenceable(56) @_ZZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11, ptr noundef nonnull align 4 dereferenceable(4) %1)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %25)
  ret void

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

.thread24:                                        ; preds = %15
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %.preheader.preheader

.thread30:                                        ; preds = %19
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  %29 = getelementptr inbounds i8, ptr %3, i64 80
  call void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %29) #5
  %30 = getelementptr inbounds i8, ptr %3, i64 40
  call void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %30) #5
  call void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %.loopexit

31:                                               ; preds = %17
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %.preheader.preheader

.preheader.preheader:                             ; preds = %31, %.thread24
  %.pn.pn29 = phi { ptr, i32 } [ %27, %.thread24 ], [ %32, %31 ]
  %.01128 = phi ptr [ %16, %.thread24 ], [ %18, %31 ]
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %.preheader
  %33 = phi ptr [ %34, %.preheader ], [ %.01128, %.preheader.preheader ]
  %34 = getelementptr inbounds i8, ptr %33, i64 -40
  call void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %34) #5
  %35 = icmp eq ptr %34, %3
  br i1 %35, label %.loopexit, label %.preheader

.loopexit:                                        ; preds = %.preheader, %.thread30, %.thread
  %.pn.pn.pn22 = phi { ptr, i32 } [ %26, %.thread ], [ %28, %.thread30 ], [ %.pn.pn29, %.preheader ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %3) #5
  call void @__cxa_guard_abort(ptr nonnull @_ZGVZNK17fastertransformer6Tensor13whereToStringB5cxx11EvE13mem_to_stringB5cxx11) #5
  resume { ptr, i32 } %.pn.pn.pn22
}

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2IS1_RA11_KcTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISF_SG_EEEbE4typeELb1EEEOSF_OSG_(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 1 dereferenceable(11)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt4pairIKN17fastertransformer15memorytype_enumENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #4 align 2

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

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #0

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

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!"branch_weights", i32 1, i32 1048575}
!6 = !{!7, !7, i64 0}
!7 = !{!"_ZTSN17fastertransformer15memorytype_enumE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass