; LLVM IR from thepowersgang/mrustc :: src/parse/root.ll (Z14Parse_Mod_ItemR11TokenStreamRN3AST6ModuleENS1_13AttributeListE)

; 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.ParseState = type { i8, i8, i8, ptr, ptr, ptr }
%"struct.AST::Named" = type { %struct.Span, %"class.AST::AttributeList", %"class.AST::Visibility", %class.RcString, %"class.AST::Item" }
%struct.Span = type { ptr }
%"class.AST::AttributeList" = type { %"class.std::vector.81" }
%"class.std::vector.81" = type { %"struct.std::_Vector_base.82" }
%"struct.std::_Vector_base.82" = type { %"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.AST::Visibility" = type <{ %"class.std::shared_ptr", %"class.std::shared_ptr.0", i32, [4 x i8] }>
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%class.RcString = type { ptr }
%"class.AST::Item" = type { i32, %"union.AST::Item::DataUnion" }
%"union.AST::Item::DataUnion" = type { %"class.AST::Module" }
%"class.AST::Module" = type { %"struct.AST::AbsolutePath", %"class.std::vector.13", %"class.std::vector.18", %"class.std::vector.23", %"struct.AST::Module::FileInfo", i8, i8, %"class.std::unordered_map", %"class.std::unordered_map", %"class.std::unordered_map", %"class.std::unordered_map", %"class.std::vector.33", %"class.std::vector.38", %"class.std::vector.43" }
%"struct.AST::AbsolutePath" = type { %class.RcString, %"class.std::vector.8" }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl" }
%"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl" = type { %"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl_data" }
%"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<std::unique_ptr<AST::Named<AST::Item>>, std::allocator<std::unique_ptr<AST::Named<AST::Item>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<AST::Named<AST::Item>>, std::allocator<std::unique_ptr<AST::Named<AST::Item>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<AST::Named<AST::Item>>, std::allocator<std::unique_ptr<AST::Named<AST::Item>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<AST::Named<AST::Item>>, std::allocator<std::unique_ptr<AST::Named<AST::Item>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<std::shared_ptr<AST::Module>, std::allocator<std::shared_ptr<AST::Module>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<AST::Module>, std::allocator<std::shared_ptr<AST::Module>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<AST::Module>, std::allocator<std::shared_ptr<AST::Module>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<AST::Module>, std::allocator<std::shared_ptr<AST::Module>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<AST::Named<MacroRulesPtr>, std::allocator<AST::Named<MacroRulesPtr>>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::Named<MacroRulesPtr>, std::allocator<AST::Named<MacroRulesPtr>>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::Named<MacroRulesPtr>, std::allocator<AST::Named<MacroRulesPtr>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::Named<MacroRulesPtr>, std::allocator<AST::Named<MacroRulesPtr>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.AST::Module::FileInfo" = type { i8, i8, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"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::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::vector.33" = type { %"struct.std::_Vector_base.34" }
%"struct.std::_Vector_base.34" = type { %"struct.std::_Vector_base<AST::AbsolutePath, std::allocator<AST::AbsolutePath>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::AbsolutePath, std::allocator<AST::AbsolutePath>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::AbsolutePath, std::allocator<AST::AbsolutePath>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::AbsolutePath, std::allocator<AST::AbsolutePath>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.38" = type { %"struct.std::_Vector_base.39" }
%"struct.std::_Vector_base.39" = type { %"struct.std::_Vector_base<AST::Module::MacroImport, std::allocator<AST::Module::MacroImport>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::Module::MacroImport, std::allocator<AST::Module::MacroImport>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::Module::MacroImport, std::allocator<AST::Module::MacroImport>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::Module::MacroImport, std::allocator<AST::Module::MacroImport>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.43" = type { %"struct.std::_Vector_base.44" }
%"struct.std::_Vector_base.44" = type { %"struct.std::_Vector_base<AST::Module::Import, std::allocator<AST::Module::Import>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::Module::Import, std::allocator<AST::Module::Import>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::Module::Import, std::allocator<AST::Module::Import>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::Module::Import, std::allocator<AST::Module::Import>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.SavedParseState = type { ptr, %struct.ParseState }

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3AST13AttributeListD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 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) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15SavedParseStateC2ER11TokenStream10ParseState(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(176), ptr noundef byval(%struct.ParseState) align 8) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16Parse_Mod_Item_SR11TokenStreamRKN3AST6Module8FileInfoERKNS1_12AbsolutePathENS1_13AttributeListE(ptr dead_on_unwind noalias writable sret(%"struct.AST::Named") align 8, ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14Parse_Mod_ItemR11TokenStreamRN3AST6ModuleENS1_13AttributeListE(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull align 8 dereferenceable(480) %1, ptr noundef %2) #4 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %class.SavedParseState, align 8
  %8 = alloca %struct.ParseState, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"struct.AST::Named", align 8
  %12 = alloca %"class.AST::AttributeList", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %7) #6
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN11TokenStream11parse_stateEv(ptr noundef nonnull align 8 dereferenceable(176) %14)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %15, i64 32, i1 false), !tbaa.struct !9
  call void @_ZN15SavedParseStateC2ER11TokenStream10ParseState(ptr noundef nonnull align 8 dereferenceable(40) %7, ptr noundef nonnull align 8 dereferenceable(176) %13, ptr noundef byval(%struct.ParseState) align 8 %8)
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN11TokenStream11parse_stateEv(ptr noundef nonnull align 8 dereferenceable(176) %17)
          to label %19 unwind label %39

19:                                               ; preds = %3
  %20 = getelementptr inbounds %struct.ParseState, ptr %18, i32 0, i32 4
  store ptr %16, ptr %20, align 8, !tbaa !12
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN11TokenStream11parse_stateEv(ptr noundef nonnull align 8 dereferenceable(176) %22)
          to label %24 unwind label %39

24:                                               ; preds = %19
  %25 = getelementptr inbounds %struct.ParseState, ptr %23, i32 0, i32 4
  store ptr %21, ptr %25, align 8, !tbaa !12
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZN11TokenStream11parse_stateEv(ptr noundef nonnull align 8 dereferenceable(176) %26)
          to label %28 unwind label %39

28:                                               ; preds = %24
  %29 = getelementptr inbounds %struct.ParseState, ptr %27, i32 0, i32 5
  store ptr %2, ptr %29, align 8, !tbaa !14
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %"class.AST::Module", ptr %32, i32 0, i32 4
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3AST6Module4pathEv(ptr noundef nonnull align 8 dereferenceable(480) %34)
          to label %36 unwind label %39

36:                                               ; preds = %28
  call void @_ZN3AST13AttributeListC2EOS0_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  invoke void @_Z16Parse_Mod_Item_SR11TokenStreamRKN3AST6Module8FileInfoERKNS1_12AbsolutePathENS1_13AttributeListE(ptr dead_on_unwind writable sret(%"struct.AST::Named") align 8 %11, ptr noundef nonnull align 8 dereferenceable(176) %31, ptr noundef nonnull align 8 dereferenceable(72) %33, ptr noundef nonnull align 8 dereferenceable(32) %35, ptr noundef %12)
          to label %37 unwind label %43

37:                                               ; preds = %36
  invoke void @_ZN3AST6Module8add_itemENS_5NamedINS_4ItemEEE(ptr noundef nonnull align 8 dereferenceable(480) %30, ptr noundef %11)
          to label %38 unwind label %47

38:                                               ; preds = %37
  call void @_ZN3AST5NamedINS_4ItemEED2Ev(ptr noundef nonnull align 8 dereferenceable(568) %11) #6
  call void @_ZN3AST13AttributeListD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @_ZN15SavedParseStateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #6
  ret void

39:                                               ; preds = %28, %24, %19, %3
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %9, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %10, align 4
  br label %52

43:                                               ; preds = %36
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %9, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %10, align 4
  br label %51

47:                                               ; preds = %37
  %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
  call void @_ZN3AST5NamedINS_4ItemEED2Ev(ptr noundef nonnull align 8 dereferenceable(568) %11) #6
  br label %51

51:                                               ; preds = %47, %43
  call void @_ZN3AST13AttributeListD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  br label %52

52:                                               ; preds = %51, %39
  call void @_ZN15SavedParseStateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %7) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %7) #6
  br label %53

53:                                               ; preds = %52
  %54 = load ptr, ptr %9, align 8
  %55 = load i32, ptr %10, align 4
  %56 = insertvalue { ptr, i32 } poison, ptr %54, 0
  %57 = insertvalue { ptr, i32 } %56, i32 %55, 1
  resume { ptr, i32 } %57
}

declare void @_ZN3AST6Module8add_itemENS_5NamedINS_4ItemEEE(ptr noundef nonnull align 8 dereferenceable(480), ptr noundef) #5

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

!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 = !{i64 0, i64 1, !10, i64 1, i64 1, !10, i64 2, i64 1, !10, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !5}
!10 = !{!11, !11, i64 0}
!11 = !{!"bool", !7, i64 0}
!12 = !{!13, !6, i64 16}
!13 = !{!"_ZTS10ParseState", !11, i64 0, !11, i64 1, !11, i64 2, !6, i64 8, !6, i64 16, !6, i64 24}
!14 = !{!13, !6, i64 24}


; 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.ParseState = type { i8, i8, i8, ptr, ptr, ptr }
%"struct.AST::Named" = type { %struct.Span, %"class.AST::AttributeList", %"class.AST::Visibility", %class.RcString, %"class.AST::Item" }
%struct.Span = type { ptr }
%"class.AST::AttributeList" = type { %"class.std::vector.81" }
%"class.std::vector.81" = type { %"struct.std::_Vector_base.82" }
%"struct.std::_Vector_base.82" = type { %"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::Attribute, std::allocator<AST::Attribute>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.AST::Visibility" = type <{ %"class.std::shared_ptr", %"class.std::shared_ptr.0", i32, [4 x i8] }>
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.0" = type { %"class.std::__shared_ptr.1" }
%"class.std::__shared_ptr.1" = type { ptr, %"class.std::__shared_count" }
%class.RcString = type { ptr }
%"class.AST::Item" = type { i32, %"union.AST::Item::DataUnion" }
%"union.AST::Item::DataUnion" = type { %"class.AST::Module" }
%"class.AST::Module" = type { %"struct.AST::AbsolutePath", %"class.std::vector.13", %"class.std::vector.18", %"class.std::vector.23", %"struct.AST::Module::FileInfo", i8, i8, %"class.std::unordered_map", %"class.std::unordered_map", %"class.std::unordered_map", %"class.std::unordered_map", %"class.std::vector.33", %"class.std::vector.38", %"class.std::vector.43" }
%"struct.AST::AbsolutePath" = type { %class.RcString, %"class.std::vector.8" }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl" }
%"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl" = type { %"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl_data" }
%"struct.std::_Vector_base<RcString, std::allocator<RcString>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<std::unique_ptr<AST::Named<AST::Item>>, std::allocator<std::unique_ptr<AST::Named<AST::Item>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<AST::Named<AST::Item>>, std::allocator<std::unique_ptr<AST::Named<AST::Item>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<AST::Named<AST::Item>>, std::allocator<std::unique_ptr<AST::Named<AST::Item>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<AST::Named<AST::Item>>, std::allocator<std::unique_ptr<AST::Named<AST::Item>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<std::shared_ptr<AST::Module>, std::allocator<std::shared_ptr<AST::Module>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<AST::Module>, std::allocator<std::shared_ptr<AST::Module>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<AST::Module>, std::allocator<std::shared_ptr<AST::Module>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<AST::Module>, std::allocator<std::shared_ptr<AST::Module>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<AST::Named<MacroRulesPtr>, std::allocator<AST::Named<MacroRulesPtr>>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::Named<MacroRulesPtr>, std::allocator<AST::Named<MacroRulesPtr>>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::Named<MacroRulesPtr>, std::allocator<AST::Named<MacroRulesPtr>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::Named<MacroRulesPtr>, std::allocator<AST::Named<MacroRulesPtr>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.AST::Module::FileInfo" = type { i8, i8, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string" }
%"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::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::vector.33" = type { %"struct.std::_Vector_base.34" }
%"struct.std::_Vector_base.34" = type { %"struct.std::_Vector_base<AST::AbsolutePath, std::allocator<AST::AbsolutePath>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::AbsolutePath, std::allocator<AST::AbsolutePath>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::AbsolutePath, std::allocator<AST::AbsolutePath>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::AbsolutePath, std::allocator<AST::AbsolutePath>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.38" = type { %"struct.std::_Vector_base.39" }
%"struct.std::_Vector_base.39" = type { %"struct.std::_Vector_base<AST::Module::MacroImport, std::allocator<AST::Module::MacroImport>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::Module::MacroImport, std::allocator<AST::Module::MacroImport>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::Module::MacroImport, std::allocator<AST::Module::MacroImport>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::Module::MacroImport, std::allocator<AST::Module::MacroImport>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.43" = type { %"struct.std::_Vector_base.44" }
%"struct.std::_Vector_base.44" = type { %"struct.std::_Vector_base<AST::Module::Import, std::allocator<AST::Module::Import>>::_Vector_impl" }
%"struct.std::_Vector_base<AST::Module::Import, std::allocator<AST::Module::Import>>::_Vector_impl" = type { %"struct.std::_Vector_base<AST::Module::Import, std::allocator<AST::Module::Import>>::_Vector_impl_data" }
%"struct.std::_Vector_base<AST::Module::Import, std::allocator<AST::Module::Import>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.SavedParseState = type { ptr, %struct.ParseState }

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15SavedParseStateC2ER11TokenStream10ParseState(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(176), ptr noundef byval(%struct.ParseState) align 8) unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16Parse_Mod_Item_SR11TokenStreamRKN3AST6Module8FileInfoERKNS1_12AbsolutePathENS1_13AttributeListE(ptr dead_on_unwind noalias writable sret(%"struct.AST::Named") align 8, ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z14Parse_Mod_ItemR11TokenStreamRN3AST6ModuleENS1_13AttributeListE(ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull align 8 dereferenceable(480) %1, ptr noundef %2) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.SavedParseState, align 8
  %5 = alloca %"struct.AST::Named", align 8
  %6 = alloca %"class.AST::AttributeList", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #5
  %7 = tail call noundef nonnull align 8 dereferenceable(32) ptr @_ZN11TokenStream11parse_stateEv(ptr noundef nonnull align 8 dereferenceable(176) %0)
  call void @_ZN15SavedParseStateC2ER11TokenStream10ParseState(ptr noundef nonnull align 8 dereferenceable(40) %4, ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull byval(%struct.ParseState) align 8 %7)
  %8 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN11TokenStream11parse_stateEv(ptr noundef nonnull align 8 dereferenceable(176) %0)
  %9 = getelementptr inbounds i8, ptr %8, i64 16
  store ptr %1, ptr %9, align 8, !tbaa !5
  %10 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN11TokenStream11parse_stateEv(ptr noundef nonnull align 8 dereferenceable(176) %0)
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  store ptr %1, ptr %11, align 8, !tbaa !5
  %12 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN11TokenStream11parse_stateEv(ptr noundef nonnull align 8 dereferenceable(176) %0)
  %13 = getelementptr inbounds i8, ptr %12, i64 24
  store ptr %2, ptr %13, align 8, !tbaa !11
  %14 = getelementptr inbounds i8, ptr %1, i64 104
  %15 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3AST6Module4pathEv(ptr noundef nonnull align 8 dereferenceable(480) %1)
  call void @_ZN3AST13AttributeListC2EOS0_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  invoke void @_Z16Parse_Mod_Item_SR11TokenStreamRKN3AST6Module8FileInfoERKNS1_12AbsolutePathENS1_13AttributeListE(ptr dead_on_unwind nonnull writable sret(%"struct.AST::Named") align 8 %5, ptr noundef nonnull align 8 dereferenceable(176) %0, ptr noundef nonnull align 8 dereferenceable(72) %14, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull %6)
          to label %16 unwind label %18

16:                                               ; preds = %3
  invoke void @_ZN3AST6Module8add_itemENS_5NamedINS_4ItemEEE(ptr noundef nonnull align 8 dereferenceable(480) %1, ptr noundef nonnull %5)
          to label %17 unwind label %20

17:                                               ; preds = %16
  call void @_ZN3AST5NamedINS_4ItemEED2Ev(ptr noundef nonnull align 8 dereferenceable(568) %5) #5
  call void @_ZN3AST13AttributeListD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @_ZN15SavedParseStateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #5
  ret void

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

20:                                               ; preds = %16
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3AST5NamedINS_4ItemEED2Ev(ptr noundef nonnull align 8 dereferenceable(568) %5) #5
  br label %22

22:                                               ; preds = %20, %18
  %.pn = phi { ptr, i32 } [ %21, %20 ], [ %19, %18 ]
  call void @_ZN3AST13AttributeListD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @_ZN15SavedParseStateD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn
}

declare void @_ZN3AST6Module8add_itemENS_5NamedINS_4ItemEEE(ptr noundef nonnull align 8 dereferenceable(480), ptr noundef) local_unnamed_addr #4

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 = { 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 #3 = { 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 }

!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, !10, i64 16}
!6 = !{!"_ZTS10ParseState", !7, i64 0, !7, i64 1, !7, i64 2, !10, i64 8, !10, i64 16, !10, i64 24}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 24}


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