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

; 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 }
%class.anon.12 = type { i8 }
%class.anon.14 = type { i8 }

@n = external dso_local global i32, align 4
@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.12 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._Z6solve9v = external hidden unnamed_addr constant [14 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [75 x i8], align 1
@_ZZ6solve9vE4ways = external hidden global [1001 x [11 x [11 x i32]]], align 16
@_ZZ6solve9vE1o = external hidden global i32, align 4
@_ZZ6solve9vE3mat = external hidden global [3 x [11 x [11 x i32]]], align 16
@_ZZ6solve9vE3tot = external hidden global i32, align 4
@_ZZ6solve9vE3ord = external hidden global [100001 x i32], align 16
@_ZZ6solve9vE3pre = external hidden global [1001 x [11 x [11 x i32]]], align 16
@_ZZ6solve9vE3suf = external hidden global [1001 x [11 x [11 x i32]]], align 16
@_ZZ6solve9vE3vec = external hidden global [11 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; 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 @_Z6solve9v() #6 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %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 i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  %36 = alloca %class.anon.12, align 1
  %37 = alloca i32, align 4
  %38 = alloca i32, align 4
  %39 = alloca i32, align 4
  %40 = alloca i32, align 4
  %41 = alloca i32, align 4
  %42 = alloca i32, align 4
  %43 = alloca i32, align 4
  %44 = alloca i32, align 4
  %45 = alloca ptr, align 8
  %46 = alloca i32, align 4
  %47 = alloca %class.anon.14, align 1
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca i32, align 4
  %53 = alloca ptr, align 8
  %54 = alloca i32, align 4
  %55 = alloca i32, align 4
  %56 = alloca i32, align 4
  %57 = alloca i32, align 4
  %58 = alloca i32, align 4
  %59 = alloca i32, align 4
  %60 = alloca ptr, align 8
  %61 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #8
  store i32 1000, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 10, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 100001, ptr %3, align 4, !tbaa !5
  %62 = load i32, ptr @n, align 4, !tbaa !5
  %63 = icmp eq i32 %62, 10000
  br i1 %63, label %64, label %65

64:                                               ; preds = %0
  br label %67

65:                                               ; preds = %0
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.1, i32 noundef 637, ptr noundef @__PRETTY_FUNCTION__._Z6solve9v) #9
  unreachable

66:                                               ; No predecessors!
  br label %67

67:                                               ; preds = %66, %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %98, %67
  %69 = load i32, ptr %4, align 4, !tbaa !5
  %70 = load i32, ptr @m, align 4, !tbaa !5
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %101

73:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %74 = load i32, ptr %4, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %75
  store ptr %76, ptr %5, align 8, !tbaa !9
  %77 = load ptr, ptr %5, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.Edge, ptr %77, i32 0, i32 0
  %79 = load i32, ptr %78, align 4, !tbaa !11
  %80 = add nsw i32 %79, 1
  %81 = srem i32 %80, 1000
  %82 = load ptr, ptr %5, align 8, !tbaa !9
  %83 = getelementptr inbounds %struct.Edge, ptr %82, i32 0, i32 1
  %84 = load i32, ptr %83, align 4, !tbaa !13
  %85 = srem i32 %84, 1000
  %86 = icmp eq i32 %81, %85
  br i1 %86, label %87, label %92

87:                                               ; preds = %73
  %88 = load ptr, ptr %5, 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 = icmp eq i32 %90, 1
  br label %92

92:                                               ; preds = %87, %73
  %93 = phi i1 [ false, %73 ], [ %91, %87 ]
  br i1 %93, label %94, label %95

94:                                               ; preds = %92
  br label %97

95:                                               ; preds = %92
  call void @__assert_fail(ptr noundef @.str.27, ptr noundef @.str.1, i32 noundef 640, ptr noundef @__PRETTY_FUNCTION__._Z6solve9v) #9
  unreachable

96:                                               ; No predecessors!
  br label %97

97:                                               ; preds = %96, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %4, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %4, align 4, !tbaa !5
  br label %68, !llvm.loop !15

101:                                              ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %161, %101
  %103 = load i32, ptr %7, align 4, !tbaa !5
  %104 = load i32, ptr @q, align 4, !tbaa !5
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %164

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %108 = load i32, ptr %7, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %109
  store ptr %110, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  %111 = load ptr, ptr %8, align 8, !tbaa !9
  %112 = getelementptr inbounds %struct.Edge, ptr %111, i32 0, i32 1
  %113 = load i32, ptr %112, align 4, !tbaa !13
  %114 = srem i32 %113, 1000
  %115 = load ptr, ptr %8, align 8, !tbaa !9
  %116 = getelementptr inbounds %struct.Edge, ptr %115, i32 0, i32 0
  %117 = load i32, ptr %116, align 4, !tbaa !11
  %118 = srem i32 %117, 1000
  %119 = sub nsw i32 %114, %118
  store i32 %119, ptr %9, align 4, !tbaa !5
  %120 = load i32, ptr %9, align 4, !tbaa !5
  %121 = icmp slt i32 %120, 0
  br i1 %121, label %122, label %125

122:                                              ; preds = %107
  %123 = load i32, ptr %9, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1000
  store i32 %124, ptr %9, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %122, %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 1, ptr %10, align 4, !tbaa !5
  %126 = 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) %10)
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = load ptr, ptr %8, align 8, !tbaa !9
  %129 = getelementptr inbounds %struct.Edge, ptr %128, i32 0, i32 2
  %130 = load i32, ptr %129, align 4, !tbaa !14
  %131 = icmp sle i32 %127, %130
  br i1 %131, label %132, label %147

132:                                              ; preds = %125
  %133 = load ptr, ptr %8, align 8, !tbaa !9
  %134 = getelementptr inbounds %struct.Edge, ptr %133, i32 0, i32 2
  %135 = load i32, ptr %134, align 4, !tbaa !14
  %136 = srem i32 %135, 1000
  %137 = load i32, ptr %9, align 4, !tbaa !5
  %138 = icmp eq i32 %136, %137
  br i1 %138, label %139, label %147

139:                                              ; preds = %132
  %140 = load ptr, ptr %8, align 8, !tbaa !9
  %141 = getelementptr inbounds %struct.Edge, ptr %140, i32 0, i32 2
  %142 = load i32, ptr %141, align 4, !tbaa !14
  %143 = load i32, ptr %9, align 4, !tbaa !5
  %144 = sub nsw i32 %142, %143
  %145 = sdiv i32 %144, 1000
  %146 = icmp slt i32 %145, 100001
  br label %147

147:                                              ; preds = %139, %132, %125
  %148 = phi i1 [ false, %132 ], [ false, %125 ], [ %146, %139 ]
  br i1 %148, label %149, label %150

149:                                              ; preds = %147
  br label %152

150:                                              ; preds = %147
  call void @__assert_fail(ptr noundef @.str.28, ptr noundef @.str.1, i32 noundef 648, ptr noundef @__PRETTY_FUNCTION__._Z6solve9v) #9
  unreachable

151:                                              ; No predecessors!
  br label %152

152:                                              ; preds = %151, %149
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %153 = load ptr, ptr %8, align 8, !tbaa !9
  %154 = getelementptr inbounds %struct.Edge, ptr %153, i32 0, i32 2
  %155 = load i32, ptr %154, align 4, !tbaa !14
  %156 = load i32, ptr %9, align 4, !tbaa !5
  %157 = sub nsw i32 %155, %156
  %158 = sdiv i32 %157, 1000
  store i32 %158, ptr %11, align 4, !tbaa !5
  %159 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %160 = load i32, ptr %159, align 4, !tbaa !5
  store i32 %160, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %161

161:                                              ; preds = %152
  %162 = load i32, ptr %7, align 4, !tbaa !5
  %163 = add nsw i32 %162, 1
  store i32 %163, ptr %7, align 4, !tbaa !5
  br label %102, !llvm.loop !17

164:                                              ; preds = %106
  %165 = load ptr, ptr @stderr, align 8, !tbaa !9
  %166 = load i32, ptr %6, align 4, !tbaa !5
  %167 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %165, ptr noundef @.str.12, i32 noundef %166) #8
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ6solve9vE4ways, i8 0, i64 484484, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %203, %164
  %169 = load i32, ptr %12, align 4, !tbaa !5
  %170 = load i32, ptr @m, align 4, !tbaa !5
  %171 = icmp slt i32 %169, %170
  br i1 %171, label %173, label %172

172:                                              ; preds = %168
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %206

173:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %174 = load i32, ptr %12, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %175
  store ptr %176, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %177 = load ptr, ptr %13, align 8, !tbaa !9
  %178 = getelementptr inbounds %struct.Edge, ptr %177, i32 0, i32 0
  %179 = load i32, ptr %178, align 4, !tbaa !11
  %180 = sub nsw i32 %179, 1
  %181 = srem i32 %180, 1000
  store i32 %181, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  %182 = load ptr, ptr %13, align 8, !tbaa !9
  %183 = getelementptr inbounds %struct.Edge, ptr %182, i32 0, i32 0
  %184 = load i32, ptr %183, align 4, !tbaa !11
  %185 = sub nsw i32 %184, 1
  %186 = sdiv i32 %185, 1000
  store i32 %186, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %187 = load ptr, ptr %13, align 8, !tbaa !9
  %188 = getelementptr inbounds %struct.Edge, ptr %187, i32 0, i32 1
  %189 = load i32, ptr %188, align 4, !tbaa !13
  %190 = sub nsw i32 %189, 1
  %191 = sdiv i32 %190, 1000
  store i32 %191, ptr %16, align 4, !tbaa !5
  %192 = load i32, ptr %14, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %193
  %195 = load i32, ptr %15, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [11 x [11 x i32]], ptr %194, i64 0, i64 %196
  %198 = load i32, ptr %16, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [11 x i32], ptr %197, i64 0, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %202 = add nsw i32 %201, 1
  store i32 %202, ptr %200, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  br label %203

203:                                              ; preds = %173
  %204 = load i32, ptr %12, align 4, !tbaa !5
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %12, align 4, !tbaa !5
  br label %168, !llvm.loop !18

206:                                              ; preds = %172
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ6solve9vE3pre, i8 0, i64 484484, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ6solve9vE3suf, i8 0, i64 484484, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %207

207:                                              ; preds = %224, %206
  %208 = load i32, ptr %17, align 4, !tbaa !5
  %209 = icmp slt i32 %208, 10
  br i1 %209, label %211, label %210

210:                                              ; preds = %207
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  br label %227

211:                                              ; preds = %207
  %212 = load i32, ptr %17, align 4, !tbaa !5
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [11 x [11 x i32]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %213
  %215 = load i32, ptr %17, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [11 x i32], ptr %214, i64 0, i64 %216
  store i32 1, ptr %217, align 4, !tbaa !5
  %218 = load i32, ptr %17, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [11 x [11 x i32]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %219
  %221 = load i32, ptr %17, align 4, !tbaa !5
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [11 x i32], ptr %220, i64 0, i64 %222
  store i32 1, ptr %223, align 4, !tbaa !5
  br label %224

224:                                              ; preds = %211
  %225 = load i32, ptr %17, align 4, !tbaa !5
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %17, align 4, !tbaa !5
  br label %207, !llvm.loop !19

227:                                              ; preds = %210
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 1, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %228

228:                                              ; preds = %302, %227
  %229 = load i32, ptr %18, align 4, !tbaa !5
  %230 = icmp ne i32 %229, 0
  br i1 %230, label %232, label %231

231:                                              ; preds = %228
  store i32 14, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %307

232:                                              ; preds = %228
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %233

233:                                              ; preds = %298, %232
  %234 = load i32, ptr %21, align 4, !tbaa !5
  %235 = icmp slt i32 %234, 10
  br i1 %235, label %237, label %236

236:                                              ; preds = %233
  store i32 17, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %301

237:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %238

238:                                              ; preds = %294, %237
  %239 = load i32, ptr %22, align 4, !tbaa !5
  %240 = icmp slt i32 %239, 10
  br i1 %240, label %242, label %241

241:                                              ; preds = %238
  store i32 20, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %297

242:                                              ; preds = %238
  %243 = load i32, ptr %19, align 4, !tbaa !5
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %244
  %246 = load i32, ptr %21, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [11 x [11 x i32]], ptr %245, i64 0, i64 %247
  %249 = load i32, ptr %22, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [11 x i32], ptr %248, i64 0, i64 %250
  %252 = load i32, ptr %251, align 4, !tbaa !5
  %253 = icmp ne i32 %252, 0
  br i1 %253, label %255, label %254

254:                                              ; preds = %242
  br label %294

255:                                              ; preds = %242
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %256

256:                                              ; preds = %290, %255
  %257 = load i32, ptr %23, align 4, !tbaa !5
  %258 = icmp slt i32 %257, 10
  br i1 %258, label %260, label %259

259:                                              ; preds = %256
  store i32 23, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %293

260:                                              ; preds = %256
  %261 = load i32, ptr %18, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %262
  %264 = load i32, ptr %21, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [11 x [11 x i32]], ptr %263, i64 0, i64 %265
  %267 = load i32, ptr %23, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [11 x i32], ptr %266, i64 0, i64 %268
  %270 = load i32, ptr %19, align 4, !tbaa !5
  %271 = sext i32 %270 to i64
  %272 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %271
  %273 = load i32, ptr %21, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [11 x [11 x i32]], ptr %272, i64 0, i64 %274
  %276 = load i32, ptr %22, align 4, !tbaa !5
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [11 x i32], ptr %275, i64 0, i64 %277
  %279 = load i32, ptr %278, align 4, !tbaa !5
  %280 = load i32, ptr %19, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %281
  %283 = load i32, ptr %22, align 4, !tbaa !5
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [11 x [11 x i32]], ptr %282, i64 0, i64 %284
  %286 = load i32, ptr %23, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [11 x i32], ptr %285, i64 0, i64 %287
  %289 = load i32, ptr %288, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %269, i32 noundef %279, i32 noundef %289)
  br label %290

290:                                              ; preds = %260
  %291 = load i32, ptr %23, align 4, !tbaa !5
  %292 = add nsw i32 %291, 1
  store i32 %292, ptr %23, align 4, !tbaa !5
  br label %256, !llvm.loop !20

293:                                              ; preds = %259
  br label %294

294:                                              ; preds = %293, %254
  %295 = load i32, ptr %22, align 4, !tbaa !5
  %296 = add nsw i32 %295, 1
  store i32 %296, ptr %22, align 4, !tbaa !5
  br label %238, !llvm.loop !21

297:                                              ; preds = %241
  br label %298

298:                                              ; preds = %297
  %299 = load i32, ptr %21, align 4, !tbaa !5
  %300 = add nsw i32 %299, 1
  store i32 %300, ptr %21, align 4, !tbaa !5
  br label %233, !llvm.loop !22

301:                                              ; preds = %236
  br label %302

302:                                              ; preds = %301
  %303 = load i32, ptr %18, align 4, !tbaa !5
  store i32 %303, ptr %19, align 4, !tbaa !5
  %304 = load i32, ptr %18, align 4, !tbaa !5
  %305 = add nsw i32 %304, 1
  %306 = srem i32 %305, 1000
  store i32 %306, ptr %18, align 4, !tbaa !5
  br label %228, !llvm.loop !23

307:                                              ; preds = %231
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 999, ptr %24, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %308

308:                                              ; preds = %382, %307
  %309 = load i32, ptr %24, align 4, !tbaa !5
  %310 = icmp ne i32 %309, 0
  br i1 %310, label %312, label %311

311:                                              ; preds = %308
  store i32 26, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %387

312:                                              ; preds = %308
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #8
  store i32 0, ptr %26, align 4, !tbaa !5
  br label %313

313:                                              ; preds = %378, %312
  %314 = load i32, ptr %26, align 4, !tbaa !5
  %315 = icmp slt i32 %314, 10
  br i1 %315, label %317, label %316

316:                                              ; preds = %313
  store i32 29, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %381

317:                                              ; preds = %313
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %318

318:                                              ; preds = %374, %317
  %319 = load i32, ptr %27, align 4, !tbaa !5
  %320 = icmp slt i32 %319, 10
  br i1 %320, label %322, label %321

321:                                              ; preds = %318
  store i32 32, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %377

322:                                              ; preds = %318
  %323 = load i32, ptr %24, align 4, !tbaa !5
  %324 = sext i32 %323 to i64
  %325 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %324
  %326 = load i32, ptr %26, align 4, !tbaa !5
  %327 = sext i32 %326 to i64
  %328 = getelementptr inbounds [11 x [11 x i32]], ptr %325, i64 0, i64 %327
  %329 = load i32, ptr %27, align 4, !tbaa !5
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds [11 x i32], ptr %328, i64 0, i64 %330
  %332 = load i32, ptr %331, align 4, !tbaa !5
  %333 = icmp ne i32 %332, 0
  br i1 %333, label %335, label %334

334:                                              ; preds = %322
  br label %374

335:                                              ; preds = %322
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store i32 0, ptr %28, align 4, !tbaa !5
  br label %336

336:                                              ; preds = %370, %335
  %337 = load i32, ptr %28, align 4, !tbaa !5
  %338 = icmp slt i32 %337, 10
  br i1 %338, label %340, label %339

339:                                              ; preds = %336
  store i32 35, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %373

340:                                              ; preds = %336
  %341 = load i32, ptr %24, align 4, !tbaa !5
  %342 = sext i32 %341 to i64
  %343 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %342
  %344 = load i32, ptr %26, align 4, !tbaa !5
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds [11 x [11 x i32]], ptr %343, i64 0, i64 %345
  %347 = load i32, ptr %28, align 4, !tbaa !5
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds [11 x i32], ptr %346, i64 0, i64 %348
  %350 = load i32, ptr %24, align 4, !tbaa !5
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %351
  %353 = load i32, ptr %26, align 4, !tbaa !5
  %354 = sext i32 %353 to i64
  %355 = getelementptr inbounds [11 x [11 x i32]], ptr %352, i64 0, i64 %354
  %356 = load i32, ptr %27, align 4, !tbaa !5
  %357 = sext i32 %356 to i64
  %358 = getelementptr inbounds [11 x i32], ptr %355, i64 0, i64 %357
  %359 = load i32, ptr %358, align 4, !tbaa !5
  %360 = load i32, ptr %25, align 4, !tbaa !5
  %361 = sext i32 %360 to i64
  %362 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %361
  %363 = load i32, ptr %27, align 4, !tbaa !5
  %364 = sext i32 %363 to i64
  %365 = getelementptr inbounds [11 x [11 x i32]], ptr %362, i64 0, i64 %364
  %366 = load i32, ptr %28, align 4, !tbaa !5
  %367 = sext i32 %366 to i64
  %368 = getelementptr inbounds [11 x i32], ptr %365, i64 0, i64 %367
  %369 = load i32, ptr %368, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %349, i32 noundef %359, i32 noundef %369)
  br label %370

370:                                              ; preds = %340
  %371 = load i32, ptr %28, align 4, !tbaa !5
  %372 = add nsw i32 %371, 1
  store i32 %372, ptr %28, align 4, !tbaa !5
  br label %336, !llvm.loop !24

373:                                              ; preds = %339
  br label %374

374:                                              ; preds = %373, %334
  %375 = load i32, ptr %27, align 4, !tbaa !5
  %376 = add nsw i32 %375, 1
  store i32 %376, ptr %27, align 4, !tbaa !5
  br label %318, !llvm.loop !25

377:                                              ; preds = %321
  br label %378

378:                                              ; preds = %377
  %379 = load i32, ptr %26, align 4, !tbaa !5
  %380 = add nsw i32 %379, 1
  store i32 %380, ptr %26, align 4, !tbaa !5
  br label %313, !llvm.loop !26

381:                                              ; preds = %316
  br label %382

382:                                              ; preds = %381
  %383 = load i32, ptr %24, align 4, !tbaa !5
  store i32 %383, ptr %25, align 4, !tbaa !5
  %384 = load i32, ptr %24, align 4, !tbaa !5
  %385 = sub nsw i32 %384, 1
  %386 = srem i32 %385, 1000
  store i32 %386, ptr %24, align 4, !tbaa !5
  br label %308, !llvm.loop !27

387:                                              ; preds = %311
  call void @llvm.memset.p0.i64(ptr align 8 getelementptr inbounds ([3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 2), i8 0, i64 484, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %388

388:                                              ; preds = %441, %387
  %389 = load i32, ptr %29, align 4, !tbaa !5
  %390 = icmp slt i32 %389, 10
  br i1 %390, label %392, label %391

391:                                              ; preds = %388
  store i32 38, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %444

392:                                              ; preds = %388
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #8
  store i32 0, ptr %30, align 4, !tbaa !5
  br label %393

393:                                              ; preds = %437, %392
  %394 = load i32, ptr %30, align 4, !tbaa !5
  %395 = icmp slt i32 %394, 10
  br i1 %395, label %397, label %396

396:                                              ; preds = %393
  store i32 41, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #8
  br label %440

397:                                              ; preds = %393
  %398 = load i32, ptr %29, align 4, !tbaa !5
  %399 = sext i32 %398 to i64
  %400 = getelementptr inbounds [11 x [11 x i32]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %399
  %401 = load i32, ptr %30, align 4, !tbaa !5
  %402 = sext i32 %401 to i64
  %403 = getelementptr inbounds [11 x i32], ptr %400, i64 0, i64 %402
  %404 = load i32, ptr %403, align 4, !tbaa !5
  %405 = icmp ne i32 %404, 0
  br i1 %405, label %407, label %406

406:                                              ; preds = %397
  br label %437

407:                                              ; preds = %397
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #8
  store i32 0, ptr %31, align 4, !tbaa !5
  br label %408

408:                                              ; preds = %433, %407
  %409 = load i32, ptr %31, align 4, !tbaa !5
  %410 = icmp slt i32 %409, 10
  br i1 %410, label %412, label %411

411:                                              ; preds = %408
  store i32 44, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #8
  br label %436

412:                                              ; preds = %408
  %413 = load i32, ptr %29, align 4, !tbaa !5
  %414 = sext i32 %413 to i64
  %415 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds ([3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 2), i64 0, i64 %414
  %416 = load i32, ptr %31, align 4, !tbaa !5
  %417 = sext i32 %416 to i64
  %418 = getelementptr inbounds [11 x i32], ptr %415, i64 0, i64 %417
  %419 = load i32, ptr %29, align 4, !tbaa !5
  %420 = sext i32 %419 to i64
  %421 = getelementptr inbounds [11 x [11 x i32]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %420
  %422 = load i32, ptr %30, align 4, !tbaa !5
  %423 = sext i32 %422 to i64
  %424 = getelementptr inbounds [11 x i32], ptr %421, i64 0, i64 %423
  %425 = load i32, ptr %424, align 4, !tbaa !5
  %426 = load i32, ptr %30, align 4, !tbaa !5
  %427 = sext i32 %426 to i64
  %428 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds ([1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 1), i64 0, i64 %427
  %429 = load i32, ptr %31, align 4, !tbaa !5
  %430 = sext i32 %429 to i64
  %431 = getelementptr inbounds [11 x i32], ptr %428, i64 0, i64 %430
  %432 = load i32, ptr %431, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %418, i32 noundef %425, i32 noundef %432)
  br label %433

433:                                              ; preds = %412
  %434 = load i32, ptr %31, align 4, !tbaa !5
  %435 = add nsw i32 %434, 1
  store i32 %435, ptr %31, align 4, !tbaa !5
  br label %408, !llvm.loop !28

436:                                              ; preds = %411
  br label %437

437:                                              ; preds = %436, %406
  %438 = load i32, ptr %30, align 4, !tbaa !5
  %439 = add nsw i32 %438, 1
  store i32 %439, ptr %30, align 4, !tbaa !5
  br label %393, !llvm.loop !29

440:                                              ; preds = %396
  br label %441

441:                                              ; preds = %440
  %442 = load i32, ptr %29, align 4, !tbaa !5
  %443 = add nsw i32 %442, 1
  store i32 %443, ptr %29, align 4, !tbaa !5
  br label %388, !llvm.loop !30

444:                                              ; preds = %391
  store i32 0, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #8
  store i32 0, ptr %32, align 4, !tbaa !5
  br label %445

445:                                              ; preds = %491, %444
  %446 = load i32, ptr %32, align 4, !tbaa !5
  %447 = load i32, ptr @q, align 4, !tbaa !5
  %448 = icmp slt i32 %446, %447
  br i1 %448, label %450, label %449

449:                                              ; preds = %445
  store i32 47, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #8
  br label %494

450:                                              ; preds = %445
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #8
  %451 = load i32, ptr %32, align 4, !tbaa !5
  %452 = sext i32 %451 to i64
  %453 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %452
  store ptr %453, ptr %33, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #8
  %454 = load ptr, ptr %33, align 8, !tbaa !9
  %455 = getelementptr inbounds %struct.Edge, ptr %454, i32 0, i32 0
  %456 = load i32, ptr %455, align 4, !tbaa !11
  %457 = sub nsw i32 %456, 1
  %458 = srem i32 %457, 1000
  store i32 %458, ptr %34, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #8
  %459 = load ptr, ptr %33, align 8, !tbaa !9
  %460 = getelementptr inbounds %struct.Edge, ptr %459, i32 0, i32 1
  %461 = load i32, ptr %460, align 4, !tbaa !13
  %462 = sub nsw i32 %461, 1
  %463 = srem i32 %462, 1000
  store i32 %463, ptr %35, align 4, !tbaa !5
  %464 = load i32, ptr %34, align 4, !tbaa !5
  %465 = icmp ne i32 %464, 0
  br i1 %465, label %466, label %469

466:                                              ; preds = %450
  %467 = load i32, ptr %34, align 4, !tbaa !5
  %468 = sub nsw i32 1000, %467
  br label %470

469:                                              ; preds = %450
  br label %470

470:                                              ; preds = %469, %466
  %471 = phi i32 [ %468, %466 ], [ 0, %469 ]
  %472 = load i32, ptr %35, align 4, !tbaa !5
  %473 = add nsw i32 %471, %472
  %474 = load ptr, ptr %33, align 8, !tbaa !9
  %475 = getelementptr inbounds %struct.Edge, ptr %474, i32 0, i32 2
  %476 = load i32, ptr %475, align 4, !tbaa !14
  %477 = sub nsw i32 %476, %473
  store i32 %477, ptr %475, align 4, !tbaa !14
  %478 = load i32, ptr %32, align 4, !tbaa !5
  %479 = sext i32 %478 to i64
  %480 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %479
  %481 = getelementptr inbounds %struct.Edge, ptr %480, i32 0, i32 2
  %482 = load i32, ptr %481, align 4, !tbaa !14
  %483 = icmp slt i32 %482, 0
  br i1 %483, label %484, label %490

484:                                              ; preds = %470
  %485 = load i32, ptr %32, align 4, !tbaa !5
  %486 = load i32, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %487 = add nsw i32 %486, 1
  store i32 %487, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %488 = sext i32 %486 to i64
  %489 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %488
  store i32 %485, ptr %489, align 4, !tbaa !5
  br label %490

490:                                              ; preds = %484, %470
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #8
  br label %491

491:                                              ; preds = %490
  %492 = load i32, ptr %32, align 4, !tbaa !5
  %493 = add nsw i32 %492, 1
  store i32 %493, ptr %32, align 4, !tbaa !5
  br label %445, !llvm.loop !31

494:                                              ; preds = %449
  %495 = load i32, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %496 = sext i32 %495 to i64
  %497 = getelementptr inbounds i32, ptr @_ZZ6solve9vE3ord, i64 %496
  call void @"_ZSt4sortIPiZ6solve9vE3$_0EvT_S2_T0_"(ptr noundef @_ZZ6solve9vE3ord, ptr noundef %497)
  call void @llvm.lifetime.start.p0(i64 4, ptr %37) #8
  store i32 0, ptr %37, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #8
  store i32 0, ptr %38, align 4, !tbaa !5
  br label %498

498:                                              ; preds = %678, %494
  %499 = load i32, ptr %37, align 4, !tbaa !5
  %500 = load i32, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %501 = icmp slt i32 %499, %500
  br i1 %501, label %502, label %505

502:                                              ; preds = %498
  %503 = load i32, ptr %38, align 4, !tbaa !5
  %504 = icmp slt i32 %503, 1000
  br label %505

505:                                              ; preds = %502, %498
  %506 = phi i1 [ false, %498 ], [ %504, %502 ]
  br i1 %506, label %508, label %507

507:                                              ; preds = %505
  store i32 50, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %37) #8
  br label %679

508:                                              ; preds = %505
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #8
  %509 = load i32, ptr %37, align 4, !tbaa !5
  %510 = sext i32 %509 to i64
  %511 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %510
  %512 = load i32, ptr %511, align 4, !tbaa !5
  %513 = sext i32 %512 to i64
  %514 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %513
  %515 = getelementptr inbounds %struct.Edge, ptr %514, i32 0, i32 0
  %516 = load i32, ptr %515, align 4, !tbaa !11
  %517 = sub nsw i32 %516, 1
  %518 = srem i32 %517, 1000
  store i32 %518, ptr %39, align 4, !tbaa !5
  %519 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %38, ptr noundef nonnull align 4 dereferenceable(4) %39)
  %520 = load i32, ptr %519, align 4, !tbaa !5
  store i32 %520, ptr %38, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #8
  %521 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %522 = sext i32 %521 to i64
  %523 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %522
  %524 = getelementptr inbounds [11 x [11 x i32]], ptr %523, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %524, ptr align 16 @_ZZ6solve9vE3pre, i64 484, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %40) #8
  %525 = load i32, ptr %38, align 4, !tbaa !5
  store i32 %525, ptr %40, align 4, !tbaa !5
  br label %526

526:                                              ; preds = %675, %508
  %527 = load i32, ptr %37, align 4, !tbaa !5
  %528 = load i32, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %529 = icmp slt i32 %527, %528
  br i1 %529, label %530, label %543

530:                                              ; preds = %526
  %531 = load i32, ptr %37, align 4, !tbaa !5
  %532 = sext i32 %531 to i64
  %533 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %532
  %534 = load i32, ptr %533, align 4, !tbaa !5
  %535 = sext i32 %534 to i64
  %536 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %535
  %537 = getelementptr inbounds %struct.Edge, ptr %536, i32 0, i32 0
  %538 = load i32, ptr %537, align 4, !tbaa !11
  %539 = sub nsw i32 %538, 1
  %540 = srem i32 %539, 1000
  %541 = load i32, ptr %38, align 4, !tbaa !5
  %542 = icmp eq i32 %540, %541
  br label %543

543:                                              ; preds = %530, %526
  %544 = phi i1 [ false, %526 ], [ %542, %530 ]
  br i1 %544, label %546, label %545

545:                                              ; preds = %543
  store i32 52, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %40) #8
  br label %678

546:                                              ; preds = %543
  br label %547

547:                                              ; preds = %642, %546
  %548 = load i32, ptr %40, align 4, !tbaa !5
  %549 = load i32, ptr %37, align 4, !tbaa !5
  %550 = sext i32 %549 to i64
  %551 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %550
  %552 = load i32, ptr %551, align 4, !tbaa !5
  %553 = sext i32 %552 to i64
  %554 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %553
  %555 = getelementptr inbounds %struct.Edge, ptr %554, i32 0, i32 1
  %556 = load i32, ptr %555, align 4, !tbaa !13
  %557 = sub nsw i32 %556, 1
  %558 = srem i32 %557, 1000
  %559 = icmp ne i32 %548, %558
  br i1 %559, label %560, label %646

560:                                              ; preds = %547
  %561 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %562 = icmp ne i32 %561, 0
  %563 = xor i1 %562, true
  %564 = zext i1 %563 to i32
  store i32 %564, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %565 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %566 = sext i32 %565 to i64
  %567 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %566
  %568 = getelementptr inbounds [11 x [11 x i32]], ptr %567, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %568, i8 0, i64 484, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %41) #8
  store i32 0, ptr %41, align 4, !tbaa !5
  br label %569

569:                                              ; preds = %638, %560
  %570 = load i32, ptr %41, align 4, !tbaa !5
  %571 = icmp slt i32 %570, 10
  br i1 %571, label %573, label %572

572:                                              ; preds = %569
  store i32 58, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %41) #8
  br label %641

573:                                              ; preds = %569
  call void @llvm.lifetime.start.p0(i64 4, ptr %42) #8
  store i32 0, ptr %42, align 4, !tbaa !5
  br label %574

574:                                              ; preds = %634, %573
  %575 = load i32, ptr %42, align 4, !tbaa !5
  %576 = icmp slt i32 %575, 10
  br i1 %576, label %578, label %577

577:                                              ; preds = %574
  store i32 61, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %42) #8
  br label %637

578:                                              ; preds = %574
  %579 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %580 = icmp ne i32 %579, 0
  %581 = xor i1 %580, true
  %582 = zext i1 %581 to i64
  %583 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %582
  %584 = load i32, ptr %41, align 4, !tbaa !5
  %585 = sext i32 %584 to i64
  %586 = getelementptr inbounds [11 x [11 x i32]], ptr %583, i64 0, i64 %585
  %587 = load i32, ptr %42, align 4, !tbaa !5
  %588 = sext i32 %587 to i64
  %589 = getelementptr inbounds [11 x i32], ptr %586, i64 0, i64 %588
  %590 = load i32, ptr %589, align 4, !tbaa !5
  %591 = icmp ne i32 %590, 0
  br i1 %591, label %593, label %592

592:                                              ; preds = %578
  br label %634

593:                                              ; preds = %578
  call void @llvm.lifetime.start.p0(i64 4, ptr %43) #8
  store i32 0, ptr %43, align 4, !tbaa !5
  br label %594

594:                                              ; preds = %630, %593
  %595 = load i32, ptr %43, align 4, !tbaa !5
  %596 = icmp slt i32 %595, 10
  br i1 %596, label %598, label %597

597:                                              ; preds = %594
  store i32 64, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %43) #8
  br label %633

598:                                              ; preds = %594
  %599 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %600 = sext i32 %599 to i64
  %601 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %600
  %602 = load i32, ptr %41, align 4, !tbaa !5
  %603 = sext i32 %602 to i64
  %604 = getelementptr inbounds [11 x [11 x i32]], ptr %601, i64 0, i64 %603
  %605 = load i32, ptr %43, align 4, !tbaa !5
  %606 = sext i32 %605 to i64
  %607 = getelementptr inbounds [11 x i32], ptr %604, i64 0, i64 %606
  %608 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %609 = icmp ne i32 %608, 0
  %610 = xor i1 %609, true
  %611 = zext i1 %610 to i64
  %612 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %611
  %613 = load i32, ptr %41, align 4, !tbaa !5
  %614 = sext i32 %613 to i64
  %615 = getelementptr inbounds [11 x [11 x i32]], ptr %612, i64 0, i64 %614
  %616 = load i32, ptr %42, align 4, !tbaa !5
  %617 = sext i32 %616 to i64
  %618 = getelementptr inbounds [11 x i32], ptr %615, i64 0, i64 %617
  %619 = load i32, ptr %618, align 4, !tbaa !5
  %620 = load i32, ptr %40, align 4, !tbaa !5
  %621 = sext i32 %620 to i64
  %622 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %621
  %623 = load i32, ptr %42, align 4, !tbaa !5
  %624 = sext i32 %623 to i64
  %625 = getelementptr inbounds [11 x [11 x i32]], ptr %622, i64 0, i64 %624
  %626 = load i32, ptr %43, align 4, !tbaa !5
  %627 = sext i32 %626 to i64
  %628 = getelementptr inbounds [11 x i32], ptr %625, i64 0, i64 %627
  %629 = load i32, ptr %628, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %607, i32 noundef %619, i32 noundef %629)
  br label %630

630:                                              ; preds = %598
  %631 = load i32, ptr %43, align 4, !tbaa !5
  %632 = add nsw i32 %631, 1
  store i32 %632, ptr %43, align 4, !tbaa !5
  br label %594, !llvm.loop !32

633:                                              ; preds = %597
  br label %634

634:                                              ; preds = %633, %592
  %635 = load i32, ptr %42, align 4, !tbaa !5
  %636 = add nsw i32 %635, 1
  store i32 %636, ptr %42, align 4, !tbaa !5
  br label %574, !llvm.loop !33

637:                                              ; preds = %577
  br label %638

638:                                              ; preds = %637
  %639 = load i32, ptr %41, align 4, !tbaa !5
  %640 = add nsw i32 %639, 1
  store i32 %640, ptr %41, align 4, !tbaa !5
  br label %569, !llvm.loop !34

641:                                              ; preds = %572
  br label %642

642:                                              ; preds = %641
  %643 = load i32, ptr %40, align 4, !tbaa !5
  %644 = add nsw i32 %643, 1
  %645 = srem i32 %644, 1000
  store i32 %645, ptr %40, align 4, !tbaa !5
  br label %547, !llvm.loop !35

646:                                              ; preds = %547
  call void @llvm.lifetime.start.p0(i64 4, ptr %44) #8
  %647 = load i32, ptr %37, align 4, !tbaa !5
  %648 = sext i32 %647 to i64
  %649 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %648
  %650 = load i32, ptr %649, align 4, !tbaa !5
  store i32 %650, ptr %44, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #8
  %651 = load i32, ptr %44, align 4, !tbaa !5
  %652 = sext i32 %651 to i64
  %653 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %652
  store ptr %653, ptr %45, align 8, !tbaa !9
  %654 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %655 = sext i32 %654 to i64
  %656 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %655
  %657 = load ptr, ptr %45, align 8, !tbaa !9
  %658 = getelementptr inbounds %struct.Edge, ptr %657, i32 0, i32 0
  %659 = load i32, ptr %658, align 4, !tbaa !11
  %660 = sub nsw i32 %659, 1
  %661 = sdiv i32 %660, 1000
  %662 = sext i32 %661 to i64
  %663 = getelementptr inbounds [11 x [11 x i32]], ptr %656, i64 0, i64 %662
  %664 = load ptr, ptr %45, align 8, !tbaa !9
  %665 = getelementptr inbounds %struct.Edge, ptr %664, i32 0, i32 1
  %666 = load i32, ptr %665, align 4, !tbaa !13
  %667 = sub nsw i32 %666, 1
  %668 = sdiv i32 %667, 1000
  %669 = sext i32 %668 to i64
  %670 = getelementptr inbounds [11 x i32], ptr %663, i64 0, i64 %669
  %671 = load i32, ptr %670, align 4, !tbaa !5
  %672 = load i32, ptr %44, align 4, !tbaa !5
  %673 = sext i32 %672 to i64
  %674 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %673
  store i32 %671, ptr %674, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %44) #8
  br label %675

675:                                              ; preds = %646
  %676 = load i32, ptr %37, align 4, !tbaa !5
  %677 = add nsw i32 %676, 1
  store i32 %677, ptr %37, align 4, !tbaa !5
  br label %526, !llvm.loop !36

678:                                              ; preds = %545
  br label %498, !llvm.loop !37

679:                                              ; preds = %507
  store i32 0, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #8
  store i32 0, ptr %46, align 4, !tbaa !5
  br label %680

680:                                              ; preds = %699, %679
  %681 = load i32, ptr %46, align 4, !tbaa !5
  %682 = load i32, ptr @q, align 4, !tbaa !5
  %683 = icmp slt i32 %681, %682
  br i1 %683, label %685, label %684

684:                                              ; preds = %680
  store i32 67, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #8
  br label %702

685:                                              ; preds = %680
  %686 = load i32, ptr %46, align 4, !tbaa !5
  %687 = sext i32 %686 to i64
  %688 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %687
  %689 = getelementptr inbounds %struct.Edge, ptr %688, i32 0, i32 2
  %690 = load i32, ptr %689, align 4, !tbaa !14
  %691 = icmp sge i32 %690, 0
  br i1 %691, label %692, label %698

692:                                              ; preds = %685
  %693 = load i32, ptr %46, align 4, !tbaa !5
  %694 = load i32, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %695 = add nsw i32 %694, 1
  store i32 %695, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %696 = sext i32 %694 to i64
  %697 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %696
  store i32 %693, ptr %697, align 4, !tbaa !5
  br label %698

698:                                              ; preds = %692, %685
  br label %699

699:                                              ; preds = %698
  %700 = load i32, ptr %46, align 4, !tbaa !5
  %701 = add nsw i32 %700, 1
  store i32 %701, ptr %46, align 4, !tbaa !5
  br label %680, !llvm.loop !38

702:                                              ; preds = %684
  %703 = load i32, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %704 = sext i32 %703 to i64
  %705 = getelementptr inbounds i32, ptr @_ZZ6solve9vE3ord, i64 %704
  call void @"_ZSt4sortIPiZ6solve9vE3$_1EvT_S2_T0_"(ptr noundef @_ZZ6solve9vE3ord, ptr noundef %705)
  %706 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %707 = sext i32 %706 to i64
  %708 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %707
  %709 = getelementptr inbounds [11 x [11 x i32]], ptr %708, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %709, ptr align 16 @_ZZ6solve9vE3pre, i64 484, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #8
  store i32 0, ptr %48, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #8
  store i32 0, ptr %49, align 4, !tbaa !5
  br label %710

710:                                              ; preds = %916, %702
  %711 = load i32, ptr %48, align 4, !tbaa !5
  %712 = load i32, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %713 = icmp slt i32 %711, %712
  br i1 %713, label %715, label %714

714:                                              ; preds = %710
  store i32 70, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #8
  br label %919

715:                                              ; preds = %710
  br label %716

716:                                              ; preds = %802, %715
  %717 = load i32, ptr %49, align 4, !tbaa !5
  %718 = add nsw i32 %717, 1000
  %719 = load i32, ptr %48, align 4, !tbaa !5
  %720 = sext i32 %719 to i64
  %721 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %720
  %722 = load i32, ptr %721, align 4, !tbaa !5
  %723 = sext i32 %722 to i64
  %724 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %723
  %725 = getelementptr inbounds %struct.Edge, ptr %724, i32 0, i32 2
  %726 = load i32, ptr %725, align 4, !tbaa !14
  %727 = icmp sle i32 %718, %726
  br i1 %727, label %728, label %805

728:                                              ; preds = %716
  %729 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %730 = icmp ne i32 %729, 0
  %731 = xor i1 %730, true
  %732 = zext i1 %731 to i32
  store i32 %732, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %733 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %734 = sext i32 %733 to i64
  %735 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %734
  %736 = getelementptr inbounds [11 x [11 x i32]], ptr %735, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %736, i8 0, i64 484, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #8
  store i32 0, ptr %50, align 4, !tbaa !5
  br label %737

737:                                              ; preds = %798, %728
  %738 = load i32, ptr %50, align 4, !tbaa !5
  %739 = icmp slt i32 %738, 10
  br i1 %739, label %741, label %740

740:                                              ; preds = %737
  store i32 76, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #8
  br label %801

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

742:                                              ; preds = %794, %741
  %743 = load i32, ptr %51, align 4, !tbaa !5
  %744 = icmp slt i32 %743, 10
  br i1 %744, label %746, label %745

745:                                              ; preds = %742
  store i32 79, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #8
  br label %797

746:                                              ; preds = %742
  %747 = load i32, ptr %50, align 4, !tbaa !5
  %748 = sext i32 %747 to i64
  %749 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds ([3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 2), i64 0, i64 %748
  %750 = load i32, ptr %51, align 4, !tbaa !5
  %751 = sext i32 %750 to i64
  %752 = getelementptr inbounds [11 x i32], ptr %749, i64 0, i64 %751
  %753 = load i32, ptr %752, align 4, !tbaa !5
  %754 = icmp ne i32 %753, 0
  br i1 %754, label %756, label %755

755:                                              ; preds = %746
  br label %794

756:                                              ; preds = %746
  call void @llvm.lifetime.start.p0(i64 4, ptr %52) #8
  store i32 0, ptr %52, align 4, !tbaa !5
  br label %757

757:                                              ; preds = %790, %756
  %758 = load i32, ptr %52, align 4, !tbaa !5
  %759 = icmp slt i32 %758, 10
  br i1 %759, label %761, label %760

760:                                              ; preds = %757
  store i32 82, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %52) #8
  br label %793

761:                                              ; preds = %757
  %762 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %763 = sext i32 %762 to i64
  %764 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %763
  %765 = load i32, ptr %50, align 4, !tbaa !5
  %766 = sext i32 %765 to i64
  %767 = getelementptr inbounds [11 x [11 x i32]], ptr %764, i64 0, i64 %766
  %768 = load i32, ptr %52, align 4, !tbaa !5
  %769 = sext i32 %768 to i64
  %770 = getelementptr inbounds [11 x i32], ptr %767, i64 0, i64 %769
  %771 = load i32, ptr %50, align 4, !tbaa !5
  %772 = sext i32 %771 to i64
  %773 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds ([3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 2), i64 0, i64 %772
  %774 = load i32, ptr %51, align 4, !tbaa !5
  %775 = sext i32 %774 to i64
  %776 = getelementptr inbounds [11 x i32], ptr %773, i64 0, i64 %775
  %777 = load i32, ptr %776, align 4, !tbaa !5
  %778 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %779 = icmp ne i32 %778, 0
  %780 = xor i1 %779, true
  %781 = zext i1 %780 to i64
  %782 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %781
  %783 = load i32, ptr %51, align 4, !tbaa !5
  %784 = sext i32 %783 to i64
  %785 = getelementptr inbounds [11 x [11 x i32]], ptr %782, i64 0, i64 %784
  %786 = load i32, ptr %52, align 4, !tbaa !5
  %787 = sext i32 %786 to i64
  %788 = getelementptr inbounds [11 x i32], ptr %785, i64 0, i64 %787
  %789 = load i32, ptr %788, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %770, i32 noundef %777, i32 noundef %789)
  br label %790

790:                                              ; preds = %761
  %791 = load i32, ptr %52, align 4, !tbaa !5
  %792 = add nsw i32 %791, 1
  store i32 %792, ptr %52, align 4, !tbaa !5
  br label %757, !llvm.loop !39

793:                                              ; preds = %760
  br label %794

794:                                              ; preds = %793, %755
  %795 = load i32, ptr %51, align 4, !tbaa !5
  %796 = add nsw i32 %795, 1
  store i32 %796, ptr %51, align 4, !tbaa !5
  br label %742, !llvm.loop !40

797:                                              ; preds = %745
  br label %798

798:                                              ; preds = %797
  %799 = load i32, ptr %50, align 4, !tbaa !5
  %800 = add nsw i32 %799, 1
  store i32 %800, ptr %50, align 4, !tbaa !5
  br label %737, !llvm.loop !41

801:                                              ; preds = %740
  br label %802

802:                                              ; preds = %801
  %803 = load i32, ptr %49, align 4, !tbaa !5
  %804 = add nsw i32 %803, 1000
  store i32 %804, ptr %49, align 4, !tbaa !5
  br label %716, !llvm.loop !42

805:                                              ; preds = %716
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #8
  %806 = load i32, ptr %48, align 4, !tbaa !5
  %807 = sext i32 %806 to i64
  %808 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %807
  %809 = load i32, ptr %808, align 4, !tbaa !5
  %810 = sext i32 %809 to i64
  %811 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %810
  store ptr %811, ptr %53, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %54) #8
  %812 = load ptr, ptr %53, align 8, !tbaa !9
  %813 = getelementptr inbounds %struct.Edge, ptr %812, i32 0, i32 0
  %814 = load i32, ptr %813, align 4, !tbaa !11
  %815 = sub nsw i32 %814, 1
  %816 = srem i32 %815, 1000
  store i32 %816, ptr %54, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %55) #8
  %817 = load ptr, ptr %53, align 8, !tbaa !9
  %818 = getelementptr inbounds %struct.Edge, ptr %817, i32 0, i32 0
  %819 = load i32, ptr %818, align 4, !tbaa !11
  %820 = sub nsw i32 %819, 1
  %821 = sdiv i32 %820, 1000
  store i32 %821, ptr %55, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %56) #8
  %822 = load ptr, ptr %53, align 8, !tbaa !9
  %823 = getelementptr inbounds %struct.Edge, ptr %822, i32 0, i32 1
  %824 = load i32, ptr %823, align 4, !tbaa !13
  %825 = sub nsw i32 %824, 1
  %826 = srem i32 %825, 1000
  store i32 %826, ptr %56, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %57) #8
  %827 = load ptr, ptr %53, align 8, !tbaa !9
  %828 = getelementptr inbounds %struct.Edge, ptr %827, i32 0, i32 1
  %829 = load i32, ptr %828, align 4, !tbaa !13
  %830 = sub nsw i32 %829, 1
  %831 = sdiv i32 %830, 1000
  store i32 %831, ptr %57, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ6solve9vE3vec, i8 0, i64 44, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %58) #8
  store i32 0, ptr %58, align 4, !tbaa !5
  br label %832

832:                                              ; preds = %882, %805
  %833 = load i32, ptr %58, align 4, !tbaa !5
  %834 = icmp slt i32 %833, 10
  br i1 %834, label %836, label %835

835:                                              ; preds = %832
  store i32 85, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %58) #8
  br label %885

836:                                              ; preds = %832
  %837 = load i32, ptr %54, align 4, !tbaa !5
  %838 = sext i32 %837 to i64
  %839 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %838
  %840 = load i32, ptr %55, align 4, !tbaa !5
  %841 = sext i32 %840 to i64
  %842 = getelementptr inbounds [11 x [11 x i32]], ptr %839, i64 0, i64 %841
  %843 = load i32, ptr %58, align 4, !tbaa !5
  %844 = sext i32 %843 to i64
  %845 = getelementptr inbounds [11 x i32], ptr %842, i64 0, i64 %844
  %846 = load i32, ptr %845, align 4, !tbaa !5
  %847 = icmp ne i32 %846, 0
  br i1 %847, label %849, label %848

848:                                              ; preds = %836
  br label %882

849:                                              ; preds = %836
  call void @llvm.lifetime.start.p0(i64 4, ptr %59) #8
  store i32 0, ptr %59, align 4, !tbaa !5
  br label %850

850:                                              ; preds = %878, %849
  %851 = load i32, ptr %59, align 4, !tbaa !5
  %852 = icmp slt i32 %851, 10
  br i1 %852, label %854, label %853

853:                                              ; preds = %850
  store i32 88, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %59) #8
  br label %881

854:                                              ; preds = %850
  %855 = load i32, ptr %59, align 4, !tbaa !5
  %856 = sext i32 %855 to i64
  %857 = getelementptr inbounds [11 x i32], ptr @_ZZ6solve9vE3vec, i64 0, i64 %856
  %858 = load i32, ptr %54, align 4, !tbaa !5
  %859 = sext i32 %858 to i64
  %860 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %859
  %861 = load i32, ptr %55, align 4, !tbaa !5
  %862 = sext i32 %861 to i64
  %863 = getelementptr inbounds [11 x [11 x i32]], ptr %860, i64 0, i64 %862
  %864 = load i32, ptr %58, align 4, !tbaa !5
  %865 = sext i32 %864 to i64
  %866 = getelementptr inbounds [11 x i32], ptr %863, i64 0, i64 %865
  %867 = load i32, ptr %866, align 4, !tbaa !5
  %868 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %869 = sext i32 %868 to i64
  %870 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %869
  %871 = load i32, ptr %58, align 4, !tbaa !5
  %872 = sext i32 %871 to i64
  %873 = getelementptr inbounds [11 x [11 x i32]], ptr %870, i64 0, i64 %872
  %874 = load i32, ptr %59, align 4, !tbaa !5
  %875 = sext i32 %874 to i64
  %876 = getelementptr inbounds [11 x i32], ptr %873, i64 0, i64 %875
  %877 = load i32, ptr %876, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %857, i32 noundef %867, i32 noundef %877)
  br label %878

878:                                              ; preds = %854
  %879 = load i32, ptr %59, align 4, !tbaa !5
  %880 = add nsw i32 %879, 1
  store i32 %880, ptr %59, align 4, !tbaa !5
  br label %850, !llvm.loop !43

881:                                              ; preds = %853
  br label %882

882:                                              ; preds = %881, %848
  %883 = load i32, ptr %58, align 4, !tbaa !5
  %884 = add nsw i32 %883, 1
  store i32 %884, ptr %58, align 4, !tbaa !5
  br label %832, !llvm.loop !44

885:                                              ; preds = %835
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #8
  %886 = load i32, ptr %48, align 4, !tbaa !5
  %887 = sext i32 %886 to i64
  %888 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %887
  %889 = load i32, ptr %888, align 4, !tbaa !5
  %890 = sext i32 %889 to i64
  %891 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %890
  store i32 0, ptr %891, align 4, !tbaa !5
  store ptr %891, ptr %60, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %61) #8
  store i32 0, ptr %61, align 4, !tbaa !5
  br label %892

892:                                              ; preds = %912, %885
  %893 = load i32, ptr %61, align 4, !tbaa !5
  %894 = icmp slt i32 %893, 10
  br i1 %894, label %896, label %895

895:                                              ; preds = %892
  store i32 91, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %61) #8
  br label %915

896:                                              ; preds = %892
  %897 = load ptr, ptr %60, align 8, !tbaa !9
  %898 = load i32, ptr %61, align 4, !tbaa !5
  %899 = sext i32 %898 to i64
  %900 = getelementptr inbounds [11 x i32], ptr @_ZZ6solve9vE3vec, i64 0, i64 %899
  %901 = load i32, ptr %900, align 4, !tbaa !5
  %902 = load i32, ptr %56, align 4, !tbaa !5
  %903 = sext i32 %902 to i64
  %904 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %903
  %905 = load i32, ptr %61, align 4, !tbaa !5
  %906 = sext i32 %905 to i64
  %907 = getelementptr inbounds [11 x [11 x i32]], ptr %904, i64 0, i64 %906
  %908 = load i32, ptr %57, align 4, !tbaa !5
  %909 = sext i32 %908 to i64
  %910 = getelementptr inbounds [11 x i32], ptr %907, i64 0, i64 %909
  %911 = load i32, ptr %910, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %897, i32 noundef %901, i32 noundef %911)
  br label %912

912:                                              ; preds = %896
  %913 = load i32, ptr %61, align 4, !tbaa !5
  %914 = add nsw i32 %913, 1
  store i32 %914, ptr %61, align 4, !tbaa !5
  br label %892, !llvm.loop !45

915:                                              ; preds = %895
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %57) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %56) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %55) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %54) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #8
  br label %916

916:                                              ; preds = %915
  %917 = load i32, ptr %48, align 4, !tbaa !5
  %918 = add nsw i32 %917, 1
  store i32 %918, ptr %48, align 4, !tbaa !5
  br label %710, !llvm.loop !46

919:                                              ; preds = %714
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #8
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ6solve9vE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) #7

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ6solve9vE3$_1EvT_S2_T0_"(ptr noundef, ptr noundef) #7

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { 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}
!27 = distinct !{!27, !16}
!28 = distinct !{!28, !16}
!29 = distinct !{!29, !16}
!30 = distinct !{!30, !16}
!31 = distinct !{!31, !16}
!32 = distinct !{!32, !16}
!33 = distinct !{!33, !16}
!34 = distinct !{!34, !16}
!35 = distinct !{!35, !16}
!36 = distinct !{!36, !16}
!37 = distinct !{!37, !16}
!38 = distinct !{!38, !16}
!39 = distinct !{!39, !16}
!40 = distinct !{!40, !16}
!41 = distinct !{!41, !16}
!42 = distinct !{!42, !16}
!43 = distinct !{!43, !16}
!44 = distinct !{!44, !16}
!45 = distinct !{!45, !16}
!46 = distinct !{!46, !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 }

@n = external dso_local local_unnamed_addr global i32, align 4
@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 global [100001 x i32], align 16
@e = external dso_local local_unnamed_addr global [150001 x %struct.Edge], align 16
@que = external dso_local local_unnamed_addr 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.12 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._Z6solve9v = external hidden unnamed_addr constant [14 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [75 x i8], align 1
@_ZZ6solve9vE4ways = external hidden local_unnamed_addr global [1001 x [11 x [11 x i32]]], align 16
@_ZZ6solve9vE1o = external hidden local_unnamed_addr global i32, align 4
@_ZZ6solve9vE3mat = external hidden global [3 x [11 x [11 x i32]]], align 16
@_ZZ6solve9vE3tot = external hidden local_unnamed_addr global i32, align 4
@_ZZ6solve9vE3ord = external hidden global [100001 x i32], align 16
@_ZZ6solve9vE3pre = external hidden global [1001 x [11 x [11 x i32]]], align 16
@_ZZ6solve9vE3suf = external hidden global [1001 x [11 x [11 x i32]]], align 16
@_ZZ6solve9vE3vec = external hidden global [11 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; 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 uwtable
define dso_local void @_Z6solve9v() local_unnamed_addr #6 {
  %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 = load i32, ptr @n, align 4, !tbaa !5
  %8 = icmp eq i32 %7, 10000
  br i1 %8, label %.preheader257, label %11

.preheader257:                                    ; preds = %0
  %9 = load i32, ptr @m, align 4, !tbaa !5
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader257
  %wide.trip.count = zext nneg i32 %9 to i64
  br label %.lr.ph

11:                                               ; preds = %0
  tail call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.1, i32 noundef 637, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6solve9v) #8
  unreachable

12:                                               ; preds = %23
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %12, %.preheader257
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  store i32 0, ptr %1, align 4, !tbaa !5
  %13 = load i32, ptr @q, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph265, label %._crit_edge266

.lr.ph:                                           ; preds = %.lr.ph.preheader, %12
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %12 ]
  %15 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv
  %16 = load i32, ptr %15, align 4, !tbaa !11
  %17 = add nsw i32 %16, 1
  %18 = srem i32 %17, 1000
  %19 = getelementptr inbounds i8, ptr %15, i64 4
  %20 = load i32, ptr %19, align 4, !tbaa !13
  %21 = srem i32 %20, 1000
  %22 = icmp eq i32 %18, %21
  br i1 %22, label %23, label %.critedge

23:                                               ; preds = %.lr.ph
  %24 = getelementptr inbounds i8, ptr %15, i64 8
  %25 = load i32, ptr %24, align 4, !tbaa !14
  %26 = icmp eq i32 %25, 1
  br i1 %26, label %12, label %.critedge

.critedge:                                        ; preds = %.lr.ph, %23
  tail call void @__assert_fail(ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.1, i32 noundef 640, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6solve9v) #8
  unreachable

._crit_edge266:                                   ; preds = %51, %._crit_edge
  %27 = phi i32 [ 0, %._crit_edge ], [ %54, %51 ]
  %28 = load ptr, ptr @stderr, align 8, !tbaa !15
  %29 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull @.str.12, i32 noundef %27) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(484484) @_ZZ6solve9vE4ways, i8 0, i64 484484, i1 false)
  %30 = load i32, ptr @m, align 4, !tbaa !5
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.lr.ph269.preheader, label %._crit_edge270

.lr.ph269.preheader:                              ; preds = %._crit_edge266
  %wide.trip.count346 = zext nneg i32 %30 to i64
  br label %.lr.ph269

.lr.ph265:                                        ; preds = %._crit_edge, %51
  %indvars.iv340 = phi i64 [ %indvars.iv.next341, %51 ], [ 0, %._crit_edge ]
  %32 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv340
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  %33 = getelementptr inbounds i8, ptr %32, i64 4
  %34 = load i32, ptr %33, align 4, !tbaa !13
  %35 = srem i32 %34, 1000
  %36 = load i32, ptr %32, align 4, !tbaa !11
  %37 = srem i32 %36, 1000
  %38 = sub nsw i32 %35, %37
  %39 = icmp slt i32 %38, 0
  %40 = add nsw i32 %38, 1000
  %spec.select = select i1 %39, i32 %40, i32 %38
  store i32 %spec.select, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  store i32 1, ptr %3, align 4, !tbaa !5
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %32, i64 8
  %44 = load i32, ptr %43, align 4, !tbaa !14
  %.not230 = icmp sgt i32 %42, %44
  br i1 %.not230, label %.critedge2, label %45

45:                                               ; preds = %.lr.ph265
  %46 = srem i32 %44, 1000
  %47 = load i32, ptr %2, align 4, !tbaa !5
  %48 = icmp eq i32 %46, %47
  %49 = sub nsw i32 %44, %47
  %50 = icmp slt i32 %49, 100001000
  %or.cond = select i1 %48, i1 %50, i1 false
  br i1 %or.cond, label %51, label %.critedge2

.critedge2:                                       ; preds = %45, %.lr.ph265
  call void @__assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.1, i32 noundef 648, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6solve9v) #8
  unreachable

51:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  %52 = sdiv i32 %49, 1000
  store i32 %52, ptr %4, align 4, !tbaa !5
  %53 = 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) %4)
  %54 = load i32, ptr %53, align 4, !tbaa !5
  store i32 %54, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  %indvars.iv.next341 = add nuw nsw i64 %indvars.iv340, 1
  %55 = load i32, ptr @q, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = icmp slt i64 %indvars.iv.next341, %56
  br i1 %57, label %.lr.ph265, label %._crit_edge266, !llvm.loop !17

._crit_edge270:                                   ; preds = %.lr.ph269, %._crit_edge266
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(484484) @_ZZ6solve9vE3pre, i8 0, i64 484484, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(484484) @_ZZ6solve9vE3suf, i8 0, i64 484484, i1 false)
  store i32 1, ptr @_ZZ6solve9vE3suf, align 16, !tbaa !5
  store i32 1, ptr @_ZZ6solve9vE3pre, align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 48), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3pre, i64 48), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 96), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3pre, i64 96), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 144), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3pre, i64 144), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 192), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3pre, i64 192), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 240), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3pre, i64 240), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 288), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3pre, i64 288), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 336), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3pre, i64 336), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 384), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3pre, i64 384), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 432), align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3pre, i64 432), align 16, !tbaa !5
  br label %.preheader255

.lr.ph269:                                        ; preds = %.lr.ph269.preheader, %.lr.ph269
  %indvars.iv343 = phi i64 [ 0, %.lr.ph269.preheader ], [ %indvars.iv.next344, %.lr.ph269 ]
  %58 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv343
  %59 = load i32, ptr %58, align 4, !tbaa !11
  %60 = add nsw i32 %59, -1
  %61 = srem i32 %60, 1000
  %62 = sdiv i32 %60, 1000
  %63 = getelementptr inbounds i8, ptr %58, i64 4
  %64 = load i32, ptr %63, align 4, !tbaa !13
  %65 = add nsw i32 %64, -1
  %66 = sdiv i32 %65, 1000
  %67 = sext i32 %61 to i64
  %68 = sext i32 %62 to i64
  %69 = sext i32 %66 to i64
  %70 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %67, i64 %68, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %70, align 4, !tbaa !5
  %indvars.iv.next344 = add nuw nsw i64 %indvars.iv343, 1
  %exitcond347.not = icmp eq i64 %indvars.iv.next344, %wide.trip.count346
  br i1 %exitcond347.not, label %._crit_edge270, label %.lr.ph269, !llvm.loop !18

.preheader255:                                    ; preds = %._crit_edge270, %85
  %.0183276 = phi i32 [ %87, %85 ], [ 1, %._crit_edge270 ]
  %.0184275 = phi i32 [ %.0183276, %85 ], [ 0, %._crit_edge270 ]
  %73 = sext i32 %.0184275 to i64
  %74 = sext i32 %.0183276 to i64
  br label %.preheader254

.preheader254:                                    ; preds = %.preheader255, %88
  %indvars.iv360 = phi i64 [ 0, %.preheader255 ], [ %indvars.iv.next361, %88 ]
  %75 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %74, i64 %indvars.iv360, i64 0
  %76 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %74, i64 %indvars.iv360, i64 1
  %77 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %74, i64 %indvars.iv360, i64 2
  %78 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %74, i64 %indvars.iv360, i64 3
  %79 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %74, i64 %indvars.iv360, i64 4
  %80 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %74, i64 %indvars.iv360, i64 5
  %81 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %74, i64 %indvars.iv360, i64 6
  %82 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %74, i64 %indvars.iv360, i64 7
  %83 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %74, i64 %indvars.iv360, i64 8
  %84 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %74, i64 %indvars.iv360, i64 9
  br label %89

85:                                               ; preds = %88
  %86 = add nsw i32 %.0183276, 1
  %87 = srem i32 %86, 1000
  %.not = icmp eq i32 %87, 0
  br i1 %.not, label %.preheader250, label %.preheader255, !llvm.loop !19

88:                                               ; preds = %.loopexit253
  %indvars.iv.next361 = add nuw nsw i64 %indvars.iv360, 1
  %exitcond363.not = icmp eq i64 %indvars.iv.next361, 10
  br i1 %exitcond363.not, label %85, label %.preheader254, !llvm.loop !20

89:                                               ; preds = %.preheader254, %.loopexit253
  %indvars.iv356 = phi i64 [ 0, %.preheader254 ], [ %indvars.iv.next357, %.loopexit253 ]
  %90 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %73, i64 %indvars.iv360, i64 %indvars.iv356
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %.not229 = icmp eq i32 %91, 0
  br i1 %.not229, label %.loopexit253, label %.preheader252.preheader

.preheader252.preheader:                          ; preds = %89
  %92 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %73, i64 %indvars.iv356, i64 0
  %93 = load i32, ptr %92, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %75, i32 noundef %91, i32 noundef %93)
  %94 = load i32, ptr %90, align 4, !tbaa !5
  %95 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %73, i64 %indvars.iv356, i64 1
  %96 = load i32, ptr %95, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %76, i32 noundef %94, i32 noundef %96)
  %97 = load i32, ptr %90, align 4, !tbaa !5
  %98 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %73, i64 %indvars.iv356, i64 2
  %99 = load i32, ptr %98, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %77, i32 noundef %97, i32 noundef %99)
  %100 = load i32, ptr %90, align 4, !tbaa !5
  %101 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %73, i64 %indvars.iv356, i64 3
  %102 = load i32, ptr %101, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %78, i32 noundef %100, i32 noundef %102)
  %103 = load i32, ptr %90, align 4, !tbaa !5
  %104 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %73, i64 %indvars.iv356, i64 4
  %105 = load i32, ptr %104, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %79, i32 noundef %103, i32 noundef %105)
  %106 = load i32, ptr %90, align 4, !tbaa !5
  %107 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %73, i64 %indvars.iv356, i64 5
  %108 = load i32, ptr %107, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %80, i32 noundef %106, i32 noundef %108)
  %109 = load i32, ptr %90, align 4, !tbaa !5
  %110 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %73, i64 %indvars.iv356, i64 6
  %111 = load i32, ptr %110, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %81, i32 noundef %109, i32 noundef %111)
  %112 = load i32, ptr %90, align 4, !tbaa !5
  %113 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %73, i64 %indvars.iv356, i64 7
  %114 = load i32, ptr %113, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %82, i32 noundef %112, i32 noundef %114)
  %115 = load i32, ptr %90, align 4, !tbaa !5
  %116 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %73, i64 %indvars.iv356, i64 8
  %117 = load i32, ptr %116, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %83, i32 noundef %115, i32 noundef %117)
  %118 = load i32, ptr %90, align 4, !tbaa !5
  %119 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %73, i64 %indvars.iv356, i64 9
  %120 = load i32, ptr %119, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %84, i32 noundef %118, i32 noundef %120)
  br label %.loopexit253

.loopexit253:                                     ; preds = %.preheader252.preheader, %89
  %indvars.iv.next357 = add nuw nsw i64 %indvars.iv356, 1
  %exitcond359.not = icmp eq i64 %indvars.iv.next357, 10
  br i1 %exitcond359.not, label %88, label %89, !llvm.loop !21

.preheader250:                                    ; preds = %85, %134
  %.0201281 = phi i32 [ %136, %134 ], [ 999, %85 ]
  %.0209280 = phi i32 [ %.0201281, %134 ], [ 0, %85 ]
  %121 = sext i32 %.0201281 to i64
  %122 = sext i32 %.0209280 to i64
  br label %.preheader249

123:                                              ; preds = %134
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(484) getelementptr inbounds (i8, ptr @_ZZ6solve9vE3mat, i64 968), i8 0, i64 484, i1 false)
  br label %.preheader246

.preheader249:                                    ; preds = %.preheader250, %137
  %indvars.iv372 = phi i64 [ 0, %.preheader250 ], [ %indvars.iv.next373, %137 ]
  %124 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %121, i64 %indvars.iv372, i64 0
  %125 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %121, i64 %indvars.iv372, i64 1
  %126 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %121, i64 %indvars.iv372, i64 2
  %127 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %121, i64 %indvars.iv372, i64 3
  %128 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %121, i64 %indvars.iv372, i64 4
  %129 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %121, i64 %indvars.iv372, i64 5
  %130 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %121, i64 %indvars.iv372, i64 6
  %131 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %121, i64 %indvars.iv372, i64 7
  %132 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %121, i64 %indvars.iv372, i64 8
  %133 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %121, i64 %indvars.iv372, i64 9
  br label %138

134:                                              ; preds = %137
  %135 = add nsw i32 %.0201281, -1
  %136 = srem i32 %135, 1000
  %.not214 = icmp eq i32 %136, 0
  br i1 %.not214, label %123, label %.preheader250, !llvm.loop !22

137:                                              ; preds = %.loopexit248
  %indvars.iv.next373 = add nuw nsw i64 %indvars.iv372, 1
  %exitcond375.not = icmp eq i64 %indvars.iv.next373, 10
  br i1 %exitcond375.not, label %134, label %.preheader249, !llvm.loop !23

138:                                              ; preds = %.preheader249, %.loopexit248
  %indvars.iv368 = phi i64 [ 0, %.preheader249 ], [ %indvars.iv.next369, %.loopexit248 ]
  %139 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %121, i64 %indvars.iv372, i64 %indvars.iv368
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %.not228 = icmp eq i32 %140, 0
  br i1 %.not228, label %.loopexit248, label %.preheader247.preheader

.preheader247.preheader:                          ; preds = %138
  %141 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %122, i64 %indvars.iv368, i64 0
  %142 = load i32, ptr %141, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %124, i32 noundef %140, i32 noundef %142)
  %143 = load i32, ptr %139, align 4, !tbaa !5
  %144 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %122, i64 %indvars.iv368, i64 1
  %145 = load i32, ptr %144, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %125, i32 noundef %143, i32 noundef %145)
  %146 = load i32, ptr %139, align 4, !tbaa !5
  %147 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %122, i64 %indvars.iv368, i64 2
  %148 = load i32, ptr %147, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %126, i32 noundef %146, i32 noundef %148)
  %149 = load i32, ptr %139, align 4, !tbaa !5
  %150 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %122, i64 %indvars.iv368, i64 3
  %151 = load i32, ptr %150, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %127, i32 noundef %149, i32 noundef %151)
  %152 = load i32, ptr %139, align 4, !tbaa !5
  %153 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %122, i64 %indvars.iv368, i64 4
  %154 = load i32, ptr %153, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %128, i32 noundef %152, i32 noundef %154)
  %155 = load i32, ptr %139, align 4, !tbaa !5
  %156 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %122, i64 %indvars.iv368, i64 5
  %157 = load i32, ptr %156, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %129, i32 noundef %155, i32 noundef %157)
  %158 = load i32, ptr %139, align 4, !tbaa !5
  %159 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %122, i64 %indvars.iv368, i64 6
  %160 = load i32, ptr %159, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %130, i32 noundef %158, i32 noundef %160)
  %161 = load i32, ptr %139, align 4, !tbaa !5
  %162 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %122, i64 %indvars.iv368, i64 7
  %163 = load i32, ptr %162, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %131, i32 noundef %161, i32 noundef %163)
  %164 = load i32, ptr %139, align 4, !tbaa !5
  %165 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %122, i64 %indvars.iv368, i64 8
  %166 = load i32, ptr %165, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %132, i32 noundef %164, i32 noundef %166)
  %167 = load i32, ptr %139, align 4, !tbaa !5
  %168 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %122, i64 %indvars.iv368, i64 9
  %169 = load i32, ptr %168, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %133, i32 noundef %167, i32 noundef %169)
  br label %.loopexit248

.loopexit248:                                     ; preds = %.preheader247.preheader, %138
  %indvars.iv.next369 = add nuw nsw i64 %indvars.iv368, 1
  %exitcond371.not = icmp eq i64 %indvars.iv.next369, 10
  br i1 %exitcond371.not, label %137, label %138, !llvm.loop !24

.preheader246:                                    ; preds = %123, %183
  %indvars.iv384 = phi i64 [ 0, %123 ], [ %indvars.iv.next385, %183 ]
  %170 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3mat, i64 968), i64 0, i64 %indvars.iv384, i64 0
  %171 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3mat, i64 968), i64 0, i64 %indvars.iv384, i64 1
  %172 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3mat, i64 968), i64 0, i64 %indvars.iv384, i64 2
  %173 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3mat, i64 968), i64 0, i64 %indvars.iv384, i64 3
  %174 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3mat, i64 968), i64 0, i64 %indvars.iv384, i64 4
  %175 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3mat, i64 968), i64 0, i64 %indvars.iv384, i64 5
  %176 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3mat, i64 968), i64 0, i64 %indvars.iv384, i64 6
  %177 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3mat, i64 968), i64 0, i64 %indvars.iv384, i64 7
  %178 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3mat, i64 968), i64 0, i64 %indvars.iv384, i64 8
  %179 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3mat, i64 968), i64 0, i64 %indvars.iv384, i64 9
  br label %184

180:                                              ; preds = %183
  store i32 0, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %181 = load i32, ptr @q, align 4, !tbaa !5
  %182 = icmp sgt i32 %181, 0
  br i1 %182, label %.lr.ph287.preheader, label %._crit_edge288

.lr.ph287.preheader:                              ; preds = %180
  %wide.trip.count391 = zext nneg i32 %181 to i64
  br label %.lr.ph287

183:                                              ; preds = %.loopexit245
  %indvars.iv.next385 = add nuw nsw i64 %indvars.iv384, 1
  %exitcond387.not = icmp eq i64 %indvars.iv.next385, 10
  br i1 %exitcond387.not, label %180, label %.preheader246, !llvm.loop !25

184:                                              ; preds = %.preheader246, %.loopexit245
  %indvars.iv380 = phi i64 [ 0, %.preheader246 ], [ %indvars.iv.next381, %.loopexit245 ]
  %185 = getelementptr inbounds [11 x [11 x i32]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %indvars.iv384, i64 %indvars.iv380
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %.not227 = icmp eq i32 %186, 0
  br i1 %.not227, label %.loopexit245, label %.preheader244.preheader

.preheader244.preheader:                          ; preds = %184
  %187 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 484), i64 0, i64 %indvars.iv380, i64 0
  %188 = load i32, ptr %187, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %170, i32 noundef %186, i32 noundef %188)
  %189 = load i32, ptr %185, align 4, !tbaa !5
  %190 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 484), i64 0, i64 %indvars.iv380, i64 1
  %191 = load i32, ptr %190, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %171, i32 noundef %189, i32 noundef %191)
  %192 = load i32, ptr %185, align 4, !tbaa !5
  %193 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 484), i64 0, i64 %indvars.iv380, i64 2
  %194 = load i32, ptr %193, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %172, i32 noundef %192, i32 noundef %194)
  %195 = load i32, ptr %185, align 4, !tbaa !5
  %196 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 484), i64 0, i64 %indvars.iv380, i64 3
  %197 = load i32, ptr %196, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %173, i32 noundef %195, i32 noundef %197)
  %198 = load i32, ptr %185, align 4, !tbaa !5
  %199 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 484), i64 0, i64 %indvars.iv380, i64 4
  %200 = load i32, ptr %199, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %174, i32 noundef %198, i32 noundef %200)
  %201 = load i32, ptr %185, align 4, !tbaa !5
  %202 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 484), i64 0, i64 %indvars.iv380, i64 5
  %203 = load i32, ptr %202, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %175, i32 noundef %201, i32 noundef %203)
  %204 = load i32, ptr %185, align 4, !tbaa !5
  %205 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 484), i64 0, i64 %indvars.iv380, i64 6
  %206 = load i32, ptr %205, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %176, i32 noundef %204, i32 noundef %206)
  %207 = load i32, ptr %185, align 4, !tbaa !5
  %208 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 484), i64 0, i64 %indvars.iv380, i64 7
  %209 = load i32, ptr %208, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %177, i32 noundef %207, i32 noundef %209)
  %210 = load i32, ptr %185, align 4, !tbaa !5
  %211 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 484), i64 0, i64 %indvars.iv380, i64 8
  %212 = load i32, ptr %211, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %178, i32 noundef %210, i32 noundef %212)
  %213 = load i32, ptr %185, align 4, !tbaa !5
  %214 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3suf, i64 484), i64 0, i64 %indvars.iv380, i64 9
  %215 = load i32, ptr %214, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %179, i32 noundef %213, i32 noundef %215)
  br label %.loopexit245

.loopexit245:                                     ; preds = %.preheader244.preheader, %184
  %indvars.iv.next381 = add nuw nsw i64 %indvars.iv380, 1
  %exitcond383.not = icmp eq i64 %indvars.iv.next381, 10
  br i1 %exitcond383.not, label %183, label %184, !llvm.loop !26

._crit_edge288.loopexit:                          ; preds = %239
  %216 = sext i32 %240 to i64
  br label %._crit_edge288

._crit_edge288:                                   ; preds = %._crit_edge288.loopexit, %180
  %217 = phi i64 [ %216, %._crit_edge288.loopexit ], [ 0, %180 ]
  %218 = getelementptr inbounds i32, ptr @_ZZ6solve9vE3ord, i64 %217
  call void @"_ZSt4sortIPiZ6solve9vE3$_0EvT_S2_T0_"(ptr noundef nonnull @_ZZ6solve9vE3ord, ptr noundef nonnull %218)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  store i32 0, ptr %5, align 4, !tbaa !5
  %219 = load i32, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %220 = icmp sgt i32 %219, 0
  br i1 %220, label %.lr.ph308, label %._crit_edge309

.lr.ph287:                                        ; preds = %.lr.ph287.preheader, %239
  %indvars.iv388 = phi i64 [ 0, %.lr.ph287.preheader ], [ %indvars.iv.next389, %239 ]
  %221 = phi i32 [ 0, %.lr.ph287.preheader ], [ %240, %239 ]
  %222 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv388
  %223 = load i32, ptr %222, align 4, !tbaa !11
  %224 = add nsw i32 %223, -1
  %225 = srem i32 %224, 1000
  %226 = getelementptr inbounds i8, ptr %222, i64 4
  %227 = load i32, ptr %226, align 4, !tbaa !13
  %228 = add nsw i32 %227, -1
  %229 = srem i32 %228, 1000
  %.not225 = icmp eq i32 %225, 0
  %.neg331 = add nsw i32 %225, -1000
  %.neg332 = select i1 %.not225, i32 0, i32 %.neg331
  %230 = getelementptr inbounds i8, ptr %222, i64 8
  %231 = load i32, ptr %230, align 4, !tbaa !14
  %.neg234 = sub i32 %231, %229
  %232 = add i32 %.neg234, %.neg332
  store i32 %232, ptr %230, align 4, !tbaa !14
  %233 = icmp slt i32 %232, 0
  br i1 %233, label %234, label %239

234:                                              ; preds = %.lr.ph287
  %235 = add nsw i32 %221, 1
  store i32 %235, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %236 = sext i32 %221 to i64
  %237 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %236
  %238 = trunc nuw nsw i64 %indvars.iv388 to i32
  store i32 %238, ptr %237, align 4, !tbaa !5
  br label %239

239:                                              ; preds = %234, %.lr.ph287
  %240 = phi i32 [ %235, %234 ], [ %221, %.lr.ph287 ]
  %indvars.iv.next389 = add nuw nsw i64 %indvars.iv388, 1
  %exitcond392.not = icmp eq i64 %indvars.iv.next389, %wide.trip.count391
  br i1 %exitcond392.not, label %._crit_edge288.loopexit, label %.lr.ph287, !llvm.loop !27

._crit_edge309:                                   ; preds = %.critedge4, %._crit_edge288
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #9
  store i32 0, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %241 = load i32, ptr @q, align 4, !tbaa !5
  %242 = icmp sgt i32 %241, 0
  br i1 %242, label %.lr.ph313.preheader, label %._crit_edge314

.lr.ph313.preheader:                              ; preds = %._crit_edge309
  %wide.trip.count412 = zext nneg i32 %241 to i64
  %xtraiter = and i64 %wide.trip.count412, 1
  %243 = icmp eq i32 %241, 1
  br i1 %243, label %._crit_edge314.loopexit.unr-lcssa, label %.lr.ph313.preheader.new

.lr.ph313.preheader.new:                          ; preds = %.lr.ph313.preheader
  %unroll_iter = and i64 %wide.trip.count412, 2147483646
  br label %.lr.ph313

.lr.ph308:                                        ; preds = %._crit_edge288, %.critedge4
  %.0197306 = phi i32 [ %.1198.lcssa, %.critedge4 ], [ 0, %._crit_edge288 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  %244 = sext i32 %.0197306 to i64
  %245 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %244
  %246 = load i32, ptr %245, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %247
  %249 = load i32, ptr %248, align 4, !tbaa !11
  %250 = add nsw i32 %249, -1
  %251 = srem i32 %250, 1000
  store i32 %251, ptr %6, align 4, !tbaa !5
  %252 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %253 = load i32, ptr %252, align 4, !tbaa !5
  store i32 %253, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  %254 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %255
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(484) %256, ptr noundef nonnull align 16 dereferenceable(484) @_ZZ6solve9vE3pre, i64 484, i1 false)
  %257 = load i32, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %258 = icmp slt i32 %.0197306, %257
  br i1 %258, label %.lr.ph302, label %.critedge4

.lr.ph302:                                        ; preds = %.lr.ph308, %._crit_edge295
  %259 = phi i32 [ %378, %._crit_edge295 ], [ %257, %.lr.ph308 ]
  %260 = phi i32 [ %379, %._crit_edge295 ], [ %254, %.lr.ph308 ]
  %indvars.iv405 = phi i64 [ %indvars.iv.next406, %._crit_edge295 ], [ %244, %.lr.ph308 ]
  %.0195300 = phi i32 [ %.1196.lcssa, %._crit_edge295 ], [ %253, %.lr.ph308 ]
  %261 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %indvars.iv405
  %262 = load i32, ptr %261, align 4, !tbaa !5
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %263
  %265 = load i32, ptr %264, align 4, !tbaa !11
  %266 = add nsw i32 %265, -1
  %267 = srem i32 %266, 1000
  %268 = load i32, ptr %5, align 4
  %269 = icmp eq i32 %267, %268
  br i1 %269, label %.preheader243, label %.critedge4.loopexit

.preheader243:                                    ; preds = %.lr.ph302
  %270 = getelementptr inbounds i8, ptr %264, i64 4
  %271 = load i32, ptr %270, align 4, !tbaa !13
  %272 = add nsw i32 %271, -1
  %273 = srem i32 %272, 1000
  %.not220292 = icmp eq i32 %.0195300, %273
  br i1 %.not220292, label %._crit_edge295, label %.lr.ph294

.critedge4.loopexit:                              ; preds = %.lr.ph302, %._crit_edge295..critedge4.loopexit_crit_edge
  %.pre451 = phi i32 [ %.pre451.pre, %._crit_edge295..critedge4.loopexit_crit_edge ], [ %268, %.lr.ph302 ]
  %274 = phi i32 [ %378, %._crit_edge295..critedge4.loopexit_crit_edge ], [ %259, %.lr.ph302 ]
  %.1198.lcssa.ph.in = phi i64 [ %indvars.iv.next406, %._crit_edge295..critedge4.loopexit_crit_edge ], [ %indvars.iv405, %.lr.ph302 ]
  %.1198.lcssa.ph = trunc i64 %.1198.lcssa.ph.in to i32
  br label %.critedge4

.critedge4:                                       ; preds = %.critedge4.loopexit, %.lr.ph308
  %275 = phi i32 [ %253, %.lr.ph308 ], [ %.pre451, %.critedge4.loopexit ]
  %276 = phi i32 [ %257, %.lr.ph308 ], [ %274, %.critedge4.loopexit ]
  %.1198.lcssa = phi i32 [ %.0197306, %.lr.ph308 ], [ %.1198.lcssa.ph, %.critedge4.loopexit ]
  %277 = icmp slt i32 %.1198.lcssa, %276
  %278 = icmp slt i32 %275, 1000
  %279 = select i1 %277, i1 %278, i1 false
  br i1 %279, label %.lr.ph308, label %._crit_edge309, !llvm.loop !28

.lr.ph294:                                        ; preds = %.preheader243, %285
  %280 = phi i32 [ %377, %285 ], [ %260, %.preheader243 ]
  %.1196293 = phi i32 [ %287, %285 ], [ %.0195300, %.preheader243 ]
  %.not221 = icmp eq i32 %280, 0
  %281 = zext i1 %.not221 to i32
  store i32 %281, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %282 = zext i1 %.not221 to i64
  %283 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %282
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(484) %283, i8 0, i64 484, i1 false)
  %284 = sext i32 %.1196293 to i64
  br label %.preheader242

.preheader242:                                    ; preds = %.lr.ph294, %295
  %.pre448 = phi i32 [ %281, %.lr.ph294 ], [ %.pre448452, %295 ]
  %indvars.iv401 = phi i64 [ 0, %.lr.ph294 ], [ %indvars.iv.next402, %295 ]
  br label %296

285:                                              ; preds = %295
  %286 = add nsw i32 %.1196293, 1
  %287 = srem i32 %286, 1000
  %288 = load i32, ptr %261, align 4, !tbaa !5
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %289
  %291 = getelementptr inbounds i8, ptr %290, i64 4
  %292 = load i32, ptr %291, align 4, !tbaa !13
  %293 = add nsw i32 %292, -1
  %294 = srem i32 %293, 1000
  %.not220 = icmp eq i32 %287, %294
  br i1 %.not220, label %._crit_edge295.loopexit, label %.lr.ph294, !llvm.loop !29

295:                                              ; preds = %.loopexit241
  %indvars.iv.next402 = add nuw nsw i64 %indvars.iv401, 1
  %exitcond404.not = icmp eq i64 %indvars.iv.next402, 10
  br i1 %exitcond404.not, label %285, label %.preheader242, !llvm.loop !30

296:                                              ; preds = %.preheader242, %.loopexit241
  %.pre448453 = phi i32 [ %.pre448, %.preheader242 ], [ %.pre448452, %.loopexit241 ]
  %297 = phi i32 [ %.pre448, %.preheader242 ], [ %377, %.loopexit241 ]
  %indvars.iv397 = phi i64 [ 0, %.preheader242 ], [ %indvars.iv.next398, %.loopexit241 ]
  %.not222 = icmp eq i32 %297, 0
  %298 = zext i1 %.not222 to i64
  %299 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %298, i64 %indvars.iv401, i64 %indvars.iv397
  %300 = load i32, ptr %299, align 4, !tbaa !5
  %.not223 = icmp eq i32 %300, 0
  br i1 %.not223, label %.loopexit241, label %.preheader240.preheader

.preheader240.preheader:                          ; preds = %296
  %301 = sext i32 %297 to i64
  %302 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %301, i64 %indvars.iv401, i64 0
  %303 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %284, i64 %indvars.iv397, i64 0
  %304 = load i32, ptr %303, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %302, i32 noundef %300, i32 noundef %304)
  %305 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %306, i64 %indvars.iv401, i64 1
  %.not224.1 = icmp eq i32 %305, 0
  %308 = zext i1 %.not224.1 to i64
  %309 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %308, i64 %indvars.iv401, i64 %indvars.iv397
  %310 = load i32, ptr %309, align 4, !tbaa !5
  %311 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %284, i64 %indvars.iv397, i64 1
  %312 = load i32, ptr %311, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %307, i32 noundef %310, i32 noundef %312)
  %313 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %314, i64 %indvars.iv401, i64 2
  %.not224.2 = icmp eq i32 %313, 0
  %316 = zext i1 %.not224.2 to i64
  %317 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %316, i64 %indvars.iv401, i64 %indvars.iv397
  %318 = load i32, ptr %317, align 4, !tbaa !5
  %319 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %284, i64 %indvars.iv397, i64 2
  %320 = load i32, ptr %319, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %315, i32 noundef %318, i32 noundef %320)
  %321 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %322, i64 %indvars.iv401, i64 3
  %.not224.3 = icmp eq i32 %321, 0
  %324 = zext i1 %.not224.3 to i64
  %325 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %324, i64 %indvars.iv401, i64 %indvars.iv397
  %326 = load i32, ptr %325, align 4, !tbaa !5
  %327 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %284, i64 %indvars.iv397, i64 3
  %328 = load i32, ptr %327, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %323, i32 noundef %326, i32 noundef %328)
  %329 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %330, i64 %indvars.iv401, i64 4
  %.not224.4 = icmp eq i32 %329, 0
  %332 = zext i1 %.not224.4 to i64
  %333 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %332, i64 %indvars.iv401, i64 %indvars.iv397
  %334 = load i32, ptr %333, align 4, !tbaa !5
  %335 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %284, i64 %indvars.iv397, i64 4
  %336 = load i32, ptr %335, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %331, i32 noundef %334, i32 noundef %336)
  %337 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %338 = sext i32 %337 to i64
  %339 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %338, i64 %indvars.iv401, i64 5
  %.not224.5 = icmp eq i32 %337, 0
  %340 = zext i1 %.not224.5 to i64
  %341 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %340, i64 %indvars.iv401, i64 %indvars.iv397
  %342 = load i32, ptr %341, align 4, !tbaa !5
  %343 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %284, i64 %indvars.iv397, i64 5
  %344 = load i32, ptr %343, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %339, i32 noundef %342, i32 noundef %344)
  %345 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %346 = sext i32 %345 to i64
  %347 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %346, i64 %indvars.iv401, i64 6
  %.not224.6 = icmp eq i32 %345, 0
  %348 = zext i1 %.not224.6 to i64
  %349 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %348, i64 %indvars.iv401, i64 %indvars.iv397
  %350 = load i32, ptr %349, align 4, !tbaa !5
  %351 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %284, i64 %indvars.iv397, i64 6
  %352 = load i32, ptr %351, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %347, i32 noundef %350, i32 noundef %352)
  %353 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %354 = sext i32 %353 to i64
  %355 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %354, i64 %indvars.iv401, i64 7
  %.not224.7 = icmp eq i32 %353, 0
  %356 = zext i1 %.not224.7 to i64
  %357 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %356, i64 %indvars.iv401, i64 %indvars.iv397
  %358 = load i32, ptr %357, align 4, !tbaa !5
  %359 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %284, i64 %indvars.iv397, i64 7
  %360 = load i32, ptr %359, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %355, i32 noundef %358, i32 noundef %360)
  %361 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %362 = sext i32 %361 to i64
  %363 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %362, i64 %indvars.iv401, i64 8
  %.not224.8 = icmp eq i32 %361, 0
  %364 = zext i1 %.not224.8 to i64
  %365 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %364, i64 %indvars.iv401, i64 %indvars.iv397
  %366 = load i32, ptr %365, align 4, !tbaa !5
  %367 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %284, i64 %indvars.iv397, i64 8
  %368 = load i32, ptr %367, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %363, i32 noundef %366, i32 noundef %368)
  %369 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %370 = sext i32 %369 to i64
  %371 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %370, i64 %indvars.iv401, i64 9
  %.not224.9 = icmp eq i32 %369, 0
  %372 = zext i1 %.not224.9 to i64
  %373 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %372, i64 %indvars.iv401, i64 %indvars.iv397
  %374 = load i32, ptr %373, align 4, !tbaa !5
  %375 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE4ways, i64 0, i64 %284, i64 %indvars.iv397, i64 9
  %376 = load i32, ptr %375, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %371, i32 noundef %374, i32 noundef %376)
  %.pre = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  br label %.loopexit241

.loopexit241:                                     ; preds = %.preheader240.preheader, %296
  %.pre448452 = phi i32 [ %.pre, %.preheader240.preheader ], [ %.pre448453, %296 ]
  %377 = phi i32 [ %.pre, %.preheader240.preheader ], [ %297, %296 ]
  %indvars.iv.next398 = add nuw nsw i64 %indvars.iv397, 1
  %exitcond400.not = icmp eq i64 %indvars.iv.next398, 10
  br i1 %exitcond400.not, label %295, label %296, !llvm.loop !31

._crit_edge295.loopexit:                          ; preds = %285
  %.pre449 = load i32, ptr %290, align 4, !tbaa !11
  %.pre450 = load i32, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %.pre456 = add nsw i32 %.pre449, -1
  br label %._crit_edge295

._crit_edge295:                                   ; preds = %._crit_edge295.loopexit, %.preheader243
  %.pre-phi = phi i32 [ %.pre456, %._crit_edge295.loopexit ], [ %266, %.preheader243 ]
  %378 = phi i32 [ %.pre450, %._crit_edge295.loopexit ], [ %259, %.preheader243 ]
  %379 = phi i32 [ %377, %._crit_edge295.loopexit ], [ %260, %.preheader243 ]
  %.1196.lcssa = phi i32 [ %287, %._crit_edge295.loopexit ], [ %.0195300, %.preheader243 ]
  %.lcssa261 = phi i64 [ %289, %._crit_edge295.loopexit ], [ %263, %.preheader243 ]
  %.lcssa259 = phi i32 [ %293, %._crit_edge295.loopexit ], [ %272, %.preheader243 ]
  %380 = sext i32 %379 to i64
  %381 = sdiv i32 %.pre-phi, 1000
  %382 = sext i32 %381 to i64
  %383 = sdiv i32 %.lcssa259, 1000
  %384 = sext i32 %383 to i64
  %385 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %380, i64 %382, i64 %384
  %386 = load i32, ptr %385, align 4, !tbaa !5
  %387 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %.lcssa261
  store i32 %386, ptr %387, align 4, !tbaa !5
  %indvars.iv.next406 = add nsw i64 %indvars.iv405, 1
  %388 = sext i32 %378 to i64
  %389 = icmp slt i64 %indvars.iv.next406, %388
  br i1 %389, label %.lr.ph302, label %._crit_edge295..critedge4.loopexit_crit_edge, !llvm.loop !32

._crit_edge295..critedge4.loopexit_crit_edge:     ; preds = %._crit_edge295
  %.pre451.pre = load i32, ptr %5, align 4
  br label %.critedge4.loopexit

._crit_edge314.loopexit.unr-lcssa:                ; preds = %424, %.lr.ph313.preheader
  %.lcssa491.ph = phi i32 [ poison, %.lr.ph313.preheader ], [ %425, %424 ]
  %indvars.iv408.unr = phi i64 [ 0, %.lr.ph313.preheader ], [ %indvars.iv.next409.1, %424 ]
  %.unr = phi i32 [ 0, %.lr.ph313.preheader ], [ %425, %424 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge314.loopexit, label %.lr.ph313.epil

.lr.ph313.epil:                                   ; preds = %._crit_edge314.loopexit.unr-lcssa
  %390 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv408.unr, i32 2
  %391 = load i32, ptr %390, align 4, !tbaa !14
  %392 = icmp sgt i32 %391, -1
  br i1 %392, label %393, label %._crit_edge314.loopexit

393:                                              ; preds = %.lr.ph313.epil
  %394 = add nsw i32 %.unr, 1
  store i32 %394, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %395 = sext i32 %.unr to i64
  %396 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %395
  %397 = trunc nuw nsw i64 %indvars.iv408.unr to i32
  store i32 %397, ptr %396, align 4, !tbaa !5
  br label %._crit_edge314.loopexit

._crit_edge314.loopexit:                          ; preds = %.lr.ph313.epil, %393, %._crit_edge314.loopexit.unr-lcssa
  %.lcssa491 = phi i32 [ %.lcssa491.ph, %._crit_edge314.loopexit.unr-lcssa ], [ %.unr, %.lr.ph313.epil ], [ %394, %393 ]
  %398 = sext i32 %.lcssa491 to i64
  br label %._crit_edge314

._crit_edge314:                                   ; preds = %._crit_edge314.loopexit, %._crit_edge309
  %399 = phi i64 [ %398, %._crit_edge314.loopexit ], [ 0, %._crit_edge309 ]
  %400 = getelementptr inbounds i32, ptr @_ZZ6solve9vE3ord, i64 %399
  call void @"_ZSt4sortIPiZ6solve9vE3$_1EvT_S2_T0_"(ptr noundef nonnull @_ZZ6solve9vE3ord, ptr noundef nonnull %400)
  %401 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %402 = sext i32 %401 to i64
  %403 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %402
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(484) %403, ptr noundef nonnull align 16 dereferenceable(484) @_ZZ6solve9vE3pre, i64 484, i1 false)
  %404 = load i32, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %405 = icmp sgt i32 %404, 0
  br i1 %405, label %.preheader239, label %._crit_edge330

.lr.ph313:                                        ; preds = %424, %.lr.ph313.preheader.new
  %indvars.iv408 = phi i64 [ 0, %.lr.ph313.preheader.new ], [ %indvars.iv.next409.1, %424 ]
  %406 = phi i32 [ 0, %.lr.ph313.preheader.new ], [ %425, %424 ]
  %niter = phi i64 [ 0, %.lr.ph313.preheader.new ], [ %niter.next.1, %424 ]
  %407 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv408, i32 2
  %408 = load i32, ptr %407, align 8, !tbaa !14
  %409 = icmp sgt i32 %408, -1
  br i1 %409, label %410, label %.lr.ph313.1

410:                                              ; preds = %.lr.ph313
  %411 = add nsw i32 %406, 1
  store i32 %411, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %412 = sext i32 %406 to i64
  %413 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %412
  %414 = trunc nuw nsw i64 %indvars.iv408 to i32
  store i32 %414, ptr %413, align 4, !tbaa !5
  br label %.lr.ph313.1

.lr.ph313.1:                                      ; preds = %.lr.ph313, %410
  %415 = phi i32 [ %406, %.lr.ph313 ], [ %411, %410 ]
  %indvars.iv.next409 = or disjoint i64 %indvars.iv408, 1
  %416 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv.next409, i32 2
  %417 = load i32, ptr %416, align 4, !tbaa !14
  %418 = icmp sgt i32 %417, -1
  br i1 %418, label %419, label %424

419:                                              ; preds = %.lr.ph313.1
  %420 = add nsw i32 %415, 1
  store i32 %420, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %421 = sext i32 %415 to i64
  %422 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %421
  %423 = trunc nuw nsw i64 %indvars.iv.next409 to i32
  store i32 %423, ptr %422, align 4, !tbaa !5
  br label %424

424:                                              ; preds = %419, %.lr.ph313.1
  %425 = phi i32 [ %415, %.lr.ph313.1 ], [ %420, %419 ]
  %indvars.iv.next409.1 = add nuw nsw i64 %indvars.iv408, 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_edge314.loopexit.unr-lcssa, label %.lr.ph313, !llvm.loop !33

.preheader239:                                    ; preds = %._crit_edge314, %528
  %indvars.iv444 = phi i64 [ %indvars.iv.next445, %528 ], [ 0, %._crit_edge314 ]
  %.0188329 = phi i32 [ %.1.lcssa, %528 ], [ 0, %._crit_edge314 ]
  %426 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve9vE3ord, i64 0, i64 %indvars.iv444
  %427 = add nsw i32 %.0188329, 1000
  %428 = load i32, ptr %426, align 4, !tbaa !5
  %429 = sext i32 %428 to i64
  %430 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %429
  %431 = getelementptr inbounds i8, ptr %430, i64 8
  %432 = load i32, ptr %431, align 4, !tbaa !14
  %.not215319 = icmp sgt i32 %427, %432
  br i1 %.not215319, label %._crit_edge321, label %.lr.ph320

._crit_edge330:                                   ; preds = %528, %._crit_edge314
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  ret void

.loopexit238:                                     ; preds = %444
  %433 = add nsw i32 %439, 1000
  %434 = load i32, ptr %426, align 4, !tbaa !5
  %435 = sext i32 %434 to i64
  %436 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %435
  %437 = getelementptr inbounds i8, ptr %436, i64 8
  %438 = load i32, ptr %437, align 4, !tbaa !14
  %.not215 = icmp sgt i32 %433, %438
  br i1 %.not215, label %._crit_edge321, label %.lr.ph320, !llvm.loop !34

.lr.ph320:                                        ; preds = %.preheader239, %.loopexit238
  %439 = phi i32 [ %433, %.loopexit238 ], [ %427, %.preheader239 ]
  %440 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %.not217 = icmp eq i32 %440, 0
  %441 = zext i1 %.not217 to i32
  store i32 %441, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %442 = zext i1 %.not217 to i64
  %443 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %442
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(484) %443, i8 0, i64 484, i1 false)
  br label %.preheader235

.preheader235:                                    ; preds = %.lr.ph320, %444
  %indvars.iv424 = phi i64 [ 0, %.lr.ph320 ], [ %indvars.iv.next425, %444 ]
  br label %445

444:                                              ; preds = %.loopexit
  %indvars.iv.next425 = add nuw nsw i64 %indvars.iv424, 1
  %exitcond428.not = icmp eq i64 %indvars.iv.next425, 10
  br i1 %exitcond428.not, label %.loopexit238, label %.preheader235, !llvm.loop !35

445:                                              ; preds = %.preheader235, %.loopexit
  %indvars.iv419 = phi i64 [ 0, %.preheader235 ], [ %indvars.iv.next420, %.loopexit ]
  %446 = getelementptr inbounds [11 x [11 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3mat, i64 968), i64 0, i64 %indvars.iv424, i64 %indvars.iv419
  %447 = load i32, ptr %446, align 4, !tbaa !5
  %.not218 = icmp eq i32 %447, 0
  br i1 %.not218, label %.loopexit, label %.preheader.preheader

.preheader.preheader:                             ; preds = %445
  %448 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %449 = sext i32 %448 to i64
  %450 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %449, i64 %indvars.iv424, i64 0
  %.not219 = icmp eq i32 %448, 0
  %451 = zext i1 %.not219 to i64
  %452 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %451, i64 %indvars.iv419, i64 0
  %453 = load i32, ptr %452, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %450, i32 noundef %447, i32 noundef %453)
  %454 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %455 = sext i32 %454 to i64
  %456 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %455, i64 %indvars.iv424, i64 1
  %457 = load i32, ptr %446, align 4, !tbaa !5
  %.not219.1 = icmp eq i32 %454, 0
  %458 = zext i1 %.not219.1 to i64
  %459 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %458, i64 %indvars.iv419, i64 1
  %460 = load i32, ptr %459, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %456, i32 noundef %457, i32 noundef %460)
  %461 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %462 = sext i32 %461 to i64
  %463 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %462, i64 %indvars.iv424, i64 2
  %464 = load i32, ptr %446, align 4, !tbaa !5
  %.not219.2 = icmp eq i32 %461, 0
  %465 = zext i1 %.not219.2 to i64
  %466 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %465, i64 %indvars.iv419, i64 2
  %467 = load i32, ptr %466, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %463, i32 noundef %464, i32 noundef %467)
  %468 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %469 = sext i32 %468 to i64
  %470 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %469, i64 %indvars.iv424, i64 3
  %471 = load i32, ptr %446, align 4, !tbaa !5
  %.not219.3 = icmp eq i32 %468, 0
  %472 = zext i1 %.not219.3 to i64
  %473 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %472, i64 %indvars.iv419, i64 3
  %474 = load i32, ptr %473, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %470, i32 noundef %471, i32 noundef %474)
  %475 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %476 = sext i32 %475 to i64
  %477 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %476, i64 %indvars.iv424, i64 4
  %478 = load i32, ptr %446, align 4, !tbaa !5
  %.not219.4 = icmp eq i32 %475, 0
  %479 = zext i1 %.not219.4 to i64
  %480 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %479, i64 %indvars.iv419, i64 4
  %481 = load i32, ptr %480, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %477, i32 noundef %478, i32 noundef %481)
  %482 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %483 = sext i32 %482 to i64
  %484 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %483, i64 %indvars.iv424, i64 5
  %485 = load i32, ptr %446, align 4, !tbaa !5
  %.not219.5 = icmp eq i32 %482, 0
  %486 = zext i1 %.not219.5 to i64
  %487 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %486, i64 %indvars.iv419, i64 5
  %488 = load i32, ptr %487, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %484, i32 noundef %485, i32 noundef %488)
  %489 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %490 = sext i32 %489 to i64
  %491 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %490, i64 %indvars.iv424, i64 6
  %492 = load i32, ptr %446, align 4, !tbaa !5
  %.not219.6 = icmp eq i32 %489, 0
  %493 = zext i1 %.not219.6 to i64
  %494 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %493, i64 %indvars.iv419, i64 6
  %495 = load i32, ptr %494, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %491, i32 noundef %492, i32 noundef %495)
  %496 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %497 = sext i32 %496 to i64
  %498 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %497, i64 %indvars.iv424, i64 7
  %499 = load i32, ptr %446, align 4, !tbaa !5
  %.not219.7 = icmp eq i32 %496, 0
  %500 = zext i1 %.not219.7 to i64
  %501 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %500, i64 %indvars.iv419, i64 7
  %502 = load i32, ptr %501, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %498, i32 noundef %499, i32 noundef %502)
  %503 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %504 = sext i32 %503 to i64
  %505 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %504, i64 %indvars.iv424, i64 8
  %506 = load i32, ptr %446, align 4, !tbaa !5
  %.not219.8 = icmp eq i32 %503, 0
  %507 = zext i1 %.not219.8 to i64
  %508 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %507, i64 %indvars.iv419, i64 8
  %509 = load i32, ptr %508, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %505, i32 noundef %506, i32 noundef %509)
  %510 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %511 = sext i32 %510 to i64
  %512 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %511, i64 %indvars.iv424, i64 9
  %513 = load i32, ptr %446, align 4, !tbaa !5
  %.not219.9 = icmp eq i32 %510, 0
  %514 = zext i1 %.not219.9 to i64
  %515 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %514, i64 %indvars.iv419, i64 9
  %516 = load i32, ptr %515, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %512, i32 noundef %513, i32 noundef %516)
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.preheader, %445
  %indvars.iv.next420 = add nuw nsw i64 %indvars.iv419, 1
  %exitcond423.not = icmp eq i64 %indvars.iv.next420, 10
  br i1 %exitcond423.not, label %444, label %445, !llvm.loop !36

._crit_edge321:                                   ; preds = %.loopexit238, %.preheader239
  %.1.lcssa = phi i32 [ %.0188329, %.preheader239 ], [ %439, %.loopexit238 ]
  %.lcssa = phi ptr [ %430, %.preheader239 ], [ %436, %.loopexit238 ]
  %517 = load i32, ptr %.lcssa, align 4, !tbaa !11
  %518 = add nsw i32 %517, -1
  %519 = srem i32 %518, 1000
  %520 = sdiv i32 %518, 1000
  %521 = getelementptr inbounds i8, ptr %.lcssa, i64 4
  %522 = load i32, ptr %521, align 4, !tbaa !13
  %523 = add nsw i32 %522, -1
  %524 = srem i32 %523, 1000
  %525 = sdiv i32 %523, 1000
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(44) @_ZZ6solve9vE3vec, i8 0, i64 44, i1 false)
  %526 = sext i32 %519 to i64
  %527 = sext i32 %520 to i64
  br label %567

528:                                              ; preds = %.loopexit237
  %529 = load i32, ptr %426, align 4, !tbaa !5
  %530 = sext i32 %529 to i64
  %531 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %530
  store i32 0, ptr %531, align 4, !tbaa !5
  %532 = sext i32 %524 to i64
  %533 = sext i32 %525 to i64
  %534 = load i32, ptr @_ZZ6solve9vE3vec, align 16, !tbaa !5
  %535 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %532, i64 0, i64 %533
  %536 = load i32, ptr %535, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %531, i32 noundef %534, i32 noundef %536)
  %537 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 4), align 4, !tbaa !5
  %538 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %532, i64 1, i64 %533
  %539 = load i32, ptr %538, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %531, i32 noundef %537, i32 noundef %539)
  %540 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 8), align 8, !tbaa !5
  %541 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %532, i64 2, i64 %533
  %542 = load i32, ptr %541, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %531, i32 noundef %540, i32 noundef %542)
  %543 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 12), align 4, !tbaa !5
  %544 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %532, i64 3, i64 %533
  %545 = load i32, ptr %544, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %531, i32 noundef %543, i32 noundef %545)
  %546 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 16), align 16, !tbaa !5
  %547 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %532, i64 4, i64 %533
  %548 = load i32, ptr %547, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %531, i32 noundef %546, i32 noundef %548)
  %549 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 20), align 4, !tbaa !5
  %550 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %532, i64 5, i64 %533
  %551 = load i32, ptr %550, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %531, i32 noundef %549, i32 noundef %551)
  %552 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 24), align 8, !tbaa !5
  %553 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %532, i64 6, i64 %533
  %554 = load i32, ptr %553, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %531, i32 noundef %552, i32 noundef %554)
  %555 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 28), align 4, !tbaa !5
  %556 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %532, i64 7, i64 %533
  %557 = load i32, ptr %556, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %531, i32 noundef %555, i32 noundef %557)
  %558 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 32), align 16, !tbaa !5
  %559 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %532, i64 8, i64 %533
  %560 = load i32, ptr %559, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %531, i32 noundef %558, i32 noundef %560)
  %561 = load i32, ptr getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 36), align 4, !tbaa !5
  %562 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3pre, i64 0, i64 %532, i64 9, i64 %533
  %563 = load i32, ptr %562, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %531, i32 noundef %561, i32 noundef %563)
  %indvars.iv.next445 = add nuw nsw i64 %indvars.iv444, 1
  %564 = load i32, ptr @_ZZ6solve9vE3tot, align 4, !tbaa !5
  %565 = sext i32 %564 to i64
  %566 = icmp slt i64 %indvars.iv.next445, %565
  br i1 %566, label %.preheader239, label %._crit_edge330, !llvm.loop !37

567:                                              ; preds = %._crit_edge321, %.loopexit237
  %indvars.iv434 = phi i64 [ 0, %._crit_edge321 ], [ %indvars.iv.next435, %.loopexit237 ]
  %568 = getelementptr inbounds [1001 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3suf, i64 0, i64 %526, i64 %527, i64 %indvars.iv434
  %569 = load i32, ptr %568, align 4, !tbaa !5
  %.not216 = icmp eq i32 %569, 0
  br i1 %.not216, label %.loopexit237, label %.preheader236.preheader

.preheader236.preheader:                          ; preds = %567
  %570 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %571 = sext i32 %570 to i64
  %572 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %571, i64 %indvars.iv434, i64 0
  %573 = load i32, ptr %572, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) @_ZZ6solve9vE3vec, i32 noundef %569, i32 noundef %573)
  %574 = load i32, ptr %568, align 4, !tbaa !5
  %575 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %576 = sext i32 %575 to i64
  %577 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %576, i64 %indvars.iv434, i64 1
  %578 = load i32, ptr %577, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 4), i32 noundef %574, i32 noundef %578)
  %579 = load i32, ptr %568, align 4, !tbaa !5
  %580 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %581 = sext i32 %580 to i64
  %582 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %581, i64 %indvars.iv434, i64 2
  %583 = load i32, ptr %582, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 8), i32 noundef %579, i32 noundef %583)
  %584 = load i32, ptr %568, align 4, !tbaa !5
  %585 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %586 = sext i32 %585 to i64
  %587 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %586, i64 %indvars.iv434, i64 3
  %588 = load i32, ptr %587, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 12), i32 noundef %584, i32 noundef %588)
  %589 = load i32, ptr %568, align 4, !tbaa !5
  %590 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %591 = sext i32 %590 to i64
  %592 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %591, i64 %indvars.iv434, i64 4
  %593 = load i32, ptr %592, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 16), i32 noundef %589, i32 noundef %593)
  %594 = load i32, ptr %568, align 4, !tbaa !5
  %595 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %596 = sext i32 %595 to i64
  %597 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %596, i64 %indvars.iv434, i64 5
  %598 = load i32, ptr %597, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 20), i32 noundef %594, i32 noundef %598)
  %599 = load i32, ptr %568, align 4, !tbaa !5
  %600 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %601 = sext i32 %600 to i64
  %602 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %601, i64 %indvars.iv434, i64 6
  %603 = load i32, ptr %602, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 24), i32 noundef %599, i32 noundef %603)
  %604 = load i32, ptr %568, align 4, !tbaa !5
  %605 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %606 = sext i32 %605 to i64
  %607 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %606, i64 %indvars.iv434, i64 7
  %608 = load i32, ptr %607, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 28), i32 noundef %604, i32 noundef %608)
  %609 = load i32, ptr %568, align 4, !tbaa !5
  %610 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %611 = sext i32 %610 to i64
  %612 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %611, i64 %indvars.iv434, i64 8
  %613 = load i32, ptr %612, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 32), i32 noundef %609, i32 noundef %613)
  %614 = load i32, ptr %568, align 4, !tbaa !5
  %615 = load i32, ptr @_ZZ6solve9vE1o, align 4, !tbaa !5
  %616 = sext i32 %615 to i64
  %617 = getelementptr inbounds [3 x [11 x [11 x i32]]], ptr @_ZZ6solve9vE3mat, i64 0, i64 %616, i64 %indvars.iv434, i64 9
  %618 = load i32, ptr %617, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) getelementptr inbounds (i8, ptr @_ZZ6solve9vE3vec, i64 36), i32 noundef %614, i32 noundef %618)
  br label %.loopexit237

.loopexit237:                                     ; preds = %.preheader236.preheader, %567
  %indvars.iv.next435 = add nuw nsw i64 %indvars.iv434, 1
  %exitcond438.not = icmp eq i64 %indvars.iv.next435, 10
  br i1 %exitcond438.not, label %528, label %567, !llvm.loop !38
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ6solve9vE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ6solve9vE3$_1EvT_S2_T0_"(ptr noundef, ptr noundef) local_unnamed_addr #7

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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { 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 #8 = { noreturn nounwind }
attributes #9 = { nounwind }
attributes #10 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!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 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !10}
!32 = distinct !{!32, !10}
!33 = distinct !{!33, !10}
!34 = distinct !{!34, !10}
!35 = distinct !{!35, !10}
!36 = distinct !{!36, !10}
!37 = distinct !{!37, !10}
!38 = distinct !{!38, !10}


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