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

; 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.std::_Placeholder" = type { 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::Expression>, std::allocator<ptr<ts::data::Expression>>>::_Vector_impl" }
%"struct.std::_Vector_base<ptr<ts::data::Expression>, std::allocator<ptr<ts::data::Expression>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ptr<ts::data::Expression>, std::allocator<ptr<ts::data::Expression>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ptr<ts::data::Expression>, std::allocator<ptr<ts::data::Expression>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ts::data::TextRange" = type { %"struct.ts::pos_type", i32 }
%"struct.ts::pos_type" = type { i32, i32 }
%"class.std::function.26" = 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 } }
%"class.std::_Bind" = type { { i64, i64 }, %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.30" }
%"struct.std::_Head_base.30" = type { ptr }
%struct.ptr.31 = type { %"class.std::shared_ptr.32" }
%"class.std::shared_ptr.32" = type { %"class.std::__shared_ptr.33" }
%"class.std::__shared_ptr.33" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.ts::ParenthesizerRules" = type { ptr }
%struct.ptr = type { %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }

@_ZNSt12placeholders2_1E = external global %"struct.std::_Placeholder", align 1

; 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

declare noundef zeroext i1 @_ZN2ts11NodeFactory20NoParenthesizerRulesEv(ptr noundef nonnull align 8 dereferenceable(232)) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2ts18ParenthesizerRules43parenthesizeExpressionsOfCommaDelimitedListENS_4data9NodeArrayI3ptrINS1_10ExpressionEEEE(ptr dead_on_unwind noalias writable sret(%"struct.ts::data::NodeArray") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %2) #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"struct.ts::data::NodeArray", align 8
  %8 = alloca %"struct.ts::data::NodeArray", align 8
  %9 = alloca %"class.std::function.26", align 8
  %10 = alloca %"class.std::_Bind", align 8
  %11 = alloca { i64, i64 }, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.ts::data::NodeArray", align 8
  %16 = alloca %"struct.ts::data::NodeArray", align 8
  %17 = alloca %struct.ptr.31, align 8
  %18 = alloca %"struct.ts::data::TextRange", align 4
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8
  %20 = getelementptr inbounds %"struct.ts::ParenthesizerRules", ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = call noundef zeroext i1 @_ZN2ts11NodeFactory20NoParenthesizerRulesEv(ptr noundef nonnull align 8 dereferenceable(232) %21)
  br i1 %22, label %23, label %24

23:                                               ; preds = %3
  call void @_ZN2ts4data9NodeArrayI3ptrINS0_10ExpressionEEEC2EOS5_(ptr noundef nonnull align 8 dereferenceable(44) %0, ptr noundef nonnull align 8 dereferenceable(44) %2) #7
  br label %69

24:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 48, ptr %7) #7
  call void @_ZN2ts4data9NodeArrayI3ptrINS0_10ExpressionEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(44) %8, ptr noundef nonnull align 8 dereferenceable(44) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #7
  store { i64, i64 } { i64 ptrtoint (ptr @_ZN2ts18ParenthesizerRules40parenthesizeExpressionForDisallowedCommaE3ptrINS_4data10ExpressionEE to i64), i64 0 }, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr %19, ptr %12, align 8, !tbaa !5
  invoke void @_ZSt4bindIMN2ts18ParenthesizerRulesEF3ptrINS0_4data10ExpressionEES5_EJPS1_RKSt12_PlaceholderILi1EEEENSt12_Bind_helperIXsr15__is_socketlikeIT_EE5valueESE_JDpT0_EE4typeEOSE_DpOSF_(ptr dead_on_unwind writable sret(%"class.std::_Bind") align 8 %10, ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 1 dereferenceable(1) @_ZNSt12placeholders2_1E)
          to label %25 unwind label %40

25:                                               ; preds = %24
  invoke void @_ZNSt8functionIF3ptrIN2ts4data10ExpressionEES4_EEC2ISt5_BindIFMNS1_18ParenthesizerRulesEFS4_S4_EPS9_St12_PlaceholderILi1EEEEvEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %26 unwind label %40

26:                                               ; preds = %25
  invoke void @_ZN2ts7sameMapINS_4data9NodeArrayI3ptrINS1_10ExpressionEEEEEET_S7_St8functionIFNSt16remove_referenceIDTixfL0p_Li0EEE4typeESC_EE(ptr dead_on_unwind writable sret(%"struct.ts::data::NodeArray") align 8 %7, ptr noundef %8, ptr noundef %9)
          to label %27 unwind label %44

27:                                               ; preds = %26
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %8) #7
  %28 = getelementptr inbounds %"struct.ts::ParenthesizerRules", ptr %19, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  invoke void @_ZN2ts4data9NodeArrayI3ptrINS0_10ExpressionEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(44) %16, ptr noundef nonnull align 8 dereferenceable(44) %7)
          to label %30 unwind label %49

30:                                               ; preds = %27
  %31 = invoke noundef ptr @_ZN2ts4data9NodeArrayI3ptrINS0_10ExpressionEEEptEv(ptr noundef nonnull align 8 dereferenceable(44) %2)
          to label %32 unwind label %53

32:                                               ; preds = %30
  %33 = getelementptr inbounds %"struct.ts::data::NodeArray", ptr %31, i32 0, i32 3
  %34 = load i8, ptr %33, align 1, !tbaa !12, !range !24, !noundef !25
  %35 = trunc i8 %34 to i1
  invoke void @_ZN2ts11NodeFactory15createNodeArrayI3ptrINS_4data10ExpressionEEEENS3_9NodeArrayIT_EES8_b(ptr dead_on_unwind writable sret(%"struct.ts::data::NodeArray") align 8 %15, ptr noundef nonnull align 8 dereferenceable(232) %29, ptr noundef %16, i1 noundef zeroext %35)
          to label %36 unwind label %53

36:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 12, ptr %18) #7
  %37 = getelementptr inbounds i8, ptr %2, i64 24
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 8 %37, i64 12, i1 false), !tbaa.struct !26
  invoke void @_ZN3ptrIN2ts4data9TextRangeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(12) %18)
          to label %38 unwind label %57

38:                                               ; preds = %36
  invoke void @_ZN2ts12setTextRangeINS_4data9NodeArrayI3ptrINS1_10ExpressionEEEEEET_S7_S3_INS1_9TextRangeEE(ptr dead_on_unwind writable sret(%"struct.ts::data::NodeArray") align 8 %0, ptr noundef %15, ptr noundef %17)
          to label %39 unwind label %61

39:                                               ; preds = %38
  call void @_ZN3ptrIN2ts4data9TextRangeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #7
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %15) #7
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %16) #7
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %7) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #7
  br label %69

40:                                               ; preds = %25, %24
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %13, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %14, align 4
  br label %48

44:                                               ; preds = %26
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %13, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %14, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br label %48

48:                                               ; preds = %44, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %8) #7
  br label %68

49:                                               ; preds = %27
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %13, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %14, align 4
  br label %67

53:                                               ; preds = %32, %30
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %13, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %14, align 4
  br label %66

57:                                               ; preds = %36
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %13, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %14, align 4
  br label %65

61:                                               ; preds = %38
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %13, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %14, align 4
  call void @_ZN3ptrIN2ts4data9TextRangeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  br label %65

65:                                               ; preds = %61, %57
  call void @llvm.lifetime.end.p0(i64 12, ptr %18) #7
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %15) #7
  br label %66

66:                                               ; preds = %65, %53
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %16) #7
  br label %67

67:                                               ; preds = %66, %49
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %7) #7
  br label %68

68:                                               ; preds = %67, %48
  call void @llvm.lifetime.end.p0(i64 48, ptr %7) #7
  br label %70

69:                                               ; preds = %39, %23
  ret void

70:                                               ; preds = %68
  %71 = load ptr, ptr %13, align 8
  %72 = load i32, ptr %14, align 4
  %73 = insertvalue { ptr, i32 } poison, ptr %71, 0
  %74 = insertvalue { ptr, i32 } %73, i32 %72, 1
  resume { ptr, i32 } %74
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2ts7sameMapINS_4data9NodeArrayI3ptrINS1_10ExpressionEEEEEET_S7_St8functionIFNSt16remove_referenceIDTixfL0p_Li0EEE4typeESC_EE(ptr dead_on_unwind noalias writable sret(%"struct.ts::data::NodeArray") align 8, ptr noundef, ptr noundef) #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4bindIMN2ts18ParenthesizerRulesEF3ptrINS0_4data10ExpressionEES5_EJPS1_RKSt12_PlaceholderILi1EEEENSt12_Bind_helperIXsr15__is_socketlikeIT_EE5valueESE_JDpT0_EE4typeEOSE_DpOSF_(ptr dead_on_unwind noalias writable sret(%"class.std::_Bind") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) #4

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2ts12setTextRangeINS_4data9NodeArrayI3ptrINS1_10ExpressionEEEEEET_S7_S3_INS1_9TextRangeEE(ptr dead_on_unwind noalias writable sret(%"struct.ts::data::NodeArray") align 8, ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2ts11NodeFactory15createNodeArrayI3ptrINS_4data10ExpressionEEEENS3_9NodeArrayIT_EES8_b(ptr dead_on_unwind noalias writable sret(%"struct.ts::data::NodeArray") align 8, ptr noundef nonnull align 8 dereferenceable(232), ptr noundef, i1 noundef zeroext) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN2ts4data9NodeArrayI3ptrINS0_10ExpressionEEEptEv(ptr noundef nonnull align 8 dereferenceable(44)) #3 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) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ptrIN2ts4data9TextRangeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 = { 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 #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 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 0}
!10 = !{!"_ZTSN2ts18ParenthesizerRulesE", !6, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !22, i64 37}
!13 = !{!"_ZTSN2ts4data9NodeArrayI3ptrINS0_10ExpressionEEEE", !14, i64 0, !19, i64 24, !22, i64 36, !22, i64 37, !22, i64 38, !23, i64 40}
!14 = !{!"_ZTSN2ts4data13ReadonlyArrayI3ptrINS0_10ExpressionEEEE", !15, i64 0}
!15 = !{!"_ZTSSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseI3ptrIN2ts4data10ExpressionEESaIS4_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseI3ptrIN2ts4data10ExpressionEESaIS4_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI3ptrIN2ts4data10ExpressionEESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_ZTSN2ts4data9TextRangeE", !20, i64 0, !21, i64 8}
!20 = !{!"_ZTSN2ts8pos_typeE", !21, i64 0, !21, i64 4}
!21 = !{!"int", !7, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = !{!"_ZTSN2ts14TransformFlagsE", !7, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{i64 0, i64 4, !27, i64 4, i64 4, !27, i64 8, i64 4, !27}
!27 = !{!21, !21, 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.std::_Placeholder" = type { 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::Expression>, std::allocator<ptr<ts::data::Expression>>>::_Vector_impl" }
%"struct.std::_Vector_base<ptr<ts::data::Expression>, std::allocator<ptr<ts::data::Expression>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ptr<ts::data::Expression>, std::allocator<ptr<ts::data::Expression>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ptr<ts::data::Expression>, std::allocator<ptr<ts::data::Expression>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.ts::data::TextRange" = type { %"struct.ts::pos_type", i32 }
%"struct.ts::pos_type" = type { i32, i32 }
%"class.std::function.26" = 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 } }
%"class.std::_Bind" = type { { i64, i64 }, %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.30" }
%"struct.std::_Head_base.30" = type { ptr }
%struct.ptr.31 = type { %"class.std::shared_ptr.32" }
%"class.std::shared_ptr.32" = type { %"class.std::__shared_ptr.33" }
%"class.std::__shared_ptr.33" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%struct.ptr = type { %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }

@_ZNSt12placeholders2_1E = external global %"struct.std::_Placeholder", align 1

; 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

declare noundef zeroext i1 @_ZN2ts11NodeFactory20NoParenthesizerRulesEv(ptr noundef nonnull align 8 dereferenceable(232)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2ts18ParenthesizerRules43parenthesizeExpressionsOfCommaDelimitedListENS_4data9NodeArrayI3ptrINS1_10ExpressionEEEE(ptr dead_on_unwind noalias writable sret(%"struct.ts::data::NodeArray") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.ts::data::NodeArray", align 8
  %5 = alloca %"struct.ts::data::NodeArray", align 8
  %6 = alloca %"class.std::function.26", align 8
  %7 = alloca %"class.std::_Bind", align 8
  %8 = alloca { i64, i64 }, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.ts::data::NodeArray", align 8
  %11 = alloca %"struct.ts::data::NodeArray", align 8
  %12 = alloca %struct.ptr.31, align 8
  %13 = alloca %"struct.ts::data::TextRange", align 4
  %14 = load ptr, ptr %1, align 8, !tbaa !5
  %15 = tail call noundef zeroext i1 @_ZN2ts11NodeFactory20NoParenthesizerRulesEv(ptr noundef nonnull align 8 dereferenceable(232) %14)
  br i1 %15, label %16, label %17

16:                                               ; preds = %3
  tail call void @_ZN2ts4data9NodeArrayI3ptrINS0_10ExpressionEEEC2EOS5_(ptr noundef nonnull align 8 dereferenceable(44) %0, ptr noundef nonnull align 8 dereferenceable(44) %2) #7
  br label %47

17:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #7
  call void @_ZN2ts4data9NodeArrayI3ptrINS0_10ExpressionEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(44) %5, ptr noundef nonnull align 8 dereferenceable(44) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  store i64 ptrtoint (ptr @_ZN2ts18ParenthesizerRules40parenthesizeExpressionForDisallowedCommaE3ptrINS_4data10ExpressionEE to i64), ptr %8, align 8, !tbaa !10
  %.fca.1.gep = getelementptr inbounds i8, ptr %8, i64 8
  store i64 0, ptr %.fca.1.gep, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  store ptr %1, ptr %9, align 8, !tbaa !11
  invoke void @_ZSt4bindIMN2ts18ParenthesizerRulesEF3ptrINS0_4data10ExpressionEES5_EJPS1_RKSt12_PlaceholderILi1EEEENSt12_Bind_helperIXsr15__is_socketlikeIT_EE5valueESE_JDpT0_EE4typeEOSE_DpOSF_(ptr dead_on_unwind nonnull writable sret(%"class.std::_Bind") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 1 dereferenceable(1) @_ZNSt12placeholders2_1E)
          to label %18 unwind label %31

18:                                               ; preds = %17
  invoke void @_ZNSt8functionIF3ptrIN2ts4data10ExpressionEES4_EEC2ISt5_BindIFMNS1_18ParenthesizerRulesEFS4_S4_EPS9_St12_PlaceholderILi1EEEEvEEOT_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %19 unwind label %31

19:                                               ; preds = %18
  invoke void @_ZN2ts7sameMapINS_4data9NodeArrayI3ptrINS1_10ExpressionEEEEEET_S7_St8functionIFNSt16remove_referenceIDTixfL0p_Li0EEE4typeESC_EE(ptr dead_on_unwind nonnull writable sret(%"struct.ts::data::NodeArray") align 8 %4, ptr noundef nonnull %5, ptr noundef nonnull %6)
          to label %20 unwind label %33

20:                                               ; preds = %19
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %5) #7
  %21 = load ptr, ptr %1, align 8, !tbaa !5
  invoke void @_ZN2ts4data9NodeArrayI3ptrINS0_10ExpressionEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(44) %11, ptr noundef nonnull align 8 dereferenceable(44) %4)
          to label %22 unwind label %36

22:                                               ; preds = %20
  %23 = call noundef ptr @_ZN2ts4data9NodeArrayI3ptrINS0_10ExpressionEEEptEv(ptr noundef nonnull align 8 dereferenceable(44) %2)
  %24 = getelementptr inbounds i8, ptr %23, i64 37
  %25 = load i8, ptr %24, align 1, !tbaa !12, !range !24, !noundef !25
  %26 = trunc nuw i8 %25 to i1
  invoke void @_ZN2ts11NodeFactory15createNodeArrayI3ptrINS_4data10ExpressionEEEENS3_9NodeArrayIT_EES8_b(ptr dead_on_unwind nonnull writable sret(%"struct.ts::data::NodeArray") align 8 %10, ptr noundef nonnull align 8 dereferenceable(232) %21, ptr noundef nonnull %11, i1 noundef zeroext %26)
          to label %27 unwind label %38

27:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #7
  %28 = getelementptr inbounds i8, ptr %2, i64 24
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 8 dereferenceable(12) %28, i64 12, i1 false), !tbaa.struct !26
  invoke void @_ZN3ptrIN2ts4data9TextRangeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(12) %13)
          to label %29 unwind label %40

29:                                               ; preds = %27
  invoke void @_ZN2ts12setTextRangeINS_4data9NodeArrayI3ptrINS1_10ExpressionEEEEEET_S7_S3_INS1_9TextRangeEE(ptr dead_on_unwind writable sret(%"struct.ts::data::NodeArray") align 8 %0, ptr noundef nonnull %10, ptr noundef nonnull %12)
          to label %30 unwind label %42

30:                                               ; preds = %29
  call void @_ZN3ptrIN2ts4data9TextRangeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #7
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %10) #7
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %11) #7
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %4) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  br label %47

31:                                               ; preds = %18, %17
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %35

33:                                               ; preds = %19
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  br label %35

35:                                               ; preds = %33, %31
  %.pn = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  br label %46

36:                                               ; preds = %20
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %46

38:                                               ; preds = %22
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %45

40:                                               ; preds = %27
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %44

42:                                               ; preds = %29
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3ptrIN2ts4data9TextRangeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  br label %44

44:                                               ; preds = %42, %40
  %.pn8 = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #7
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %10) #7
  br label %45

45:                                               ; preds = %44, %38
  %.pn8.pn = phi { ptr, i32 } [ %.pn8, %44 ], [ %39, %38 ]
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %11) #7
  br label %46

46:                                               ; preds = %36, %45, %35
  %.sink = phi ptr [ %5, %35 ], [ %4, %45 ], [ %4, %36 ]
  %.pn8.pn.pn.pn = phi { ptr, i32 } [ %.pn, %35 ], [ %.pn8.pn, %45 ], [ %37, %36 ]
  call void @_ZNSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(44) %.sink) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn8.pn.pn.pn

47:                                               ; preds = %30, %16
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2ts7sameMapINS_4data9NodeArrayI3ptrINS1_10ExpressionEEEEEET_S7_St8functionIFNSt16remove_referenceIDTixfL0p_Li0EEE4typeESC_EE(ptr dead_on_unwind noalias writable sret(%"struct.ts::data::NodeArray") align 8, ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4bindIMN2ts18ParenthesizerRulesEF3ptrINS0_4data10ExpressionEES5_EJPS1_RKSt12_PlaceholderILi1EEEENSt12_Bind_helperIXsr15__is_socketlikeIT_EE5valueESE_JDpT0_EE4typeEOSE_DpOSF_(ptr dead_on_unwind noalias writable sret(%"class.std::_Bind") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2ts12setTextRangeINS_4data9NodeArrayI3ptrINS1_10ExpressionEEEEEET_S7_S3_INS1_9TextRangeEE(ptr dead_on_unwind noalias writable sret(%"struct.ts::data::NodeArray") align 8, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2ts11NodeFactory15createNodeArrayI3ptrINS_4data10ExpressionEEEENS3_9NodeArrayIT_EES8_b(ptr dead_on_unwind noalias writable sret(%"struct.ts::data::NodeArray") align 8, ptr noundef nonnull align 8 dereferenceable(232), ptr noundef, i1 noundef zeroext) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress 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) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3ptrIN2ts4data9TextRangeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 = { 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 #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 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 0}
!6 = !{!"_ZTSN2ts18ParenthesizerRulesE", !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!8, !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !22, i64 37}
!13 = !{!"_ZTSN2ts4data9NodeArrayI3ptrINS0_10ExpressionEEEE", !14, i64 0, !19, i64 24, !22, i64 36, !22, i64 37, !22, i64 38, !23, i64 40}
!14 = !{!"_ZTSN2ts4data13ReadonlyArrayI3ptrINS0_10ExpressionEEEE", !15, i64 0}
!15 = !{!"_ZTSSt6vectorI3ptrIN2ts4data10ExpressionEESaIS4_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseI3ptrIN2ts4data10ExpressionEESaIS4_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseI3ptrIN2ts4data10ExpressionEESaIS4_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseI3ptrIN2ts4data10ExpressionEESaIS4_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!19 = !{!"_ZTSN2ts4data9TextRangeE", !20, i64 0, !21, i64 8}
!20 = !{!"_ZTSN2ts8pos_typeE", !21, i64 0, !21, i64 4}
!21 = !{!"int", !8, i64 0}
!22 = !{!"bool", !8, i64 0}
!23 = !{!"_ZTSN2ts14TransformFlagsE", !8, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{i64 0, i64 4, !27, i64 4, i64 4, !27, i64 8, i64 4, !27}
!27 = !{!21, !21, i64 0}


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