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

; 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::AMFPropertyInfo" = type { ptr, ptr, ptr, i32, i32, %"struct.amf::AMFVariantStruct", %"struct.amf::AMFVariantStruct", %"struct.amf::AMFVariantStruct", i32, ptr }
%"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" }
%"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] }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(184) ptr @_ZN3amf19AMFPropertyInfoImplaSERKS0_(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef nonnull align 8 dereferenceable(184) %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8
  %6 = load ptr, ptr %4, align 8, !tbaa !5
  %7 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %6, i32 0, i32 1
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = getelementptr inbounds %"class.amf::AMFPropertyInfoImpl", ptr %5, i32 0, i32 1
  %10 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEEaSEPKw(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %8)
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %11, i32 0, i32 2
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  %14 = getelementptr inbounds %"class.amf::AMFPropertyInfoImpl", ptr %5, i32 0, i32 2
  %15 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEEaSEPKw(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef %13)
  %16 = getelementptr inbounds %"class.amf::AMFPropertyInfoImpl", ptr %5, i32 0, i32 1
  %17 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %16) #3
  %18 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %5, i32 0, i32 1
  store ptr %17, ptr %18, align 8, !tbaa !9
  %19 = getelementptr inbounds %"class.amf::AMFPropertyInfoImpl", ptr %5, i32 0, i32 2
  %20 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %19) #3
  %21 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %5, i32 0, i32 2
  store ptr %20, ptr %21, align 8, !tbaa !15
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %22, i32 0, i32 3
  %24 = load i32, ptr %23, align 8, !tbaa !16
  %25 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %5, i32 0, i32 3
  store i32 %24, ptr %25, align 8, !tbaa !16
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %26, i32 0, i32 4
  %28 = load i32, ptr %27, align 4, !tbaa !17
  %29 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %5, i32 0, i32 4
  store i32 %28, ptr %29, align 4, !tbaa !17
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %30, i32 0, i32 8
  %32 = load i32, ptr %31, align 8, !tbaa !18
  %33 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %5, i32 0, i32 8
  store i32 %32, ptr %33, align 8, !tbaa !18
  %34 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %5, i32 0, i32 5
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %35, i32 0, i32 5
  %37 = call noundef i32 @_ZN3amfL14AMFVariantCopyEPNS_16AMFVariantStructEPKS0_(ptr noundef %34, ptr noundef %36)
  %38 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %5, i32 0, i32 6
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %39, i32 0, i32 6
  %41 = call noundef i32 @_ZN3amfL14AMFVariantCopyEPNS_16AMFVariantStructEPKS0_(ptr noundef %38, ptr noundef %40)
  %42 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %5, i32 0, i32 7
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %43, i32 0, i32 7
  %45 = call noundef i32 @_ZN3amfL14AMFVariantCopyEPNS_16AMFVariantStructEPKS0_(ptr noundef %42, ptr noundef %44)
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %46, i32 0, i32 9
  %48 = load ptr, ptr %47, align 8, !tbaa !19
  %49 = getelementptr inbounds %"struct.amf::AMFPropertyInfo", ptr %5, i32 0, i32 9
  store ptr %48, ptr %49, align 8, !tbaa !19
  ret ptr %5
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i32 @_ZN3amfL14AMFVariantCopyEPNS_16AMFVariantStructEPKS0_(ptr noundef, ptr noundef) #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 = { 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 #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, !6, i64 8}
!10 = !{!"_ZTSN3amf15AMFPropertyInfoE", !6, i64 8, !6, i64 16, !11, i64 24, !12, i64 28, !13, i64 32, !13, i64 56, !13, i64 80, !14, i64 104, !6, i64 112}
!11 = !{!"_ZTSN3amf16AMF_VARIANT_TYPEE", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN3amf16AMFVariantStructE", !11, i64 0, !7, i64 8}
!14 = !{!"_ZTSN3amf24AMF_PROPERTY_ACCESS_TYPEE", !7, i64 0}
!15 = !{!10, !6, i64 16}
!16 = !{!10, !11, i64 24}
!17 = !{!10, !12, i64 28}
!18 = !{!10, !14, i64 104}
!19 = !{!10, !6, i64 112}


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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(184) ptr @_ZN3amf19AMFPropertyInfoImplaSERKS0_(ptr noundef nonnull returned align 8 dereferenceable(184) %0, ptr noundef nonnull align 8 dereferenceable(184) %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %1, i64 8
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 120
  %6 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEEaSEPKw(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %4)
  %7 = getelementptr inbounds i8, ptr %1, i64 16
  %8 = load ptr, ptr %7, align 8, !tbaa !14
  %9 = getelementptr inbounds i8, ptr %0, i64 152
  %10 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEEaSEPKw(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %8)
  %11 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %11, ptr %12, align 8, !tbaa !5
  %13 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIwSt11char_traitsIwEN3amf13amf_allocatorIwEEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %9) #3
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %13, ptr %14, align 8, !tbaa !14
  %15 = getelementptr inbounds i8, ptr %1, i64 24
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  %17 = load <2 x i32>, ptr %15, align 8, !tbaa !15
  store <2 x i32> %17, ptr %16, align 8, !tbaa !15
  %18 = getelementptr inbounds i8, ptr %1, i64 104
  %19 = load i32, ptr %18, align 8, !tbaa !16
  %20 = getelementptr inbounds i8, ptr %0, i64 104
  store i32 %19, ptr %20, align 8, !tbaa !16
  %21 = getelementptr inbounds i8, ptr %0, i64 32
  %22 = getelementptr inbounds i8, ptr %1, i64 32
  %23 = tail call noundef i32 @_ZN3amfL14AMFVariantCopyEPNS_16AMFVariantStructEPKS0_(ptr noundef nonnull %21, ptr noundef nonnull %22)
  %24 = getelementptr inbounds i8, ptr %0, i64 56
  %25 = getelementptr inbounds i8, ptr %1, i64 56
  %26 = tail call noundef i32 @_ZN3amfL14AMFVariantCopyEPNS_16AMFVariantStructEPKS0_(ptr noundef nonnull %24, ptr noundef nonnull %25)
  %27 = getelementptr inbounds i8, ptr %0, i64 80
  %28 = getelementptr inbounds i8, ptr %1, i64 80
  %29 = tail call noundef i32 @_ZN3amfL14AMFVariantCopyEPNS_16AMFVariantStructEPKS0_(ptr noundef nonnull %27, ptr noundef nonnull %28)
  %30 = getelementptr inbounds i8, ptr %1, i64 112
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %32 = getelementptr inbounds i8, ptr %0, i64 112
  store ptr %31, ptr %32, align 8, !tbaa !17
  ret ptr %0
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef i32 @_ZN3amfL14AMFVariantCopyEPNS_16AMFVariantStructEPKS0_(ptr noundef, ptr noundef) local_unnamed_addr #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 = { 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 #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, !7, i64 8}
!6 = !{!"_ZTSN3amf15AMFPropertyInfoE", !7, i64 8, !7, i64 16, !10, i64 24, !11, i64 28, !12, i64 32, !12, i64 56, !12, i64 80, !13, i64 104, !7, i64 112}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3amf16AMF_VARIANT_TYPEE", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_ZTSN3amf16AMFVariantStructE", !10, i64 0, !8, i64 8}
!13 = !{!"_ZTSN3amf24AMF_PROPERTY_ACCESS_TYPEE", !8, i64 0}
!14 = !{!6, !7, i64 16}
!15 = !{!8, !8, i64 0}
!16 = !{!6, !13, i64 104}
!17 = !{!6, !7, i64 112}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,TailCallElimPass