; LLVM IR from tangjz/acm-icpc :: lydsy (4969)

; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@n = external dso_local global i32, align 4
@inv = external dso_local global [100001 x i32], align 16
@f = external dso_local global [100001 x %"class.std::vector"], align 16
@g = external dso_local global [100001 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_Z7initNTTi(i32 noundef) #0

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5solveii(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  store i32 1, ptr getelementptr inbounds ([100001 x i32], ptr @inv, i64 0, i64 1), align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  store i32 2, ptr %2, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %39, %0
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = icmp sle i32 %18, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  br label %42

22:                                               ; preds = %17
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sdiv i32 998244353, %23
  %25 = sext i32 %24 to i64
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = srem i32 998244353, %26
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [100001 x i32], ptr @inv, i64 0, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = mul nsw i64 %25, %31
  %33 = srem i64 %32, 998244353
  %34 = trunc i64 %33 to i32
  %35 = sub nsw i32 998244353, %34
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [100001 x i32], ptr @inv, i64 0, i64 %37
  store i32 %35, ptr %38, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %22
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %2, align 4, !tbaa !5
  br label %17, !llvm.loop !9

42:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %4) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  %43 = load i32, ptr @n, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  %45 = sext i32 %44 to i64
  invoke void @_ZNSt6vectorIiSaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %45)
          to label %46 unwind label %56

46:                                               ; preds = %42
  %47 = load i32, ptr @n, align 4, !tbaa !5
  %48 = add nsw i32 %47, 1
  %49 = sext i32 %48 to i64
  invoke void @_ZNSt6vectorIiSaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %49)
          to label %50 unwind label %56

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  br label %51

51:                                               ; preds = %88, %50
  %52 = load i32, ptr %7, align 4, !tbaa !5
  %53 = load i32, ptr @n, align 4, !tbaa !5
  %54 = icmp sle i32 %52, %53
  br i1 %54, label %60, label %55

55:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %95

56:                                               ; preds = %193, %99, %95, %46, %42
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %5, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %6, align 4
  br label %224

60:                                               ; preds = %51
  %61 = invoke i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %8)
          to label %62 unwind label %91

62:                                               ; preds = %60
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %75

65:                                               ; preds = %62
  %66 = load i32, ptr %9, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = load i32, ptr %7, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [100001 x i32], ptr @inv, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = mul nsw i64 %67, %72
  %74 = srem i64 %73, 998244353
  br label %76

75:                                               ; preds = %62
  br label %76

76:                                               ; preds = %75, %65
  %77 = phi i64 [ %74, %65 ], [ 1, %75 ]
  %78 = trunc i64 %77 to i32
  store i32 %78, ptr %9, align 4, !tbaa !5
  %79 = load i32, ptr %8, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = load i32, ptr %9, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = mul nsw i64 %80, %82
  %84 = srem i64 %83, 998244353
  %85 = trunc i64 %84 to i32
  store i32 %85, ptr %8, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %86 unwind label %91

86:                                               ; preds = %76
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %87 unwind label %91

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  %89 = load i32, ptr %7, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1
  store i32 %90, ptr %7, align 4, !tbaa !5
  br label %51, !llvm.loop !11

91:                                               ; preds = %86, %76, %60
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %5, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %224

95:                                               ; preds = %55
  %96 = load i32, ptr @n, align 4, !tbaa !5
  %97 = shl i32 %96, 1
  %98 = or i32 %97, 1
  call void @_Z7initNTTi(i32 noundef %98)
  invoke void @_Z7polyMulRKSt6vectorIiSaIiEES3_RS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %99 unwind label %56

99:                                               ; preds = %95
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  %102 = sext i32 %101 to i64
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %102)
          to label %103 unwind label %56

103:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %104 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %104, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  br label %105

105:                                              ; preds = %177, %103
  %106 = load i32, ptr %10, align 4, !tbaa !5
  %107 = icmp sge i32 %106, 0
  br i1 %107, label %109, label %108

108:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %193

109:                                              ; preds = %105
  %110 = load i32, ptr %10, align 4, !tbaa !5
  %111 = load i32, ptr @n, align 4, !tbaa !5
  %112 = icmp slt i32 %110, %111
  br i1 %112, label %113, label %125

113:                                              ; preds = %109
  %114 = load i32, ptr %12, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = load i32, ptr @n, align 4, !tbaa !5
  %117 = load i32, ptr %10, align 4, !tbaa !5
  %118 = sub nsw i32 %116, %117
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [100001 x i32], ptr @inv, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = mul nsw i64 %115, %122
  %124 = srem i64 %123, 998244353
  br label %126

125:                                              ; preds = %109
  br label %126

126:                                              ; preds = %125, %113
  %127 = phi i64 [ %124, %113 ], [ 1, %125 ]
  %128 = trunc i64 %127 to i32
  store i32 %128, ptr %12, align 4, !tbaa !5
  %129 = load i32, ptr %10, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %130) #5
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = load i32, ptr %12, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = mul nsw i64 %133, %135
  %137 = srem i64 %136, 998244353
  %138 = trunc i64 %137 to i32
  store i32 %138, ptr %11, align 4, !tbaa !5
  %139 = load i32, ptr %11, align 4, !tbaa !5
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %141, label %148

141:                                              ; preds = %126
  %142 = load i32, ptr %10, align 4, !tbaa !5
  %143 = and i32 %142, 1
  %144 = icmp ne i32 %143, 0
  br i1 %144, label %145, label %148

145:                                              ; preds = %141
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = sub nsw i32 998244353, %146
  store i32 %147, ptr %11, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %145, %141, %126
  %149 = load i32, ptr %10, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @f, i64 0, i64 %150
  invoke void @_ZNSt6vectorIiSaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %151, i64 noundef 1)
          to label %152 unwind label %180

152:                                              ; preds = %148
  %153 = load i32, ptr %10, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @f, i64 0, i64 %154
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %155, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %156 unwind label %180

156:                                              ; preds = %152
  %157 = load i32, ptr %10, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @g, i64 0, i64 %158
  invoke void @_ZNSt6vectorIiSaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %159, i64 noundef 2)
          to label %160 unwind label %180

160:                                              ; preds = %156
  %161 = load i32, ptr %10, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @g, i64 0, i64 %162
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %164 = load i32, ptr %10, align 4, !tbaa !5
  %165 = icmp ne i32 %164, 0
  br i1 %165, label %166, label %169

166:                                              ; preds = %160
  %167 = load i32, ptr %10, align 4, !tbaa !5
  %168 = sub nsw i32 998244353, %167
  br label %170

169:                                              ; preds = %160
  br label %170

170:                                              ; preds = %169, %166
  %171 = phi i32 [ %168, %166 ], [ 0, %169 ]
  store i32 %171, ptr %13, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %163, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %172 unwind label %184

172:                                              ; preds = %170
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  %173 = load i32, ptr %10, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @g, i64 0, i64 %174
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 1, ptr %14, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %175, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %176 unwind label %188

176:                                              ; preds = %172
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %177

177:                                              ; preds = %176
  %178 = load i32, ptr %10, align 4, !tbaa !5
  %179 = add nsw i32 %178, -1
  store i32 %179, ptr %10, align 4, !tbaa !5
  br label %105, !llvm.loop !12

180:                                              ; preds = %156, %152, %148
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %5, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %6, align 4
  br label %192

184:                                              ; preds = %170
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %5, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %192

188:                                              ; preds = %172
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %5, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %192

192:                                              ; preds = %188, %184, %180
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %224

193:                                              ; preds = %108
  %194 = load i32, ptr @n, align 4, !tbaa !5
  invoke void @_Z5solveii(i32 noundef 0, i32 noundef %194)
          to label %195 unwind label %56

195:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %196

196:                                              ; preds = %215, %195
  %197 = load i32, ptr %15, align 4, !tbaa !5
  %198 = load i32, ptr @n, align 4, !tbaa !5
  %199 = icmp sle i32 %197, %198
  br i1 %199, label %201, label %200

200:                                              ; preds = %196
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %222

201:                                              ; preds = %196
  %202 = load i32, ptr %15, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @f, i64 noundef %203) #5
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = load i32, ptr %15, align 4, !tbaa !5
  %207 = load i32, ptr @n, align 4, !tbaa !5
  %208 = icmp eq i32 %206, %207
  %209 = zext i1 %208 to i64
  %210 = getelementptr inbounds [3 x i8], ptr @.str.5, i64 0, i64 %209
  %211 = load i8, ptr %210, align 1, !tbaa !13
  %212 = sext i8 %211 to i32
  %213 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %205, i32 noundef %212)
          to label %214 unwind label %218

214:                                              ; preds = %201
  br label %215

215:                                              ; preds = %214
  %216 = load i32, ptr %15, align 4, !tbaa !5
  %217 = add nsw i32 %216, 1
  store i32 %217, ptr %15, align 4, !tbaa !5
  br label %196, !llvm.loop !14

218:                                              ; preds = %201
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %5, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %224

222:                                              ; preds = %200
  store i32 0, ptr %1, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  %223 = load i32, ptr %1, align 4
  ret i32 %223

224:                                              ; preds = %218, %192, %91, %56
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %4) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #5
  br label %225

225:                                              ; preds = %224
  %226 = load ptr, ptr %5, align 8
  %227 = load i32, ptr %6, align 4
  %228 = insertvalue { ptr, i32 } poison, ptr %226, 0
  %229 = insertvalue { ptr, i32 } %228, i32 %227, 1
  resume { ptr, i32 } %229
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #4

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

declare i32 @__gxx_personality_v0(...)

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

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

declare i32 @printf(ptr noundef, ...) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = !{!7, !7, i64 0}
!14 = distinct !{!14, !10}


; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@n = external dso_local global i32, align 4
@inv = external dso_local local_unnamed_addr global [100001 x i32], align 16
@f = external dso_local global [100001 x %"class.std::vector"], align 16
@g = external dso_local global [100001 x %"class.std::vector"], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z5solveii(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::vector", align 8
  %2 = alloca %"class.std::vector", align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  store i32 1, ptr getelementptr inbounds (i8, ptr @inv, i64 4), align 4, !tbaa !5
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %.not49 = icmp slt i32 %9, 2
  br i1 %.not49, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %0
  %10 = add nuw i32 %9, 1
  %wide.trip.count = zext i32 %10 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  %11 = load i32, ptr @n, align 4, !tbaa !5
  %12 = add nsw i32 %11, 1
  %13 = sext i32 %12 to i64
  invoke void @_ZNSt6vectorIiSaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %13)
          to label %27 unwind label %42

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 2, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %14 = trunc nuw nsw i64 %indvars.iv to i32
  %15 = udiv i32 998244353, %14
  %16 = zext nneg i32 %15 to i64
  %17 = urem i32 998244353, %14
  %18 = zext nneg i32 %17 to i64
  %19 = getelementptr inbounds [100001 x i32], ptr @inv, i64 0, i64 %18
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = mul nsw i64 %21, %16
  %23 = srem i64 %22, 998244353
  %24 = trunc nsw i64 %23 to i32
  %25 = sub nsw i32 998244353, %24
  %26 = getelementptr inbounds [100001 x i32], ptr @inv, i64 0, i64 %indvars.iv
  store i32 %25, ptr %26, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

27:                                               ; preds = %._crit_edge
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  %30 = sext i32 %29 to i64
  invoke void @_ZNSt6vectorIiSaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %30)
          to label %31 unwind label %42

31:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %32 = load i32, ptr @n, align 4, !tbaa !5
  %.not3951 = icmp slt i32 %32, 0
  br i1 %.not3951, label %._crit_edge55, label %33

33:                                               ; preds = %31
  %34 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3)
  store i32 1, ptr %4, align 4, !tbaa !5
  %35 = load i32, ptr %3, align 4, !tbaa !5
  %36 = srem i32 %35, 998244353
  store i32 %36, ptr %3, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %37 unwind label %.loopexit.split-lp

37:                                               ; preds = %33
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %38 unwind label %.loopexit.split-lp

38:                                               ; preds = %37
  %39 = load i32, ptr @n, align 4, !tbaa !5
  %.not39.not.peel = icmp sgt i32 %39, 0
  br i1 %.not39.not.peel, label %.lr.ph54.peel.next, label %._crit_edge55

._crit_edge55:                                    ; preds = %59, %38, %31
  %.lcssa = phi i32 [ %32, %31 ], [ %39, %38 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  %40 = shl i32 %.lcssa, 1
  %41 = or disjoint i32 %40, 1
  call void @_Z7initNTTi(i32 noundef %41)
  invoke void @_Z7polyMulRKSt6vectorIiSaIiEES3_RS1_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %63 unwind label %42

42:                                               ; preds = %._crit_edge60, %63, %._crit_edge55, %27, %._crit_edge
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %124

.lr.ph54.peel.next:                               ; preds = %38, %59
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %59 ], [ 1, %38 ]
  %44 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %3)
  %45 = getelementptr inbounds [100001 x i32], ptr @inv, i64 0, i64 %indvars.iv67
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = load i32, ptr %4, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = mul nsw i64 %47, %49
  %51 = srem i64 %50, 998244353
  %52 = trunc nsw i64 %51 to i32
  store i32 %52, ptr %4, align 4, !tbaa !5
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = mul nsw i64 %51, %54
  %56 = srem i64 %55, 998244353
  %57 = trunc nsw i64 %56 to i32
  store i32 %57, ptr %3, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %58 unwind label %.loopexit

58:                                               ; preds = %.lr.ph54.peel.next
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %59 unwind label %.loopexit

59:                                               ; preds = %58
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %60 = load i32, ptr @n, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %.not39.not = icmp slt i64 %indvars.iv67, %61
  br i1 %.not39.not, label %.lr.ph54.peel.next, label %._crit_edge55, !llvm.loop !11

.loopexit:                                        ; preds = %.lr.ph54.peel.next, %58
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %62

.loopexit.split-lp:                               ; preds = %33, %37
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %62

62:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %124

63:                                               ; preds = %._crit_edge55
  %64 = load i32, ptr @n, align 4, !tbaa !5
  %65 = add nsw i32 %64, 1
  %66 = sext i32 %65 to i64
  invoke void @_ZNSt6vectorIiSaIiEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %66)
          to label %67 unwind label %42

67:                                               ; preds = %63
  %68 = load i32, ptr @n, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %69 = icmp sgt i32 %68, -1
  br i1 %69, label %.lr.ph59.preheader, label %._crit_edge60

.lr.ph59.preheader:                               ; preds = %67
  %70 = zext nneg i32 %68 to i64
  br label %.lr.ph59

._crit_edge60.loopexit:                           ; preds = %103
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge60

._crit_edge60:                                    ; preds = %._crit_edge60.loopexit, %67
  %71 = phi i32 [ %.pre, %._crit_edge60.loopexit ], [ %68, %67 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  invoke void @_Z5solveii(i32 noundef 0, i32 noundef %71)
          to label %.preheader unwind label %42

.preheader:                                       ; preds = %._crit_edge60
  %72 = load i32, ptr @n, align 4, !tbaa !5
  %.not4061 = icmp slt i32 %72, 0
  br i1 %.not4061, label %._crit_edge64, label %.lr.ph63

.lr.ph59:                                         ; preds = %.lr.ph59.preheader, %103
  %indvars.iv71 = phi i64 [ %70, %.lr.ph59.preheader ], [ %indvars.iv.next72, %103 ]
  %.03057 = phi i64 [ 0, %.lr.ph59.preheader ], [ %85, %103 ]
  %73 = load i32, ptr @n, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = icmp slt i64 %indvars.iv71, %74
  %76 = trunc nuw nsw i64 %indvars.iv71 to i32
  br i1 %75, label %77, label %.lr.ph59._crit_edge

77:                                               ; preds = %.lr.ph59
  %78 = sub nsw i32 %73, %76
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [100001 x i32], ptr @inv, i64 0, i64 %79
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = mul nsw i64 %.03057, %82
  %84 = srem i64 %83, 998244353
  br label %.lr.ph59._crit_edge

.lr.ph59._crit_edge:                              ; preds = %.lr.ph59, %77
  %85 = phi i64 [ %84, %77 ], [ 1, %.lr.ph59 ]
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv71) #5
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = mul nsw i64 %85, %88
  %90 = srem i64 %89, 998244353
  %91 = trunc nsw i64 %90 to i32
  %.not41 = icmp eq i64 %90, 0
  %92 = and i32 %76, 1
  %.not42 = icmp eq i32 %92, 0
  %or.cond = or i1 %.not42, %.not41
  %93 = sub nsw i32 998244353, %91
  %spec.select = select i1 %or.cond, i32 %91, i32 %93
  store i32 %spec.select, ptr %5, align 4, !tbaa !5
  %94 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @f, i64 0, i64 %indvars.iv71
  invoke void @_ZNSt6vectorIiSaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %94, i64 noundef 1)
          to label %95 unwind label %105

95:                                               ; preds = %.lr.ph59._crit_edge
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %94, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %96 unwind label %105

96:                                               ; preds = %95
  %97 = getelementptr inbounds [100001 x %"class.std::vector"], ptr @g, i64 0, i64 %indvars.iv71
  invoke void @_ZNSt6vectorIiSaIiEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %97, i64 noundef 2)
          to label %98 unwind label %105

98:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %.not43 = icmp eq i64 %indvars.iv71, 0
  %99 = trunc i64 %indvars.iv71 to i32
  %100 = sub i32 998244353, %99
  %101 = select i1 %.not43, i32 0, i32 %100
  store i32 %101, ptr %6, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %97, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %102 unwind label %107

102:                                              ; preds = %98
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 1, ptr %7, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %97, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %103 unwind label %109

103:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  %indvars.iv.next72 = add nsw i64 %indvars.iv71, -1
  %104 = icmp sgt i64 %indvars.iv71, 0
  br i1 %104, label %.lr.ph59, label %._crit_edge60.loopexit, !llvm.loop !13

105:                                              ; preds = %96, %95, %.lr.ph59._crit_edge
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %111

107:                                              ; preds = %98
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %111

109:                                              ; preds = %102
  %110 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %111

111:                                              ; preds = %109, %107, %105
  %.pn = phi { ptr, i32 } [ %110, %109 ], [ %108, %107 ], [ %106, %105 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %124

._crit_edge64:                                    ; preds = %.lr.ph63, %.preheader
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #5
  ret i32 0

.lr.ph63:                                         ; preds = %.preheader, %.lr.ph63
  %indvars.iv74 = phi i64 [ %indvars.iv.next75, %.lr.ph63 ], [ 0, %.preheader ]
  %112 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @f, i64 noundef %indvars.iv74) #5
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = load i32, ptr @n, align 4, !tbaa !5
  %115 = zext i32 %114 to i64
  %116 = icmp eq i64 %indvars.iv74, %115
  %117 = zext i1 %116 to i64
  %118 = getelementptr inbounds [3 x i8], ptr @.str.5, i64 0, i64 %117
  %119 = load i8, ptr %118, align 1, !tbaa !14
  %120 = sext i8 %119 to i32
  %121 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %113, i32 noundef %120)
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %122 = load i32, ptr @n, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %.not40.not = icmp slt i64 %indvars.iv74, %123
  br i1 %.not40.not, label %.lr.ph63, label %._crit_edge64, !llvm.loop !15

124:                                              ; preds = %111, %62, %42
  %.pn46 = phi { ptr, i32 } [ %lpad.phi, %62 ], [ %.pn, %111 ], [ %43, %42 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %1) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #5
  resume { ptr, i32 } %.pn46
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree 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 #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}
!12 = !{!"llvm.loop.peeled.count", i32 1}
!13 = distinct !{!13, !10}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass