; LLVM IR from gulrak/filesystem :: test/filesystem_test.ll (ZN5Catch14TestSpecParserC2ERKNS_17ITagAliasRegistryE)

; 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.Catch::TestSpecParser" = type { i32, i32, i8, i64, i64, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::vector.44", %"struct.Catch::TestSpec::Filter", %"class.Catch::TestSpec", ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.0 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"class.std::vector.44" = type { %"struct.std::_Vector_base.45" }
%"struct.std::_Vector_base.45" = 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 }
%"struct.Catch::TestSpec::Filter" = type { %"class.std::vector.49" }
%"class.std::vector.49" = type { %"struct.std::_Vector_base.50" }
%"struct.std::_Vector_base.50" = type { %"struct.std::_Vector_base<std::shared_ptr<Catch::TestSpec::Pattern>, std::allocator<std::shared_ptr<Catch::TestSpec::Pattern>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<Catch::TestSpec::Pattern>, std::allocator<std::shared_ptr<Catch::TestSpec::Pattern>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<Catch::TestSpec::Pattern>, std::allocator<std::shared_ptr<Catch::TestSpec::Pattern>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<Catch::TestSpec::Pattern>, std::allocator<std::shared_ptr<Catch::TestSpec::Pattern>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Catch::TestSpec" = type { %"class.std::vector.39", %"class.std::vector.16" }
%"class.std::vector.39" = type { %"struct.std::_Vector_base.40" }
%"struct.std::_Vector_base.40" = type { %"struct.std::_Vector_base<Catch::TestSpec::Filter, std::allocator<Catch::TestSpec::Filter>>::_Vector_impl" }
%"struct.std::_Vector_base<Catch::TestSpec::Filter, std::allocator<Catch::TestSpec::Filter>>::_Vector_impl" = type { %"struct.std::_Vector_base<Catch::TestSpec::Filter, std::allocator<Catch::TestSpec::Filter>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Catch::TestSpec::Filter, std::allocator<Catch::TestSpec::Filter>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN5Catch14TestSpecParserC2ERKNS_17ITagAliasRegistryE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) unnamed_addr #0 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 = getelementptr inbounds %"class.Catch::TestSpecParser", ptr %5, i32 0, i32 0
  store i32 0, ptr %6, align 8, !tbaa !9
  %7 = getelementptr inbounds %"class.Catch::TestSpecParser", ptr %5, i32 0, i32 1
  store i32 0, ptr %7, align 4, !tbaa !34
  %8 = getelementptr inbounds %"class.Catch::TestSpecParser", ptr %5, i32 0, i32 2
  store i8 0, ptr %8, align 8, !tbaa !35
  %9 = getelementptr inbounds %"class.Catch::TestSpecParser", ptr %5, i32 0, i32 3
  store i64 0, ptr %9, align 8, !tbaa !36
  %10 = getelementptr inbounds %"class.Catch::TestSpecParser", ptr %5, i32 0, i32 4
  store i64 0, ptr %10, align 8, !tbaa !37
  %11 = getelementptr inbounds %"class.Catch::TestSpecParser", ptr %5, i32 0, i32 5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #2
  %12 = getelementptr inbounds %"class.Catch::TestSpecParser", ptr %5, i32 0, i32 6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #2
  %13 = getelementptr inbounds %"class.Catch::TestSpecParser", ptr %5, i32 0, i32 7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #2
  %14 = getelementptr inbounds %"class.Catch::TestSpecParser", ptr %5, i32 0, i32 8
  call void @_ZNSt6vectorImSaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #2
  %15 = getelementptr inbounds %"class.Catch::TestSpecParser", ptr %5, i32 0, i32 9
  call void @_ZN5Catch8TestSpec6FilterC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #2
  %16 = getelementptr inbounds %"class.Catch::TestSpecParser", ptr %5, i32 0, i32 10
  call void @_ZN5Catch8TestSpecC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %16) #2
  %17 = getelementptr inbounds %"class.Catch::TestSpecParser", ptr %5, i32 0, i32 11
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %18, ptr %17, align 8, !tbaa !38
  ret void
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN5Catch8TestSpec6FilterC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 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 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN5Catch14TestSpecParserE", !11, i64 0, !11, i64 4, !12, i64 8, !13, i64 16, !13, i64 24, !14, i64 32, !14, i64 64, !14, i64 96, !16, i64 128, !20, i64 152, !25, i64 176, !6, i64 224}
!11 = !{!"_ZTSN5Catch14TestSpecParser4ModeE", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !13, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!16 = !{!"_ZTSSt6vectorImSaImEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseImSaImEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSN5Catch8TestSpec6FilterE", !21, i64 0}
!21 = !{!"_ZTSSt6vectorISt10shared_ptrIN5Catch8TestSpec7PatternEESaIS4_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN5Catch8TestSpec7PatternEESaIS4_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN5Catch8TestSpec7PatternEESaIS4_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN5Catch8TestSpec7PatternEESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSN5Catch8TestSpecE", !26, i64 0, !30, i64 24}
!26 = !{!"_ZTSSt6vectorIN5Catch8TestSpec6FilterESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIN5Catch8TestSpec6FilterESaIS2_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN5Catch8TestSpec6FilterESaIS2_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIN5Catch8TestSpec6FilterESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!10, !11, i64 4}
!35 = !{!10, !12, i64 8}
!36 = !{!10, !13, i64 16}
!37 = !{!10, !13, i64 24}
!38 = !{!10, !6, i64 224}


; 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 void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN5Catch14TestSpecParserC2ERKNS_17ITagAliasRegistryE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull align 8 dereferenceable(8) %1) unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 16
  %4 = getelementptr inbounds i8, ptr %0, i64 32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(9) %0, i8 0, i64 9, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %3, i8 0, i64 16, i1 false)
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #3
  %5 = getelementptr inbounds i8, ptr %0, i64 64
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  %6 = getelementptr inbounds i8, ptr %0, i64 96
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #3
  %7 = getelementptr inbounds i8, ptr %0, i64 128
  tail call void @_ZNSt6vectorImSaImEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #3
  %8 = getelementptr inbounds i8, ptr %0, i64 152
  tail call void @_ZN5Catch8TestSpec6FilterC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 176
  tail call void @_ZN5Catch8TestSpecC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #3
  %10 = getelementptr inbounds i8, ptr %0, i64 224
  store ptr %1, ptr %10, align 8, !tbaa !5
  ret void
}

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !14, i64 224}
!6 = !{!"_ZTSN5Catch14TestSpecParserE", !7, i64 0, !7, i64 4, !10, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !12, i64 64, !12, i64 96, !15, i64 128, !19, i64 152, !24, i64 176, !14, i64 224}
!7 = !{!"_ZTSN5Catch14TestSpecParser4ModeE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !11, i64 8, !8, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorImSaImEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseImSaImEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!"_ZTSN5Catch8TestSpec6FilterE", !20, i64 0}
!20 = !{!"_ZTSSt6vectorISt10shared_ptrIN5Catch8TestSpec7PatternEESaIS4_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN5Catch8TestSpec7PatternEESaIS4_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN5Catch8TestSpec7PatternEESaIS4_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN5Catch8TestSpec7PatternEESaIS4_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!24 = !{!"_ZTSN5Catch8TestSpecE", !25, i64 0, !29, i64 24}
!25 = !{!"_ZTSSt6vectorIN5Catch8TestSpec6FilterESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIN5Catch8TestSpec6FilterESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIN5Catch8TestSpec6FilterESaIS2_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN5Catch8TestSpec6FilterESaIS2_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!29 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}


; Effective O3 passes: EarlyCSEPass,InstCombinePass,MemCpyOptPass,SROAPass,TailCallElimPass