; LLVM IR from tangjz/acm-icpc :: uoj/200.ll (Z6solve5v)

; 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.Edge = type { i32, i32, i32 }

@m = external dso_local global i32, align 4
@q = external dso_local global i32, align 4
@ans = external dso_local global [100001 x i32], align 16
@e = external dso_local global [150001 x %struct.Edge], align 16
@que = external dso_local global [100001 x %struct.Edge], align 16
@.str.1 = external hidden unnamed_addr constant [61 x i8], align 1
@stderr = external global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__._Z6solve5v = external hidden unnamed_addr constant [14 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [131 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZZ6solve5vE4ways = external hidden global [11 x [11 x [401 x i32]]], align 16
@_ZZ6solve5vE4sols = external hidden global [11 x [11 x [8001 x i32]]], align 16

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

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

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z6solve5v() #5 {
  %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 ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %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 i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  store i32 10, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 401, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 8001, ptr %3, align 4, !tbaa !5
  %29 = load i32, ptr @m, align 4, !tbaa !5
  %30 = srem i32 %29, 2
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %0
  br label %35

33:                                               ; preds = %0
  call void @__assert_fail(ptr noundef @.str.15, ptr noundef @.str.1, i32 noundef 297, ptr noundef @__PRETTY_FUNCTION__._Z6solve5v) #7
  unreachable

34:                                               ; No predecessors!
  br label %35

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

36:                                               ; preds = %111, %35
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = shl i32 %37, 1
  %39 = load i32, ptr @m, align 4, !tbaa !5
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %42, label %41

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

42:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %43 = load i32, ptr %5, align 4, !tbaa !5
  %44 = shl i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %45
  store ptr %46, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %47 = load i32, ptr %5, align 4, !tbaa !5
  %48 = shl i32 %47, 1
  %49 = or i32 %48, 1
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %50
  store ptr %51, ptr %7, align 8, !tbaa !9
  %52 = load ptr, ptr %6, align 8, !tbaa !9
  %53 = getelementptr inbounds %struct.Edge, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 4, !tbaa !11
  %55 = icmp sle i32 %54, 10
  br i1 %55, label %56, label %96

56:                                               ; preds = %42
  %57 = load ptr, ptr %6, align 8, !tbaa !9
  %58 = getelementptr inbounds %struct.Edge, ptr %57, i32 0, i32 1
  %59 = load i32, ptr %58, align 4, !tbaa !13
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = add nsw i32 10, %60
  %62 = add nsw i32 %61, 1
  %63 = icmp eq i32 %59, %62
  br i1 %63, label %64, label %96

64:                                               ; preds = %56
  %65 = load ptr, ptr %7, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.Edge, ptr %65, i32 0, i32 0
  %67 = load i32, ptr %66, align 4, !tbaa !11
  %68 = load i32, ptr %5, align 4, !tbaa !5
  %69 = add nsw i32 10, %68
  %70 = add nsw i32 %69, 1
  %71 = icmp eq i32 %67, %70
  br i1 %71, label %72, label %96

72:                                               ; preds = %64
  %73 = load ptr, ptr %7, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.Edge, ptr %73, i32 0, i32 1
  %75 = load i32, ptr %74, align 4, !tbaa !13
  %76 = icmp sle i32 %75, 10
  br i1 %76, label %77, label %96

77:                                               ; preds = %72
  %78 = load ptr, ptr %6, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct.Edge, ptr %78, i32 0, i32 2
  %80 = load i32, ptr %79, align 4, !tbaa !14
  %81 = icmp sgt i32 %80, 0
  br i1 %81, label %82, label %96

82:                                               ; preds = %77
  %83 = load ptr, ptr %7, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.Edge, ptr %83, i32 0, i32 2
  %85 = load i32, ptr %84, align 4, !tbaa !14
  %86 = icmp sgt i32 %85, 0
  br i1 %86, label %87, label %96

87:                                               ; preds = %82
  %88 = load ptr, ptr %6, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct.Edge, ptr %88, i32 0, i32 2
  %90 = load i32, ptr %89, align 4, !tbaa !14
  %91 = load ptr, ptr %7, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct.Edge, ptr %91, i32 0, i32 2
  %93 = load i32, ptr %92, align 4, !tbaa !14
  %94 = add nsw i32 %90, %93
  %95 = icmp slt i32 %94, 401
  br label %96

96:                                               ; preds = %87, %82, %77, %72, %64, %56, %42
  %97 = phi i1 [ false, %82 ], [ false, %77 ], [ false, %72 ], [ false, %64 ], [ false, %56 ], [ false, %42 ], [ %95, %87 ]
  br i1 %97, label %98, label %99

98:                                               ; preds = %96
  br label %101

99:                                               ; preds = %96
  call void @__assert_fail(ptr noundef @.str.16, ptr noundef @.str.1, i32 noundef 303, ptr noundef @__PRETTY_FUNCTION__._Z6solve5v) #7
  unreachable

100:                                              ; No predecessors!
  br label %101

101:                                              ; preds = %100, %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %102 = load ptr, ptr %6, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct.Edge, ptr %102, i32 0, i32 2
  %104 = load i32, ptr %103, align 4, !tbaa !14
  %105 = load ptr, ptr %7, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.Edge, ptr %105, i32 0, i32 2
  %107 = load i32, ptr %106, align 4, !tbaa !14
  %108 = add nsw i32 %104, %107
  store i32 %108, ptr %8, align 4, !tbaa !5
  %109 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %110 = load i32, ptr %109, align 4, !tbaa !5
  store i32 %110, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %111

111:                                              ; preds = %101
  %112 = load i32, ptr %5, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %5, align 4, !tbaa !5
  br label %36, !llvm.loop !15

114:                                              ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %137, %114
  %116 = load i32, ptr %10, align 4, !tbaa !5
  %117 = load i32, ptr @q, align 4, !tbaa !5
  %118 = icmp slt i32 %116, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %140

120:                                              ; preds = %115
  %121 = load i32, ptr %10, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %122
  %124 = getelementptr inbounds %struct.Edge, ptr %123, i32 0, i32 2
  %125 = load i32, ptr %124, align 4, !tbaa !14
  %126 = icmp slt i32 %125, 8001
  br i1 %126, label %127, label %128

127:                                              ; preds = %120
  br label %130

128:                                              ; preds = %120
  call void @__assert_fail(ptr noundef @.str.14, ptr noundef @.str.1, i32 noundef 308, ptr noundef @__PRETTY_FUNCTION__._Z6solve5v) #7
  unreachable

129:                                              ; No predecessors!
  br label %130

130:                                              ; preds = %129, %127
  %131 = load i32, ptr %10, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %132
  %134 = getelementptr inbounds %struct.Edge, ptr %133, i32 0, i32 2
  %135 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %134)
  %136 = load i32, ptr %135, align 4, !tbaa !5
  store i32 %136, ptr %9, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %130
  %138 = load i32, ptr %10, align 4, !tbaa !5
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %10, align 4, !tbaa !5
  br label %115, !llvm.loop !17

140:                                              ; preds = %119
  %141 = load ptr, ptr @stderr, align 8, !tbaa !9
  %142 = load i32, ptr %4, align 4, !tbaa !5
  %143 = load i32, ptr %9, align 4, !tbaa !5
  %144 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %141, ptr noundef @.str.17, i32 noundef %142, i32 noundef %143) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %145

145:                                              ; preds = %188, %140
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = icmp slt i32 %146, 10
  br i1 %147, label %149, label %148

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

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

150:                                              ; preds = %177, %149
  %151 = load i32, ptr %13, align 4, !tbaa !5
  %152 = icmp slt i32 %151, 10
  br i1 %152, label %154, label %153

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

154:                                              ; preds = %150
  %155 = load i32, ptr %11, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [11 x [11 x [401 x i32]]], ptr @_ZZ6solve5vE4ways, i64 0, i64 %156
  %158 = load i32, ptr %13, align 4, !tbaa !5
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [11 x [401 x i32]], ptr %157, i64 0, i64 %159
  %161 = getelementptr inbounds [401 x i32], ptr %160, i64 0, i64 0
  %162 = load i32, ptr %4, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  %164 = sext i32 %163 to i64
  %165 = mul i64 %164, 4
  call void @llvm.memset.p0.i64(ptr align 4 %161, i8 0, i64 %165, i1 false)
  %166 = load i32, ptr %11, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %167
  %169 = load i32, ptr %13, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [11 x [8001 x i32]], ptr %168, i64 0, i64 %170
  %172 = getelementptr inbounds [8001 x i32], ptr %171, i64 0, i64 0
  %173 = load i32, ptr %9, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  %175 = sext i32 %174 to i64
  %176 = mul i64 %175, 4
  call void @llvm.memset.p0.i64(ptr align 4 %172, i8 0, i64 %176, i1 false)
  br label %177

177:                                              ; preds = %154
  %178 = load i32, ptr %13, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %13, align 4, !tbaa !5
  br label %150, !llvm.loop !18

180:                                              ; preds = %153
  %181 = load i32, ptr %11, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %182
  %184 = load i32, ptr %11, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [11 x [8001 x i32]], ptr %183, i64 0, i64 %185
  %187 = getelementptr inbounds [8001 x i32], ptr %186, i64 0, i64 0
  store i32 1, ptr %187, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %180
  %189 = load i32, ptr %11, align 4, !tbaa !5
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %11, align 4, !tbaa !5
  br label %145, !llvm.loop !19

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

192:                                              ; preds = %231, %191
  %193 = load i32, ptr %14, align 4, !tbaa !5
  %194 = shl i32 %193, 1
  %195 = load i32, ptr @m, align 4, !tbaa !5
  %196 = icmp slt i32 %194, %195
  br i1 %196, label %198, label %197

197:                                              ; preds = %192
  store i32 14, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %234

198:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %199 = load i32, ptr %14, align 4, !tbaa !5
  %200 = shl i32 %199, 1
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %201
  store ptr %202, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %203 = load i32, ptr %14, align 4, !tbaa !5
  %204 = shl i32 %203, 1
  %205 = or i32 %204, 1
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %206
  store ptr %207, ptr %16, align 8, !tbaa !9
  %208 = load ptr, ptr %15, align 8, !tbaa !9
  %209 = getelementptr inbounds %struct.Edge, ptr %208, i32 0, i32 0
  %210 = load i32, ptr %209, align 4, !tbaa !11
  %211 = sub nsw i32 %210, 1
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [11 x [11 x [401 x i32]]], ptr @_ZZ6solve5vE4ways, i64 0, i64 %212
  %214 = load ptr, ptr %16, align 8, !tbaa !9
  %215 = getelementptr inbounds %struct.Edge, ptr %214, i32 0, i32 1
  %216 = load i32, ptr %215, align 4, !tbaa !13
  %217 = sub nsw i32 %216, 1
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [11 x [401 x i32]], ptr %213, i64 0, i64 %218
  %220 = load ptr, ptr %15, align 8, !tbaa !9
  %221 = getelementptr inbounds %struct.Edge, ptr %220, i32 0, i32 2
  %222 = load i32, ptr %221, align 4, !tbaa !14
  %223 = load ptr, ptr %16, align 8, !tbaa !9
  %224 = getelementptr inbounds %struct.Edge, ptr %223, i32 0, i32 2
  %225 = load i32, ptr %224, align 4, !tbaa !14
  %226 = add nsw i32 %222, %225
  %227 = sext i32 %226 to i64
  %228 = getelementptr inbounds [401 x i32], ptr %219, i64 0, i64 %227
  %229 = load i32, ptr %228, align 4, !tbaa !5
  %230 = add nsw i32 %229, 1
  store i32 %230, ptr %228, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %231

231:                                              ; preds = %198
  %232 = load i32, ptr %14, align 4, !tbaa !5
  %233 = add nsw i32 %232, 1
  store i32 %233, ptr %14, align 4, !tbaa !5
  br label %192, !llvm.loop !20

234:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 2, ptr %17, align 4, !tbaa !5
  br label %235

235:                                              ; preds = %329, %234
  %236 = load i32, ptr %17, align 4, !tbaa !5
  %237 = load i32, ptr %9, align 4, !tbaa !5
  %238 = icmp sle i32 %236, %237
  br i1 %238, label %240, label %239

239:                                              ; preds = %235
  store i32 17, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %332

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

241:                                              ; preds = %325, %240
  %242 = load i32, ptr %18, align 4, !tbaa !5
  %243 = icmp slt i32 %242, 10
  br i1 %243, label %245, label %244

244:                                              ; preds = %241
  store i32 20, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %328

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

246:                                              ; preds = %321, %245
  %247 = load i32, ptr %19, align 4, !tbaa !5
  %248 = icmp slt i32 %247, 10
  br i1 %248, label %250, label %249

249:                                              ; preds = %246
  store i32 23, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %324

250:                                              ; preds = %246
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 2, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %251 = load i32, ptr %17, align 4, !tbaa !5
  %252 = sub nsw i32 %251, 2
  store i32 %252, ptr %21, align 4, !tbaa !5
  br label %253

253:                                              ; preds = %315, %250
  %254 = load i32, ptr %20, align 4, !tbaa !5
  %255 = load i32, ptr %4, align 4, !tbaa !5
  %256 = icmp sle i32 %254, %255
  br i1 %256, label %257, label %260

257:                                              ; preds = %253
  %258 = load i32, ptr %21, align 4, !tbaa !5
  %259 = icmp sge i32 %258, 0
  br label %260

260:                                              ; preds = %257, %253
  %261 = phi i1 [ false, %253 ], [ %259, %257 ]
  br i1 %261, label %263, label %262

262:                                              ; preds = %260
  store i32 26, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  br label %320

263:                                              ; preds = %260
  %264 = load i32, ptr %18, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [11 x [11 x [401 x i32]]], ptr @_ZZ6solve5vE4ways, i64 0, i64 %265
  %267 = load i32, ptr %19, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [11 x [401 x i32]], ptr %266, i64 0, i64 %268
  %270 = load i32, ptr %20, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [401 x i32], ptr %269, i64 0, i64 %271
  %273 = load i32, ptr %272, align 4, !tbaa !5
  %274 = icmp ne i32 %273, 0
  br i1 %274, label %276, label %275

275:                                              ; preds = %263
  br label %315

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

277:                                              ; preds = %311, %276
  %278 = load i32, ptr %22, align 4, !tbaa !5
  %279 = icmp slt i32 %278, 10
  br i1 %279, label %281, label %280

280:                                              ; preds = %277
  store i32 29, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %314

281:                                              ; preds = %277
  %282 = load i32, ptr %18, align 4, !tbaa !5
  %283 = sext i32 %282 to i64
  %284 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %283
  %285 = load i32, ptr %22, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [11 x [8001 x i32]], ptr %284, i64 0, i64 %286
  %288 = load i32, ptr %17, align 4, !tbaa !5
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [8001 x i32], ptr %287, i64 0, i64 %289
  %291 = load i32, ptr %18, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [11 x [11 x [401 x i32]]], ptr @_ZZ6solve5vE4ways, i64 0, i64 %292
  %294 = load i32, ptr %19, align 4, !tbaa !5
  %295 = sext i32 %294 to i64
  %296 = getelementptr inbounds [11 x [401 x i32]], ptr %293, i64 0, i64 %295
  %297 = load i32, ptr %20, align 4, !tbaa !5
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds [401 x i32], ptr %296, i64 0, i64 %298
  %300 = load i32, ptr %299, align 4, !tbaa !5
  %301 = load i32, ptr %19, align 4, !tbaa !5
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %302
  %304 = load i32, ptr %22, align 4, !tbaa !5
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds [11 x [8001 x i32]], ptr %303, i64 0, i64 %305
  %307 = load i32, ptr %21, align 4, !tbaa !5
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [8001 x i32], ptr %306, i64 0, i64 %308
  %310 = load i32, ptr %309, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %290, i32 noundef %300, i32 noundef %310)
  br label %311

311:                                              ; preds = %281
  %312 = load i32, ptr %22, align 4, !tbaa !5
  %313 = add nsw i32 %312, 1
  store i32 %313, ptr %22, align 4, !tbaa !5
  br label %277, !llvm.loop !21

314:                                              ; preds = %280
  br label %315

315:                                              ; preds = %314, %275
  %316 = load i32, ptr %20, align 4, !tbaa !5
  %317 = add nsw i32 %316, 1
  store i32 %317, ptr %20, align 4, !tbaa !5
  %318 = load i32, ptr %21, align 4, !tbaa !5
  %319 = add nsw i32 %318, -1
  store i32 %319, ptr %21, align 4, !tbaa !5
  br label %253, !llvm.loop !22

320:                                              ; preds = %262
  br label %321

321:                                              ; preds = %320
  %322 = load i32, ptr %19, align 4, !tbaa !5
  %323 = add nsw i32 %322, 1
  store i32 %323, ptr %19, align 4, !tbaa !5
  br label %246, !llvm.loop !23

324:                                              ; preds = %249
  br label %325

325:                                              ; preds = %324
  %326 = load i32, ptr %18, align 4, !tbaa !5
  %327 = add nsw i32 %326, 1
  store i32 %327, ptr %18, align 4, !tbaa !5
  br label %241, !llvm.loop !24

328:                                              ; preds = %244
  br label %329

329:                                              ; preds = %328
  %330 = load i32, ptr %17, align 4, !tbaa !5
  %331 = add nsw i32 %330, 1
  store i32 %331, ptr %17, align 4, !tbaa !5
  br label %235, !llvm.loop !25

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

333:                                              ; preds = %426, %332
  %334 = load i32, ptr %23, align 4, !tbaa !5
  %335 = load i32, ptr @q, align 4, !tbaa !5
  %336 = icmp slt i32 %334, %335
  br i1 %336, label %338, label %337

337:                                              ; preds = %333
  store i32 32, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %429

338:                                              ; preds = %333
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %339 = load i32, ptr %23, align 4, !tbaa !5
  %340 = sext i32 %339 to i64
  %341 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %340
  %342 = getelementptr inbounds %struct.Edge, ptr %341, i32 0, i32 0
  %343 = load i32, ptr %342, align 4, !tbaa !11
  store i32 %343, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %344 = load i32, ptr %23, align 4, !tbaa !5
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %345
  %347 = getelementptr inbounds %struct.Edge, ptr %346, i32 0, i32 1
  %348 = load i32, ptr %347, align 4, !tbaa !13
  store i32 %348, ptr %25, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %349 = load i32, ptr %23, align 4, !tbaa !5
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %350
  %352 = getelementptr inbounds %struct.Edge, ptr %351, i32 0, i32 2
  %353 = load i32, ptr %352, align 4, !tbaa !14
  store i32 %353, ptr %26, align 4, !tbaa !5
  %354 = load i32, ptr %26, align 4, !tbaa !5
  %355 = icmp ne i32 %354, 0
  br i1 %355, label %364, label %356

356:                                              ; preds = %338
  %357 = load i32, ptr %24, align 4, !tbaa !5
  %358 = load i32, ptr %25, align 4, !tbaa !5
  %359 = icmp eq i32 %357, %358
  %360 = zext i1 %359 to i32
  %361 = load i32, ptr %23, align 4, !tbaa !5
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %362
  store i32 %360, ptr %363, align 4, !tbaa !5
  store i32 34, ptr %12, align 4
  br label %423

364:                                              ; preds = %338
  %365 = load i32, ptr %24, align 4, !tbaa !5
  %366 = icmp sgt i32 %365, 10
  br i1 %366, label %367, label %383

367:                                              ; preds = %364
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #6
  %368 = load i32, ptr %24, align 4, !tbaa !5
  %369 = sub nsw i32 %368, 10
  %370 = sub nsw i32 %369, 1
  %371 = shl i32 %370, 1
  %372 = or i32 %371, 1
  %373 = sext i32 %372 to i64
  %374 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %373
  store ptr %374, ptr %27, align 8, !tbaa !9
  %375 = load ptr, ptr %27, align 8, !tbaa !9
  %376 = getelementptr inbounds %struct.Edge, ptr %375, i32 0, i32 1
  %377 = load i32, ptr %376, align 4, !tbaa !13
  store i32 %377, ptr %24, align 4, !tbaa !5
  %378 = load ptr, ptr %27, align 8, !tbaa !9
  %379 = getelementptr inbounds %struct.Edge, ptr %378, i32 0, i32 2
  %380 = load i32, ptr %379, align 4, !tbaa !14
  %381 = load i32, ptr %26, align 4, !tbaa !5
  %382 = sub nsw i32 %381, %380
  store i32 %382, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #6
  br label %383

383:                                              ; preds = %367, %364
  %384 = load i32, ptr %25, align 4, !tbaa !5
  %385 = icmp sgt i32 %384, 10
  br i1 %385, label %386, label %401

386:                                              ; preds = %383
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #6
  %387 = load i32, ptr %25, align 4, !tbaa !5
  %388 = sub nsw i32 %387, 10
  %389 = sub nsw i32 %388, 1
  %390 = shl i32 %389, 1
  %391 = sext i32 %390 to i64
  %392 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %391
  store ptr %392, ptr %28, align 8, !tbaa !9
  %393 = load ptr, ptr %28, align 8, !tbaa !9
  %394 = getelementptr inbounds %struct.Edge, ptr %393, i32 0, i32 0
  %395 = load i32, ptr %394, align 4, !tbaa !11
  store i32 %395, ptr %25, align 4, !tbaa !5
  %396 = load ptr, ptr %28, align 8, !tbaa !9
  %397 = getelementptr inbounds %struct.Edge, ptr %396, i32 0, i32 2
  %398 = load i32, ptr %397, align 4, !tbaa !14
  %399 = load i32, ptr %26, align 4, !tbaa !5
  %400 = sub nsw i32 %399, %398
  store i32 %400, ptr %26, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #6
  br label %401

401:                                              ; preds = %386, %383
  %402 = load i32, ptr %26, align 4, !tbaa !5
  %403 = icmp slt i32 %402, 0
  br i1 %403, label %404, label %405

404:                                              ; preds = %401
  br label %418

405:                                              ; preds = %401
  %406 = load i32, ptr %24, align 4, !tbaa !5
  %407 = sub nsw i32 %406, 1
  %408 = sext i32 %407 to i64
  %409 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %408
  %410 = load i32, ptr %25, align 4, !tbaa !5
  %411 = sub nsw i32 %410, 1
  %412 = sext i32 %411 to i64
  %413 = getelementptr inbounds [11 x [8001 x i32]], ptr %409, i64 0, i64 %412
  %414 = load i32, ptr %26, align 4, !tbaa !5
  %415 = sext i32 %414 to i64
  %416 = getelementptr inbounds [8001 x i32], ptr %413, i64 0, i64 %415
  %417 = load i32, ptr %416, align 4, !tbaa !5
  br label %418

418:                                              ; preds = %405, %404
  %419 = phi i32 [ 0, %404 ], [ %417, %405 ]
  %420 = load i32, ptr %23, align 4, !tbaa !5
  %421 = sext i32 %420 to i64
  %422 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %421
  store i32 %419, ptr %422, align 4, !tbaa !5
  store i32 0, ptr %12, align 4
  br label %423

423:                                              ; preds = %418, %356
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  %424 = load i32, ptr %12, align 4
  switch i32 %424, label %430 [
    i32 0, label %425
    i32 34, label %426
  ]

425:                                              ; preds = %423
  br label %426

426:                                              ; preds = %425, %423
  %427 = load i32, ptr %23, align 4, !tbaa !5
  %428 = add nsw i32 %427, 1
  store i32 %428, ptr %23, align 4, !tbaa !5
  br label %333, !llvm.loop !26

429:                                              ; preds = %337
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #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
  ret void

430:                                              ; preds = %423
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS4Edge", !6, i64 0, !6, i64 4, !6, i64 8}
!13 = !{!12, !6, i64 4}
!14 = !{!12, !6, i64 8}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}
!21 = distinct !{!21, !16}
!22 = distinct !{!22, !16}
!23 = distinct !{!23, !16}
!24 = distinct !{!24, !16}
!25 = distinct !{!25, !16}
!26 = distinct !{!26, !16}


; 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.Edge = type { i32, i32, i32 }

@m = external dso_local local_unnamed_addr global i32, align 4
@q = external dso_local local_unnamed_addr global i32, align 4
@ans = external dso_local local_unnamed_addr global [100001 x i32], align 16
@e = external dso_local local_unnamed_addr global [150001 x %struct.Edge], align 16
@que = external dso_local global [100001 x %struct.Edge], align 16
@.str.1 = external hidden unnamed_addr constant [61 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.14 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__._Z6solve5v = external hidden unnamed_addr constant [14 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [131 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@_ZZ6solve5vE4ways = external hidden local_unnamed_addr global [11 x [11 x [401 x i32]]], align 16
@_ZZ6solve5vE4sols = external hidden global [11 x [11 x [8001 x i32]]], align 16

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z6solve5v() local_unnamed_addr #5 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = load i32, ptr @m, align 4, !tbaa !5
  %5 = and i32 %4, 1
  %6 = icmp eq i32 %5, 0
  br i1 %6, label %8, label %7

7:                                                ; preds = %0
  tail call void @__assert_fail(ptr noundef nonnull @.str.15, ptr noundef nonnull @.str.1, i32 noundef 297, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6solve5v) #6
  unreachable

8:                                                ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  store i32 0, ptr %1, align 4, !tbaa !5
  %9 = icmp sgt i32 %4, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %44, %8
  %10 = phi i32 [ 0, %8 ], [ %46, %44 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  %11 = load i32, ptr @q, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph122, label %._crit_edge123

.lr.ph:                                           ; preds = %8, %44
  %indvars.iv = phi i64 [ %indvars.iv.next, %44 ], [ 0, %8 ]
  %13 = phi i32 [ %48, %44 ], [ 0, %8 ]
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %14
  %16 = or disjoint i32 %13, 1
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %17
  %19 = load i32, ptr %15, align 8, !tbaa !9
  %20 = icmp slt i32 %19, 11
  br i1 %20, label %21, label %.critedge

21:                                               ; preds = %.lr.ph
  %22 = getelementptr inbounds i8, ptr %15, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !11
  %24 = trunc i64 %indvars.iv to i32
  %25 = add i32 %24, 11
  %26 = icmp eq i32 %23, %25
  br i1 %26, label %27, label %.critedge

27:                                               ; preds = %21
  %28 = load i32, ptr %18, align 4, !tbaa !9
  %29 = icmp eq i32 %28, %23
  br i1 %29, label %30, label %.critedge

30:                                               ; preds = %27
  %31 = getelementptr inbounds i8, ptr %18, i64 4
  %32 = load i32, ptr %31, align 8, !tbaa !11
  %33 = icmp slt i32 %32, 11
  br i1 %33, label %34, label %.critedge

34:                                               ; preds = %30
  %35 = getelementptr inbounds i8, ptr %15, i64 8
  %36 = load i32, ptr %35, align 8, !tbaa !12
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %38, label %.critedge

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %18, i64 8
  %40 = load i32, ptr %39, align 4, !tbaa !12
  %41 = icmp sgt i32 %40, 0
  %42 = add nsw i32 %40, %36
  %43 = icmp slt i32 %42, 401
  %or.cond = select i1 %41, i1 %43, i1 false
  br i1 %or.cond, label %44, label %.critedge

.critedge:                                        ; preds = %38, %34, %30, %27, %21, %.lr.ph
  call void @__assert_fail(ptr noundef nonnull @.str.16, ptr noundef nonnull @.str.1, i32 noundef 303, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6solve5v) #6
  unreachable

44:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 %42, ptr %2, align 4, !tbaa !5
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %46 = load i32, ptr %45, align 4, !tbaa !5
  store i32 %46, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %47 = trunc nsw i64 %indvars.iv.next to i32
  %48 = shl nuw i32 %47, 1
  %49 = load i32, ptr @m, align 4, !tbaa !5
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge123.loopexit:                          ; preds = %69
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  br label %._crit_edge123

._crit_edge123:                                   ; preds = %._crit_edge123.loopexit, %._crit_edge
  %51 = phi i32 [ %71, %._crit_edge123.loopexit ], [ 0, %._crit_edge ]
  %52 = phi i32 [ %.pre, %._crit_edge123.loopexit ], [ %10, %._crit_edge ]
  %53 = load ptr, ptr @stderr, align 8, !tbaa !15
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef nonnull @.str.17, i32 noundef %52, i32 noundef %51) #8
  %55 = load i32, ptr %1, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = shl nsw i64 %57, 2
  %59 = load i32, ptr %3, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  %61 = sext i32 %60 to i64
  %62 = shl nsw i64 %61, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @_ZZ6solve5vE4ways, i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @_ZZ6solve5vE4sols, i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 1604), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 32004), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 3208), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 64008), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 4812), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 96012), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 6416), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 128016), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 8020), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 160020), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 9624), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 192024), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 11228), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 224028), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 12832), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 256032), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 14436), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 288036), i8 0, i64 %62, i1 false)
  store i32 1, ptr @_ZZ6solve5vE4sols, align 16, !tbaa !5
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 17644), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 352044), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 19248), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 384048), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 20852), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 416052), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 22456), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 448056), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 24060), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 480060), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 25664), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 512064), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 27268), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 544068), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 28872), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 576072), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 30476), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 608076), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 32080), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 640080), i8 0, i64 %62, i1 false)
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 384048), align 16, !tbaa !5
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 35288), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 704088), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 36892), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 736092), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 38496), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 768096), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 40100), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 800100), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 41704), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 832104), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 43308), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 864108), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 44912), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 896112), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 46516), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 928116), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 48120), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 960120), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 49724), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 992124), i8 0, i64 %62, i1 false)
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 768096), align 16, !tbaa !5
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 52932), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1056132), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 54536), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1088136), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 56140), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1120140), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 57744), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1152144), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 59348), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1184148), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 60952), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1216152), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 62556), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1248156), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 64160), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1280160), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 65764), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1312164), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 67368), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1344168), i8 0, i64 %62, i1 false)
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1152144), align 16, !tbaa !5
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 70576), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1408176), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 72180), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1440180), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 73784), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1472184), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 75388), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1504188), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 76992), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1536192), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 78596), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1568196), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 80200), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1600200), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 81804), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1632204), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 83408), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1664208), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 85012), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1696212), i8 0, i64 %62, i1 false)
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1536192), align 16, !tbaa !5
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 88220), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1760220), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 89824), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1792224), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 91428), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1824228), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 93032), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1856232), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 94636), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1888236), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 96240), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1920240), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 97844), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1952244), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 99448), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1984248), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 101052), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2016252), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 102656), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2048256), i8 0, i64 %62, i1 false)
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 1920240), align 16, !tbaa !5
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 105864), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2112264), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 107468), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2144268), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 109072), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2176272), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 110676), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2208276), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 112280), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2240280), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 113884), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2272284), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 115488), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2304288), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 117092), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2336292), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 118696), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2368296), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 120300), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2400300), i8 0, i64 %62, i1 false)
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2304288), align 16, !tbaa !5
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 123508), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2464308), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 125112), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2496312), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 126716), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2528316), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 128320), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2560320), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 129924), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2592324), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 131528), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2624328), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 133132), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2656332), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 134736), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2688336), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 136340), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2720340), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 137944), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2752344), i8 0, i64 %62, i1 false)
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2688336), align 16, !tbaa !5
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 141152), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2816352), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 142756), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2848356), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 144360), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2880360), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 145964), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2912364), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 147568), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2944368), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 149172), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 2976372), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 150776), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3008376), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 152380), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3040380), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 153984), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3072384), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 155588), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3104388), i8 0, i64 %62, i1 false)
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3072384), align 16, !tbaa !5
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 158796), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3168396), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 160400), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3200400), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 162004), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3232404), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 163608), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3264408), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 165212), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3296412), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 166816), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3328416), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 168420), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3360420), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 170024), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 8 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3392424), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 171628), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3424428), i8 0, i64 %62, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4ways, i64 173232), i8 0, i64 %58, i1 false)
  call void @llvm.memset.p0.i64(ptr nonnull align 16 getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3456432), i8 0, i64 %62, i1 false)
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve5vE4sols, i64 3456432), align 16, !tbaa !5
  %63 = load i32, ptr @m, align 4, !tbaa !5
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %.lr.ph127.preheader, label %.preheader116

.lr.ph122:                                        ; preds = %._crit_edge, %69
  %indvars.iv153 = phi i64 [ %indvars.iv.next154, %69 ], [ 0, %._crit_edge ]
  %65 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv153, i32 2
  %66 = load i32, ptr %65, align 4, !tbaa !12
  %67 = icmp slt i32 %66, 8001
  br i1 %67, label %69, label %68

68:                                               ; preds = %.lr.ph122
  call void @__assert_fail(ptr noundef nonnull @.str.14, ptr noundef nonnull @.str.1, i32 noundef 308, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6solve5v) #6
  unreachable

69:                                               ; preds = %.lr.ph122
  %70 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %65)
  %71 = load i32, ptr %70, align 4, !tbaa !5
  store i32 %71, ptr %3, align 4, !tbaa !5
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %72 = load i32, ptr @q, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = icmp slt i64 %indvars.iv.next154, %73
  br i1 %74, label %.lr.ph122, label %._crit_edge123.loopexit, !llvm.loop !17

.lr.ph127.preheader:                              ; preds = %._crit_edge123
  %75 = add nsw i32 %63, -1
  %76 = lshr i32 %75, 1
  %77 = add nuw nsw i32 %76, 1
  %wide.trip.count = zext nneg i32 %77 to i64
  br label %.lr.ph127

.preheader116:                                    ; preds = %.lr.ph127, %._crit_edge123
  %78 = load i32, ptr %3, align 4, !tbaa !5
  %.not144 = icmp slt i32 %78, 2
  br i1 %.not144, label %.preheader, label %.preheader115.split.us

.lr.ph127:                                        ; preds = %.lr.ph127.preheader, %.lr.ph127
  %indvars.iv164 = phi i64 [ 0, %.lr.ph127.preheader ], [ %indvars.iv.next165, %.lr.ph127 ]
  %indvars.iv162 = phi i64 [ 0, %.lr.ph127.preheader ], [ %indvars.iv.next163, %.lr.ph127 ]
  %79 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv162
  %80 = or disjoint i64 %indvars.iv162, 1
  %81 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %80
  %82 = load i32, ptr %79, align 8, !tbaa !9
  %83 = add nsw i32 %82, -1
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds i8, ptr %81, i64 4
  %86 = load i32, ptr %85, align 8, !tbaa !11
  %87 = add nsw i32 %86, -1
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds i8, ptr %79, i64 8
  %90 = load i32, ptr %89, align 8, !tbaa !12
  %91 = getelementptr inbounds i8, ptr %81, i64 8
  %92 = load i32, ptr %91, align 4, !tbaa !12
  %93 = add nsw i32 %92, %90
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [11 x [11 x [401 x i32]]], ptr @_ZZ6solve5vE4ways, i64 0, i64 %84, i64 %88, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %95, align 4, !tbaa !5
  %indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1
  %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 2
  %exitcond.not = icmp eq i64 %indvars.iv.next165, %wide.trip.count
  br i1 %exitcond.not, label %.preheader116, label %.lr.ph127, !llvm.loop !18

.preheader115.split.us:                           ; preds = %.preheader116, %.split143.us
  %98 = phi i32 [ %162, %.split143.us ], [ %78, %.preheader116 ]
  %indvars.iv190 = phi i64 [ %indvars.iv.next191, %.split143.us ], [ 2, %.preheader116 ]
  %indvars.iv173 = phi i64 [ %indvars.iv.next174, %.split143.us ], [ 0, %.preheader116 ]
  %99 = load i32, ptr %1, align 4, !tbaa !5
  %100 = icmp sgt i32 %99, 1
  br i1 %100, label %.preheader114.us, label %.split143.us

.preheader114.us:                                 ; preds = %.preheader115.split.us, %.split.us141
  %101 = phi i32 [ %157, %.split.us141 ], [ %99, %.preheader115.split.us ]
  %102 = phi i32 [ %158, %.split.us141 ], [ %99, %.preheader115.split.us ]
  %103 = phi i32 [ %159, %.split.us141 ], [ %99, %.preheader115.split.us ]
  %indvars.iv186 = phi i64 [ %indvars.iv.next187, %.split.us141 ], [ 0, %.preheader115.split.us ]
  %104 = icmp sgt i32 %103, 1
  br i1 %104, label %.preheader114.split.split.us140.preheader, label %.split.us141

.preheader114.split.split.us140.preheader:        ; preds = %.preheader114.us
  %105 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv186, i64 0, i64 %indvars.iv190
  %106 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv186, i64 1, i64 %indvars.iv190
  %107 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv186, i64 2, i64 %indvars.iv190
  %108 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv186, i64 3, i64 %indvars.iv190
  %109 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv186, i64 4, i64 %indvars.iv190
  %110 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv186, i64 5, i64 %indvars.iv190
  %111 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv186, i64 6, i64 %indvars.iv190
  %112 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv186, i64 7, i64 %indvars.iv190
  %113 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv186, i64 8, i64 %indvars.iv190
  %114 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv186, i64 9, i64 %indvars.iv190
  br label %.preheader114.split.split.us140

.preheader114.split.split.us140:                  ; preds = %.preheader114.split.split.us140.preheader, %._crit_edge133.us
  %115 = phi i32 [ %101, %.preheader114.split.split.us140.preheader ], [ %118, %._crit_edge133.us ]
  %116 = phi i32 [ %102, %.preheader114.split.split.us140.preheader ], [ %119, %._crit_edge133.us ]
  %indvars.iv182 = phi i64 [ 0, %.preheader114.split.split.us140.preheader ], [ %indvars.iv.next183, %._crit_edge133.us ]
  %117 = icmp sgt i32 %116, 1
  br i1 %117, label %.lr.ph132.us, label %._crit_edge133.us

._crit_edge133.us:                                ; preds = %.loopexit.us, %.preheader114.split.split.us140
  %118 = phi i32 [ %115, %.preheader114.split.split.us140 ], [ %123, %.loopexit.us ]
  %119 = phi i32 [ %116, %.preheader114.split.split.us140 ], [ %123, %.loopexit.us ]
  %indvars.iv.next183 = add nuw nsw i64 %indvars.iv182, 1
  %exitcond185.not = icmp eq i64 %indvars.iv.next183, 10
  br i1 %exitcond185.not, label %.split.us141, label %.preheader114.split.split.us140, !llvm.loop !19

.lr.ph132.us:                                     ; preds = %.preheader114.split.split.us140, %.loopexit.us
  %120 = phi i32 [ %123, %.loopexit.us ], [ %115, %.preheader114.split.split.us140 ]
  %indvars.iv177 = phi i64 [ %indvars.iv.next178, %.loopexit.us ], [ 2, %.preheader114.split.split.us140 ]
  %indvars.iv175 = phi i64 [ %indvars.iv.next176, %.loopexit.us ], [ %indvars.iv173, %.preheader114.split.split.us140 ]
  %121 = getelementptr inbounds [11 x [11 x [401 x i32]]], ptr @_ZZ6solve5vE4ways, i64 0, i64 %indvars.iv186, i64 %indvars.iv182, i64 %indvars.iv177
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %.not111.us = icmp eq i32 %122, 0
  br i1 %.not111.us, label %.loopexit.us, label %.preheader113.us

.loopexit.us:                                     ; preds = %.preheader113.us, %.lr.ph132.us
  %123 = phi i32 [ %.pre198, %.preheader113.us ], [ %120, %.lr.ph132.us ]
  %indvars.iv.next178 = add nuw nsw i64 %indvars.iv177, 1
  %indvars.iv.next176 = add nsw i64 %indvars.iv175, -1
  %124 = sext i32 %123 to i64
  %125 = icmp slt i64 %indvars.iv177, %124
  %126 = icmp sgt i64 %indvars.iv175, 0
  %127 = select i1 %125, i1 %126, i1 false
  br i1 %127, label %.lr.ph132.us, label %._crit_edge133.us, !llvm.loop !21

.preheader113.us:                                 ; preds = %.lr.ph132.us
  %128 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv182, i64 0, i64 %indvars.iv175
  %129 = load i32, ptr %128, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %105, i32 noundef %122, i32 noundef %129)
  %130 = load i32, ptr %121, align 4, !tbaa !5
  %131 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv182, i64 1, i64 %indvars.iv175
  %132 = load i32, ptr %131, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %106, i32 noundef %130, i32 noundef %132)
  %133 = load i32, ptr %121, align 4, !tbaa !5
  %134 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv182, i64 2, i64 %indvars.iv175
  %135 = load i32, ptr %134, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %107, i32 noundef %133, i32 noundef %135)
  %136 = load i32, ptr %121, align 4, !tbaa !5
  %137 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv182, i64 3, i64 %indvars.iv175
  %138 = load i32, ptr %137, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %108, i32 noundef %136, i32 noundef %138)
  %139 = load i32, ptr %121, align 4, !tbaa !5
  %140 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv182, i64 4, i64 %indvars.iv175
  %141 = load i32, ptr %140, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %109, i32 noundef %139, i32 noundef %141)
  %142 = load i32, ptr %121, align 4, !tbaa !5
  %143 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv182, i64 5, i64 %indvars.iv175
  %144 = load i32, ptr %143, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %110, i32 noundef %142, i32 noundef %144)
  %145 = load i32, ptr %121, align 4, !tbaa !5
  %146 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv182, i64 6, i64 %indvars.iv175
  %147 = load i32, ptr %146, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %111, i32 noundef %145, i32 noundef %147)
  %148 = load i32, ptr %121, align 4, !tbaa !5
  %149 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv182, i64 7, i64 %indvars.iv175
  %150 = load i32, ptr %149, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %112, i32 noundef %148, i32 noundef %150)
  %151 = load i32, ptr %121, align 4, !tbaa !5
  %152 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv182, i64 8, i64 %indvars.iv175
  %153 = load i32, ptr %152, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %113, i32 noundef %151, i32 noundef %153)
  %154 = load i32, ptr %121, align 4, !tbaa !5
  %155 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %indvars.iv182, i64 9, i64 %indvars.iv175
  %156 = load i32, ptr %155, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %114, i32 noundef %154, i32 noundef %156)
  %.pre198 = load i32, ptr %1, align 4, !tbaa !5
  br label %.loopexit.us

.split.us141:                                     ; preds = %._crit_edge133.us, %.preheader114.us
  %157 = phi i32 [ %101, %.preheader114.us ], [ %118, %._crit_edge133.us ]
  %158 = phi i32 [ %102, %.preheader114.us ], [ %119, %._crit_edge133.us ]
  %159 = phi i32 [ %103, %.preheader114.us ], [ %119, %._crit_edge133.us ]
  %indvars.iv.next187 = add nuw nsw i64 %indvars.iv186, 1
  %exitcond189.not = icmp eq i64 %indvars.iv.next187, 10
  br i1 %exitcond189.not, label %.split143.us.loopexit, label %.preheader114.us, !llvm.loop !22

.preheader:                                       ; preds = %.split143.us, %.preheader116
  %160 = load i32, ptr @q, align 4, !tbaa !5
  %161 = icmp sgt i32 %160, 0
  br i1 %161, label %.lr.ph147.preheader, label %._crit_edge148

.lr.ph147.preheader:                              ; preds = %.preheader
  %wide.trip.count196 = zext nneg i32 %160 to i64
  br label %.lr.ph147

.split143.us.loopexit:                            ; preds = %.split.us141
  %.pre199 = load i32, ptr %3, align 4, !tbaa !5
  br label %.split143.us

.split143.us:                                     ; preds = %.preheader115.split.us, %.split143.us.loopexit
  %162 = phi i32 [ %.pre199, %.split143.us.loopexit ], [ %98, %.preheader115.split.us ]
  %indvars.iv.next191 = add nuw nsw i64 %indvars.iv190, 1
  %163 = sext i32 %162 to i64
  %.not.not = icmp slt i64 %indvars.iv190, %163
  %indvars.iv.next174 = add nuw nsw i64 %indvars.iv173, 1
  br i1 %.not.not, label %.preheader115.split.us, label %.preheader, !llvm.loop !23

._crit_edge148:                                   ; preds = %206, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret void

.lr.ph147:                                        ; preds = %.lr.ph147.preheader, %206
  %indvars.iv193 = phi i64 [ 0, %.lr.ph147.preheader ], [ %indvars.iv.next194, %206 ]
  %164 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv193
  %165 = load i32, ptr %164, align 4, !tbaa !9
  %166 = getelementptr inbounds i8, ptr %164, i64 4
  %167 = load i32, ptr %166, align 4, !tbaa !11
  %168 = getelementptr inbounds i8, ptr %164, i64 8
  %169 = load i32, ptr %168, align 4, !tbaa !12
  %.not110 = icmp eq i32 %169, 0
  br i1 %.not110, label %170, label %173

170:                                              ; preds = %.lr.ph147
  %171 = icmp eq i32 %165, %167
  %172 = zext i1 %171 to i32
  br label %206

173:                                              ; preds = %.lr.ph147
  %174 = icmp sgt i32 %165, 10
  br i1 %174, label %175, label %185

175:                                              ; preds = %173
  %176 = shl nuw i32 %165, 1
  %177 = add i32 %176, -21
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %178
  %180 = getelementptr inbounds i8, ptr %179, i64 4
  %181 = load i32, ptr %180, align 8, !tbaa !11
  %182 = getelementptr inbounds i8, ptr %179, i64 8
  %183 = load i32, ptr %182, align 4, !tbaa !12
  %184 = sub nsw i32 %169, %183
  br label %185

185:                                              ; preds = %175, %173
  %.089 = phi i32 [ %181, %175 ], [ %165, %173 ]
  %.087 = phi i32 [ %184, %175 ], [ %169, %173 ]
  %186 = icmp sgt i32 %167, 10
  br i1 %186, label %187, label %196

187:                                              ; preds = %185
  %188 = shl nuw i32 %167, 1
  %189 = add i32 %188, -22
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %190
  %192 = load i32, ptr %191, align 8, !tbaa !9
  %193 = getelementptr inbounds i8, ptr %191, i64 8
  %194 = load i32, ptr %193, align 8, !tbaa !12
  %195 = sub nsw i32 %.087, %194
  br label %196

196:                                              ; preds = %187, %185
  %.088 = phi i32 [ %192, %187 ], [ %167, %185 ]
  %.1 = phi i32 [ %195, %187 ], [ %.087, %185 ]
  %197 = icmp slt i32 %.1, 0
  br i1 %197, label %206, label %198

198:                                              ; preds = %196
  %199 = add nsw i32 %.089, -1
  %200 = sext i32 %199 to i64
  %201 = add nsw i32 %.088, -1
  %202 = sext i32 %201 to i64
  %203 = zext nneg i32 %.1 to i64
  %204 = getelementptr inbounds [11 x [11 x [8001 x i32]]], ptr @_ZZ6solve5vE4sols, i64 0, i64 %200, i64 %202, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %198, %196, %170
  %.sink = phi i32 [ %172, %170 ], [ %205, %198 ], [ 0, %196 ]
  %207 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %indvars.iv193
  store i32 %.sink, ptr %207, align 4, !tbaa !5
  %indvars.iv.next194 = add nuw nsw i64 %indvars.iv193, 1
  %exitcond197.not = icmp eq i64 %indvars.iv.next194, %wide.trip.count196
  br i1 %exitcond197.not, label %._crit_edge148, label %.lr.ph147, !llvm.loop !24
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { noreturn nounwind }
attributes #7 = { nounwind }
attributes #8 = { cold 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 0}
!10 = !{!"_ZTS4Edge", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 4}
!12 = !{!10, !6, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14, !20}
!20 = !{!"llvm.loop.unswitch.partial.disable"}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14, !20}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}


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