; LLVM IR from ShahjalalShohag/code-library :: Math/Polynomial Sum.ll (Z2yoSt6vectorI6modintILi998244353EESaIS1_EExS1_i)

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

%struct.Combi = type { i32, %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }

@C = external dso_local global %struct.Combi, align 8
@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [86 x i8], align 1
@__PRETTY_FUNCTION__._Z2yoSt6vectorI6modintILi998244353EESaIS1_EExS1_i = external hidden unnamed_addr constant [44 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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: 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) #3

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

; 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: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #4 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN6modintILi998244353EEdVES0_(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 @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local i32 @_Z2yoSt6vectorI6modintILi998244353EESaIS1_EExS1_i(ptr noundef %0, i64 noundef %1, i32 %2, i32 noundef %3) #0 {
  %5 = alloca %struct.modint, align 4
  %6 = alloca %struct.modint, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca %struct.modint, align 4
  %11 = alloca %struct.modint, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.modint, align 4
  %14 = alloca %struct.modint, align 4
  %15 = alloca %struct.modint, align 4
  %16 = alloca %struct.modint, align 4
  %17 = alloca %struct.modint, align 4
  %18 = alloca %struct.modint, align 4
  %19 = alloca %struct.modint, align 4
  %20 = alloca %struct.modint, align 4
  %21 = alloca %struct.modint, align 4
  %22 = alloca %struct.modint, align 4
  %23 = alloca %struct.modint, align 4
  %24 = alloca %struct.modint, align 4
  %25 = alloca i32, align 4
  %26 = alloca %struct.modint, 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 %struct.modint, 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 %struct.modint, align 4
  %38 = alloca %struct.modint, align 4
  %39 = getelementptr inbounds %struct.modint, ptr %6, i32 0, i32 0
  store i32 %2, ptr %39, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i64 %1, ptr %8, align 8, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !11
  %40 = load i32, ptr %9, align 4, !tbaa !11
  %41 = add nsw i32 %40, 1
  %42 = sext i32 %41 to i64
  %43 = call noundef i64 @_ZNKSt6vectorI6modintILi998244353EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %44 = icmp eq i64 %42, %43
  br i1 %44, label %45, label %46

45:                                               ; preds = %4
  br label %48

46:                                               ; preds = %4
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.2, i32 noundef 82, ptr noundef @__PRETTY_FUNCTION__._Z2yoSt6vectorI6modintILi998244353EESaIS1_EExS1_i) #8
  unreachable

47:                                               ; No predecessors!
  br label %48

48:                                               ; preds = %47, %45
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %10, i32 noundef 1)
  %49 = getelementptr inbounds %struct.modint, ptr %10, i32 0, i32 0
  %50 = load i32, ptr %49, align 4
  %51 = call noundef zeroext i1 @_ZNK6modintILi998244353EEneES0_(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 %50)
  br i1 %51, label %52, label %53

52:                                               ; preds = %48
  br label %55

53:                                               ; preds = %48
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.2, i32 noundef 83, ptr noundef @__PRETTY_FUNCTION__._Z2yoSt6vectorI6modintILi998244353EESaIS1_EExS1_i) #8
  unreachable

54:                                               ; No predecessors!
  br label %55

55:                                               ; preds = %54, %52
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %56

56:                                               ; preds = %90, %55
  %57 = load i32, ptr %12, align 4, !tbaa !11
  %58 = load i32, ptr %9, align 4, !tbaa !11
  %59 = icmp sle i32 %57, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %93

61:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %62 = load i32, ptr %9, align 4, !tbaa !11
  %63 = add nsw i32 %62, 1
  %64 = load i32, ptr %12, align 4, !tbaa !11
  %65 = add nsw i32 %64, 1
  %66 = call i32 @_ZN5Combi3ncrEii(ptr noundef nonnull align 8 dereferenceable(80) @C, i32 noundef %63, i32 noundef %65)
  %67 = getelementptr inbounds %struct.modint, ptr %15, i32 0, i32 0
  store i32 %66, ptr %67, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %68 = call i32 @_ZNK6modintILi998244353EEngEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
  %69 = getelementptr inbounds %struct.modint, ptr %17, i32 0, i32 0
  store i32 %68, ptr %69, align 4
  %70 = load i32, ptr %9, align 4, !tbaa !11
  %71 = load i32, ptr %12, align 4, !tbaa !11
  %72 = sub nsw i32 %70, %71
  %73 = sext i32 %72 to i64
  %74 = call i32 @_ZNK6modintILi998244353EE3powEm(ptr noundef nonnull align 4 dereferenceable(4) %17, i64 noundef %73)
  %75 = getelementptr inbounds %struct.modint, ptr %16, i32 0, i32 0
  store i32 %74, ptr %75, align 4
  %76 = getelementptr inbounds %struct.modint, ptr %16, i32 0, i32 0
  %77 = load i32, ptr %76, align 4
  %78 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %15, i32 %77)
  %79 = getelementptr inbounds %struct.modint, ptr %14, i32 0, i32 0
  store i32 %78, ptr %79, align 4
  %80 = load i32, ptr %12, align 4, !tbaa !11
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %81) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %82, i64 4, i1 false), !tbaa.struct !13
  %83 = getelementptr inbounds %struct.modint, ptr %18, i32 0, i32 0
  %84 = load i32, ptr %83, align 4
  %85 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %14, i32 %84)
  %86 = getelementptr inbounds %struct.modint, ptr %13, i32 0, i32 0
  store i32 %85, ptr %86, align 4
  %87 = getelementptr inbounds %struct.modint, ptr %13, i32 0, i32 0
  %88 = load i32, ptr %87, align 4
  %89 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 %88)
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %90

90:                                               ; preds = %61
  %91 = load i32, ptr %12, align 4, !tbaa !11
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %12, align 4, !tbaa !11
  br label %56, !llvm.loop !14

93:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %94 = call i32 @_ZNK6modintILi998244353EEngEv(ptr noundef nonnull align 4 dereferenceable(4) %6)
  %95 = getelementptr inbounds %struct.modint, ptr %21, i32 0, i32 0
  store i32 %94, ptr %95, align 4
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %22, i32 noundef 1)
  %96 = getelementptr inbounds %struct.modint, ptr %22, i32 0, i32 0
  %97 = load i32, ptr %96, align 4
  %98 = call i32 @_ZNK6modintILi998244353EEplES0_(ptr noundef nonnull align 4 dereferenceable(4) %21, i32 %97)
  %99 = getelementptr inbounds %struct.modint, ptr %20, i32 0, i32 0
  store i32 %98, ptr %99, align 4
  %100 = load i32, ptr %9, align 4, !tbaa !11
  %101 = add nsw i32 %100, 1
  %102 = sext i32 %101 to i64
  %103 = call i32 @_ZNK6modintILi998244353EE3powEm(ptr noundef nonnull align 4 dereferenceable(4) %20, i64 noundef %102)
  %104 = getelementptr inbounds %struct.modint, ptr %19, i32 0, i32 0
  store i32 %103, ptr %104, align 4
  %105 = getelementptr inbounds %struct.modint, ptr %19, i32 0, i32 0
  %106 = load i32, ptr %105, align 4
  %107 = call i32 @_ZN6modintILi998244353EEdVES0_(ptr noundef nonnull align 4 dereferenceable(4) %11, i32 %106)
  %108 = getelementptr inbounds %struct.modint, ptr %23, i32 0, i32 0
  store i32 %107, ptr %108, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #7
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %24, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 0, ptr %25, align 4, !tbaa !11
  br label %109

109:                                              ; preds = %133, %93
  %110 = load i32, ptr %25, align 4, !tbaa !11
  %111 = load i32, ptr %9, align 4, !tbaa !11
  %112 = icmp sle i32 %110, %111
  br i1 %112, label %114, label %113

113:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  br label %136

114:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #7
  %115 = load i32, ptr %25, align 4, !tbaa !11
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %116) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %11, i64 4, i1 false), !tbaa.struct !13
  %118 = getelementptr inbounds %struct.modint, ptr %28, i32 0, i32 0
  %119 = load i32, ptr %118, align 4
  %120 = call i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4) %117, i32 %119)
  %121 = getelementptr inbounds %struct.modint, ptr %27, i32 0, i32 0
  store i32 %120, ptr %121, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %24, i64 4, i1 false), !tbaa.struct !13
  %122 = getelementptr inbounds %struct.modint, ptr %29, i32 0, i32 0
  %123 = load i32, ptr %122, align 4
  %124 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %27, i32 %123)
  %125 = getelementptr inbounds %struct.modint, ptr %26, i32 0, i32 0
  store i32 %124, ptr %125, align 4
  %126 = load i32, ptr %25, align 4, !tbaa !11
  %127 = sext i32 %126 to i64
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %127) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %128, ptr align 4 %26, i64 4, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %6, i64 4, i1 false), !tbaa.struct !13
  %129 = getelementptr inbounds %struct.modint, ptr %30, i32 0, i32 0
  %130 = load i32, ptr %129, align 4
  %131 = call i32 @_ZN6modintILi998244353EEdVES0_(ptr noundef nonnull align 4 dereferenceable(4) %24, i32 %130)
  %132 = getelementptr inbounds %struct.modint, ptr %31, i32 0, i32 0
  store i32 %131, ptr %132, align 4
  br label %133

133:                                              ; preds = %114
  %134 = load i32, ptr %25, align 4, !tbaa !11
  %135 = add nsw i32 %134, 1
  store i32 %135, ptr %25, align 4, !tbaa !11
  br label %109, !llvm.loop !16

136:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #7
  %137 = load i64, ptr %8, align 8, !tbaa !9
  %138 = srem i64 %137, 998244353
  %139 = trunc i64 %138 to i32
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %34, i32 noundef %139)
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %35, i32 noundef 0)
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %36, i32 noundef 1)
  %140 = getelementptr inbounds %struct.modint, ptr %34, i32 0, i32 0
  %141 = load i32, ptr %140, align 4
  %142 = getelementptr inbounds %struct.modint, ptr %35, i32 0, i32 0
  %143 = load i32, ptr %142, align 4
  %144 = getelementptr inbounds %struct.modint, ptr %36, i32 0, i32 0
  %145 = load i32, ptr %144, align 4
  %146 = call i32 @_Z8LagrangeRKSt6vectorI6modintILi998244353EESaIS1_EES1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 %141, i32 %143, i32 %145)
  %147 = getelementptr inbounds %struct.modint, ptr %33, i32 0, i32 0
  store i32 %146, ptr %147, align 4
  %148 = load i64, ptr %8, align 8, !tbaa !9
  %149 = call i32 @_ZNK6modintILi998244353EE3powEm(ptr noundef nonnull align 4 dereferenceable(4) %6, i64 noundef %148)
  %150 = getelementptr inbounds %struct.modint, ptr %37, i32 0, i32 0
  store i32 %149, ptr %150, align 4
  %151 = getelementptr inbounds %struct.modint, ptr %37, i32 0, i32 0
  %152 = load i32, ptr %151, align 4
  %153 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %33, i32 %152)
  %154 = getelementptr inbounds %struct.modint, ptr %32, i32 0, i32 0
  store i32 %153, ptr %154, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %38, ptr align 4 %11, i64 4, i1 false), !tbaa.struct !13
  %155 = getelementptr inbounds %struct.modint, ptr %38, i32 0, i32 0
  %156 = load i32, ptr %155, align 4
  %157 = call i32 @_ZNK6modintILi998244353EEplES0_(ptr noundef nonnull align 4 dereferenceable(4) %32, i32 %156)
  %158 = getelementptr inbounds %struct.modint, ptr %5, i32 0, i32 0
  store i32 %157, ptr %158, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  %159 = getelementptr inbounds %struct.modint, ptr %5, i32 0, i32 0
  %160 = load i32, ptr %159, align 4
  ret i32 %160
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #6

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { noreturn nounwind "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 }
attributes #8 = { noreturn 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 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 4, !11}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Combi = type { i32, %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }

@C = external dso_local global %struct.Combi, align 8
@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [86 x i8], align 1
@__PRETTY_FUNCTION__._Z2yoSt6vectorI6modintILi998244353EESaIS1_EExS1_i = external hidden unnamed_addr constant [44 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI6modintILi998244353EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; 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 #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: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN6modintILi998244353EEdVES0_(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 @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
define dso_local i32 @_Z2yoSt6vectorI6modintILi998244353EESaIS1_EExS1_i(ptr noundef nonnull %0, i64 noundef %1, i32 %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = alloca %struct.modint, align 4
  %6 = alloca %struct.modint, align 4
  %7 = alloca %struct.modint, align 4
  %8 = alloca %struct.modint, align 4
  %9 = alloca %struct.modint, align 4
  %10 = alloca %struct.modint, align 4
  %11 = alloca %struct.modint, align 4
  %12 = alloca %struct.modint, align 4
  %13 = alloca %struct.modint, align 4
  %14 = alloca %struct.modint, align 4
  %15 = alloca %struct.modint, align 4
  %16 = alloca %struct.modint, align 4
  %17 = alloca %struct.modint, align 4
  %18 = alloca %struct.modint, align 4
  %19 = alloca %struct.modint, align 4
  %20 = alloca %struct.modint, align 4
  store i32 %2, ptr %5, align 4
  %21 = add i32 %3, 1
  %22 = sext i32 %21 to i64
  %23 = tail call noundef i64 @_ZNKSt6vectorI6modintILi998244353EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #6
  %24 = icmp eq i64 %23, %22
  br i1 %24, label %26, label %25

25:                                               ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.2, i32 noundef 82, ptr noundef nonnull @__PRETTY_FUNCTION__._Z2yoSt6vectorI6modintILi998244353EESaIS1_EExS1_i) #7
  unreachable

26:                                               ; preds = %4
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 noundef 1)
  %27 = load i32, ptr %6, align 4
  %28 = call noundef zeroext i1 @_ZNK6modintILi998244353EEneES0_(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 %27)
  br i1 %28, label %30, label %29

29:                                               ; preds = %26
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.2, i32 noundef 83, ptr noundef nonnull @__PRETTY_FUNCTION__._Z2yoSt6vectorI6modintILi998244353EESaIS1_EExS1_i) #7
  unreachable

30:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 noundef 0)
  %.not33 = icmp slt i32 %3, 0
  br i1 %.not33, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %30
  %31 = zext nneg i32 %3 to i64
  %wide.trip.count = zext i32 %21 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %30
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  %32 = call i32 @_ZNK6modintILi998244353EEngEv(ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i32 %32, ptr %12, align 4
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %13, i32 noundef 1)
  %33 = load i32, ptr %13, align 4
  %34 = call i32 @_ZNK6modintILi998244353EEplES0_(ptr noundef nonnull align 4 dereferenceable(4) %12, i32 %33)
  store i32 %34, ptr %11, align 4
  %35 = call i32 @_ZNK6modintILi998244353EE3powEm(ptr noundef nonnull align 4 dereferenceable(4) %11, i64 noundef %22)
  %36 = call i32 @_ZN6modintILi998244353EEdVES0_(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 %35)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %14, i32 noundef 1)
  br i1 %.not33, label %._crit_edge39, label %.lr.ph38.preheader

.lr.ph38.preheader:                               ; preds = %._crit_edge
  %wide.trip.count44 = zext i32 %21 to i64
  br label %.lr.ph38

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %37 = trunc nuw nsw i64 %indvars.iv.next to i32
  %38 = call i32 @_ZN5Combi3ncrEii(ptr noundef nonnull align 8 dereferenceable(80) @C, i32 noundef %21, i32 noundef %37)
  store i32 %38, ptr %9, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  %39 = call i32 @_ZNK6modintILi998244353EEngEv(ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i32 %39, ptr %10, align 4
  %40 = sub nsw i64 %31, %indvars.iv
  %41 = call i32 @_ZNK6modintILi998244353EE3powEm(ptr noundef nonnull align 4 dereferenceable(4) %10, i64 noundef %40)
  %42 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %9, i32 %41)
  store i32 %42, ptr %8, align 4
  %43 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #6
  %.sroa.012.0.copyload = load i32, ptr %43, align 4, !tbaa !5
  %44 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 %.sroa.012.0.copyload)
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 %44)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge39:                                    ; preds = %.lr.ph38, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #6
  %46 = srem i64 %1, 998244353
  %47 = trunc nsw i64 %46 to i32
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %18, i32 noundef %47)
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %19, i32 noundef 0)
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %20, i32 noundef 1)
  %48 = load i32, ptr %18, align 4
  %49 = load i32, ptr %19, align 4
  %50 = load i32, ptr %20, align 4
  %51 = call i32 @_Z8LagrangeRKSt6vectorI6modintILi998244353EESaIS1_EES1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 %48, i32 %49, i32 %50)
  store i32 %51, ptr %17, align 4
  %52 = call i32 @_ZNK6modintILi998244353EE3powEm(ptr noundef nonnull align 4 dereferenceable(4) %5, i64 noundef %1)
  %53 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %17, i32 %52)
  store i32 %53, ptr %16, align 4
  %.sroa.0.0.copyload = load i32, ptr %7, align 4, !tbaa !5
  %54 = call i32 @_ZNK6modintILi998244353EEplES0_(ptr noundef nonnull align 4 dereferenceable(4) %16, i32 %.sroa.0.0.copyload)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  ret i32 %54

.lr.ph38:                                         ; preds = %.lr.ph38.preheader, %.lr.ph38
  %indvars.iv41 = phi i64 [ 0, %.lr.ph38.preheader ], [ %indvars.iv.next42, %.lr.ph38 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv41) #6
  %.sroa.05.0.copyload = load i32, ptr %7, align 4, !tbaa !5
  %56 = call i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4) %55, i32 %.sroa.05.0.copyload)
  store i32 %56, ptr %15, align 4
  %.sroa.04.0.copyload = load i32, ptr %14, align 4, !tbaa !5
  %57 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %15, i32 %.sroa.04.0.copyload)
  %58 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI6modintILi998244353EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv41) #6
  store i32 %57, ptr %58, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  %.sroa.03.0.copyload = load i32, ptr %5, align 4, !tbaa !5
  %59 = call i32 @_ZN6modintILi998244353EEdVES0_(ptr noundef nonnull align 4 dereferenceable(4) %14, i32 %.sroa.03.0.copyload)
  %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1
  %exitcond45.not = icmp eq i64 %indvars.iv.next42, %wide.trip.count44
  br i1 %exitcond45.not, label %._crit_edge39, label %.lr.ph38, !llvm.loop !11
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync 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 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 = { noreturn nounwind "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 }
attributes #7 = { noreturn 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}


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