; LLVM IR from GPUOpen-LibrariesAndSDKs/TAN :: amf/public/common (PropertyStorageExImpl)

; 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.amf::AMFVariantStruct" = type { i32, %union.anon.0 }
%union.anon.0 = type { i64, [8 x i8] }
%"class.amf::AMFPropertyInfoImpl" = type { %"struct.amf::AMFPropertyInfo", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"struct.amf::AMFPropertyInfo" = type { ptr, ptr, ptr, i32, i32, %"struct.amf::AMFVariantStruct", %"struct.amf::AMFVariantStruct", %"struct.amf::AMFVariantStruct", i32, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, amf::amf_allocator<wchar_t>>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, amf::amf_allocator<wchar_t>>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_ZTVN3amf19AMFPropertyInfoImplE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3amf15AMFPropertyInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3amf19AMFPropertyInfoImpl4InitEPKwS2_NS_16AMF_VARIANT_TYPEEjNS_16AMFVariantStructES4_S4_NS_24AMF_PROPERTY_ACCESS_TYPEEPKNS_23AMFEnumDescriptionEntryE(ptr noundef nonnull align 8 dereferenceable(184), ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%"struct.amf::AMFVariantStruct") align 8, ptr noundef byval(%"struct.amf::AMFVariantStruct") align 8, ptr noundef byval(%"struct.amf::AMFVariantStruct") align 8, i32 noundef, ptr noundef) #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3amf19AMFPropertyInfoImplC2EPKwS2_NS_16AMF_VARIANT_TYPEEjNS_16AMFVariantStructES4_S4_NS_24AMF_PROPERTY_ACCESS_TYPEEPKNS_23AMFEnumDescriptionEntryE(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef byval(%"struct.amf::AMFVariantStruct") align 8 %5, ptr noundef byval(%"struct.amf::AMFVariantStruct") align 8 %6, ptr noundef byval(%"struct.amf::AMFVariantStruct") align 8 %7, i32 noundef %8, ptr noundef %9) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca %"struct.amf::AMFVariantStruct", align 8
  %21 = alloca %"struct.amf::AMFVariantStruct", align 8
  %22 = alloca %"struct.amf::AMFVariantStruct", align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store i32 %3, ptr %14, align 4, !tbaa !9
  store i32 %4, ptr %15, align 4, !tbaa !11
  store i32 %8, ptr %16, align 4, !tbaa !13
  store ptr %9, ptr %17, align 8, !tbaa !5
  %23 = load ptr, ptr %11, align 8
  call void @_ZN3amf15AMFPropertyInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %23)
  store ptr getelementptr inbounds inrange(-16, 16) ({ [4 x ptr] }, ptr @_ZTVN3amf19AMFPropertyInfoImplE, i32 0, i32 0, i32 2), ptr %23, align 8, !tbaa !15
  %24 = getelementptr inbounds %"class.amf::AMFPropertyInfoImpl", ptr %23, i32 0, i32 1
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %25 unwind label %35

25:                                               ; preds = %10
  %26 = getelementptr inbounds %"class.amf::AMFPropertyInfoImpl", ptr %23, i32 0, i32 2
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26)
          to label %27 unwind label %39

27:                                               ; preds = %25
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  %29 = load ptr, ptr %13, align 8, !tbaa !5
  %30 = load i32, ptr %14, align 4, !tbaa !9
  %31 = load i32, ptr %15, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %5, i64 24, i1 false), !tbaa.struct !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %6, i64 24, i1 false), !tbaa.struct !17
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %7, i64 24, i1 false), !tbaa.struct !17
  %32 = load i32, ptr %16, align 4, !tbaa !13
  %33 = load ptr, ptr %17, align 8, !tbaa !5
  invoke void @_ZN3amf19AMFPropertyInfoImpl4InitEPKwS2_NS_16AMF_VARIANT_TYPEEjNS_16AMFVariantStructES4_S4_NS_24AMF_PROPERTY_ACCESS_TYPEEPKNS_23AMFEnumDescriptionEntryE(ptr noundef nonnull align 8 dereferenceable(184) %23, ptr noundef %28, ptr noundef %29, i32 noundef %30, i32 noundef %31, ptr noundef byval(%"struct.amf::AMFVariantStruct") align 8 %20, ptr noundef byval(%"struct.amf::AMFVariantStruct") align 8 %21, ptr noundef byval(%"struct.amf::AMFVariantStruct") align 8 %22, i32 noundef %32, ptr noundef %33)
          to label %34 unwind label %43

34:                                               ; preds = %27
  ret void

35:                                               ; preds = %10
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %18, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %19, align 4
  br label %48

39:                                               ; preds = %25
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %18, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %19, align 4
  br label %47

43:                                               ; preds = %27
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %18, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %19, align 4
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #3
  br label %47

47:                                               ; preds = %43, %39
  call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #3
  br label %48

48:                                               ; preds = %47, %35
  call void @_ZN3amf15AMFPropertyInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %23) #3
  br label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr %18, align 8
  %51 = load i32, ptr %19, align 4
  %52 = insertvalue { ptr, i32 } poison, ptr %50, 0
  %53 = insertvalue { ptr, i32 } %52, i32 %51, 1
  resume { ptr, i32 } %53
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3amf15AMFPropertyInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #0 align 2

attributes #0 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN3amf16AMF_VARIANT_TYPEE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN3amf24AMF_PROPERTY_ACCESS_TYPEE", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}
!17 = !{i64 0, i64 4, !9, i64 8, i64 16, !18}
!18 = !{!7, !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.amf::AMFVariantStruct" = type { i32, %union.anon.0 }
%union.anon.0 = type { i64, [8 x i8] }

@_ZTVN3amf19AMFPropertyInfoImplE = external dso_local unnamed_addr constant { [4 x ptr] }, align 8

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3amf15AMFPropertyInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3amf19AMFPropertyInfoImpl4InitEPKwS2_NS_16AMF_VARIANT_TYPEEjNS_16AMFVariantStructES4_S4_NS_24AMF_PROPERTY_ACCESS_TYPEEPKNS_23AMFEnumDescriptionEntryE(ptr noundef nonnull align 8 dereferenceable(184), ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef byval(%"struct.amf::AMFVariantStruct") align 8, ptr noundef byval(%"struct.amf::AMFVariantStruct") align 8, ptr noundef byval(%"struct.amf::AMFVariantStruct") align 8, i32 noundef, ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3amf19AMFPropertyInfoImplC2EPKwS2_NS_16AMF_VARIANT_TYPEEjNS_16AMFVariantStructES4_S4_NS_24AMF_PROPERTY_ACCESS_TYPEEPKNS_23AMFEnumDescriptionEntryE(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr nocapture noundef readonly byval(%"struct.amf::AMFVariantStruct") align 8 %5, ptr nocapture noundef readonly byval(%"struct.amf::AMFVariantStruct") align 8 %6, ptr nocapture noundef readonly byval(%"struct.amf::AMFVariantStruct") align 8 %7, i32 noundef %8, ptr noundef %9) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  tail call void @_ZN3amf15AMFPropertyInfoC2Ev(ptr noundef nonnull align 8 dereferenceable(120) %0)
  store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTVN3amf19AMFPropertyInfoImplE, i64 16), ptr %0, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 120
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %12 unwind label %16

12:                                               ; preds = %10
  %13 = getelementptr inbounds i8, ptr %0, i64 152
  invoke void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %14 unwind label %18

14:                                               ; preds = %12
  invoke void @_ZN3amf19AMFPropertyInfoImpl4InitEPKwS2_NS_16AMF_VARIANT_TYPEEjNS_16AMFVariantStructES4_S4_NS_24AMF_PROPERTY_ACCESS_TYPEEPKNS_23AMFEnumDescriptionEntryE(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef nonnull byval(%"struct.amf::AMFVariantStruct") align 8 %5, ptr noundef nonnull byval(%"struct.amf::AMFVariantStruct") align 8 %6, ptr noundef nonnull byval(%"struct.amf::AMFVariantStruct") align 8 %7, i32 noundef %8, ptr noundef %9)
          to label %15 unwind label %20

15:                                               ; preds = %14
  ret void

16:                                               ; preds = %10
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %23

18:                                               ; preds = %12
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %22

20:                                               ; preds = %14
  %21 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #2
  br label %22

22:                                               ; preds = %20, %18
  %.pn = phi { ptr, i32 } [ %21, %20 ], [ %19, %18 ]
  tail call void @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #2
  br label %23

23:                                               ; preds = %22, %16
  %.pn.pn = phi { ptr, i32 } [ %.pn, %22 ], [ %17, %16 ]
  tail call void @_ZN3amf15AMFPropertyInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(120) %0) #2
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3amf15AMFPropertyInfoD2Ev(ptr noundef nonnull align 8 dereferenceable(120)) unnamed_addr #0 align 2

attributes #0 = { 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 #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 = { nounwind }

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

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


; Effective O3 passes: DSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass