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

; 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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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 }
%"class.std::allocator.2" = type { i8 }

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

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

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

; 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) #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8LagrangeRSt6vectorI6modintILi998244353EESaIS1_EES4_(ptr dead_on_unwind noalias writable sret(%"class.std::vector.0") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #5 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i1, align 1
  %9 = alloca %struct.modint, align 4
  %10 = alloca %"class.std::allocator.2", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::vector.0", align 8
  %14 = alloca %struct.modint, align 4
  %15 = alloca %"class.std::allocator.2", align 1
  %16 = alloca %struct.modint, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %struct.modint, align 4
  %21 = alloca %struct.modint, align 4
  %22 = alloca i32, align 4
  %23 = alloca %"class.std::vector.0", align 8
  %24 = alloca %"class.std::allocator.2", align 1
  %25 = alloca %struct.modint, align 4
  %26 = alloca i32, align 4
  %27 = alloca %struct.modint, align 4
  %28 = alloca %struct.modint, align 4
  %29 = alloca %struct.modint, align 4
  %30 = alloca %struct.modint, align 4
  %31 = alloca i32, align 4
  %32 = alloca %struct.modint, align 4
  %33 = alloca %struct.modint, align 4
  %34 = alloca %struct.modint, align 4
  %35 = alloca %struct.modint, align 4
  %36 = alloca %struct.modint, align 4
  %37 = alloca i32, align 4
  %38 = alloca %struct.modint, align 4
  %39 = alloca %struct.modint, 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = call noundef i64 @_ZNKSt6vectorI6modintILi998244353EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #6
  %42 = trunc i64 %41 to i32
  store i32 %42, ptr %7, align 4, !tbaa !9
  store i1 false, ptr %8, align 1
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #6
  call void @_ZNSaI6modintILi998244353EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %44, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %45 unwind label %58

45:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = add nsw i32 %46, 1
  %48 = sext i32 %47 to i64
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %14, i32 noundef 0)
          to label %49 unwind label %62

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  call void @_ZNSaI6modintILi998244353EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %48, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %50 unwind label %66

50:                                               ; preds = %49
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %16, i32 noundef 1)
          to label %51 unwind label %71

51:                                               ; preds = %50
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef 0) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %52, ptr align 4 %16, i64 4, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %119, %51
  %54 = load i32, ptr %17, align 4, !tbaa !9
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %75, label %57

57:                                               ; preds = %53
  store i32 2, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %122

58:                                               ; preds = %3
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %11, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %12, align 4
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %275

62:                                               ; preds = %45
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %11, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %12, align 4
  br label %70

66:                                               ; preds = %49
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %11, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %12, align 4
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  br label %70

70:                                               ; preds = %66, %62
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %272

71:                                               ; preds = %50
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %11, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %271

75:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %76 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %76, ptr %19, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %115, %75
  %78 = load i32, ptr %19, align 4, !tbaa !9
  %79 = icmp sge i32 %78, 0
  br i1 %79, label %81, label %80

80:                                               ; preds = %77
  store i32 5, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %118

81:                                               ; preds = %77
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = load i32, ptr %17, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %84) #6
  %86 = invoke i32 @_ZNK6modintILi998244353EEngEv(ptr noundef nonnull align 4 dereferenceable(4) %85)
          to label %87 unwind label %110

87:                                               ; preds = %81
  %88 = getelementptr inbounds %struct.modint, ptr %20, i32 0, i32 0
  store i32 %86, ptr %88, align 4
  %89 = load i32, ptr %19, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %90) #6
  %92 = getelementptr inbounds %struct.modint, ptr %20, i32 0, i32 0
  %93 = load i32, ptr %92, align 4
  %94 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %91, i32 %93)
          to label %95 unwind label %110

95:                                               ; preds = %87
  %96 = load i32, ptr %19, align 4, !tbaa !9
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %114

98:                                               ; preds = %95
  %99 = load i32, ptr %19, align 4, !tbaa !9
  %100 = sub nsw i32 %99, 1
  %101 = sext i32 %100 to i64
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %101) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %102, i64 4, i1 false), !tbaa.struct !11
  %103 = load i32, ptr %19, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %104) #6
  %106 = getelementptr inbounds %struct.modint, ptr %21, i32 0, i32 0
  %107 = load i32, ptr %106, align 4
  %108 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %105, i32 %107)
          to label %109 unwind label %110

109:                                              ; preds = %98
  br label %114

110:                                              ; preds = %98, %87, %81
  %111 = landingpad { ptr, i32 }
          cleanup
  %112 = extractvalue { ptr, i32 } %111, 0
  store ptr %112, ptr %11, align 8
  %113 = extractvalue { ptr, i32 } %111, 1
  store i32 %113, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %271

114:                                              ; preds = %109, %95
  br label %115

115:                                              ; preds = %114
  %116 = load i32, ptr %19, align 4, !tbaa !9
  %117 = add nsw i32 %116, -1
  store i32 %117, ptr %19, align 4, !tbaa !9
  br label %77, !llvm.loop !12

118:                                              ; preds = %80
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr %17, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %17, align 4, !tbaa !9
  br label %53, !llvm.loop !14

122:                                              ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %123

123:                                              ; preds = %263, %122
  %124 = load i32, ptr %22, align 4, !tbaa !9
  %125 = load i32, ptr %7, align 4, !tbaa !9
  %126 = icmp slt i32 %124, %125
  br i1 %126, label %128, label %127

127:                                              ; preds = %123
  store i32 8, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %269

128:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #6
  %129 = load i32, ptr %7, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #6
  call void @_ZNSaI6modintILi998244353EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %130, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %131 unwind label %141

131:                                              ; preds = %128
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %132 = load i32, ptr %7, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %133) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %134, i64 4, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %135 = load i32, ptr %7, align 4, !tbaa !9
  %136 = sub nsw i32 %135, 1
  store i32 %136, ptr %26, align 4, !tbaa !9
  br label %137

137:                                              ; preds = %166, %131
  %138 = load i32, ptr %26, align 4, !tbaa !9
  %139 = icmp sge i32 %138, 0
  br i1 %139, label %145, label %140

140:                                              ; preds = %137
  store i32 11, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %173

141:                                              ; preds = %128
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %11, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %12, align 4
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #6
  br label %268

145:                                              ; preds = %137
  %146 = load i32, ptr %26, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %147) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %148, ptr align 4 %25, i64 4, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %149 = load i32, ptr %26, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %150) #6
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = load i32, ptr %22, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %152, i64 noundef %154) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %155, i64 4, i1 false), !tbaa.struct !11
  %156 = getelementptr inbounds %struct.modint, ptr %29, i32 0, i32 0
  %157 = load i32, ptr %156, align 4
  %158 = invoke i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %25, i32 %157)
          to label %159 unwind label %169

159:                                              ; preds = %145
  %160 = getelementptr inbounds %struct.modint, ptr %28, i32 0, i32 0
  store i32 %158, ptr %160, align 4
  %161 = getelementptr inbounds %struct.modint, ptr %28, i32 0, i32 0
  %162 = load i32, ptr %161, align 4
  %163 = invoke i32 @_ZNK6modintILi998244353EEplES0_(ptr noundef nonnull align 4 dereferenceable(4) %151, i32 %162)
          to label %164 unwind label %169

164:                                              ; preds = %159
  %165 = getelementptr inbounds %struct.modint, ptr %27, i32 0, i32 0
  store i32 %163, ptr %165, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %27, i64 4, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %166

166:                                              ; preds = %164
  %167 = load i32, ptr %26, align 4, !tbaa !9
  %168 = add nsw i32 %167, -1
  store i32 %168, ptr %26, align 4, !tbaa !9
  br label %137, !llvm.loop !15

169:                                              ; preds = %159, %145
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %11, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %267

173:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  invoke void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %30, i32 noundef 1)
          to label %174 unwind label %180

174:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  store i32 0, ptr %31, align 4, !tbaa !9
  br label %175

175:                                              ; preds = %211, %174
  %176 = load i32, ptr %31, align 4, !tbaa !9
  %177 = load i32, ptr %7, align 4, !tbaa !9
  %178 = icmp slt i32 %176, %177
  br i1 %178, label %184, label %179

179:                                              ; preds = %175
  store i32 14, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %214

180:                                              ; preds = %214, %173
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %11, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %12, align 4
  br label %266

184:                                              ; preds = %175
  %185 = load i32, ptr %22, align 4, !tbaa !9
  %186 = load i32, ptr %31, align 4, !tbaa !9
  %187 = icmp ne i32 %185, %186
  br i1 %187, label %188, label %210

188:                                              ; preds = %184
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = load i32, ptr %22, align 4, !tbaa !9
  %191 = sext i32 %190 to i64
  %192 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %189, i64 noundef %191) #6
  %193 = load ptr, ptr %5, align 8, !tbaa !5
  %194 = load i32, ptr %31, align 4, !tbaa !9
  %195 = sext i32 %194 to i64
  %196 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %193, i64 noundef %195) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %196, i64 4, i1 false), !tbaa.struct !11
  %197 = getelementptr inbounds %struct.modint, ptr %33, i32 0, i32 0
  %198 = load i32, ptr %197, align 4
  %199 = invoke i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4) %192, i32 %198)
          to label %200 unwind label %206

200:                                              ; preds = %188
  %201 = getelementptr inbounds %struct.modint, ptr %32, i32 0, i32 0
  store i32 %199, ptr %201, align 4
  %202 = getelementptr inbounds %struct.modint, ptr %32, i32 0, i32 0
  %203 = load i32, ptr %202, align 4
  %204 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %30, i32 %203)
          to label %205 unwind label %206

205:                                              ; preds = %200
  br label %210

206:                                              ; preds = %200, %188
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %11, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %266

210:                                              ; preds = %205, %184
  br label %211

211:                                              ; preds = %210
  %212 = load i32, ptr %31, align 4, !tbaa !9
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %31, align 4, !tbaa !9
  br label %175, !llvm.loop !16

214:                                              ; preds = %179
  %215 = load i32, ptr %7, align 4, !tbaa !9
  %216 = sext i32 %215 to i64
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %216)
          to label %217 unwind label %180

217:                                              ; preds = %214
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  %218 = invoke i32 @_ZNK6modintILi998244353EE3invEv(ptr noundef nonnull align 4 dereferenceable(4) %30)
          to label %219 unwind label %235

219:                                              ; preds = %217
  %220 = getelementptr inbounds %struct.modint, ptr %35, i32 0, i32 0
  store i32 %218, ptr %220, align 4
  %221 = load ptr, ptr %6, align 8, !tbaa !5
  %222 = load i32, ptr %22, align 4, !tbaa !9
  %223 = sext i32 %222 to i64
  %224 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %221, i64 noundef %223) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %224, i64 4, i1 false), !tbaa.struct !11
  %225 = getelementptr inbounds %struct.modint, ptr %36, i32 0, i32 0
  %226 = load i32, ptr %225, align 4
  %227 = invoke i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %35, i32 %226)
          to label %228 unwind label %235

228:                                              ; preds = %219
  %229 = getelementptr inbounds %struct.modint, ptr %34, i32 0, i32 0
  store i32 %227, ptr %229, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %34, i64 4, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #6
  store i32 0, ptr %37, align 4, !tbaa !9
  br label %230

230:                                              ; preds = %255, %228
  %231 = load i32, ptr %37, align 4, !tbaa !9
  %232 = load i32, ptr %7, align 4, !tbaa !9
  %233 = icmp slt i32 %231, %232
  br i1 %233, label %239, label %234

234:                                              ; preds = %230
  store i32 17, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #6
  br label %262

235:                                              ; preds = %219, %217
  %236 = landingpad { ptr, i32 }
          cleanup
  %237 = extractvalue { ptr, i32 } %236, 0
  store ptr %237, ptr %11, align 8
  %238 = extractvalue { ptr, i32 } %236, 1
  store i32 %238, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  br label %266

239:                                              ; preds = %230
  %240 = load i32, ptr %37, align 4, !tbaa !9
  %241 = sext i32 %240 to i64
  %242 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %241) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %39, ptr align 4 %30, i64 4, i1 false), !tbaa.struct !11
  %243 = getelementptr inbounds %struct.modint, ptr %39, i32 0, i32 0
  %244 = load i32, ptr %243, align 4
  %245 = invoke i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %242, i32 %244)
          to label %246 unwind label %258

246:                                              ; preds = %239
  %247 = getelementptr inbounds %struct.modint, ptr %38, i32 0, i32 0
  store i32 %245, ptr %247, align 4
  %248 = load i32, ptr %37, align 4, !tbaa !9
  %249 = sext i32 %248 to i64
  %250 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %249) #6
  %251 = getelementptr inbounds %struct.modint, ptr %38, i32 0, i32 0
  %252 = load i32, ptr %251, align 4
  %253 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %250, i32 %252)
          to label %254 unwind label %258

254:                                              ; preds = %246
  br label %255

255:                                              ; preds = %254
  %256 = load i32, ptr %37, align 4, !tbaa !9
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %37, align 4, !tbaa !9
  br label %230, !llvm.loop !17

258:                                              ; preds = %246, %239
  %259 = landingpad { ptr, i32 }
          cleanup
  %260 = extractvalue { ptr, i32 } %259, 0
  store ptr %260, ptr %11, align 8
  %261 = extractvalue { ptr, i32 } %259, 1
  store i32 %261, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #6
  br label %266

262:                                              ; preds = %234
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  br label %263

263:                                              ; preds = %262
  %264 = load i32, ptr %22, align 4, !tbaa !9
  %265 = add nsw i32 %264, 1
  store i32 %265, ptr %22, align 4, !tbaa !9
  br label %123, !llvm.loop !18

266:                                              ; preds = %258, %235, %206, %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %267

267:                                              ; preds = %266, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  br label %268

268:                                              ; preds = %267, %141
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %271

269:                                              ; preds = %127
  store i1 true, ptr %8, align 1
  store i32 1, ptr %18, align 4
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  %270 = load i1, ptr %8, align 1
  br i1 %270, label %274, label %273

271:                                              ; preds = %268, %110, %71
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  br label %272

272:                                              ; preds = %271, %70
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %275

273:                                              ; preds = %269
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  br label %274

274:                                              ; preds = %273, %269
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  ret void

275:                                              ; preds = %272, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %276

276:                                              ; preds = %275
  %277 = load ptr, ptr %11, align 8
  %278 = load i32, ptr %12, align 4
  %279 = insertvalue { ptr, i32 } poison, ptr %277, 0
  %280 = insertvalue { ptr, i32 } %279, i32 %278, 1
  resume { ptr, i32 } %280
}

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EE3invEv(ptr noundef nonnull align 4 dereferenceable(4)) #5 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 4, !9}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !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::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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 }
%"class.std::allocator.2" = type { i8 }

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

; 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 nounwind uwtable
declare dso_local void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #1 align 2

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

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

; 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 #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z8LagrangeRSt6vectorI6modintILi998244353EESaIS1_EES4_(ptr dead_on_unwind noalias writable sret(%"class.std::vector.0") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.modint, align 4
  %5 = alloca %"class.std::allocator.2", align 1
  %6 = alloca %"class.std::vector.0", align 8
  %7 = alloca %struct.modint, align 4
  %8 = alloca %"class.std::allocator.2", align 1
  %9 = alloca %struct.modint, align 4
  %10 = alloca %"class.std::vector.0", align 8
  %11 = alloca %"class.std::allocator.2", align 1
  %12 = alloca %struct.modint, align 4
  %13 = alloca %struct.modint, align 4
  %14 = alloca %struct.modint, align 4
  %15 = tail call noundef i64 @_ZNKSt6vectorI6modintILi998244353EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  %16 = trunc i64 %15 to i32
  %sext = shl i64 %15, 32
  %17 = ashr exact i64 %sext, 32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %4, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaI6modintILi998244353EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %17, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %18 unwind label %38

18:                                               ; preds = %3
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  %sext70 = add i64 %sext, 4294967296
  %19 = ashr exact i64 %sext70, 32
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #5
  call void @_ZNSaI6modintILi998244353EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2EmRKS1_RKS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %19, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %20 unwind label %40

20:                                               ; preds = %18
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 noundef 1)
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #5
  %22 = load i32, ptr %9, align 4, !tbaa !5
  store i32 %22, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  %23 = icmp sgt i32 %16, 0
  br i1 %23, label %.preheader80.us.preheader, label %._crit_edge90

.preheader80.us.preheader:                        ; preds = %20
  %24 = and i64 %15, 2147483647
  br label %.preheader80.us

.preheader80.us:                                  ; preds = %.preheader80.us.preheader, %._crit_edge.us
  %indvars.iv92 = phi i64 [ 0, %.preheader80.us.preheader ], [ %indvars.iv.next93, %._crit_edge.us ]
  br label %25

25:                                               ; preds = %.preheader80.us, %._crit_edge113
  %indvars.iv = phi i64 [ %24, %.preheader80.us ], [ %31, %._crit_edge113 ]
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv92) #5
  %27 = invoke i32 @_ZNK6modintILi998244353EEngEv(ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %28 unwind label %.split.us

28:                                               ; preds = %25
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #5
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %29, i32 %27)
  %.not79.us = icmp eq i64 %indvars.iv, 0
  br i1 %.not79.us, label %._crit_edge.us, label %._crit_edge113

._crit_edge113:                                   ; preds = %28
  %31 = add nsw i64 %indvars.iv, -1
  %32 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %31) #5
  %.sroa.026.0.copyload.us = load i32, ptr %32, align 4, !tbaa !5
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #5
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %33, i32 %.sroa.026.0.copyload.us)
  %35 = icmp sgt i64 %indvars.iv, 0
  br i1 %35, label %25, label %._crit_edge.us, !llvm.loop !9

._crit_edge.us:                                   ; preds = %28, %._crit_edge113
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next93, %24
  br i1 %exitcond.not, label %.preheader, label %.preheader80.us, !llvm.loop !11

.split.us:                                        ; preds = %25
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %89

.preheader:                                       ; preds = %._crit_edge.us
  br i1 %23, label %.lr.ph89, label %._crit_edge90

.lr.ph89:                                         ; preds = %.preheader
  %37 = and i64 %15, 2147483647
  br label %42

38:                                               ; preds = %3
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %91

40:                                               ; preds = %18
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %90

._crit_edge90:                                    ; preds = %._crit_edge87, %20, %.preheader
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  ret void

42:                                               ; preds = %.lr.ph89, %._crit_edge87
  %indvars.iv108 = phi i64 [ 0, %.lr.ph89 ], [ %indvars.iv.next109, %._crit_edge87 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSaI6modintILi998244353EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %17, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %43 unwind label %48

43:                                               ; preds = %42
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #5
  %44 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %17) #5
  %45 = load i32, ptr %44, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %56, %43
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %56 ], [ %37, %43 ]
  %storemerge = phi i32 [ %57, %56 ], [ %45, %43 ]
  store i32 %storemerge, ptr %12, align 4, !tbaa !5
  %indvars.iv.next96 = add nsw i64 %indvars.iv95, -1
  %47 = icmp sgt i64 %indvars.iv95, 0
  br i1 %47, label %50, label %.lr.ph

.lr.ph:                                           ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #5
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef 1)
  br label %62

48:                                               ; preds = %42
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  br label %88

50:                                               ; preds = %46
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv.next96) #5
  %52 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %52, ptr %51, align 4, !tbaa !5
  %53 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv.next96) #5
  %54 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv108) #5
  %.sroa.013.0.copyload = load i32, ptr %54, align 4, !tbaa !5
  %55 = invoke i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %12, i32 %.sroa.013.0.copyload)
          to label %56 unwind label %58

56:                                               ; preds = %50
  %57 = invoke i32 @_ZNK6modintILi998244353EEplES0_(ptr noundef nonnull align 4 dereferenceable(4) %53, i32 %55)
          to label %46 unwind label %58, !llvm.loop !12

58:                                               ; preds = %56, %50
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %87

._crit_edge:                                      ; preds = %71
  invoke void @_ZNSt6vectorI6modintILi998244353EESaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %17)
          to label %72 unwind label %60

60:                                               ; preds = %._crit_edge
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %86

62:                                               ; preds = %.lr.ph, %71
  %indvars.iv98 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next99, %71 ]
  %.not = icmp eq i64 %indvars.iv108, %indvars.iv98
  br i1 %.not, label %71, label %63

63:                                               ; preds = %62
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv108) #5
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv98) #5
  %.sroa.07.0.copyload = load i32, ptr %65, align 4, !tbaa !5
  %66 = invoke i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4) %64, i32 %.sroa.07.0.copyload)
          to label %67 unwind label %69

67:                                               ; preds = %63
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEmLES0_(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 %66)
  br label %71

69:                                               ; preds = %63
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %86

71:                                               ; preds = %62, %67
  %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1
  %exitcond102.not = icmp eq i64 %indvars.iv.next99, %37
  br i1 %exitcond102.not, label %._crit_edge, label %62, !llvm.loop !13

72:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #5
  %73 = invoke i32 @_ZNK6modintILi998244353EE3invEv(ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %74 unwind label %77

74:                                               ; preds = %72
  store i32 %73, ptr %14, align 4
  %75 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv108) #5
  %.sroa.05.0.copyload = load i32, ptr %75, align 4, !tbaa !5
  %76 = invoke i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %14, i32 %.sroa.05.0.copyload)
          to label %.lr.ph86.preheader unwind label %77

.lr.ph86.preheader:                               ; preds = %74
  store i32 %76, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  br label %.lr.ph86

._crit_edge87:                                    ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1
  %exitcond112.not = icmp eq i64 %indvars.iv.next109, %37
  br i1 %exitcond112.not, label %._crit_edge90, label %42, !llvm.loop !14

77:                                               ; preds = %74, %72
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #5
  br label %86

.lr.ph86:                                         ; preds = %.lr.ph86.preheader, %81
  %indvars.iv103 = phi i64 [ 0, %.lr.ph86.preheader ], [ %indvars.iv.next104, %81 ]
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %indvars.iv103) #5
  %.sroa.0.0.copyload = load i32, ptr %13, align 4, !tbaa !5
  %80 = invoke i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %79, i32 %.sroa.0.0.copyload)
          to label %81 unwind label %84

81:                                               ; preds = %.lr.ph86
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv103) #5
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %82, i32 %80)
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %exitcond107.not = icmp eq i64 %indvars.iv.next104, %37
  br i1 %exitcond107.not, label %._crit_edge87, label %.lr.ph86, !llvm.loop !15

84:                                               ; preds = %.lr.ph86
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %86

86:                                               ; preds = %84, %77, %69, %60
  %.pn = phi { ptr, i32 } [ %70, %69 ], [ %85, %84 ], [ %78, %77 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #5
  br label %87

87:                                               ; preds = %86, %58
  %.pn72 = phi { ptr, i32 } [ %59, %58 ], [ %.pn, %86 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #5
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  br label %88

88:                                               ; preds = %87, %48
  %.pn72.pn = phi { ptr, i32 } [ %.pn72, %87 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %89

89:                                               ; preds = %88, %.split.us
  %.pn75 = phi { ptr, i32 } [ %36, %.split.us ], [ %.pn72.pn, %88 ]
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  br label %90

90:                                               ; preds = %89, %40
  %.pn75.pn = phi { ptr, i32 } [ %.pn75, %89 ], [ %41, %40 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @_ZNSt6vectorI6modintILi998244353EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %91

91:                                               ; preds = %90, %38
  %.pn75.pn.pn = phi { ptr, i32 } [ %.pn75.pn, %90 ], [ %39, %38 ]
  resume { ptr, i32 } %.pn75.pn.pn
}

; 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 @_ZNSaI6modintILi998244353EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EE3invEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 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: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorI6modintILi998244353EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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 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 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass