; LLVM IR from ASDAlexander77/TypeScriptCompiler :: tsc/tsc-new-parser (node_factory)

; 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.ts::data::NodeArray.46" = type <{ %"struct.ts::data::ReadonlyArray.47", %"struct.ts::data::TextRange", i8, i8, i8, i8, i32, [4 x i8] }>
%"struct.ts::data::ReadonlyArray.47" = type { %"class.std::vector.48" }
%"class.std::vector.48" = type { %"struct.std::_Vector_base.49" }
%"struct.std::_Vector_base.49" = type { %"struct.std::_Vector_base<ptr<ts::data::TypeNode>, std::allocator<ptr<ts::data::TypeNode>>>::_Vector_impl" }
%"struct.std::_Vector_base<ptr<ts::data::TypeNode>, std::allocator<ptr<ts::data::TypeNode>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ptr<ts::data::TypeNode>, std::allocator<ptr<ts::data::TypeNode>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ptr<ts::data::TypeNode>, std::allocator<ptr<ts::data::TypeNode>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ts::data::TextRange" = type { %"struct.ts::pos_type", i32 }
%"struct.ts::pos_type" = type { i32, i32 }
%struct.ptr.259 = type { %"class.std::shared_ptr.260" }
%"class.std::shared_ptr.260" = type { %"class.std::__shared_ptr.261" }
%"class.std::__shared_ptr.261" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.ts::data::TypeQueryNode" = type { %"struct.ts::data::TypeNode", %struct.ptr.17, %"struct.ts::data::NodeArray.46" }
%"struct.ts::data::TypeNode" = type { %"struct.ts::data::JSDocContainer" }
%"struct.ts::data::JSDocContainer" = type { %"struct.ts::data::Node.base", [3 x i8], %"struct.ts::data::NodeArray.30", %"struct.ts::data::NodeArray.38" }
%"struct.ts::data::Node.base" = type <{ ptr, %"struct.ts::data::TextRange", i32, i32, i32, i32, [4 x i8], %"struct.ts::data::NodeArray", i32, [4 x i8], %struct.ptr.17, %struct.ptr.17, i32, i8 }>
%"struct.ts::data::NodeArray" = type <{ %"struct.ts::data::ReadonlyArray", %"struct.ts::data::TextRange", i8, i8, i8, i8, i32, [4 x i8] }>
%"struct.ts::data::ReadonlyArray" = type { %"class.std::vector.21" }
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<ptr<ts::data::Node>, std::allocator<ptr<ts::data::Node>>>::_Vector_impl" }
%"struct.std::_Vector_base<ptr<ts::data::Node>, std::allocator<ptr<ts::data::Node>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ptr<ts::data::Node>, std::allocator<ptr<ts::data::Node>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ptr<ts::data::Node>, std::allocator<ptr<ts::data::Node>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ts::data::NodeArray.30" = type <{ %"struct.ts::data::ReadonlyArray.31", %"struct.ts::data::TextRange", i8, i8, i8, i8, i32, [4 x i8] }>
%"struct.ts::data::ReadonlyArray.31" = type { %"class.std::vector.32" }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<ptr<ts::data::JSDoc>, std::allocator<ptr<ts::data::JSDoc>>>::_Vector_impl" }
%"struct.std::_Vector_base<ptr<ts::data::JSDoc>, std::allocator<ptr<ts::data::JSDoc>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ptr<ts::data::JSDoc>, std::allocator<ptr<ts::data::JSDoc>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ptr<ts::data::JSDoc>, std::allocator<ptr<ts::data::JSDoc>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ts::data::NodeArray.38" = type <{ %"struct.ts::data::ReadonlyArray.39", %"struct.ts::data::TextRange", i8, i8, i8, i8, i32, [4 x i8] }>
%"struct.ts::data::ReadonlyArray.39" = type { %"class.std::vector.40" }
%"class.std::vector.40" = type { %"struct.std::_Vector_base.41" }
%"struct.std::_Vector_base.41" = type { %"struct.std::_Vector_base<ptr<ts::data::JSDocTag>, std::allocator<ptr<ts::data::JSDocTag>>>::_Vector_impl" }
%"struct.std::_Vector_base<ptr<ts::data::JSDocTag>, std::allocator<ptr<ts::data::JSDocTag>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ptr<ts::data::JSDocTag>, std::allocator<ptr<ts::data::JSDocTag>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ptr<ts::data::JSDocTag>, std::allocator<ptr<ts::data::JSDocTag>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.ptr.17 = type { %"class.std::shared_ptr.18" }
%"class.std::shared_ptr.18" = type { %"class.std::__shared_ptr.19" }
%"class.std::__shared_ptr.19" = type { ptr, %"class.std::__shared_count" }
%"class.ts::NodeFactory" = type { ptr, %"class.ts::Scanner", %"struct.ts::ParenthesizerRules", i32, %"class.std::function.15" }
%"class.ts::Scanner" = type { i32, i32, i8, i32, %"struct.ts::safe_string", i32, i32, i32, i32, i32, %"class.std::__cxx11::basic_string", i32, %"class.std::vector.10", i32, i32, %"class.std::function" }
%"struct.ts::safe_string" = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<wchar_t>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<wchar_t>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<ptr<ts::data::CommentDirective>, std::allocator<ptr<ts::data::CommentDirective>>>::_Vector_impl" }
%"struct.std::_Vector_base<ptr<ts::data::CommentDirective>, std::allocator<ptr<ts::data::CommentDirective>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ptr<ts::data::CommentDirective>, std::allocator<ptr<ts::data::CommentDirective>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ptr<ts::data::CommentDirective>, std::allocator<ptr<ts::data::CommentDirective>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"struct.ts::ParenthesizerRules" = type { ptr }
%"class.std::function.15" = type { %"class.std::_Function_base", ptr }
%"struct.ts::data::Node" = type <{ ptr, %"struct.ts::data::TextRange", i32, i32, i32, i32, [4 x i8], %"struct.ts::data::NodeArray", i32, [4 x i8], %struct.ptr.17, %struct.ptr.17, i32, i8, [3 x i8] }>

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ptrIN2ts4data4NodeEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(44) ptr @_ZN2ts4data9NodeArrayI3ptrINS0_8TypeNodeEEEaSEOS5_(ptr noundef nonnull align 8 dereferenceable(44), ptr noundef nonnull align 8 dereferenceable(44)) #1 align 2

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

declare void @_ZN2ts18ParenthesizerRules25parenthesizeTypeArgumentsENS_4data9NodeArrayI3ptrINS1_8TypeNodeEEEE(ptr dead_on_unwind writable sret(%"struct.ts::data::NodeArray.46") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2ts4data9NodeArrayI3ptrINS0_8TypeNodeEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(44), ptr noundef nonnull align 8 dereferenceable(44)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2ts11NodeFactory19createTypeQueryNodeE3ptrINS_4data4NodeEENS2_9NodeArrayIS1_INS2_8TypeNodeEEEE(ptr dead_on_unwind noalias writable sret(%struct.ptr.259) align 8 %0, ptr noundef nonnull align 8 dereferenceable(232) %1, ptr noundef %2, ptr noundef %3) #5 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i1, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.ts::data::NodeArray.46", align 8
  %13 = alloca %"struct.ts::data::NodeArray.46", align 8
  %14 = alloca i1, align 1
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %15 = load ptr, ptr %6, align 8
  store i1 false, ptr %9, align 1
  call void @_ZN2ts11NodeFactory14createBaseNodeI3ptrINS_4data13TypeQueryNodeEES4_EEDa10SyntaxKind(ptr dead_on_unwind writable sret(%struct.ptr.259) align 8 %0, ptr noundef nonnull align 8 dereferenceable(232) %15, i32 noundef 186)
  %16 = invoke noundef ptr @_ZN3ptrIN2ts4data13TypeQueryNodeEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %17 unwind label %40

17:                                               ; preds = %4
  %18 = getelementptr inbounds %"struct.ts::data::TypeQueryNode", ptr %16, i32 0, i32 1
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ptrIN2ts4data4NodeEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr %12) #6
  store i1 false, ptr %14, align 1
  %20 = invoke noundef zeroext i1 @_ZN2tsntI3ptrINS_4data8TypeNodeEEEEbRNS2_9NodeArrayIT_EE(ptr noundef nonnull align 8 dereferenceable(44) %3)
          to label %21 unwind label %44

21:                                               ; preds = %17
  br i1 %20, label %26, label %22

22:                                               ; preds = %21
  %23 = getelementptr inbounds %"class.ts::NodeFactory", ptr %15, i32 0, i32 2
  invoke void @_ZN2ts4data9NodeArrayI3ptrINS0_8TypeNodeEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(44) %13, ptr noundef nonnull align 8 dereferenceable(44) %3)
          to label %24 unwind label %44

24:                                               ; preds = %22
  store i1 true, ptr %14, align 1
  invoke void @_ZN2ts18ParenthesizerRules25parenthesizeTypeArgumentsENS_4data9NodeArrayI3ptrINS1_8TypeNodeEEEE(ptr dead_on_unwind writable sret(%"struct.ts::data::NodeArray.46") align 8 %12, ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef %13)
          to label %25 unwind label %48

25:                                               ; preds = %24
  br label %28

26:                                               ; preds = %21
  invoke void @_ZN2ts4data9NodeArrayI3ptrINS0_8TypeNodeEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(44) %12, ptr noundef nonnull align 8 dereferenceable(44) %3)
          to label %27 unwind label %48

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27, %25
  %29 = invoke noundef ptr @_ZN3ptrIN2ts4data13TypeQueryNodeEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %30 unwind label %52

30:                                               ; preds = %28
  %31 = getelementptr inbounds %"struct.ts::data::TypeQueryNode", ptr %29, i32 0, i32 2
  %32 = call noundef nonnull align 8 dereferenceable(44) ptr @_ZN2ts4data9NodeArrayI3ptrINS0_8TypeNodeEEEaSEOS5_(ptr noundef nonnull align 8 dereferenceable(44) %31, ptr noundef nonnull align 8 dereferenceable(44) %12) #6
  call void @_ZNSt6vectorI3ptrIN2ts4data8TypeNodeEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %12) #6
  %33 = load i1, ptr %14, align 1
  br i1 %33, label %34, label %35

34:                                               ; preds = %30
  call void @_ZNSt6vectorI3ptrIN2ts4data8TypeNodeEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %13) #6
  br label %35

35:                                               ; preds = %34, %30
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #6
  %36 = invoke noundef ptr @_ZN3ptrIN2ts4data13TypeQueryNodeEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
          to label %37 unwind label %40

37:                                               ; preds = %35
  %38 = getelementptr inbounds %"struct.ts::data::Node", ptr %36, i32 0, i32 5
  store i32 1, ptr %38, align 8, !tbaa !9
  store i1 true, ptr %9, align 1
  %39 = load i1, ptr %9, align 1
  br i1 %39, label %62, label %61

40:                                               ; preds = %35, %4
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %10, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %11, align 4
  br label %63

44:                                               ; preds = %22, %17
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %10, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %11, align 4
  br label %60

48:                                               ; preds = %26, %24
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %10, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %11, align 4
  br label %56

52:                                               ; preds = %28
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %10, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %11, align 4
  call void @_ZNSt6vectorI3ptrIN2ts4data8TypeNodeEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %12) #6
  br label %56

56:                                               ; preds = %52, %48
  %57 = load i1, ptr %14, align 1
  br i1 %57, label %58, label %59

58:                                               ; preds = %56
  call void @_ZNSt6vectorI3ptrIN2ts4data8TypeNodeEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %13) #6
  br label %59

59:                                               ; preds = %58, %56
  br label %60

60:                                               ; preds = %59, %44
  call void @llvm.lifetime.end.p0(i64 48, ptr %12) #6
  br label %63

61:                                               ; preds = %37
  call void @_ZN3ptrIN2ts4data13TypeQueryNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #6
  br label %62

62:                                               ; preds = %61, %37
  ret void

63:                                               ; preds = %60, %40
  call void @_ZN3ptrIN2ts4data13TypeQueryNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #6
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr %10, align 8
  %66 = load i32, ptr %11, align 4
  %67 = insertvalue { ptr, i32 } poison, ptr %65, 0
  %68 = insertvalue { ptr, i32 } %67, i32 %66, 1
  resume { ptr, i32 } %68
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2ts11NodeFactory14createBaseNodeI3ptrINS_4data13TypeQueryNodeEES4_EEDa10SyntaxKind(ptr dead_on_unwind noalias writable sret(%struct.ptr.259) align 8, ptr noundef nonnull align 8 dereferenceable(232), i32 noundef) #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3ptrIN2ts4data13TypeQueryNodeEEptEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2tsntI3ptrINS_4data8TypeNodeEEEEbRNS2_9NodeArrayIT_EE(ptr noundef nonnull align 8 dereferenceable(44)) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { "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 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 = { 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 #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 = !{!10, !17, i64 32}
!10 = !{!"_ZTSN2ts4data4NodeE", !11, i64 8, !14, i64 20, !15, i64 24, !16, i64 28, !17, i64 32, !18, i64 40, !13, i64 88, !25, i64 96, !25, i64 112, !29, i64 128, !24, i64 132}
!11 = !{!"_ZTSN2ts4data9TextRangeE", !12, i64 0, !13, i64 8}
!12 = !{!"_ZTSN2ts8pos_typeE", !13, i64 0, !13, i64 4}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_ZTS10SyntaxKind", !7, i64 0}
!15 = !{!"_ZTSN2ts9NodeFlagsE", !7, i64 0}
!16 = !{!"_ZTSN2ts13ModifierFlagsE", !7, i64 0}
!17 = !{!"_ZTSN2ts14TransformFlagsE", !7, i64 0}
!18 = !{!"_ZTSN2ts4data9NodeArrayI3ptrINS0_4NodeEEEE", !19, i64 0, !11, i64 24, !24, i64 36, !24, i64 37, !24, i64 38, !17, i64 40}
!19 = !{!"_ZTSN2ts4data13ReadonlyArrayI3ptrINS0_4NodeEEEE", !20, i64 0}
!20 = !{!"_ZTSSt6vectorI3ptrIN2ts4data4NodeEESaIS4_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseI3ptrIN2ts4data4NodeEESaIS4_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI3ptrIN2ts4data4NodeEESaIS4_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseI3ptrIN2ts4data4NodeEESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!"bool", !7, i64 0}
!25 = !{!"_ZTS3ptrIN2ts4data4NodeEE", !26, i64 0}
!26 = !{!"_ZTSSt10shared_ptrIN2ts4data4NodeEE", !27, i64 0}
!27 = !{!"_ZTSSt12__shared_ptrIN2ts4data4NodeELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !28, i64 8}
!28 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!29 = !{!"_ZTSN2ts13InternalFlagsE", !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.ts::data::NodeArray.46" = type <{ %"struct.ts::data::ReadonlyArray.47", %"struct.ts::data::TextRange", i8, i8, i8, i8, i32, [4 x i8] }>
%"struct.ts::data::ReadonlyArray.47" = type { %"class.std::vector.48" }
%"class.std::vector.48" = type { %"struct.std::_Vector_base.49" }
%"struct.std::_Vector_base.49" = type { %"struct.std::_Vector_base<ptr<ts::data::TypeNode>, std::allocator<ptr<ts::data::TypeNode>>>::_Vector_impl" }
%"struct.std::_Vector_base<ptr<ts::data::TypeNode>, std::allocator<ptr<ts::data::TypeNode>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ptr<ts::data::TypeNode>, std::allocator<ptr<ts::data::TypeNode>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ptr<ts::data::TypeNode>, std::allocator<ptr<ts::data::TypeNode>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ts::data::TextRange" = type { %"struct.ts::pos_type", i32 }
%"struct.ts::pos_type" = type { i32, i32 }
%struct.ptr.259 = type { %"class.std::shared_ptr.260" }
%"class.std::shared_ptr.260" = type { %"class.std::__shared_ptr.261" }
%"class.std::__shared_ptr.261" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ptrIN2ts4data4NodeEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(44) ptr @_ZN2ts4data9NodeArrayI3ptrINS0_8TypeNodeEEEaSEOS5_(ptr noundef nonnull align 8 dereferenceable(44), ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #1 align 2

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

declare void @_ZN2ts18ParenthesizerRules25parenthesizeTypeArgumentsENS_4data9NodeArrayI3ptrINS1_8TypeNodeEEEE(ptr dead_on_unwind writable sret(%"struct.ts::data::NodeArray.46") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2ts4data9NodeArrayI3ptrINS0_8TypeNodeEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(44), ptr noundef nonnull align 8 dereferenceable(44)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2ts11NodeFactory19createTypeQueryNodeE3ptrINS_4data4NodeEENS2_9NodeArrayIS1_INS2_8TypeNodeEEEE(ptr dead_on_unwind noalias writable sret(%struct.ptr.259) align 8 %0, ptr noundef nonnull align 8 dereferenceable(232) %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"struct.ts::data::NodeArray.46", align 8
  %6 = alloca %"struct.ts::data::NodeArray.46", align 8
  tail call void @_ZN2ts11NodeFactory14createBaseNodeI3ptrINS_4data13TypeQueryNodeEES4_EEDa10SyntaxKind(ptr dead_on_unwind writable sret(%struct.ptr.259) align 8 %0, ptr noundef nonnull align 8 dereferenceable(232) %1, i32 noundef 186)
  %7 = tail call noundef ptr @_ZN3ptrIN2ts4data13TypeQueryNodeEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %8 = getelementptr inbounds i8, ptr %7, i64 232
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN3ptrIN2ts4data4NodeEEaSERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #6
  %10 = tail call noundef zeroext i1 @_ZN2tsntI3ptrINS_4data8TypeNodeEEEEbRNS2_9NodeArrayIT_EE(ptr noundef nonnull align 8 dereferenceable(44) %3)
  br i1 %10, label %14, label %11

11:                                               ; preds = %4
  invoke void @_ZN2ts4data9NodeArrayI3ptrINS0_8TypeNodeEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(44) %6, ptr noundef nonnull align 8 dereferenceable(44) %3)
          to label %12 unwind label %24

12:                                               ; preds = %11
  %13 = getelementptr inbounds i8, ptr %1, i64 184
  invoke void @_ZN2ts18ParenthesizerRules25parenthesizeTypeArgumentsENS_4data9NodeArrayI3ptrINS1_8TypeNodeEEEE(ptr dead_on_unwind nonnull writable sret(%"struct.ts::data::NodeArray.46") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull %6)
          to label %16 unwind label %26

14:                                               ; preds = %4
  invoke void @_ZN2ts4data9NodeArrayI3ptrINS0_8TypeNodeEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(44) %5, ptr noundef nonnull align 8 dereferenceable(44) %3)
          to label %16 unwind label %.thread

.thread:                                          ; preds = %14
  %15 = landingpad { ptr, i32 }
          cleanup
  br label %28

16:                                               ; preds = %14, %12
  %17 = call noundef ptr @_ZN3ptrIN2ts4data13TypeQueryNodeEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %18 = getelementptr inbounds i8, ptr %17, i64 248
  %19 = call noundef nonnull align 8 dereferenceable(44) ptr @_ZN2ts4data9NodeArrayI3ptrINS0_8TypeNodeEEEaSEOS5_(ptr noundef nonnull align 8 dereferenceable(44) %18, ptr noundef nonnull align 8 dereferenceable(44) %5) #6
  call void @_ZNSt6vectorI3ptrIN2ts4data8TypeNodeEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %5) #6
  br i1 %10, label %21, label %20

20:                                               ; preds = %16
  call void @_ZNSt6vectorI3ptrIN2ts4data8TypeNodeEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %6) #6
  br label %21

21:                                               ; preds = %20, %16
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  %22 = call noundef ptr @_ZN3ptrIN2ts4data13TypeQueryNodeEEptEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  %23 = getelementptr inbounds i8, ptr %22, i64 32
  store i32 1, ptr %23, align 8, !tbaa !5
  ret void

24:                                               ; preds = %11
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %28

26:                                               ; preds = %12
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorI3ptrIN2ts4data8TypeNodeEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %6) #6
  br label %28

28:                                               ; preds = %.thread, %26, %24
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ], [ %15, %.thread ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #6
  call void @_ZN3ptrIN2ts4data13TypeQueryNodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %0) #6
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2ts11NodeFactory14createBaseNodeI3ptrINS_4data13TypeQueryNodeEES4_EEDa10SyntaxKind(ptr dead_on_unwind noalias writable sret(%struct.ptr.259) align 8, ptr noundef nonnull align 8 dereferenceable(232), i32 noundef) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3ptrIN2ts4data13TypeQueryNodeEEptEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN2tsntI3ptrINS_4data8TypeNodeEEEEbRNS2_9NodeArrayIT_EE(ptr noundef nonnull align 8 dereferenceable(44)) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { "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 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 = { 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 #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, !15, i64 32}
!6 = !{!"_ZTSN2ts4data4NodeE", !7, i64 8, !12, i64 20, !13, i64 24, !14, i64 28, !15, i64 32, !16, i64 40, !9, i64 88, !24, i64 96, !24, i64 112, !28, i64 128, !23, i64 132}
!7 = !{!"_ZTSN2ts4data9TextRangeE", !8, i64 0, !9, i64 8}
!8 = !{!"_ZTSN2ts8pos_typeE", !9, i64 0, !9, i64 4}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTS10SyntaxKind", !10, i64 0}
!13 = !{!"_ZTSN2ts9NodeFlagsE", !10, i64 0}
!14 = !{!"_ZTSN2ts13ModifierFlagsE", !10, i64 0}
!15 = !{!"_ZTSN2ts14TransformFlagsE", !10, i64 0}
!16 = !{!"_ZTSN2ts4data9NodeArrayI3ptrINS0_4NodeEEEE", !17, i64 0, !7, i64 24, !23, i64 36, !23, i64 37, !23, i64 38, !15, i64 40}
!17 = !{!"_ZTSN2ts4data13ReadonlyArrayI3ptrINS0_4NodeEEEE", !18, i64 0}
!18 = !{!"_ZTSSt6vectorI3ptrIN2ts4data4NodeEESaIS4_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseI3ptrIN2ts4data4NodeEESaIS4_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseI3ptrIN2ts4data4NodeEESaIS4_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI3ptrIN2ts4data4NodeEESaIS4_EE17_Vector_impl_dataE", !22, i64 0, !22, i64 8, !22, i64 16}
!22 = !{!"any pointer", !10, i64 0}
!23 = !{!"bool", !10, i64 0}
!24 = !{!"_ZTS3ptrIN2ts4data4NodeEE", !25, i64 0}
!25 = !{!"_ZTSSt10shared_ptrIN2ts4data4NodeEE", !26, i64 0}
!26 = !{!"_ZTSSt12__shared_ptrIN2ts4data4NodeELN9__gnu_cxx12_Lock_policyE2EE", !22, i64 0, !27, i64 8}
!27 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !22, i64 0}
!28 = !{!"_ZTSN2ts13InternalFlagsE", !10, i64 0}


; Effective O3 passes: GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass