; LLVM IR from ShahjalalShohag/code-library :: Math (Polynomial)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl" }
%"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl" = type { %"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.modint = type { i32 }
%struct.poly = type { %"class.std::vector.6" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; 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: 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) #1

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #4 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #5 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector.6", align 8
  %5 = alloca %"class.std::vector.6", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.modint, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.modint, align 4
  %12 = alloca %struct.poly, align 8
  %13 = alloca %struct.poly, align 8
  %14 = alloca %"class.std::vector.6", align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %struct.modint, align 4
  %18 = alloca %struct.poly, align 8
  %19 = alloca %struct.poly, align 8
  %20 = alloca %"class.std::vector.6", align 8
  %21 = alloca i32, align 4
  %22 = alloca %struct.modint, align 4
  %23 = alloca %struct.modint, align 4
  store i32 0, ptr %1, align 4
  %24 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %25 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %26 = getelementptr i8, ptr %25, i64 -24
  %27 = load i64, ptr %26, align 8
  %28 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %27
  %29 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %28, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #8
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #8
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %32 = load i32, ptr %3, align 4, !tbaa !8
  %33 = add nsw i32 %32, 1
  %34 = sext i32 %33 to i64
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %34)
          to label %35 unwind label %43

35:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 noundef 1)
          to label %36 unwind label %47

36:                                               ; preds = %35
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %8, i64 4, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 1, ptr %9, align 4, !tbaa !8
  br label %38

38:                                               ; preds = %71, %36
  %39 = load i32, ptr %9, align 4, !tbaa !8
  %40 = load i32, ptr %2, align 4, !tbaa !8
  %41 = icmp sle i32 %39, %40
  br i1 %41, label %51, label %42

42:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %75

43:                                               ; preds = %129, %119, %118, %0
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %6, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %7, align 4
  br label %181

47:                                               ; preds = %35
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %6, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %181

51:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %52 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %53 unwind label %62

53:                                               ; preds = %51
  %54 = load i32, ptr %10, align 4, !tbaa !8
  %55 = load i32, ptr %3, align 4, !tbaa !8
  %56 = icmp sle i32 %54, %55
  br i1 %56, label %57, label %70

57:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 noundef -4)
          to label %58 unwind label %66

58:                                               ; preds = %57
  %59 = load i32, ptr %10, align 4, !tbaa !8
  %60 = sext i32 %59 to i64
  %61 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %60) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %61, ptr align 4 %11, i64 4, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %70

62:                                               ; preds = %51
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %6, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %7, align 4
  br label %74

66:                                               ; preds = %57
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %6, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %74

70:                                               ; preds = %58, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %71

71:                                               ; preds = %70
  %72 = load i32, ptr %9, align 4, !tbaa !8
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %9, align 4, !tbaa !8
  br label %38, !llvm.loop !12

74:                                               ; preds = %66, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %181

75:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #8
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %76 unwind label %91

76:                                               ; preds = %75
  invoke void @_ZN4polyC2IJSt6vectorI6modintILi998244353EESaIS3_EEEEEDpT_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef %14)
          to label %77 unwind label %95

77:                                               ; preds = %76
  %78 = load i32, ptr %3, align 4, !tbaa !8
  %79 = add nsw i32 %78, 1
  invoke void @_ZNK4poly4rootEii(ptr dead_on_unwind writable sret(%struct.poly) align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef %79, i32 noundef 2)
          to label %80 unwind label %99

80:                                               ; preds = %77
  %81 = getelementptr inbounds %struct.poly, ptr %12, i32 0, i32 0
  %82 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %81) #8
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  %83 = call noundef i64 @_ZNKSt6vectorI6modintILi998244353EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  %84 = icmp eq i64 %83, 1
  br i1 %84, label %85, label %118

85:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  store i32 1, ptr %15, align 4, !tbaa !8
  br label %86

86:                                               ; preds = %110, %85
  %87 = load i32, ptr %15, align 4, !tbaa !8
  %88 = load i32, ptr %3, align 4, !tbaa !8
  %89 = icmp sle i32 %87, %88
  br i1 %89, label %105, label %90

90:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %117

91:                                               ; preds = %75
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %6, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %7, align 4
  br label %104

95:                                               ; preds = %76
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %6, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %7, align 4
  br label %103

99:                                               ; preds = %77
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %6, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %7, align 4
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #8
  br label %103

103:                                              ; preds = %99, %95
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #8
  br label %104

104:                                              ; preds = %103, %91
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  br label %181

105:                                              ; preds = %86
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
          to label %107 unwind label %113

107:                                              ; preds = %105
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %106, i8 noundef signext 10)
          to label %109 unwind label %113

109:                                              ; preds = %107
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %15, align 4, !tbaa !8
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %15, align 4, !tbaa !8
  br label %86, !llvm.loop !14

113:                                              ; preds = %107, %105
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %6, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %181

117:                                              ; preds = %90
  store i32 0, ptr %1, align 4
  store i32 1, ptr %16, align 4
  br label %179

118:                                              ; preds = %80
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %17, i32 noundef 1)
          to label %119 unwind label %43

119:                                              ; preds = %118
  %120 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 0) #8
  %121 = getelementptr inbounds %struct.modint, ptr %17, i32 0, i32 0
  %122 = load i32, ptr %121, align 4
  %123 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %120, i32 %122)
          to label %124 unwind label %43

124:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #8
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %125 unwind label %141

125:                                              ; preds = %124
  invoke void @_ZN4polyC2IJSt6vectorI6modintILi998244353EESaIS3_EEEEEDpT_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr noundef %20)
          to label %126 unwind label %145

126:                                              ; preds = %125
  %127 = load i32, ptr %3, align 4, !tbaa !8
  %128 = add nsw i32 %127, 1
  invoke void @_ZNK4poly7inverseEi(ptr dead_on_unwind writable sret(%struct.poly) align 8 %18, ptr noundef nonnull align 8 dereferenceable(24) %19, i32 noundef %128)
          to label %129 unwind label %149

129:                                              ; preds = %126
  %130 = getelementptr inbounds %struct.poly, ptr %18, i32 0, i32 0
  %131 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %130) #8
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #8
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #8
  %132 = load i32, ptr %3, align 4, !tbaa !8
  %133 = add nsw i32 %132, 1
  %134 = sext i32 %133 to i64
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %134)
          to label %135 unwind label %43

135:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 1, ptr %21, align 4, !tbaa !8
  br label %136

136:                                              ; preds = %171, %135
  %137 = load i32, ptr %21, align 4, !tbaa !8
  %138 = load i32, ptr %3, align 4, !tbaa !8
  %139 = icmp sle i32 %137, %138
  br i1 %139, label %155, label %140

140:                                              ; preds = %136
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %178

141:                                              ; preds = %124
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %6, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %7, align 4
  br label %154

145:                                              ; preds = %125
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %6, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %7, align 4
  br label %153

149:                                              ; preds = %126
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %6, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %7, align 4
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #8
  br label %153

153:                                              ; preds = %149, %145
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %20) #8
  br label %154

154:                                              ; preds = %153, %141
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #8
  br label %181

155:                                              ; preds = %136
  %156 = load i32, ptr %21, align 4, !tbaa !8
  %157 = sext i32 %156 to i64
  %158 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %157) #8
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %23, i32 noundef 2)
          to label %159 unwind label %174

159:                                              ; preds = %155
  %160 = getelementptr inbounds %struct.modint, ptr %23, i32 0, i32 0
  %161 = load i32, ptr %160, align 4
  %162 = invoke i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %158, i32 %161)
          to label %163 unwind label %174

163:                                              ; preds = %159
  %164 = getelementptr inbounds %struct.modint, ptr %22, i32 0, i32 0
  store i32 %162, ptr %164, align 4
  %165 = getelementptr inbounds %struct.modint, ptr %22, i32 0, i32 0
  %166 = load i32, ptr %165, align 4
  %167 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILi998244353EERSoS0_6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %166)
          to label %168 unwind label %174

168:                                              ; preds = %163
  %169 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %167, i8 noundef signext 10)
          to label %170 unwind label %174

170:                                              ; preds = %168
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %21, align 4, !tbaa !8
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %21, align 4, !tbaa !8
  br label %136, !llvm.loop !15

174:                                              ; preds = %168, %163, %159, %155
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %6, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %181

178:                                              ; preds = %140
  store i32 0, ptr %1, align 4
  store i32 1, ptr %16, align 4
  br label %179

179:                                              ; preds = %178, %117
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  %180 = load i32, ptr %1, align 4
  ret i32 %180

181:                                              ; preds = %174, %154, %113, %104, %74, %47, %43
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #8
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %182

182:                                              ; preds = %181
  %183 = load ptr, ptr %6, align 8
  %184 = load i32, ptr %7, align 4
  %185 = insertvalue { ptr, i32 } poison, ptr %183, 0
  %186 = insertvalue { ptr, i32 } %185, i32 %184, 1
  resume { ptr, i32 } %186
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #6

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI6modintILi998244353EESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #4

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILi998244353EERSoS0_6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8), i32) #7

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 norecurse 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 = { "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 #7 = { 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 #8 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{i64 0, i64 4, !8}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}


; 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"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl" }
%"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl" = type { %"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<modint<998244353>, std::allocator<modint<998244353>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.modint = type { i32 }
%struct.poly = type { %"class.std::vector.6" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI6modintILi998244353EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector.6", align 8
  %4 = alloca %"class.std::vector.6", align 8
  %5 = alloca %struct.modint, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.modint, align 4
  %8 = alloca %struct.poly, align 8
  %9 = alloca %struct.poly, align 8
  %10 = alloca %"class.std::vector.6", align 8
  %11 = alloca %struct.modint, align 4
  %12 = alloca %struct.poly, align 8
  %13 = alloca %struct.poly, align 8
  %14 = alloca %"class.std::vector.6", align 8
  %15 = alloca %struct.modint, align 4
  %16 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %17 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %19
  %21 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %20, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %24 = load i32, ptr %2, align 4, !tbaa !8
  %25 = add nsw i32 %24, 1
  %26 = sext i32 %25 to i64
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %26)
          to label %27 unwind label %31

27:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 1)
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef 0) #7
  %29 = load i32, ptr %5, align 4, !tbaa !8
  store i32 %29, ptr %28, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %30 = load i32, ptr %1, align 4, !tbaa !8
  %.not30 = icmp slt i32 %30, 1
  br i1 %.not30, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %44, %27
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %47 unwind label %56

31:                                               ; preds = %80, %0
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %106

.lr.ph:                                           ; preds = %27, %44
  %.01131 = phi i32 [ %45, %44 ], [ 1, %27 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  %33 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %34 unwind label %42

34:                                               ; preds = %.lr.ph
  %35 = load i32, ptr %6, align 4, !tbaa !8
  %36 = load i32, ptr %2, align 4, !tbaa !8
  %.not27 = icmp sgt i32 %35, %36
  br i1 %.not27, label %44, label %37

37:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #7
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 noundef -4)
  %38 = load i32, ptr %6, align 4, !tbaa !8
  %39 = sext i32 %38 to i64
  %40 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %39) #7
  %41 = load i32, ptr %7, align 4, !tbaa !8
  store i32 %41, ptr %40, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #7
  br label %44

42:                                               ; preds = %.lr.ph
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  br label %106

44:                                               ; preds = %37, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  %45 = add nuw nsw i32 %.01131, 1
  %46 = load i32, ptr %1, align 4, !tbaa !8
  %.not.not = icmp slt i32 %.01131, %46
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

47:                                               ; preds = %._crit_edge
  invoke void @_ZN4polyC2IJSt6vectorI6modintILi998244353EESaIS3_EEEEEDpT_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull %10)
          to label %48 unwind label %58

48:                                               ; preds = %47
  %49 = load i32, ptr %2, align 4, !tbaa !8
  %50 = add nsw i32 %49, 1
  invoke void @_ZNK4poly4rootEii(ptr dead_on_unwind nonnull writable sret(%struct.poly) align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef %50, i32 noundef 2)
          to label %51 unwind label %60

51:                                               ; preds = %48
  %52 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  %53 = call noundef i64 @_ZNKSt6vectorI6modintILi998244353EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %54 = icmp eq i64 %53, 1
  br i1 %54, label %.preheader, label %72

.preheader:                                       ; preds = %51
  %55 = load i32, ptr %2, align 4, !tbaa !8
  %.not2435 = icmp slt i32 %55, 1
  br i1 %.not2435, label %.loopexit, label %.lr.ph37

56:                                               ; preds = %._crit_edge
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %63

58:                                               ; preds = %47
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %62

60:                                               ; preds = %48
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br label %62

62:                                               ; preds = %60, %58
  %.pn = phi { ptr, i32 } [ %61, %60 ], [ %59, %58 ]
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #7
  br label %63

63:                                               ; preds = %62, %56
  %.pn.pn = phi { ptr, i32 } [ %.pn, %62 ], [ %57, %56 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %106

.lr.ph37:                                         ; preds = %.preheader, %67
  %.01036 = phi i32 [ %68, %67 ], [ 1, %.preheader ]
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef 0)
          to label %65 unwind label %70

65:                                               ; preds = %.lr.ph37
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %64, i8 noundef signext 10)
          to label %67 unwind label %70

67:                                               ; preds = %65
  %68 = add nuw nsw i32 %.01036, 1
  %69 = load i32, ptr %2, align 4, !tbaa !8
  %.not24.not = icmp slt i32 %.01036, %69
  br i1 %.not24.not, label %.lr.ph37, label %.loopexit, !llvm.loop !13

70:                                               ; preds = %65, %.lr.ph37
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %106

72:                                               ; preds = %51
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 noundef 1)
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0) #7
  %74 = load i32, ptr %11, align 4
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %73, i32 %74)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #7
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %76 unwind label %86

76:                                               ; preds = %72
  invoke void @_ZN4polyC2IJSt6vectorI6modintILi998244353EESaIS3_EEEEEDpT_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull %14)
          to label %77 unwind label %88

77:                                               ; preds = %76
  %78 = load i32, ptr %2, align 4, !tbaa !8
  %79 = add nsw i32 %78, 1
  invoke void @_ZNK4poly7inverseEi(ptr dead_on_unwind nonnull writable sret(%struct.poly) align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %13, i32 noundef %79)
          to label %80 unwind label %90

80:                                               ; preds = %77
  %81 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #7
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  %82 = load i32, ptr %2, align 4, !tbaa !8
  %83 = add nsw i32 %82, 1
  %84 = sext i32 %83 to i64
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %84)
          to label %.preheader28 unwind label %31

.preheader28:                                     ; preds = %80
  %85 = load i32, ptr %2, align 4, !tbaa !8
  %.not2332 = icmp slt i32 %85, 1
  br i1 %.not2332, label %.loopexit, label %.lr.ph34

86:                                               ; preds = %72
  %87 = landingpad { ptr, i32 }
          cleanup
  br label %93

88:                                               ; preds = %76
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %92

90:                                               ; preds = %77
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4polyD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  br label %92

92:                                               ; preds = %90, %88
  %.pn20 = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #7
  br label %93

93:                                               ; preds = %92, %86
  %.pn20.pn = phi { ptr, i32 } [ %.pn20, %92 ], [ %87, %86 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #7
  br label %106

.lr.ph34:                                         ; preds = %.preheader28, %101
  %indvars.iv = phi i64 [ %indvars.iv.next, %101 ], [ 1, %.preheader28 ]
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #7
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %15, i32 noundef 2)
  %95 = load i32, ptr %15, align 4
  %96 = invoke i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %94, i32 %95)
          to label %97 unwind label %104

97:                                               ; preds = %.lr.ph34
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILi998244353EERSoS0_6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 %96)
          to label %99 unwind label %104

99:                                               ; preds = %97
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %98, i8 noundef signext 10)
          to label %101 unwind label %104

101:                                              ; preds = %99
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %102 = load i32, ptr %2, align 4, !tbaa !8
  %103 = sext i32 %102 to i64
  %.not23.not = icmp slt i64 %indvars.iv, %103
  br i1 %.not23.not, label %.lr.ph34, label %.loopexit, !llvm.loop !14

104:                                              ; preds = %99, %97, %.lr.ph34
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %106

.loopexit:                                        ; preds = %101, %67, %.preheader28, %.preheader
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret i32 0

106:                                              ; preds = %104, %93, %70, %63, %42, %31
  %.pn25 = phi { ptr, i32 } [ %43, %42 ], [ %71, %70 ], [ %105, %104 ], [ %32, %31 ], [ %.pn20.pn, %93 ], [ %.pn.pn, %63 ]
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn25
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #1 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI6modintILi998244353EESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsILi998244353EERSoS0_6modintIXT_EE(ptr noundef nonnull align 8 dereferenceable(8), i32) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass