; 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.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.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" }
%struct.ptr.112 = type { %"class.std::shared_ptr.113" }
%"class.std::shared_ptr.113" = type { %"class.std::__shared_ptr.114" }
%"class.std::__shared_ptr.114" = type { ptr, %"class.std::__shared_count" }
%struct.ptr.35 = type { %"class.std::shared_ptr.36" }
%"class.std::shared_ptr.36" = type { %"class.std::__shared_ptr.37" }
%"class.std::__shared_ptr.37" = type { ptr, %"class.std::__shared_count" }
%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" }
%"struct.ts::ParenthesizerRules" = type { ptr }

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

declare void @_ZN2ts11NodeFactory29createParenthesizedExpressionE3ptrINS_4data10ExpressionEE(ptr dead_on_unwind writable sret(%struct.ptr.17) align 8, ptr noundef nonnull align 8 dereferenceable(232), ptr noundef) #1

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2ts12setTextRangeI3ptrINS_4data10ExpressionEEEET_S5_S1_INS2_9TextRangeEE(ptr dead_on_unwind noalias writable sret(%struct.ptr) align 8, ptr noundef, ptr noundef) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2ts18ParenthesizerRules32parenthesizeOperandOfPrefixUnaryE3ptrINS_4data10ExpressionEE(ptr dead_on_unwind noalias writable sret(%struct.ptr.112) align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %2) #5 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.ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %struct.ptr, align 8
  %11 = alloca %struct.ptr.35, align 8
  %12 = alloca %struct.ptr, align 8
  %13 = alloca i1, align 1
  %14 = alloca %struct.ptr, align 8
  %15 = alloca %struct.ptr.17, align 8
  %16 = alloca i1, align 1
  %17 = alloca %struct.ptr, align 8
  %18 = alloca i1, align 1
  %19 = alloca i1, align 1
  %20 = alloca i1, align 1
  %21 = alloca %struct.ptr.31, align 8
  %22 = alloca %struct.ptr, align 8
  %23 = alloca i1, align 1
  %24 = alloca i1, align 1
  %25 = alloca i1, align 1
  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
  %26 = load ptr, ptr %5, align 8
  %27 = getelementptr inbounds %"struct.ts::ParenthesizerRules", ptr %26, i32 0, i32 0
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = call noundef zeroext i1 @_ZN2ts11NodeFactory20NoParenthesizerRulesEv(ptr noundef nonnull align 8 dereferenceable(232) %28)
  br i1 %29, label %30, label %36

30:                                               ; preds = %3
  call void @_ZN3ptrIN2ts4data10ExpressionEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  invoke void @_ZN3ptrIN2ts4data15UnaryExpressionEEC2INS1_10ExpressionEEES_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %7)
          to label %31 unwind label %32

31:                                               ; preds = %30
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  br label %132

32:                                               ; preds = %30
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %8, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %9, align 4
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  br label %133

36:                                               ; preds = %3
  call void @_ZN3ptrIN2ts4data10ExpressionEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  store i1 false, ptr %13, align 1
  store i1 false, ptr %16, align 1
  store i1 false, ptr %18, align 1
  store i1 false, ptr %19, align 1
  store i1 false, ptr %20, align 1
  store i1 false, ptr %23, align 1
  store i1 false, ptr %24, align 1
  store i1 false, ptr %25, align 1
  invoke void @_ZN3ptrIN2ts4data4NodeEEC2INS1_10ExpressionEEES_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %12)
          to label %37 unwind label %74

37:                                               ; preds = %36
  %38 = invoke noundef zeroext i1 @_ZN2tsL17isUnaryExpressionE3ptrINS_4data4NodeEE(ptr noundef %11)
          to label %39 unwind label %78

39:                                               ; preds = %37
  br i1 %38, label %40, label %41

40:                                               ; preds = %39
  call void @_ZN3ptrIN2ts4data10ExpressionEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  store i1 true, ptr %13, align 1
  br label %48

41:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  store i1 true, ptr %16, align 1
  %42 = getelementptr inbounds %"struct.ts::ParenthesizerRules", ptr %26, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8, !tbaa !9
  call void @_ZN3ptrIN2ts4data10ExpressionEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  store i1 true, ptr %18, align 1
  invoke void @_ZN2ts11NodeFactory29createParenthesizedExpressionE3ptrINS_4data10ExpressionEE(ptr dead_on_unwind writable sret(%struct.ptr.17) align 8 %15, ptr noundef nonnull align 8 dereferenceable(232) %43, ptr noundef %17)
          to label %44 unwind label %82

44:                                               ; preds = %41
  store i1 true, ptr %19, align 1
  invoke void @_ZN3ptrIN2ts4data23ParenthesizedExpressionEE2asIS_INS1_10ExpressionEEEET_v(ptr dead_on_unwind writable sret(%struct.ptr) align 8 %14, ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %45 unwind label %86

45:                                               ; preds = %44
  store i1 true, ptr %20, align 1
  call void @_ZN3ptrIN2ts4data10ExpressionEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  store i1 true, ptr %23, align 1
  invoke void @_ZN3ptrIN2ts4data9TextRangeEEC2INS1_10ExpressionEEES_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef %22)
          to label %46 unwind label %90

46:                                               ; preds = %45
  store i1 true, ptr %24, align 1
  invoke void @_ZN2ts12setTextRangeI3ptrINS_4data10ExpressionEEEET_S5_S1_INS2_9TextRangeEE(ptr dead_on_unwind writable sret(%struct.ptr) align 8 %10, ptr noundef %14, ptr noundef %21)
          to label %47 unwind label %94

47:                                               ; preds = %46
  store i1 true, ptr %25, align 1
  br label %48

48:                                               ; preds = %47, %40
  invoke void @_ZN3ptrIN2ts4data15UnaryExpressionEEC2INS1_10ExpressionEEES_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %10)
          to label %49 unwind label %98

49:                                               ; preds = %48
  %50 = load i1, ptr %25, align 1
  br i1 %50, label %51, label %52

51:                                               ; preds = %49
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  br label %52

52:                                               ; preds = %51, %49
  %53 = load i1, ptr %24, align 1
  br i1 %53, label %54, label %55

54:                                               ; preds = %52
  call void @_ZN3ptrIN2ts4data9TextRangeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #6
  br label %55

55:                                               ; preds = %54, %52
  %56 = load i1, ptr %23, align 1
  br i1 %56, label %57, label %58

57:                                               ; preds = %55
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  br label %58

58:                                               ; preds = %57, %55
  %59 = load i1, ptr %20, align 1
  br i1 %59, label %60, label %61

60:                                               ; preds = %58
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  br label %61

61:                                               ; preds = %60, %58
  %62 = load i1, ptr %19, align 1
  br i1 %62, label %63, label %64

63:                                               ; preds = %61
  call void @_ZN3ptrIN2ts4data23ParenthesizedExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #6
  br label %64

64:                                               ; preds = %63, %61
  %65 = load i1, ptr %18, align 1
  br i1 %65, label %66, label %67

66:                                               ; preds = %64
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  br label %67

67:                                               ; preds = %66, %64
  %68 = load i1, ptr %16, align 1
  br i1 %68, label %69, label %70

69:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br label %70

70:                                               ; preds = %69, %67
  %71 = load i1, ptr %13, align 1
  br i1 %71, label %72, label %73

72:                                               ; preds = %70
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  br label %73

73:                                               ; preds = %72, %70
  call void @_ZN3ptrIN2ts4data4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  br label %132

74:                                               ; preds = %36
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %8, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %9, align 4
  br label %131

78:                                               ; preds = %37
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %8, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %9, align 4
  br label %130

82:                                               ; preds = %41
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %8, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %9, align 4
  br label %120

86:                                               ; preds = %44
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %8, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %9, align 4
  br label %116

90:                                               ; preds = %45
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %8, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %9, align 4
  br label %109

94:                                               ; preds = %46
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %8, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %9, align 4
  br label %105

98:                                               ; preds = %48
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %8, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %9, align 4
  %102 = load i1, ptr %25, align 1
  br i1 %102, label %103, label %104

103:                                              ; preds = %98
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  br label %104

104:                                              ; preds = %103, %98
  br label %105

105:                                              ; preds = %104, %94
  %106 = load i1, ptr %24, align 1
  br i1 %106, label %107, label %108

107:                                              ; preds = %105
  call void @_ZN3ptrIN2ts4data9TextRangeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #6
  br label %108

108:                                              ; preds = %107, %105
  br label %109

109:                                              ; preds = %108, %90
  %110 = load i1, ptr %23, align 1
  br i1 %110, label %111, label %112

111:                                              ; preds = %109
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  br label %112

112:                                              ; preds = %111, %109
  %113 = load i1, ptr %20, align 1
  br i1 %113, label %114, label %115

114:                                              ; preds = %112
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  br label %115

115:                                              ; preds = %114, %112
  br label %116

116:                                              ; preds = %115, %86
  %117 = load i1, ptr %19, align 1
  br i1 %117, label %118, label %119

118:                                              ; preds = %116
  call void @_ZN3ptrIN2ts4data23ParenthesizedExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #6
  br label %119

119:                                              ; preds = %118, %116
  br label %120

120:                                              ; preds = %119, %82
  %121 = load i1, ptr %18, align 1
  br i1 %121, label %122, label %123

122:                                              ; preds = %120
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  br label %123

123:                                              ; preds = %122, %120
  %124 = load i1, ptr %16, align 1
  br i1 %124, label %125, label %126

125:                                              ; preds = %123
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br label %126

126:                                              ; preds = %125, %123
  %127 = load i1, ptr %13, align 1
  br i1 %127, label %128, label %129

128:                                              ; preds = %126
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  br label %129

129:                                              ; preds = %128, %126
  br label %130

130:                                              ; preds = %129, %78
  call void @_ZN3ptrIN2ts4data4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  br label %131

131:                                              ; preds = %130, %74
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  br label %133

132:                                              ; preds = %73, %31
  ret void

133:                                              ; preds = %131, %32
  %134 = load ptr, ptr %8, align 8
  %135 = load i32, ptr %9, align 4
  %136 = insertvalue { ptr, i32 } poison, ptr %134, 0
  %137 = insertvalue { ptr, i32 } %136, i32 %135, 1
  resume { ptr, i32 } %137
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN2tsL17isUnaryExpressionE3ptrINS_4data4NodeEE(ptr noundef) #3

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 = { 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 = { 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 #4 = { 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 #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, !6, i64 0}
!10 = !{!"_ZTSN2ts18ParenthesizerRulesE", !6, 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.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.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" }
%struct.ptr.112 = type { %"class.std::shared_ptr.113" }
%"class.std::shared_ptr.113" = type { %"class.std::__shared_ptr.114" }
%"class.std::__shared_ptr.114" = type { ptr, %"class.std::__shared_count" }
%struct.ptr.35 = type { %"class.std::shared_ptr.36" }
%"class.std::shared_ptr.36" = type { %"class.std::__shared_ptr.37" }
%"class.std::__shared_ptr.37" = type { ptr, %"class.std::__shared_count" }
%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" }

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

declare void @_ZN2ts11NodeFactory29createParenthesizedExpressionE3ptrINS_4data10ExpressionEE(ptr dead_on_unwind writable sret(%struct.ptr.17) align 8, ptr noundef nonnull align 8 dereferenceable(232), ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN2ts12setTextRangeI3ptrINS_4data10ExpressionEEEET_S5_S1_INS2_9TextRangeEE(ptr dead_on_unwind noalias writable sret(%struct.ptr) align 8, ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2ts18ParenthesizerRules32parenthesizeOperandOfPrefixUnaryE3ptrINS_4data10ExpressionEE(ptr dead_on_unwind noalias writable sret(%struct.ptr.112) align 8 %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %1, ptr noundef %2) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.ptr, align 8
  %5 = alloca %struct.ptr, align 8
  %6 = alloca %struct.ptr.35, align 8
  %7 = alloca %struct.ptr, align 8
  %8 = alloca %struct.ptr, align 8
  %9 = alloca %struct.ptr.17, align 8
  %10 = alloca %struct.ptr, align 8
  %11 = alloca %struct.ptr.31, align 8
  %12 = alloca %struct.ptr, align 8
  %13 = load ptr, ptr %1, align 8, !tbaa !5
  %14 = tail call noundef zeroext i1 @_ZN2ts11NodeFactory20NoParenthesizerRulesEv(ptr noundef nonnull align 8 dereferenceable(232) %13)
  br i1 %14, label %15, label %16

15:                                               ; preds = %3
  call void @_ZN3ptrIN2ts4data10ExpressionEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @_ZN3ptrIN2ts4data15UnaryExpressionEEC2INS1_10ExpressionEEES_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %4)
  br label %35

16:                                               ; preds = %3
  call void @_ZN3ptrIN2ts4data10ExpressionEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @_ZN3ptrIN2ts4data4NodeEEC2INS1_10ExpressionEEES_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull %7)
  %17 = invoke noundef zeroext i1 @_ZN2tsL17isUnaryExpressionE3ptrINS_4data4NodeEE(ptr noundef nonnull %6)
          to label %18 unwind label %24

18:                                               ; preds = %16
  br i1 %17, label %.critedge36, label %19

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  %20 = load ptr, ptr %1, align 8, !tbaa !5
  call void @_ZN3ptrIN2ts4data10ExpressionEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  invoke void @_ZN2ts11NodeFactory29createParenthesizedExpressionE3ptrINS_4data10ExpressionEE(ptr dead_on_unwind nonnull writable sret(%struct.ptr.17) align 8 %9, ptr noundef nonnull align 8 dereferenceable(232) %20, ptr noundef nonnull %10)
          to label %21 unwind label %26

21:                                               ; preds = %19
  invoke void @_ZN3ptrIN2ts4data23ParenthesizedExpressionEE2asIS_INS1_10ExpressionEEEET_v(ptr dead_on_unwind nonnull writable sret(%struct.ptr) align 8 %8, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %22 unwind label %28

22:                                               ; preds = %21
  call void @_ZN3ptrIN2ts4data10ExpressionEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @_ZN3ptrIN2ts4data9TextRangeEEC2INS1_10ExpressionEEES_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull %12)
  invoke void @_ZN2ts12setTextRangeI3ptrINS_4data10ExpressionEEEET_S5_S1_INS2_9TextRangeEE(ptr dead_on_unwind nonnull writable sret(%struct.ptr) align 8 %5, ptr noundef nonnull %8, ptr noundef nonnull %11)
          to label %.critedge unwind label %30

.critedge:                                        ; preds = %22
  call void @_ZN3ptrIN2ts4data15UnaryExpressionEEC2INS1_10ExpressionEEES_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %5)
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @_ZN3ptrIN2ts4data9TextRangeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @_ZN3ptrIN2ts4data23ParenthesizedExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  br label %23

.critedge36:                                      ; preds = %18
  call void @_ZN3ptrIN2ts4data10ExpressionEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %2) #6
  call void @_ZN3ptrIN2ts4data15UnaryExpressionEEC2INS1_10ExpressionEEES_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %5)
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  br label %23

23:                                               ; preds = %.critedge, %.critedge36
  call void @_ZN3ptrIN2ts4data4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  br label %35

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

26:                                               ; preds = %19
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %33

28:                                               ; preds = %21
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %32

30:                                               ; preds = %22
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3ptrIN2ts4data9TextRangeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  br label %32

32:                                               ; preds = %28, %30
  %.pn = phi { ptr, i32 } [ %31, %30 ], [ %29, %28 ]
  call void @_ZN3ptrIN2ts4data23ParenthesizedExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  br label %33

33:                                               ; preds = %26, %32
  %.pn.pn = phi { ptr, i32 } [ %.pn, %32 ], [ %27, %26 ]
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  br label %34

34:                                               ; preds = %33, %24
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %33 ], [ %25, %24 ]
  call void @_ZN3ptrIN2ts4data4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  resume { ptr, i32 } %.pn.pn.pn

35:                                               ; preds = %23, %15
  %.sink = phi ptr [ %7, %23 ], [ %4, %15 ]
  call void @_ZN3ptrIN2ts4data10ExpressionEED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %.sink) #6
  ret void
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN2tsL17isUnaryExpressionE3ptrINS_4data4NodeEE(ptr noundef) local_unnamed_addr #3

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 = { 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 = { 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 #4 = { 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 #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, !7, i64 0}
!6 = !{!"_ZTSN2ts18ParenthesizerRulesE", !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}


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