; LLVM IR from tangjz/acm-icpc :: codeforces/gym/104068M.ll (Z5solvev)

; 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.FastInput = type <{ ptr, ptr, ptr, i8, [7 x i8] }>
%struct.FastOutput = type { ptr, ptr, ptr }
%struct.Node = type { i32, i32, i32 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@in = external dso_local global %struct.FastInput, align 8
@out = external dso_local global %struct.FastOutput, align 8
@.str.3 = external hidden unnamed_addr constant [76 x i8], align 1
@_ZZ5solvevE3dim = external hidden global [19 x %struct.Node], align 16
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1
@_ZZ5solvevE1a = external hidden global [19 x i32], align 16
@_ZZ5solvevE3coe = external hidden global [19 x [19 x [524289 x i32]]], align 16
@_ZZ5solvevE1f = external hidden global [19 x [2097155 x i32]], align 16
@_ZZ5solvevE1g = external hidden global [1048577 x i32], align 16
@.str.7 = external hidden unnamed_addr constant [10 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3NTTiPii(i32 noundef, ptr noundef, i32 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %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 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"class.std::function", align 8
  %28 = alloca %class.anon, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca i32, align 4
  %37 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 1, ptr %3, align 4, !tbaa !5
  call void @_ZN9FastInput4readERi(ptr noundef nonnull align 8 dereferenceable(25) @in, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %38

38:                                               ; preds = %74, %0
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = load i32, ptr %2, align 4, !tbaa !5
  %41 = icmp sle i32 %39, %40
  br i1 %41, label %43, label %42

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

43:                                               ; preds = %38
  %44 = load i32, ptr %1, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %45
  %47 = getelementptr inbounds %struct.Node, ptr %46, i32 0, i32 1
  call void @_ZN9FastInput4readERi(ptr noundef nonnull align 8 dereferenceable(25) @in, ptr noundef nonnull align 4 dereferenceable(4) %47)
  %48 = load i32, ptr %1, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %49
  %51 = getelementptr inbounds %struct.Node, ptr %50, i32 0, i32 1
  %52 = load i32, ptr %51, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 1
  br i1 %53, label %54, label %55

54:                                               ; preds = %43
  br label %74

55:                                               ; preds = %43
  %56 = load i32, ptr %4, align 4, !tbaa !5
  %57 = load i32, ptr %1, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %58
  %60 = getelementptr inbounds %struct.Node, ptr %59, i32 0, i32 0
  store i32 %56, ptr %60, align 4, !tbaa !11
  %61 = load i32, ptr %3, align 4, !tbaa !5
  %62 = load i32, ptr %1, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %63
  %65 = getelementptr inbounds %struct.Node, ptr %64, i32 0, i32 2
  store i32 %61, ptr %65, align 4, !tbaa !12
  %66 = load i32, ptr %1, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %1, align 4, !tbaa !5
  %68 = sext i32 %66 to i64
  %69 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %68
  %70 = getelementptr inbounds %struct.Node, ptr %69, i32 0, i32 1
  %71 = load i32, ptr %70, align 4, !tbaa !9
  %72 = load i32, ptr %3, align 4, !tbaa !5
  %73 = mul nsw i32 %72, %71
  store i32 %73, ptr %3, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %55, %54
  %75 = load i32, ptr %4, align 4, !tbaa !5
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %4, align 4, !tbaa !5
  br label %38, !llvm.loop !13

77:                                               ; preds = %42
  %78 = load i32, ptr %1, align 4, !tbaa !5
  %79 = icmp sle i32 %78, 1
  br i1 %79, label %80, label %98

80:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %81

81:                                               ; preds = %94, %80
  %82 = load i32, ptr %5, align 4, !tbaa !5
  %83 = load i32, ptr %3, align 4, !tbaa !5
  %84 = icmp slt i32 %82, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %97

86:                                               ; preds = %81
  call void @_ZN10FastOutput9writeCharEc(ptr noundef nonnull align 8 dereferenceable(24) @out, i8 noundef signext 49)
  %87 = load i32, ptr %5, align 4, !tbaa !5
  %88 = load i32, ptr %3, align 4, !tbaa !5
  %89 = sub nsw i32 %88, 1
  %90 = icmp eq i32 %87, %89
  %91 = zext i1 %90 to i64
  %92 = getelementptr inbounds [3 x i8], ptr @.str.4, i64 0, i64 %91
  %93 = load i8, ptr %92, align 1, !tbaa !15
  call void @_ZN10FastOutput9writeCharEc(ptr noundef nonnull align 8 dereferenceable(24) @out, i8 noundef signext %93)
  br label %94

94:                                               ; preds = %86
  %95 = load i32, ptr %5, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %5, align 4, !tbaa !5
  br label %81, !llvm.loop !16

97:                                               ; preds = %85
  store i32 1, ptr %6, align 4
  br label %616

98:                                               ; preds = %77
  %99 = load i32, ptr %1, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds %struct.Node, ptr @_ZZ5solvevE3dim, i64 %100
  call void @_ZSt4sortIP4NodeEvT_S2_(ptr noundef @_ZZ5solvevE3dim, ptr noundef %101)
  %102 = load i32, ptr %1, align 4, !tbaa !5
  %103 = add nsw i32 %102, -1
  store i32 %103, ptr %1, align 4, !tbaa !5
  %104 = load i32, ptr %1, align 4, !tbaa !5
  %105 = icmp slt i32 %104, 19
  br i1 %105, label %106, label %107

106:                                              ; preds = %98
  br label %109

107:                                              ; preds = %98
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.3, i32 noundef 160, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #7
  unreachable

108:                                              ; No predecessors!
  br label %109

109:                                              ; preds = %108, %106
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 1, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %110 = load i32, ptr %1, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %111
  %113 = getelementptr inbounds %struct.Node, ptr %112, i32 0, i32 1
  %114 = load i32, ptr %113, align 4, !tbaa !9
  store i32 %114, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %115 = load i32, ptr %3, align 4, !tbaa !5
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = sdiv i32 %115, %116
  store i32 %117, ptr %9, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %131, %109
  %119 = load i32, ptr %7, align 4, !tbaa !5
  %120 = load i32, ptr %8, align 4, !tbaa !5
  %121 = mul nsw i32 %120, 2
  %122 = sub nsw i32 %121, 1
  %123 = icmp slt i32 %119, %122
  br i1 %123, label %128, label %124

124:                                              ; preds = %118
  %125 = load i32, ptr %7, align 4, !tbaa !5
  %126 = load i32, ptr %8, align 4, !tbaa !5
  %127 = icmp slt i32 %125, %126
  br label %128

128:                                              ; preds = %124, %118
  %129 = phi i1 [ true, %118 ], [ %127, %124 ]
  br i1 %129, label %130, label %134

130:                                              ; preds = %128
  br label %131

131:                                              ; preds = %130
  %132 = load i32, ptr %7, align 4, !tbaa !5
  %133 = shl i32 %132, 1
  store i32 %133, ptr %7, align 4, !tbaa !5
  br label %118, !llvm.loop !17

134:                                              ; preds = %128
  %135 = load i32, ptr %7, align 4, !tbaa !5
  %136 = load i32, ptr %9, align 4, !tbaa !5
  %137 = mul nsw i32 %135, %136
  %138 = icmp slt i32 %137, 2097155
  br i1 %138, label %139, label %140

139:                                              ; preds = %134
  br label %142

140:                                              ; preds = %134
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.3, i32 noundef 163, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #7
  unreachable

141:                                              ; No predecessors!
  br label %142

142:                                              ; preds = %141, %139
  %143 = load i32, ptr %7, align 4, !tbaa !5
  call void @_Z7initNTTi(i32 noundef %143)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %209, %142
  %145 = load i32, ptr %10, align 4, !tbaa !5
  %146 = load i32, ptr %1, align 4, !tbaa !5
  %147 = icmp sle i32 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %212

149:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %150

150:                                              ; preds = %205, %149
  %151 = load i32, ptr %11, align 4, !tbaa !5
  %152 = load i32, ptr %8, align 4, !tbaa !5
  %153 = icmp slt i32 %151, %152
  br i1 %153, label %155, label %154

154:                                              ; preds = %150
  store i32 14, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %208

155:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %156 = load i32, ptr %10, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [19 x [524289 x i32]], ptr @_ZZ5solvevE3coe, i64 0, i64 %157
  %159 = load i32, ptr %11, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [524289 x i32], ptr %158, i64 0, i64 %160
  store i32 1, ptr %161, align 4, !tbaa !5
  %162 = load i32, ptr %10, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [19 x [524289 x i32]], ptr getelementptr inbounds ([19 x [19 x [524289 x i32]]], ptr @_ZZ5solvevE3coe, i64 0, i64 1), i64 0, i64 %163
  %165 = load i32, ptr %11, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [524289 x i32], ptr %164, i64 0, i64 %166
  store i32 1, ptr %167, align 4, !tbaa !5
  store ptr %167, ptr %12, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %168 = load i32, ptr %11, align 4, !tbaa !5
  %169 = add nsw i32 %168, 1
  store i32 %169, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %170 = load i32, ptr %10, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %171
  %173 = getelementptr inbounds %struct.Node, ptr %172, i32 0, i32 0
  %174 = load i32, ptr %173, align 4, !tbaa !11
  store i32 %174, ptr %14, align 4, !tbaa !5
  br label %175

175:                                              ; preds = %194, %155
  %176 = load i32, ptr %14, align 4, !tbaa !5
  %177 = icmp sgt i32 %176, 0
  br i1 %177, label %179, label %178

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

179:                                              ; preds = %175
  %180 = load i32, ptr %14, align 4, !tbaa !5
  %181 = and i32 %180, 1
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %193

183:                                              ; preds = %179
  %184 = load ptr, ptr %12, align 8, !tbaa !18
  %185 = load i32, ptr %184, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = load i32, ptr %13, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = mul nsw i64 %186, %188
  %190 = srem i64 %189, 998244353
  %191 = trunc i64 %190 to i32
  %192 = load ptr, ptr %12, align 8, !tbaa !18
  store i32 %191, ptr %192, align 4, !tbaa !5
  br label %193

193:                                              ; preds = %183, %179
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %14, align 4, !tbaa !5
  %196 = ashr i32 %195, 1
  store i32 %196, ptr %14, align 4, !tbaa !5
  %197 = load i32, ptr %13, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = load i32, ptr %13, align 4, !tbaa !5
  %200 = sext i32 %199 to i64
  %201 = mul nsw i64 %198, %200
  %202 = srem i64 %201, 998244353
  %203 = trunc i64 %202 to i32
  store i32 %203, ptr %13, align 4, !tbaa !5
  br label %175, !llvm.loop !20

204:                                              ; preds = %178
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %205

205:                                              ; preds = %204
  %206 = load i32, ptr %11, align 4, !tbaa !5
  %207 = add nsw i32 %206, 1
  store i32 %207, ptr %11, align 4, !tbaa !5
  br label %150, !llvm.loop !21

208:                                              ; preds = %154
  br label %209

209:                                              ; preds = %208
  %210 = load i32, ptr %10, align 4, !tbaa !5
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %10, align 4, !tbaa !5
  br label %144, !llvm.loop !22

212:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 2, ptr %15, align 4, !tbaa !5
  br label %213

213:                                              ; preds = %285, %212
  %214 = load i32, ptr %15, align 4, !tbaa !5
  %215 = load i32, ptr %1, align 4, !tbaa !5
  %216 = icmp sle i32 %214, %215
  br i1 %216, label %218, label %217

217:                                              ; preds = %213
  store i32 20, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %288

218:                                              ; preds = %213
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %219

219:                                              ; preds = %281, %218
  %220 = load i32, ptr %16, align 4, !tbaa !5
  %221 = load i32, ptr %1, align 4, !tbaa !5
  %222 = icmp sle i32 %220, %221
  br i1 %222, label %224, label %223

223:                                              ; preds = %219
  store i32 23, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %284

224:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %225

225:                                              ; preds = %277, %224
  %226 = load i32, ptr %17, align 4, !tbaa !5
  %227 = load i32, ptr %8, align 4, !tbaa !5
  %228 = icmp slt i32 %226, %227
  br i1 %228, label %230, label %229

229:                                              ; preds = %225
  store i32 26, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %280

230:                                              ; preds = %225
  %231 = load i32, ptr %15, align 4, !tbaa !5
  %232 = sub nsw i32 %231, 1
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [19 x [19 x [524289 x i32]]], ptr @_ZZ5solvevE3coe, i64 0, i64 %233
  %235 = load i32, ptr %16, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [19 x [524289 x i32]], ptr %234, i64 0, i64 %236
  %238 = load i32, ptr %17, align 4, !tbaa !5
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [524289 x i32], ptr %237, i64 0, i64 %239
  %241 = load i32, ptr %240, align 4, !tbaa !5
  %242 = sext i32 %241 to i64
  %243 = load i32, ptr %15, align 4, !tbaa !5
  %244 = sub nsw i32 %243, 1
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [19 x [19 x [524289 x i32]]], ptr @_ZZ5solvevE3coe, i64 0, i64 %245
  %247 = load i32, ptr %16, align 4, !tbaa !5
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [19 x [524289 x i32]], ptr %246, i64 0, i64 %248
  %250 = load i32, ptr %17, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [524289 x i32], ptr %249, i64 0, i64 %251
  %253 = load i32, ptr %252, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = mul nsw i64 %242, %254
  %256 = srem i64 %255, 998244353
  %257 = load i32, ptr %16, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [19 x [524289 x i32]], ptr getelementptr inbounds ([19 x [19 x [524289 x i32]]], ptr @_ZZ5solvevE3coe, i64 0, i64 1), i64 0, i64 %258
  %260 = load i32, ptr %17, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [524289 x i32], ptr %259, i64 0, i64 %261
  %263 = load i32, ptr %262, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = mul nsw i64 %256, %264
  %266 = srem i64 %265, 998244353
  %267 = trunc i64 %266 to i32
  %268 = load i32, ptr %15, align 4, !tbaa !5
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [19 x [19 x [524289 x i32]]], ptr @_ZZ5solvevE3coe, i64 0, i64 %269
  %271 = load i32, ptr %16, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [19 x [524289 x i32]], ptr %270, i64 0, i64 %272
  %274 = load i32, ptr %17, align 4, !tbaa !5
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [524289 x i32], ptr %273, i64 0, i64 %275
  store i32 %267, ptr %276, align 4, !tbaa !5
  br label %277

277:                                              ; preds = %230
  %278 = load i32, ptr %17, align 4, !tbaa !5
  %279 = add nsw i32 %278, 1
  store i32 %279, ptr %17, align 4, !tbaa !5
  br label %225, !llvm.loop !23

280:                                              ; preds = %229
  br label %281

281:                                              ; preds = %280
  %282 = load i32, ptr %16, align 4, !tbaa !5
  %283 = add nsw i32 %282, 1
  store i32 %283, ptr %16, align 4, !tbaa !5
  br label %219, !llvm.loop !24

284:                                              ; preds = %223
  br label %285

285:                                              ; preds = %284
  %286 = load i32, ptr %15, align 4, !tbaa !5
  %287 = add nsw i32 %286, 1
  store i32 %287, ptr %15, align 4, !tbaa !5
  br label %213, !llvm.loop !25

288:                                              ; preds = %217
  %289 = load i32, ptr %1, align 4, !tbaa !5
  %290 = sext i32 %289 to i64
  %291 = mul i64 %290, 4
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ5solvevE1a, i8 0, i64 %291, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !5
  br label %292

292:                                              ; preds = %581, %288
  %293 = load i32, ptr %18, align 4, !tbaa !5
  %294 = load i32, ptr %9, align 4, !tbaa !5
  %295 = icmp slt i32 %293, %294
  br i1 %295, label %297, label %296

296:                                              ; preds = %292
  store i32 29, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %585

297:                                              ; preds = %292
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !5
  %298 = load i32, ptr %18, align 4, !tbaa !5
  %299 = icmp sgt i32 %298, 0
  br i1 %299, label %300, label %307

300:                                              ; preds = %297
  %301 = load i32, ptr %1, align 4, !tbaa !5
  %302 = sub nsw i32 %301, 1
  %303 = sext i32 %302 to i64
  %304 = getelementptr inbounds [19 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %303
  %305 = load i32, ptr %304, align 4, !tbaa !5
  %306 = add nsw i32 %305, 1
  store i32 %306, ptr %304, align 4, !tbaa !5
  br label %307

307:                                              ; preds = %300, %297
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %308 = load i32, ptr %1, align 4, !tbaa !5
  %309 = sub nsw i32 %308, 1
  store i32 %309, ptr %22, align 4, !tbaa !5
  br label %310

310:                                              ; preds = %373, %307
  %311 = load i32, ptr %22, align 4, !tbaa !5
  %312 = icmp sge i32 %311, 0
  br i1 %312, label %314, label %313

313:                                              ; preds = %310
  store i32 32, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %376

314:                                              ; preds = %310
  %315 = load i32, ptr %22, align 4, !tbaa !5
  %316 = icmp ne i32 %315, 0
  br i1 %316, label %317, label %338

317:                                              ; preds = %314
  %318 = load i32, ptr %22, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [19 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %319
  %321 = load i32, ptr %320, align 4, !tbaa !5
  %322 = load i32, ptr %22, align 4, !tbaa !5
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %323
  %325 = getelementptr inbounds %struct.Node, ptr %324, i32 0, i32 1
  %326 = load i32, ptr %325, align 4, !tbaa !9
  %327 = icmp eq i32 %321, %326
  br i1 %327, label %328, label %338

328:                                              ; preds = %317
  %329 = load i32, ptr %22, align 4, !tbaa !5
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds [19 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %330
  store i32 0, ptr %331, align 4, !tbaa !5
  %332 = load i32, ptr %22, align 4, !tbaa !5
  %333 = sub nsw i32 %332, 1
  %334 = sext i32 %333 to i64
  %335 = getelementptr inbounds [19 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %334
  %336 = load i32, ptr %335, align 4, !tbaa !5
  %337 = add nsw i32 %336, 1
  store i32 %337, ptr %335, align 4, !tbaa !5
  br label %338

338:                                              ; preds = %328, %317, %314
  %339 = load i32, ptr %22, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %340
  %342 = getelementptr inbounds %struct.Node, ptr %341, i32 0, i32 2
  %343 = load i32, ptr %342, align 4, !tbaa !12
  %344 = load i32, ptr %22, align 4, !tbaa !5
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds [19 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %345
  %347 = load i32, ptr %346, align 4, !tbaa !5
  %348 = mul nsw i32 %343, %347
  %349 = load i32, ptr %19, align 4, !tbaa !5
  %350 = add nsw i32 %349, %348
  store i32 %350, ptr %19, align 4, !tbaa !5
  %351 = load i32, ptr %22, align 4, !tbaa !5
  %352 = sext i32 %351 to i64
  %353 = getelementptr inbounds [19 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %352
  %354 = load i32, ptr %353, align 4, !tbaa !5
  %355 = icmp sgt i32 %354, 0
  %356 = zext i1 %355 to i32
  %357 = load i32, ptr %20, align 4, !tbaa !5
  %358 = add nsw i32 %357, %356
  store i32 %358, ptr %20, align 4, !tbaa !5
  %359 = load i32, ptr %22, align 4, !tbaa !5
  %360 = sext i32 %359 to i64
  %361 = getelementptr inbounds [19 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %360
  %362 = load i32, ptr %361, align 4, !tbaa !5
  %363 = add nsw i32 %362, 1
  %364 = load i32, ptr %22, align 4, !tbaa !5
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %365
  %367 = getelementptr inbounds %struct.Node, ptr %366, i32 0, i32 1
  %368 = load i32, ptr %367, align 4, !tbaa !9
  %369 = icmp eq i32 %363, %368
  %370 = zext i1 %369 to i32
  %371 = load i32, ptr %21, align 4, !tbaa !5
  %372 = add nsw i32 %371, %370
  store i32 %372, ptr %21, align 4, !tbaa !5
  br label %373

373:                                              ; preds = %338
  %374 = load i32, ptr %22, align 4, !tbaa !5
  %375 = add nsw i32 %374, -1
  store i32 %375, ptr %22, align 4, !tbaa !5
  br label %310, !llvm.loop !26

376:                                              ; preds = %313
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %377 = load i32, ptr %18, align 4, !tbaa !5
  %378 = load i32, ptr %7, align 4, !tbaa !5
  %379 = mul nsw i32 %377, %378
  %380 = sext i32 %379 to i64
  %381 = getelementptr inbounds i32, ptr @_ZZ5solvevE1f, i64 %380
  store ptr %381, ptr %24, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr %28) #6
  %382 = getelementptr inbounds %class.anon, ptr %28, i32 0, i32 0
  store ptr %1, ptr %382, align 8, !tbaa !18
  %383 = getelementptr inbounds %class.anon, ptr %28, i32 0, i32 1
  store ptr %9, ptr %383, align 8, !tbaa !18
  %384 = getelementptr inbounds %class.anon, ptr %28, i32 0, i32 2
  store ptr %20, ptr %384, align 8, !tbaa !18
  %385 = getelementptr inbounds %class.anon, ptr %28, i32 0, i32 3
  store ptr %25, ptr %385, align 8, !tbaa !18
  %386 = getelementptr inbounds %class.anon, ptr %28, i32 0, i32 4
  store ptr %7, ptr %386, align 8, !tbaa !18
  %387 = getelementptr inbounds %class.anon, ptr %28, i32 0, i32 5
  store ptr %26, ptr %387, align 8, !tbaa !18
  %388 = getelementptr inbounds %class.anon, ptr %28, i32 0, i32 6
  store ptr %23, ptr %388, align 8, !tbaa !18
  %389 = getelementptr inbounds %class.anon, ptr %28, i32 0, i32 7
  store ptr %24, ptr %389, align 8, !tbaa !18
  %390 = getelementptr inbounds %class.anon, ptr %28, i32 0, i32 8
  store ptr %27, ptr %390, align 8, !tbaa !18
  call void @"_ZNSt8functionIFviiiiiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull align 8 dereferenceable(72) %28)
  call void @llvm.lifetime.end.p0(i64 72, ptr %28) #6
  %391 = load i32, ptr %20, align 4, !tbaa !5
  %392 = icmp sgt i32 %391, 0
  br i1 %392, label %393, label %467

393:                                              ; preds = %376
  %394 = load ptr, ptr %24, align 8, !tbaa !18
  %395 = load i32, ptr %7, align 4, !tbaa !5
  %396 = sext i32 %395 to i64
  %397 = mul i64 %396, 8
  call void @llvm.memset.p0.i64(ptr align 4 %394, i8 0, i64 %397, i1 false)
  invoke void @_ZNKSt8functionIFviiiiiEEclEiiiii(ptr noundef nonnull align 8 dereferenceable(32) %27, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %398 unwind label %426

398:                                              ; preds = %393
  %399 = load i32, ptr %7, align 4, !tbaa !5
  %400 = load ptr, ptr %24, align 8, !tbaa !18
  invoke void @_Z3NTTiPii(i32 noundef %399, ptr noundef %400, i32 noundef -1)
          to label %401 unwind label %426

401:                                              ; preds = %398
  %402 = load ptr, ptr %24, align 8, !tbaa !18
  %403 = load i32, ptr %8, align 4, !tbaa !5
  %404 = sext i32 %403 to i64
  %405 = getelementptr inbounds i32, ptr %402, i64 %404
  %406 = load i32, ptr %7, align 4, !tbaa !5
  %407 = load i32, ptr %8, align 4, !tbaa !5
  %408 = sub nsw i32 %406, %407
  %409 = sext i32 %408 to i64
  %410 = mul i64 %409, 4
  call void @llvm.memset.p0.i64(ptr align 4 %405, i8 0, i64 %410, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %411 = load i32, ptr %8, align 4, !tbaa !5
  %412 = sub nsw i32 %411, 1
  store i32 %412, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  %413 = load i32, ptr %19, align 4, !tbaa !5
  %414 = load i32, ptr %1, align 4, !tbaa !5
  %415 = sext i32 %414 to i64
  %416 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %415
  %417 = getelementptr inbounds %struct.Node, ptr %416, i32 0, i32 2
  %418 = load i32, ptr %417, align 4, !tbaa !12
  %419 = load i32, ptr %31, align 4, !tbaa !5
  %420 = mul nsw i32 %418, %419
  %421 = add nsw i32 %413, %420
  store i32 %421, ptr %32, align 4, !tbaa !5
  br label %422

422:                                              ; preds = %444, %401
  %423 = load i32, ptr %31, align 4, !tbaa !5
  %424 = icmp sgt i32 %423, 0
  br i1 %424, label %430, label %425

425:                                              ; preds = %422
  store i32 35, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %454

426:                                              ; preds = %398, %393
  %427 = landingpad { ptr, i32 }
          cleanup
  %428 = extractvalue { ptr, i32 } %427, 0
  store ptr %428, ptr %29, align 8
  %429 = extractvalue { ptr, i32 } %427, 1
  store i32 %429, ptr %30, align 4
  br label %584

430:                                              ; preds = %422
  %431 = load ptr, ptr %24, align 8, !tbaa !18
  %432 = load i32, ptr %31, align 4, !tbaa !5
  %433 = sub nsw i32 %432, 1
  %434 = sext i32 %433 to i64
  %435 = getelementptr inbounds i32, ptr %431, i64 %434
  %436 = load i32, ptr %435, align 4, !tbaa !5
  %437 = load ptr, ptr %24, align 8, !tbaa !18
  %438 = load i32, ptr %31, align 4, !tbaa !5
  %439 = sext i32 %438 to i64
  %440 = getelementptr inbounds i32, ptr %437, i64 %439
  store i32 %436, ptr %440, align 4, !tbaa !5
  %441 = load i32, ptr %32, align 4, !tbaa !5
  %442 = sext i32 %441 to i64
  %443 = getelementptr inbounds [1048577 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %442
  store i32 %436, ptr %443, align 4, !tbaa !5
  br label %444

444:                                              ; preds = %430
  %445 = load i32, ptr %31, align 4, !tbaa !5
  %446 = add nsw i32 %445, -1
  store i32 %446, ptr %31, align 4, !tbaa !5
  %447 = load i32, ptr %1, align 4, !tbaa !5
  %448 = sext i32 %447 to i64
  %449 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %448
  %450 = getelementptr inbounds %struct.Node, ptr %449, i32 0, i32 2
  %451 = load i32, ptr %450, align 4, !tbaa !12
  %452 = load i32, ptr %32, align 4, !tbaa !5
  %453 = sub nsw i32 %452, %451
  store i32 %453, ptr %32, align 4, !tbaa !5
  br label %422, !llvm.loop !27

454:                                              ; preds = %425
  %455 = load i32, ptr %20, align 4, !tbaa !5
  %456 = icmp sgt i32 %455, 1
  br i1 %456, label %457, label %459

457:                                              ; preds = %454
  %458 = load i32, ptr %23, align 4, !tbaa !5
  br label %460

459:                                              ; preds = %454
  br label %460

460:                                              ; preds = %459, %457
  %461 = phi i32 [ %458, %457 ], [ 1, %459 ]
  %462 = load ptr, ptr %24, align 8, !tbaa !18
  %463 = getelementptr inbounds i32, ptr %462, i64 0
  store i32 %461, ptr %463, align 4, !tbaa !5
  %464 = load i32, ptr %19, align 4, !tbaa !5
  %465 = sext i32 %464 to i64
  %466 = getelementptr inbounds [1048577 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %465
  store i32 %461, ptr %466, align 4, !tbaa !5
  br label %511

467:                                              ; preds = %376
  %468 = load ptr, ptr %24, align 8, !tbaa !18
  %469 = load i32, ptr %8, align 4, !tbaa !5
  %470 = sext i32 %469 to i64
  %471 = getelementptr inbounds i32, ptr %468, i64 %470
  %472 = load i32, ptr %7, align 4, !tbaa !5
  %473 = load i32, ptr %8, align 4, !tbaa !5
  %474 = sub nsw i32 %472, %473
  %475 = sext i32 %474 to i64
  %476 = mul i64 %475, 4
  call void @llvm.memset.p0.i64(ptr align 4 %471, i8 0, i64 %476, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  %477 = load i32, ptr %8, align 4, !tbaa !5
  %478 = sub nsw i32 %477, 1
  store i32 %478, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  %479 = load i32, ptr %19, align 4, !tbaa !5
  %480 = load i32, ptr %1, align 4, !tbaa !5
  %481 = sext i32 %480 to i64
  %482 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %481
  %483 = getelementptr inbounds %struct.Node, ptr %482, i32 0, i32 2
  %484 = load i32, ptr %483, align 4, !tbaa !12
  %485 = load i32, ptr %33, align 4, !tbaa !5
  %486 = mul nsw i32 %484, %485
  %487 = add nsw i32 %479, %486
  store i32 %487, ptr %34, align 4, !tbaa !5
  br label %488

488:                                              ; preds = %500, %467
  %489 = load i32, ptr %33, align 4, !tbaa !5
  %490 = icmp sge i32 %489, 0
  br i1 %490, label %492, label %491

491:                                              ; preds = %488
  store i32 38, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  br label %510

492:                                              ; preds = %488
  %493 = load ptr, ptr %24, align 8, !tbaa !18
  %494 = load i32, ptr %33, align 4, !tbaa !5
  %495 = sext i32 %494 to i64
  %496 = getelementptr inbounds i32, ptr %493, i64 %495
  store i32 1, ptr %496, align 4, !tbaa !5
  %497 = load i32, ptr %34, align 4, !tbaa !5
  %498 = sext i32 %497 to i64
  %499 = getelementptr inbounds [1048577 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %498
  store i32 1, ptr %499, align 4, !tbaa !5
  br label %500

500:                                              ; preds = %492
  %501 = load i32, ptr %33, align 4, !tbaa !5
  %502 = add nsw i32 %501, -1
  store i32 %502, ptr %33, align 4, !tbaa !5
  %503 = load i32, ptr %1, align 4, !tbaa !5
  %504 = sext i32 %503 to i64
  %505 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %504
  %506 = getelementptr inbounds %struct.Node, ptr %505, i32 0, i32 2
  %507 = load i32, ptr %506, align 4, !tbaa !12
  %508 = load i32, ptr %34, align 4, !tbaa !5
  %509 = sub nsw i32 %508, %507
  store i32 %509, ptr %34, align 4, !tbaa !5
  br label %488, !llvm.loop !28

510:                                              ; preds = %491
  br label %511

511:                                              ; preds = %510, %460
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  store i32 1, ptr %35, align 4, !tbaa !5
  br label %512

512:                                              ; preds = %573, %511
  %513 = load i32, ptr %35, align 4, !tbaa !5
  %514 = load i32, ptr %1, align 4, !tbaa !5
  %515 = icmp sle i32 %513, %514
  br i1 %515, label %517, label %516

516:                                              ; preds = %512
  store i32 41, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  br label %580

517:                                              ; preds = %512
  %518 = load i32, ptr %35, align 4, !tbaa !5
  %519 = sext i32 %518 to i64
  %520 = getelementptr inbounds [19 x [2097155 x i32]], ptr @_ZZ5solvevE1f, i64 0, i64 %519
  %521 = getelementptr inbounds [2097155 x i32], ptr %520, i64 0, i64 0
  %522 = load i32, ptr %18, align 4, !tbaa !5
  %523 = load i32, ptr %7, align 4, !tbaa !5
  %524 = mul nsw i32 %522, %523
  %525 = sext i32 %524 to i64
  %526 = getelementptr inbounds i32, ptr %521, i64 %525
  store ptr %526, ptr %25, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %36) #6
  store i32 0, ptr %36, align 4, !tbaa !5
  br label %527

527:                                              ; preds = %557, %517
  %528 = load i32, ptr %36, align 4, !tbaa !5
  %529 = load i32, ptr %8, align 4, !tbaa !5
  %530 = icmp slt i32 %528, %529
  br i1 %530, label %532, label %531

531:                                              ; preds = %527
  store i32 44, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %36) #6
  br label %560

532:                                              ; preds = %527
  %533 = load ptr, ptr %24, align 8, !tbaa !18
  %534 = load i32, ptr %36, align 4, !tbaa !5
  %535 = sext i32 %534 to i64
  %536 = getelementptr inbounds i32, ptr %533, i64 %535
  %537 = load i32, ptr %536, align 4, !tbaa !5
  %538 = sext i32 %537 to i64
  %539 = load i32, ptr %35, align 4, !tbaa !5
  %540 = sext i32 %539 to i64
  %541 = getelementptr inbounds [19 x [19 x [524289 x i32]]], ptr @_ZZ5solvevE3coe, i64 0, i64 %540
  %542 = load i32, ptr %1, align 4, !tbaa !5
  %543 = sext i32 %542 to i64
  %544 = getelementptr inbounds [19 x [524289 x i32]], ptr %541, i64 0, i64 %543
  %545 = load i32, ptr %36, align 4, !tbaa !5
  %546 = sext i32 %545 to i64
  %547 = getelementptr inbounds [524289 x i32], ptr %544, i64 0, i64 %546
  %548 = load i32, ptr %547, align 4, !tbaa !5
  %549 = sext i32 %548 to i64
  %550 = mul nsw i64 %538, %549
  %551 = srem i64 %550, 998244353
  %552 = trunc i64 %551 to i32
  %553 = load ptr, ptr %25, align 8, !tbaa !18
  %554 = load i32, ptr %36, align 4, !tbaa !5
  %555 = sext i32 %554 to i64
  %556 = getelementptr inbounds i32, ptr %553, i64 %555
  store i32 %552, ptr %556, align 4, !tbaa !5
  br label %557

557:                                              ; preds = %532
  %558 = load i32, ptr %36, align 4, !tbaa !5
  %559 = add nsw i32 %558, 1
  store i32 %559, ptr %36, align 4, !tbaa !5
  br label %527, !llvm.loop !29

560:                                              ; preds = %531
  %561 = load ptr, ptr %25, align 8, !tbaa !18
  %562 = load i32, ptr %8, align 4, !tbaa !5
  %563 = sext i32 %562 to i64
  %564 = getelementptr inbounds i32, ptr %561, i64 %563
  %565 = load i32, ptr %7, align 4, !tbaa !5
  %566 = load i32, ptr %8, align 4, !tbaa !5
  %567 = sub nsw i32 %565, %566
  %568 = sext i32 %567 to i64
  %569 = mul i64 %568, 4
  call void @llvm.memset.p0.i64(ptr align 4 %564, i8 0, i64 %569, i1 false)
  %570 = load i32, ptr %7, align 4, !tbaa !5
  %571 = load ptr, ptr %25, align 8, !tbaa !18
  invoke void @_Z3NTTiPii(i32 noundef %570, ptr noundef %571, i32 noundef 1)
          to label %572 unwind label %576

572:                                              ; preds = %560
  br label %573

573:                                              ; preds = %572
  %574 = load i32, ptr %35, align 4, !tbaa !5
  %575 = add nsw i32 %574, 1
  store i32 %575, ptr %35, align 4, !tbaa !5
  br label %512, !llvm.loop !30

576:                                              ; preds = %560
  %577 = landingpad { ptr, i32 }
          cleanup
  %578 = extractvalue { ptr, i32 } %577, 0
  store ptr %578, ptr %29, align 8
  %579 = extractvalue { ptr, i32 } %577, 1
  store i32 %579, ptr %30, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  br label %584

580:                                              ; preds = %516
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %581

581:                                              ; preds = %580
  %582 = load i32, ptr %18, align 4, !tbaa !5
  %583 = add nsw i32 %582, 1
  store i32 %583, ptr %18, align 4, !tbaa !5
  br label %292, !llvm.loop !31

584:                                              ; preds = %576, %426
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  br label %619

585:                                              ; preds = %296
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #6
  store i32 0, ptr %37, align 4, !tbaa !5
  br label %586

586:                                              ; preds = %612, %585
  %587 = load i32, ptr %37, align 4, !tbaa !5
  %588 = load i32, ptr %3, align 4, !tbaa !5
  %589 = icmp slt i32 %587, %588
  br i1 %589, label %591, label %590

590:                                              ; preds = %586
  store i32 47, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #6
  br label %615

591:                                              ; preds = %586
  %592 = load i32, ptr %37, align 4, !tbaa !5
  %593 = sext i32 %592 to i64
  %594 = getelementptr inbounds [1048577 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %593
  %595 = load i32, ptr %594, align 4, !tbaa !5
  %596 = icmp sge i32 %595, 0
  br i1 %596, label %597, label %598

597:                                              ; preds = %591
  br label %600

598:                                              ; preds = %591
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.3, i32 noundef 251, ptr noundef @__PRETTY_FUNCTION__._Z5solvev) #7
  unreachable

599:                                              ; No predecessors!
  br label %600

600:                                              ; preds = %599, %597
  %601 = load i32, ptr %37, align 4, !tbaa !5
  %602 = sext i32 %601 to i64
  %603 = getelementptr inbounds [1048577 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %602
  %604 = load i32, ptr %603, align 4, !tbaa !5
  call void @_ZN10FastOutput5writeEi(ptr noundef nonnull align 8 dereferenceable(24) @out, i32 noundef %604)
  %605 = load i32, ptr %37, align 4, !tbaa !5
  %606 = load i32, ptr %3, align 4, !tbaa !5
  %607 = sub nsw i32 %606, 1
  %608 = icmp eq i32 %605, %607
  %609 = zext i1 %608 to i64
  %610 = getelementptr inbounds [3 x i8], ptr @.str.4, i64 0, i64 %609
  %611 = load i8, ptr %610, align 1, !tbaa !15
  call void @_ZN10FastOutput9writeCharEc(ptr noundef nonnull align 8 dereferenceable(24) @out, i8 noundef signext %611)
  br label %612

612:                                              ; preds = %600
  %613 = load i32, ptr %37, align 4, !tbaa !5
  %614 = add nsw i32 %613, 1
  store i32 %614, ptr %37, align 4, !tbaa !5
  br label %586, !llvm.loop !32

615:                                              ; preds = %590
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  store i32 0, ptr %6, align 4
  br label %616

616:                                              ; preds = %615, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  %617 = load i32, ptr %6, align 4
  switch i32 %617, label %624 [
    i32 0, label %618
    i32 1, label %618
  ]

618:                                              ; preds = %616, %616
  ret void

619:                                              ; preds = %584
  %620 = load ptr, ptr %29, align 8
  %621 = load i32, ptr %30, align 4
  %622 = insertvalue { ptr, i32 } poison, ptr %620, 0
  %623 = insertvalue { ptr, i32 } %622, i32 %621, 1
  resume { ptr, i32 } %623

624:                                              ; preds = %616
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP4NodeEvT_S2_(ptr noundef, ptr noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFviiiiiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNKSt8functionIFviiiiiEEclEiiiii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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 = { 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!10, !6, i64 4}
!10 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 0}
!12 = !{!10, !6, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = !{!19, !19, i64 0}
!19 = !{!"any pointer", !7, i64 0}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}
!28 = distinct !{!28, !14}
!29 = distinct !{!29, !14}
!30 = distinct !{!30, !14}
!31 = distinct !{!31, !14}
!32 = distinct !{!32, !14}


; 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.FastInput = type <{ ptr, ptr, ptr, i8, [7 x i8] }>
%struct.FastOutput = type { ptr, ptr, ptr }
%struct.Node = type { i32, i32, i32 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@in = external dso_local global %struct.FastInput, align 8
@out = external dso_local global %struct.FastOutput, align 8
@.str.3 = external hidden unnamed_addr constant [76 x i8], align 1
@_ZZ5solvevE3dim = external hidden global [19 x %struct.Node], align 16
@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@__PRETTY_FUNCTION__._Z5solvev = external hidden unnamed_addr constant [13 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [28 x i8], align 1
@_ZZ5solvevE1a = external hidden local_unnamed_addr global [19 x i32], align 16
@_ZZ5solvevE3coe = external hidden local_unnamed_addr global [19 x [19 x [524289 x i32]]], align 16
@_ZZ5solvevE1f = external hidden global [19 x [2097155 x i32]], align 16
@_ZZ5solvevE1g = external hidden local_unnamed_addr global [1048577 x i32], align 16
@.str.7 = external hidden unnamed_addr constant [10 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3NTTiPii(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::function", align 8
  %11 = alloca %class.anon, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @_ZN9FastInput4readERi(ptr noundef nonnull align 8 dereferenceable(25) @in, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %12 = load i32, ptr %2, align 4, !tbaa !5
  %.not155 = icmp slt i32 %12, 1
  br i1 %.not155, label %.lr.ph223, label %.lr.ph

._crit_edge:                                      ; preds = %29
  %13 = icmp slt i32 %30, 2
  br i1 %13, label %.preheader, label %39

.preheader:                                       ; preds = %._crit_edge
  %14 = icmp sgt i32 %.1, 0
  br i1 %14, label %.lr.ph223, label %.loopexit

.lr.ph223:                                        ; preds = %0, %.preheader
  %.0129.lcssa286288 = phi i32 [ %.1, %.preheader ], [ 1, %0 ]
  %15 = add nsw i32 %.0129.lcssa286288, -1
  br label %33

.lr.ph:                                           ; preds = %0, %29
  %16 = phi i32 [ %30, %29 ], [ 0, %0 ]
  %.0129157 = phi i32 [ %.1, %29 ], [ 1, %0 ]
  %.0132156 = phi i32 [ %31, %29 ], [ 1, %0 ]
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %17, i32 1
  call void @_ZN9FastInput4readERi(ptr noundef nonnull align 8 dereferenceable(25) @in, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %20
  %22 = getelementptr inbounds i8, ptr %21, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !9
  %24 = icmp eq i32 %23, 1
  br i1 %24, label %29, label %25

25:                                               ; preds = %.lr.ph
  store i32 %.0132156, ptr %21, align 4, !tbaa !11
  %26 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %20, i32 2
  store i32 %.0129157, ptr %26, align 4, !tbaa !12
  %27 = add nsw i32 %19, 1
  store i32 %27, ptr %1, align 4, !tbaa !5
  %28 = mul nsw i32 %23, %.0129157
  br label %29

29:                                               ; preds = %.lr.ph, %25
  %30 = phi i32 [ %19, %.lr.ph ], [ %27, %25 ]
  %.1 = phi i32 [ %.0129157, %.lr.ph ], [ %28, %25 ]
  %31 = add nuw nsw i32 %.0132156, 1
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %.not.not = icmp slt i32 %.0132156, %32
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !13

33:                                               ; preds = %.lr.ph223, %33
  %.0133222 = phi i32 [ 0, %.lr.ph223 ], [ %38, %33 ]
  call void @_ZN10FastOutput9writeCharEc(ptr noundef nonnull align 8 dereferenceable(24) @out, i8 noundef signext 49)
  %34 = icmp eq i32 %.0133222, %15
  %35 = zext i1 %34 to i64
  %36 = getelementptr inbounds [3 x i8], ptr @.str.4, i64 0, i64 %35
  %37 = load i8, ptr %36, align 1, !tbaa !15
  call void @_ZN10FastOutput9writeCharEc(ptr noundef nonnull align 8 dereferenceable(24) @out, i8 noundef signext %37)
  %38 = add nuw nsw i32 %.0133222, 1
  %exitcond277.not = icmp eq i32 %38, %.0129.lcssa286288
  br i1 %exitcond277.not, label %.loopexit, label %33, !llvm.loop !16

39:                                               ; preds = %._crit_edge
  %40 = zext nneg i32 %30 to i64
  %41 = getelementptr inbounds %struct.Node, ptr @_ZZ5solvevE3dim, i64 %40
  call void @_ZSt4sortIP4NodeEvT_S2_(ptr noundef nonnull @_ZZ5solvevE3dim, ptr noundef nonnull %41)
  %42 = load i32, ptr %1, align 4, !tbaa !5
  %43 = add nsw i32 %42, -1
  store i32 %43, ptr %1, align 4, !tbaa !5
  %44 = icmp slt i32 %42, 20
  br i1 %44, label %46, label %45

45:                                               ; preds = %39
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, i32 noundef 160, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #8
  unreachable

46:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 1, ptr %3, align 4, !tbaa !5
  %47 = sext i32 %43 to i64
  %48 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %47, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  %50 = sdiv i32 %.1, %49
  store i32 %50, ptr %4, align 4, !tbaa !5
  %51 = shl nsw i32 %49, 1
  %52 = add nsw i32 %51, -1
  %invariant.smax = call i32 @llvm.smax.i32(i32 %52, i32 %49)
  %53 = icmp sgt i32 %invariant.smax, 1
  br i1 %53, label %.lr.ph159, label %57

.lr.ph159:                                        ; preds = %46, %.lr.ph159
  %54 = phi i32 [ %55, %.lr.ph159 ], [ 1, %46 ]
  %55 = shl i32 %54, 1
  %56 = icmp slt i32 %55, %invariant.smax
  br i1 %56, label %.lr.ph159, label %._crit_edge160, !llvm.loop !17

._crit_edge160:                                   ; preds = %.lr.ph159
  store i32 %55, ptr %3, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %._crit_edge160, %46
  %.lcssa154 = phi i32 [ %55, %._crit_edge160 ], [ 1, %46 ]
  %58 = mul nsw i32 %.lcssa154, %50
  %59 = icmp slt i32 %58, 2097155
  br i1 %59, label %61, label %60

60:                                               ; preds = %57
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.3, i32 noundef 163, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #8
  unreachable

61:                                               ; preds = %57
  call void @_Z7initNTTi(i32 noundef %.lcssa154)
  %62 = load i32, ptr %1, align 4, !tbaa !5
  %.not139170 = icmp slt i32 %62, 0
  br i1 %.not139170, label %._crit_edge184, label %.preheader153.lr.ph

.preheader153.lr.ph:                              ; preds = %61
  %63 = icmp sgt i32 %49, 0
  br i1 %63, label %.preheader153.us.preheader, label %.preheader151

.preheader153.us.preheader:                       ; preds = %.preheader153.lr.ph
  %64 = add nuw i32 %62, 1
  %wide.trip.count238 = zext i32 %64 to i64
  %wide.trip.count = zext nneg i32 %49 to i64
  %wide.trip.count233 = zext nneg i32 %49 to i64
  %min.iters.check = icmp ult i32 %49, 4
  %n.vec = and i64 %wide.trip.count, 2147483644
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br label %.preheader153.us

.preheader153.us:                                 ; preds = %.preheader153.us.preheader, %._crit_edge169.us
  %indvars.iv235 = phi i64 [ 0, %.preheader153.us.preheader ], [ %indvars.iv.next236, %._crit_edge169.us ]
  %65 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %indvars.iv235
  %66 = load i32, ptr %65, align 4, !tbaa !11
  %67 = icmp sgt i32 %66, 0
  br i1 %67, label %.lr.ph166.us.us, label %.loopexit152.us.preheader

.loopexit152.us.preheader:                        ; preds = %.preheader153.us
  br i1 %min.iters.check, label %.loopexit152.us.preheader302, label %vector.body

vector.body:                                      ; preds = %.loopexit152.us.preheader, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.loopexit152.us.preheader ]
  %68 = getelementptr inbounds [19 x [524289 x i32]], ptr @_ZZ5solvevE3coe, i64 0, i64 %indvars.iv235, i64 %index
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %68, align 4, !tbaa !5
  %69 = getelementptr inbounds [19 x [524289 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3coe, i64 39845964), i64 0, i64 %indvars.iv235, i64 %index
  store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %69, align 4, !tbaa !5
  %index.next = add nuw i64 %index, 4
  %70 = icmp eq i64 %index.next, %n.vec
  br i1 %70, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge169.us, label %.loopexit152.us.preheader302

.loopexit152.us.preheader302:                     ; preds = %middle.block, %.loopexit152.us.preheader
  %indvars.iv.ph = phi i64 [ 0, %.loopexit152.us.preheader ], [ %n.vec, %middle.block ]
  br label %.loopexit152.us

.loopexit152.us:                                  ; preds = %.loopexit152.us.preheader302, %.loopexit152.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %.loopexit152.us ], [ %indvars.iv.ph, %.loopexit152.us.preheader302 ]
  %71 = getelementptr inbounds [19 x [524289 x i32]], ptr @_ZZ5solvevE3coe, i64 0, i64 %indvars.iv235, i64 %indvars.iv
  store i32 1, ptr %71, align 4, !tbaa !5
  %72 = getelementptr inbounds [19 x [524289 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3coe, i64 39845964), i64 0, i64 %indvars.iv235, i64 %indvars.iv
  store i32 1, ptr %72, 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_edge169.us, label %.loopexit152.us, !llvm.loop !21

._crit_edge169.us:                                ; preds = %.loopexit152.us, %..loopexit152_crit_edge.us.us, %middle.block
  %indvars.iv.next236 = add nuw nsw i64 %indvars.iv235, 1
  %exitcond239.not = icmp eq i64 %indvars.iv.next236, %wide.trip.count238
  br i1 %exitcond239.not, label %.preheader151, label %.preheader153.us, !llvm.loop !22

.lr.ph166.us.us:                                  ; preds = %.preheader153.us, %..loopexit152_crit_edge.us.us
  %indvars.iv230 = phi i64 [ %indvars.iv.next231, %..loopexit152_crit_edge.us.us ], [ 0, %.preheader153.us ]
  %73 = getelementptr inbounds [19 x [524289 x i32]], ptr @_ZZ5solvevE3coe, i64 0, i64 %indvars.iv235, i64 %indvars.iv230
  store i32 1, ptr %73, align 4, !tbaa !5
  %74 = getelementptr inbounds [19 x [524289 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3coe, i64 39845964), i64 0, i64 %indvars.iv235, i64 %indvars.iv230
  store i32 1, ptr %74, align 4, !tbaa !5
  %indvars.iv.next231 = add nuw nsw i64 %indvars.iv230, 1
  br label %75

75:                                               ; preds = %84, %.lr.ph166.us.us
  %76 = phi i32 [ 1, %.lr.ph166.us.us ], [ %85, %84 ]
  %.0127164.us.us = phi i32 [ %66, %.lr.ph166.us.us ], [ %86, %84 ]
  %.0128163.us.us.in = phi i64 [ %indvars.iv.next231, %.lr.ph166.us.us ], [ %88, %84 ]
  %77 = and i32 %.0127164.us.us, 1
  %.not146.us.us = icmp eq i32 %77, 0
  br i1 %.not146.us.us, label %._crit_edge282, label %78

._crit_edge282:                                   ; preds = %75
  %sext284 = shl i64 %.0128163.us.us.in, 32
  %.pre283 = ashr exact i64 %sext284, 32
  br label %84

78:                                               ; preds = %75
  %79 = sext i32 %76 to i64
  %sext = shl i64 %.0128163.us.us.in, 32
  %80 = ashr exact i64 %sext, 32
  %81 = mul nsw i64 %80, %79
  %82 = srem i64 %81, 998244353
  %83 = trunc nsw i64 %82 to i32
  store i32 %83, ptr %74, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %._crit_edge282, %78
  %.pre-phi = phi i64 [ %.pre283, %._crit_edge282 ], [ %80, %78 ]
  %85 = phi i32 [ %76, %._crit_edge282 ], [ %83, %78 ]
  %86 = lshr i32 %.0127164.us.us, 1
  %87 = mul nsw i64 %.pre-phi, %.pre-phi
  %88 = urem i64 %87, 998244353
  %.not = icmp ult i32 %.0127164.us.us, 2
  br i1 %.not, label %..loopexit152_crit_edge.us.us, label %75, !llvm.loop !23

..loopexit152_crit_edge.us.us:                    ; preds = %84
  %exitcond234.not = icmp eq i64 %indvars.iv.next231, %wide.trip.count233
  br i1 %exitcond234.not, label %._crit_edge169.us, label %.lr.ph166.us.us, !llvm.loop !24

.preheader151:                                    ; preds = %._crit_edge169.us, %.preheader153.lr.ph
  %.not140182 = icmp sgt i32 %62, 1
  %89 = icmp sgt i32 %49, 0
  %or.cond = and i1 %.not140182, %89
  br i1 %or.cond, label %.preheader150.us185.preheader, label %._crit_edge184

.preheader150.us185.preheader:                    ; preds = %.preheader151
  %90 = add nuw i32 %62, 1
  %wide.trip.count253 = zext i32 %90 to i64
  %wide.trip.count243 = zext nneg i32 %49 to i64
  br label %.preheader150.us185

.preheader150.us185:                              ; preds = %.preheader150.us185.preheader, %._crit_edge181.split.us.us
  %indvars.iv250 = phi i64 [ 2, %.preheader150.us185.preheader ], [ %indvars.iv.next251, %._crit_edge181.split.us.us ]
  %91 = add nsw i64 %indvars.iv250, -1
  br label %.preheader149.us.us

.preheader149.us.us:                              ; preds = %._crit_edge178.us.us, %.preheader150.us185
  %indvars.iv245 = phi i64 [ %indvars.iv.next246, %._crit_edge178.us.us ], [ 0, %.preheader150.us185 ]
  br label %92

92:                                               ; preds = %92, %.preheader149.us.us
  %indvars.iv240 = phi i64 [ %indvars.iv.next241, %92 ], [ 0, %.preheader149.us.us ]
  %93 = getelementptr inbounds [19 x [19 x [524289 x i32]]], ptr @_ZZ5solvevE3coe, i64 0, i64 %91, i64 %indvars.iv245, i64 %indvars.iv240
  %94 = load i32, ptr %93, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = mul nsw i64 %95, %95
  %97 = urem i64 %96, 998244353
  %98 = getelementptr inbounds [19 x [524289 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ5solvevE3coe, i64 39845964), i64 0, i64 %indvars.iv245, i64 %indvars.iv240
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = mul nsw i64 %97, %100
  %102 = srem i64 %101, 998244353
  %103 = trunc nsw i64 %102 to i32
  %104 = getelementptr inbounds [19 x [19 x [524289 x i32]]], ptr @_ZZ5solvevE3coe, i64 0, i64 %indvars.iv250, i64 %indvars.iv245, i64 %indvars.iv240
  store i32 %103, ptr %104, align 4, !tbaa !5
  %indvars.iv.next241 = add nuw nsw i64 %indvars.iv240, 1
  %exitcond244.not = icmp eq i64 %indvars.iv.next241, %wide.trip.count243
  br i1 %exitcond244.not, label %._crit_edge178.us.us, label %92, !llvm.loop !25

._crit_edge178.us.us:                             ; preds = %92
  %indvars.iv.next246 = add nuw nsw i64 %indvars.iv245, 1
  %exitcond249.not = icmp eq i64 %indvars.iv.next246, %wide.trip.count253
  br i1 %exitcond249.not, label %._crit_edge181.split.us.us, label %.preheader149.us.us, !llvm.loop !26

._crit_edge181.split.us.us:                       ; preds = %._crit_edge178.us.us
  %indvars.iv.next251 = add nuw nsw i64 %indvars.iv250, 1
  %exitcond254.not = icmp eq i64 %indvars.iv.next251, %wide.trip.count253
  br i1 %exitcond254.not, label %._crit_edge184, label %.preheader150.us185, !llvm.loop !27

._crit_edge184:                                   ; preds = %._crit_edge181.split.us.us, %61, %.preheader151
  %105 = sext i32 %62 to i64
  %106 = shl nsw i64 %105, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @_ZZ5solvevE1a, i8 0, i64 %106, i1 false)
  %107 = load i32, ptr %4, align 4, !tbaa !5
  %108 = icmp sgt i32 %107, 0
  br i1 %108, label %.lr.ph218, label %.preheader147

.lr.ph218:                                        ; preds = %._crit_edge184
  %109 = getelementptr inbounds i8, ptr %11, i64 8
  %110 = getelementptr inbounds i8, ptr %11, i64 16
  %111 = getelementptr inbounds i8, ptr %11, i64 24
  %112 = getelementptr inbounds i8, ptr %11, i64 32
  %113 = getelementptr inbounds i8, ptr %11, i64 40
  %114 = getelementptr inbounds i8, ptr %11, i64 48
  %115 = getelementptr inbounds i8, ptr %11, i64 56
  %116 = getelementptr inbounds i8, ptr %11, i64 64
  %117 = sext i32 %49 to i64
  %118 = add i32 %49, -1
  %119 = icmp sgt i32 %49, 0
  %120 = icmp sgt i32 %49, 1
  %121 = zext i32 %118 to i64
  %wide.trip.count267 = zext i32 %49 to i64
  %122 = and i32 %49, 1
  %lcmp.mod.not = icmp eq i32 %122, 0
  %indvars.iv.next259.prol = add nsw i64 %121, -1
  %123 = icmp eq i32 %118, 0
  %xtraiter306 = and i64 %wide.trip.count267, 1
  %124 = icmp eq i32 %49, 1
  %unroll_iter = and i64 %wide.trip.count267, 2147483646
  %lcmp.mod307.not = icmp eq i64 %xtraiter306, 0
  br label %128

.preheader147:                                    ; preds = %._crit_edge215, %._crit_edge184
  %125 = icmp sgt i32 %.1, 0
  br i1 %125, label %.lr.ph220, label %._crit_edge221

.lr.ph220:                                        ; preds = %.preheader147
  %126 = add nsw i32 %.1, -1
  %127 = zext nneg i32 %126 to i64
  %wide.trip.count275 = zext nneg i32 %.1 to i64
  br label %297

128:                                              ; preds = %.lr.ph218, %._crit_edge215
  %.0123216 = phi i32 [ 0, %.lr.ph218 ], [ %246, %._crit_edge215 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store i32 0, ptr %5, align 4, !tbaa !5
  %.not141 = icmp eq i32 %.0123216, 0
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br i1 %.not141, label %135, label %129

129:                                              ; preds = %128
  %130 = add nsw i32 %.pre, -1
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [19 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %132, align 4, !tbaa !5
  br label %135

135:                                              ; preds = %129, %128
  %136 = icmp sgt i32 %.pre, 0
  br i1 %136, label %.lr.ph194.preheader, label %138

.lr.ph194.preheader:                              ; preds = %135
  %137 = zext nneg i32 %.pre to i64
  br label %.lr.ph194

._crit_edge195:                                   ; preds = %158
  store i32 %166, ptr %5, align 4, !tbaa !5
  br label %138

138:                                              ; preds = %._crit_edge195, %135
  %.0122.lcssa = phi i32 [ %163, %._crit_edge195 ], [ 0, %135 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %139 = load i32, ptr %3, align 4, !tbaa !5
  %140 = mul nsw i32 %139, %.0123216
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds i32, ptr @_ZZ5solvevE1f, i64 %141
  store ptr %142, ptr %7, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #7
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %11) #7
  store ptr %1, ptr %11, align 8, !tbaa !28
  store ptr %4, ptr %109, align 8, !tbaa !28
  store ptr %5, ptr %110, align 8, !tbaa !28
  store ptr %8, ptr %111, align 8, !tbaa !28
  store ptr %3, ptr %112, align 8, !tbaa !28
  store ptr %9, ptr %113, align 8, !tbaa !28
  store ptr %6, ptr %114, align 8, !tbaa !28
  store ptr %7, ptr %115, align 8, !tbaa !28
  store ptr %10, ptr %116, align 8, !tbaa !28
  call void @"_ZNSt8functionIFviiiiiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(72) %11)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11) #7
  %143 = load i32, ptr %5, align 4, !tbaa !5
  %144 = icmp sgt i32 %143, 0
  %145 = load ptr, ptr %7, align 8, !tbaa !28
  br i1 %144, label %168, label %208

.lr.ph194:                                        ; preds = %.lr.ph194.preheader, %158
  %indvars.iv255 = phi i64 [ %137, %.lr.ph194.preheader ], [ %indvars.iv.next256, %158 ]
  %.0122190 = phi i32 [ 0, %.lr.ph194.preheader ], [ %163, %158 ]
  %146 = phi i32 [ 0, %.lr.ph194.preheader ], [ %166, %158 ]
  %indvars.iv.next256 = add nsw i64 %indvars.iv255, -1
  %.not144 = icmp eq i64 %indvars.iv.next256, 0
  br i1 %.not144, label %.lr.ph194._crit_edge, label %147

.lr.ph194._crit_edge:                             ; preds = %.lr.ph194
  %.pre278 = load i32, ptr @_ZZ5solvevE1a, align 16, !tbaa !5
  br label %158

147:                                              ; preds = %.lr.ph194
  %148 = getelementptr inbounds [19 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %indvars.iv.next256
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %indvars.iv.next256, i32 1
  %151 = load i32, ptr %150, align 4, !tbaa !9
  %152 = icmp eq i32 %149, %151
  br i1 %152, label %153, label %158

153:                                              ; preds = %147
  store i32 0, ptr %148, align 4, !tbaa !5
  %154 = add nsw i64 %indvars.iv255, -2
  %155 = getelementptr inbounds [19 x i32], ptr @_ZZ5solvevE1a, i64 0, i64 %154
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = add nsw i32 %156, 1
  store i32 %157, ptr %155, align 4, !tbaa !5
  br label %158

158:                                              ; preds = %.lr.ph194._crit_edge, %153, %147
  %159 = phi i32 [ %.pre278, %.lr.ph194._crit_edge ], [ 0, %153 ], [ %149, %147 ]
  %160 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %indvars.iv.next256, i32 2
  %161 = load i32, ptr %160, align 4, !tbaa !12
  %162 = mul nsw i32 %159, %161
  %163 = add nsw i32 %162, %.0122190
  %164 = icmp sgt i32 %159, 0
  %165 = zext i1 %164 to i32
  %166 = add nuw nsw i32 %146, %165
  %167 = icmp ugt i64 %indvars.iv255, 1
  br i1 %167, label %.lr.ph194, label %._crit_edge195, !llvm.loop !30

168:                                              ; preds = %138
  %169 = load i32, ptr %3, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = shl nsw i64 %170, 3
  call void @llvm.memset.p0.i64(ptr align 4 %145, i8 0, i64 %171, i1 false)
  invoke void @_ZNKSt8functionIFviiiiiEEclEiiiii(ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 1, i32 noundef 1)
          to label %172 unwind label %194

172:                                              ; preds = %168
  %173 = load i32, ptr %3, align 4, !tbaa !5
  %174 = load ptr, ptr %7, align 8, !tbaa !28
  invoke void @_Z3NTTiPii(i32 noundef %173, ptr noundef %174, i32 noundef -1)
          to label %175 unwind label %194

175:                                              ; preds = %172
  %176 = load ptr, ptr %7, align 8, !tbaa !28
  %177 = getelementptr inbounds i32, ptr %176, i64 %117
  %178 = load i32, ptr %3, align 4, !tbaa !5
  %179 = sub nsw i32 %178, %49
  %180 = sext i32 %179 to i64
  %181 = shl nsw i64 %180, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %177, i8 0, i64 %181, i1 false)
  %.pre279 = load ptr, ptr %7, align 8, !tbaa !28
  br i1 %120, label %.lr.ph205, label %._crit_edge206

.lr.ph205:                                        ; preds = %175
  %182 = load i32, ptr %1, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %183, i32 2
  %185 = load i32, ptr %184, align 4, !tbaa !12
  %186 = mul nsw i32 %185, %118
  %187 = add nsw i32 %186, %.0122.lcssa
  br label %196

._crit_edge206:                                   ; preds = %196, %175
  %188 = load i32, ptr %5, align 4, !tbaa !5
  %189 = icmp sgt i32 %188, 1
  %190 = load i32, ptr %6, align 4
  %191 = select i1 %189, i32 %190, i32 1
  store i32 %191, ptr %.pre279, align 4, !tbaa !5
  %192 = sext i32 %.0122.lcssa to i64
  %193 = getelementptr inbounds [1048577 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %192
  store i32 %191, ptr %193, align 4, !tbaa !5
  %.pre280 = load i32, ptr %1, align 4, !tbaa !5
  br label %.loopexit148

194:                                              ; preds = %172, %168
  %195 = landingpad { ptr, i32 }
          cleanup
  br label %296

196:                                              ; preds = %.lr.ph205, %196
  %indvars.iv261 = phi i64 [ %121, %.lr.ph205 ], [ %indvars.iv.next262, %196 ]
  %.0116203 = phi i32 [ %187, %.lr.ph205 ], [ %206, %196 ]
  %197 = getelementptr i32, ptr %.pre279, i64 %indvars.iv261
  %198 = getelementptr i8, ptr %197, i64 -4
  %199 = load i32, ptr %198, align 4, !tbaa !5
  store i32 %199, ptr %197, align 4, !tbaa !5
  %200 = sext i32 %.0116203 to i64
  %201 = getelementptr inbounds [1048577 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %200
  store i32 %199, ptr %201, align 4, !tbaa !5
  %indvars.iv.next262 = add nsw i64 %indvars.iv261, -1
  %202 = load i32, ptr %1, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %203, i32 2
  %205 = load i32, ptr %204, align 4, !tbaa !12
  %206 = sub nsw i32 %.0116203, %205
  %207 = icmp sgt i64 %indvars.iv261, 1
  br i1 %207, label %196, label %._crit_edge206, !llvm.loop !31

208:                                              ; preds = %138
  %209 = getelementptr inbounds i32, ptr %145, i64 %117
  %210 = load i32, ptr %3, align 4, !tbaa !5
  %211 = sub nsw i32 %210, %49
  %212 = sext i32 %211 to i64
  %213 = shl nsw i64 %212, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %209, i8 0, i64 %213, i1 false)
  %.pre281 = load i32, ptr %1, align 4, !tbaa !5
  br i1 %119, label %.lr.ph201, label %.loopexit148

.lr.ph201:                                        ; preds = %208
  %214 = sext i32 %.pre281 to i64
  %215 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %214, i32 2
  %216 = load i32, ptr %215, align 4, !tbaa !12
  %217 = mul nsw i32 %216, %118
  %218 = add nsw i32 %217, %.0122.lcssa
  %219 = load ptr, ptr %7, align 8, !tbaa !28
  br i1 %lcmp.mod.not, label %.prol.loopexit, label %.prol.loopexit.unr-lcssa

.prol.loopexit.unr-lcssa:                         ; preds = %.lr.ph201
  %220 = getelementptr inbounds i32, ptr %219, i64 %121
  store i32 1, ptr %220, align 4, !tbaa !5
  %221 = sext i32 %218 to i64
  %222 = getelementptr inbounds [1048577 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %221
  store i32 1, ptr %222, align 4, !tbaa !5
  %223 = load i32, ptr %1, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %224, i32 2
  %226 = load i32, ptr %225, align 4, !tbaa !12
  %227 = sub nsw i32 %218, %226
  br label %.prol.loopexit

.prol.loopexit:                                   ; preds = %.prol.loopexit.unr-lcssa, %.lr.ph201
  %indvars.iv258.unr = phi i64 [ %121, %.lr.ph201 ], [ %indvars.iv.next259.prol, %.prol.loopexit.unr-lcssa ]
  %.0114199.unr = phi i32 [ %218, %.lr.ph201 ], [ %227, %.prol.loopexit.unr-lcssa ]
  %.lcssa301.unr = phi i32 [ poison, %.lr.ph201 ], [ %223, %.prol.loopexit.unr-lcssa ]
  br i1 %123, label %.loopexit148, label %.lr.ph201.new

.lr.ph201.new:                                    ; preds = %.prol.loopexit
  %invariant.gep = getelementptr i8, ptr %219, i64 -4
  br label %228

228:                                              ; preds = %228, %.lr.ph201.new
  %indvars.iv258 = phi i64 [ %indvars.iv258.unr, %.lr.ph201.new ], [ %indvars.iv.next259.1, %228 ]
  %.0114199 = phi i32 [ %.0114199.unr, %.lr.ph201.new ], [ %243, %228 ]
  %229 = getelementptr inbounds i32, ptr %219, i64 %indvars.iv258
  store i32 1, ptr %229, align 4, !tbaa !5
  %230 = sext i32 %.0114199 to i64
  %231 = getelementptr inbounds [1048577 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %230
  store i32 1, ptr %231, align 4, !tbaa !5
  %232 = load i32, ptr %1, align 4, !tbaa !5
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %233, i32 2
  %235 = load i32, ptr %234, align 4, !tbaa !12
  %236 = sub nsw i32 %.0114199, %235
  %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv258
  store i32 1, ptr %gep, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [1048577 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %237
  store i32 1, ptr %238, align 4, !tbaa !5
  %indvars.iv.next259.1 = add nsw i64 %indvars.iv258, -2
  %239 = load i32, ptr %1, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [19 x %struct.Node], ptr @_ZZ5solvevE3dim, i64 0, i64 %240, i32 2
  %242 = load i32, ptr %241, align 4, !tbaa !12
  %243 = sub nsw i32 %236, %242
  %244 = icmp sgt i64 %indvars.iv258, 1
  br i1 %244, label %228, label %.loopexit148, !llvm.loop !32

.loopexit148:                                     ; preds = %.prol.loopexit, %228, %208, %._crit_edge206
  %245 = phi i32 [ %.pre281, %208 ], [ %.pre280, %._crit_edge206 ], [ %.lcssa301.unr, %.prol.loopexit ], [ %239, %228 ]
  %.not142211 = icmp slt i32 %245, 1
  br i1 %.not142211, label %._crit_edge215, label %.lr.ph214

._crit_edge215:                                   ; preds = %291, %.loopexit148
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  %246 = add nuw nsw i32 %.0123216, 1
  %247 = load i32, ptr %4, align 4, !tbaa !5
  %248 = icmp slt i32 %246, %247
  br i1 %248, label %128, label %.preheader147, !llvm.loop !33

.lr.ph214:                                        ; preds = %.loopexit148, %291
  %249 = phi i32 [ %292, %291 ], [ %245, %.loopexit148 ]
  %indvars.iv269 = phi i64 [ %indvars.iv.next270, %291 ], [ 1, %.loopexit148 ]
  %250 = getelementptr inbounds [19 x [2097155 x i32]], ptr @_ZZ5solvevE1f, i64 0, i64 %indvars.iv269
  %251 = load i32, ptr %3, align 4, !tbaa !5
  %252 = mul nsw i32 %251, %.0123216
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds i32, ptr %250, i64 %253
  store ptr %254, ptr %8, align 8, !tbaa !28
  br i1 %119, label %.lr.ph209, label %._crit_edge210

.lr.ph209:                                        ; preds = %.lr.ph214
  %255 = load ptr, ptr %7, align 8, !tbaa !28
  %256 = sext i32 %249 to i64
  br i1 %124, label %._crit_edge210.loopexit.unr-lcssa, label %.lr.ph209.new

._crit_edge210.loopexit.unr-lcssa:                ; preds = %.lr.ph209.new, %.lr.ph209
  %indvars.iv264.unr = phi i64 [ 0, %.lr.ph209 ], [ %indvars.iv.next265.1, %.lr.ph209.new ]
  br i1 %lcmp.mod307.not, label %._crit_edge210, label %._crit_edge210.loopexit.epilog-lcssa

._crit_edge210.loopexit.epilog-lcssa:             ; preds = %._crit_edge210.loopexit.unr-lcssa
  %257 = getelementptr inbounds i32, ptr %255, i64 %indvars.iv264.unr
  %258 = load i32, ptr %257, align 4, !tbaa !5
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [19 x [19 x [524289 x i32]]], ptr @_ZZ5solvevE3coe, i64 0, i64 %indvars.iv269, i64 %256, i64 %indvars.iv264.unr
  %261 = load i32, ptr %260, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = mul nsw i64 %262, %259
  %264 = srem i64 %263, 998244353
  %265 = trunc nsw i64 %264 to i32
  %266 = getelementptr inbounds i32, ptr %254, i64 %indvars.iv264.unr
  store i32 %265, ptr %266, align 4, !tbaa !5
  br label %._crit_edge210

._crit_edge210:                                   ; preds = %._crit_edge210.loopexit.epilog-lcssa, %._crit_edge210.loopexit.unr-lcssa, %.lr.ph214
  %267 = getelementptr inbounds i32, ptr %254, i64 %117
  %268 = sub nsw i32 %251, %49
  %269 = sext i32 %268 to i64
  %270 = shl nsw i64 %269, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %267, i8 0, i64 %270, i1 false)
  invoke void @_Z3NTTiPii(i32 noundef %251, ptr noundef nonnull %254, i32 noundef 1)
          to label %291 unwind label %294

.lr.ph209.new:                                    ; preds = %.lr.ph209, %.lr.ph209.new
  %indvars.iv264 = phi i64 [ %indvars.iv.next265.1, %.lr.ph209.new ], [ 0, %.lr.ph209 ]
  %niter = phi i64 [ %niter.next.1, %.lr.ph209.new ], [ 0, %.lr.ph209 ]
  %271 = getelementptr inbounds i32, ptr %255, i64 %indvars.iv264
  %272 = load i32, ptr %271, align 4, !tbaa !5
  %273 = sext i32 %272 to i64
  %274 = getelementptr inbounds [19 x [19 x [524289 x i32]]], ptr @_ZZ5solvevE3coe, i64 0, i64 %indvars.iv269, i64 %256, i64 %indvars.iv264
  %275 = load i32, ptr %274, align 4, !tbaa !5
  %276 = sext i32 %275 to i64
  %277 = mul nsw i64 %276, %273
  %278 = srem i64 %277, 998244353
  %279 = trunc nsw i64 %278 to i32
  %280 = getelementptr inbounds i32, ptr %254, i64 %indvars.iv264
  store i32 %279, ptr %280, align 4, !tbaa !5
  %indvars.iv.next265 = or disjoint i64 %indvars.iv264, 1
  %281 = getelementptr inbounds i32, ptr %255, i64 %indvars.iv.next265
  %282 = load i32, ptr %281, align 4, !tbaa !5
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [19 x [19 x [524289 x i32]]], ptr @_ZZ5solvevE3coe, i64 0, i64 %indvars.iv269, i64 %256, i64 %indvars.iv.next265
  %285 = load i32, ptr %284, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = mul nsw i64 %286, %283
  %288 = srem i64 %287, 998244353
  %289 = trunc nsw i64 %288 to i32
  %290 = getelementptr inbounds i32, ptr %254, i64 %indvars.iv.next265
  store i32 %289, ptr %290, align 4, !tbaa !5
  %indvars.iv.next265.1 = add nuw nsw i64 %indvars.iv264, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge210.loopexit.unr-lcssa, label %.lr.ph209.new, !llvm.loop !34

291:                                              ; preds = %._crit_edge210
  %indvars.iv.next270 = add nuw nsw i64 %indvars.iv269, 1
  %292 = load i32, ptr %1, align 4, !tbaa !5
  %293 = sext i32 %292 to i64
  %.not142.not = icmp slt i64 %indvars.iv269, %293
  br i1 %.not142.not, label %.lr.ph214, label %._crit_edge215, !llvm.loop !35

294:                                              ; preds = %._crit_edge210
  %295 = landingpad { ptr, i32 }
          cleanup
  br label %296

296:                                              ; preds = %294, %194
  %.pn = phi { ptr, i32 } [ %295, %294 ], [ %195, %194 ]
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn

._crit_edge221:                                   ; preds = %302, %.preheader147
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  br label %.loopexit

297:                                              ; preds = %.lr.ph220, %302
  %indvars.iv272 = phi i64 [ 0, %.lr.ph220 ], [ %indvars.iv.next273, %302 ]
  %298 = getelementptr inbounds [1048577 x i32], ptr @_ZZ5solvevE1g, i64 0, i64 %indvars.iv272
  %299 = load i32, ptr %298, align 4, !tbaa !5
  %300 = icmp sgt i32 %299, -1
  br i1 %300, label %302, label %301

301:                                              ; preds = %297
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.3, i32 noundef 251, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5solvev) #8
  unreachable

302:                                              ; preds = %297
  call void @_ZN10FastOutput5writeEi(ptr noundef nonnull align 8 dereferenceable(24) @out, i32 noundef %299)
  %303 = icmp eq i64 %indvars.iv272, %127
  %304 = zext i1 %303 to i64
  %305 = getelementptr inbounds [3 x i8], ptr @.str.4, i64 0, i64 %304
  %306 = load i8, ptr %305, align 1, !tbaa !15
  call void @_ZN10FastOutput9writeCharEc(ptr noundef nonnull align 8 dereferenceable(24) @out, i8 noundef signext %306)
  %indvars.iv.next273 = add nuw nsw i64 %indvars.iv272, 1
  %exitcond276.not = icmp eq i64 %indvars.iv.next273, %wide.trip.count275
  br i1 %exitcond276.not, label %._crit_edge221, label %297, !llvm.loop !36

.loopexit:                                        ; preds = %33, %.preheader, %._crit_edge221
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret void
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP4NodeEvT_S2_(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZNSt8functionIFviiiiiEEC2IZ5solvevE3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(72)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNKSt8functionIFviiiiiEEclEiiiii(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #6

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 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 nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 4}
!10 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 0}
!12 = !{!10, !6, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14, !19, !20}
!19 = !{!"llvm.loop.isvectorized", i32 1}
!20 = !{!"llvm.loop.unroll.runtime.disable"}
!21 = distinct !{!21, !14, !20, !19}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}
!28 = !{!29, !29, i64 0}
!29 = !{!"any pointer", !7, i64 0}
!30 = distinct !{!30, !14}
!31 = distinct !{!31, !14}
!32 = distinct !{!32, !14}
!33 = distinct !{!33, !14}
!34 = distinct !{!34, !14}
!35 = distinct !{!35, !14}
!36 = distinct !{!36, !14}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass