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

; 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.3 = 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.18 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__._Z6solve6v = external hidden unnamed_addr constant [14 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [13 x i8], align 1
@_ZZ6solve6vE1o = external hidden global i32, align 4
@_ZZ6solve6vE3mat = external hidden global [3 x [201 x [201 x i32]]], align 16
@_ZZ6solve6vE3ord = external hidden global [100001 x i32], align 16
@_ZZ6solve6vE3vec = external hidden global [100001 x [201 x i32]], align 16
@.str.21 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZZ6solve6vE3res = external hidden global [201 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 @_Z6solve6v() #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 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %class.anon.3, align 1
  %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 ptr, align 8
  %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
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #8
  store i32 200, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 500, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  store i32 1000000001, ptr %3, align 4, !tbaa !5
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %28 = icmp eq i32 %27, 200
  br i1 %28, label %29, label %34

29:                                               ; preds = %0
  %30 = load i32, ptr @n, align 4, !tbaa !5
  %31 = mul nsw i32 %30, 500
  %32 = load i32, ptr @q, align 4, !tbaa !5
  %33 = icmp eq i32 %31, %32
  br label %34

34:                                               ; preds = %29, %0
  %35 = phi i1 [ false, %0 ], [ %33, %29 ]
  br i1 %35, label %36, label %37

36:                                               ; preds = %34
  br label %39

37:                                               ; preds = %34
  call void @__assert_fail(ptr noundef @.str.18, ptr noundef @.str.1, i32 noundef 356, ptr noundef @__PRETTY_FUNCTION__._Z6solve6v) #9
  unreachable

38:                                               ; No predecessors!
  br label %39

39:                                               ; preds = %38, %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %56, %39
  %41 = load i32, ptr %4, align 4, !tbaa !5
  %42 = load i32, ptr @m, align 4, !tbaa !5
  %43 = icmp slt i32 %41, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %59

45:                                               ; preds = %40
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %47
  %49 = getelementptr inbounds %struct.Edge, ptr %48, i32 0, i32 2
  %50 = load i32, ptr %49, align 4, !tbaa !9
  %51 = icmp eq i32 %50, 1
  br i1 %51, label %52, label %53

52:                                               ; preds = %45
  br label %55

53:                                               ; preds = %45
  call void @__assert_fail(ptr noundef @.str.19, ptr noundef @.str.1, i32 noundef 358, ptr noundef @__PRETTY_FUNCTION__._Z6solve6v) #9
  unreachable

54:                                               ; No predecessors!
  br label %55

55:                                               ; preds = %54, %52
  br label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %4, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %4, align 4, !tbaa !5
  br label %40, !llvm.loop !11

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

60:                                               ; preds = %81, %59
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = load i32, ptr @q, align 4, !tbaa !5
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  br label %84

65:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %66 = load i32, ptr %6, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %67
  store ptr %68, ptr %7, align 8, !tbaa !13
  %69 = load ptr, ptr %7, align 8, !tbaa !13
  %70 = getelementptr inbounds %struct.Edge, ptr %69, i32 0, i32 2
  %71 = load i32, ptr %70, align 4, !tbaa !9
  %72 = icmp slt i32 %71, 1000000001
  br i1 %72, label %73, label %74

73:                                               ; preds = %65
  br label %76

74:                                               ; preds = %65
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.1, i32 noundef 362, ptr noundef @__PRETTY_FUNCTION__._Z6solve6v) #9
  unreachable

75:                                               ; No predecessors!
  br label %76

76:                                               ; preds = %75, %73
  %77 = load ptr, ptr %7, align 8, !tbaa !13
  %78 = getelementptr inbounds %struct.Edge, ptr %77, i32 0, i32 2
  %79 = 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) %78)
  %80 = load i32, ptr %79, align 4, !tbaa !5
  store i32 %80, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %81

81:                                               ; preds = %76
  %82 = load i32, ptr %6, align 4, !tbaa !5
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %6, align 4, !tbaa !5
  br label %60, !llvm.loop !15

84:                                               ; preds = %64
  %85 = load ptr, ptr @stderr, align 8, !tbaa !13
  %86 = load i32, ptr %5, align 4, !tbaa !5
  %87 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %85, ptr noundef @.str.12, i32 noundef %86) #8
  call void @llvm.memset.p0.i64(ptr align 8 getelementptr inbounds ([3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 2), i8 0, i64 161604, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %111, %84
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = load i32, ptr @m, align 4, !tbaa !5
  %91 = icmp slt i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %114

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %94 = load i32, ptr %8, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %95
  store ptr %96, ptr %9, align 8, !tbaa !13
  %97 = load ptr, ptr %9, align 8, !tbaa !13
  %98 = getelementptr inbounds %struct.Edge, ptr %97, i32 0, i32 0
  %99 = load i32, ptr %98, align 4, !tbaa !16
  %100 = sub nsw i32 %99, 1
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds ([3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 2), i64 0, i64 %101
  %103 = load ptr, ptr %9, align 8, !tbaa !13
  %104 = getelementptr inbounds %struct.Edge, ptr %103, i32 0, i32 1
  %105 = load i32, ptr %104, align 4, !tbaa !17
  %106 = sub nsw i32 %105, 1
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [201 x i32], ptr %102, i64 0, i64 %107
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = add nsw i32 %109, 1
  store i32 %110, ptr %108, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %111

111:                                              ; preds = %93
  %112 = load i32, ptr %8, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %8, align 4, !tbaa !5
  br label %88, !llvm.loop !18

114:                                              ; preds = %92
  %115 = load i32, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 %116
  %118 = getelementptr inbounds [201 x [201 x i32]], ptr %117, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %118, ptr align 8 getelementptr inbounds ([3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 2), i64 161604, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ6solve6vE3vec, i8 0, i64 80400804, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %140, %114
  %120 = load i32, ptr %10, align 4, !tbaa !5
  %121 = load i32, ptr @q, align 4, !tbaa !5
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %124, label %123

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

124:                                              ; preds = %119
  %125 = load i32, ptr %10, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %126
  %128 = load i32, ptr %10, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %129
  %131 = getelementptr inbounds %struct.Edge, ptr %130, i32 0, i32 0
  %132 = load i32, ptr %131, align 4, !tbaa !16
  %133 = sub nsw i32 %132, 1
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [201 x i32], ptr %127, i64 0, i64 %134
  store i32 1, ptr %135, align 4, !tbaa !5
  %136 = load i32, ptr %10, align 4, !tbaa !5
  %137 = load i32, ptr %10, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve6vE3ord, i64 0, i64 %138
  store i32 %136, ptr %139, align 4, !tbaa !5
  br label %140

140:                                              ; preds = %124
  %141 = load i32, ptr %10, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %10, align 4, !tbaa !5
  br label %119, !llvm.loop !19

143:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %370, %143
  %145 = load ptr, ptr @stderr, align 8, !tbaa !13
  %146 = load i32, ptr %11, align 4, !tbaa !5
  %147 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %145, ptr noundef @.str.21, i32 noundef %146) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %148

148:                                              ; preds = %166, %144
  %149 = load i32, ptr %12, align 4, !tbaa !5
  %150 = load i32, ptr @q, align 4, !tbaa !5
  %151 = icmp slt i32 %149, %150
  br i1 %151, label %153, label %152

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

153:                                              ; preds = %148
  %154 = load i32, ptr %12, align 4, !tbaa !5
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %155
  %157 = getelementptr inbounds %struct.Edge, ptr %156, i32 0, i32 2
  %158 = load i32, ptr %157, align 4, !tbaa !9
  %159 = load i32, ptr %11, align 4, !tbaa !5
  %160 = sdiv i32 %158, %159
  %161 = srem i32 %160, 500
  %162 = load i32, ptr %12, align 4, !tbaa !5
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %163
  %165 = getelementptr inbounds [201 x i32], ptr %164, i64 0, i64 200
  store i32 %161, ptr %165, align 4, !tbaa !5
  br label %166

166:                                              ; preds = %153
  %167 = load i32, ptr %12, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %12, align 4, !tbaa !5
  br label %148, !llvm.loop !20

169:                                              ; preds = %152
  %170 = load i32, ptr @q, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds i32, ptr @_ZZ6solve6vE3ord, i64 %171
  call void @"_ZSt4sortIPiZ6solve6vE3$_0EvT_S2_T0_"(ptr noundef @_ZZ6solve6vE3ord, ptr noundef %172)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %173 = load i32, ptr %5, align 4, !tbaa !5
  %174 = load i32, ptr %11, align 4, !tbaa !5
  %175 = sdiv i32 %173, %174
  store i32 %175, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  store i32 499, ptr %17, align 4, !tbaa !5
  %176 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %177 = load i32, ptr %176, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  store i32 %177, ptr %15, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %196, %169
  %179 = load i32, ptr %14, align 4, !tbaa !5
  %180 = load i32, ptr @q, align 4, !tbaa !5
  %181 = icmp slt i32 %179, %180
  br i1 %181, label %182, label %193

182:                                              ; preds = %178
  %183 = load i32, ptr %14, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve6vE3ord, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %187
  %189 = getelementptr inbounds [201 x i32], ptr %188, i64 0, i64 200
  %190 = load i32, ptr %189, align 4, !tbaa !5
  %191 = icmp ne i32 %190, 0
  %192 = xor i1 %191, true
  br label %193

193:                                              ; preds = %182, %178
  %194 = phi i1 [ false, %178 ], [ %192, %182 ]
  br i1 %194, label %195, label %199

195:                                              ; preds = %193
  br label %196

196:                                              ; preds = %195
  %197 = load i32, ptr %14, align 4, !tbaa !5
  %198 = add nsw i32 %197, 1
  store i32 %198, ptr %14, align 4, !tbaa !5
  br label %178, !llvm.loop !21

199:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %200

200:                                              ; preds = %353, %199
  %201 = load i32, ptr %18, align 4, !tbaa !5
  %202 = load i32, ptr %15, align 4, !tbaa !5
  %203 = icmp sle i32 %201, %202
  br i1 %203, label %205, label %204

204:                                              ; preds = %200
  store i32 23, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  br label %356

205:                                              ; preds = %200
  br label %206

206:                                              ; preds = %276, %205
  %207 = load i32, ptr %14, align 4, !tbaa !5
  %208 = load i32, ptr @q, align 4, !tbaa !5
  %209 = icmp slt i32 %207, %208
  br i1 %209, label %210, label %221

210:                                              ; preds = %206
  %211 = load i32, ptr %14, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve6vE3ord, i64 0, i64 %212
  %214 = load i32, ptr %213, align 4, !tbaa !5
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %215
  %217 = getelementptr inbounds [201 x i32], ptr %216, i64 0, i64 200
  %218 = load i32, ptr %217, align 4, !tbaa !5
  %219 = load i32, ptr %18, align 4, !tbaa !5
  %220 = icmp eq i32 %218, %219
  br label %221

221:                                              ; preds = %210, %206
  %222 = phi i1 [ false, %206 ], [ %220, %210 ]
  br i1 %222, label %223, label %279

223:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %224 = load i32, ptr %14, align 4, !tbaa !5
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve6vE3ord, i64 0, i64 %225
  %227 = load i32, ptr %226, align 4, !tbaa !5
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %228
  %230 = getelementptr inbounds [201 x i32], ptr %229, i64 0, i64 0
  store ptr %230, ptr %20, align 8, !tbaa !13
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ6solve6vE3res, i8 0, i64 804, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %231

231:                                              ; preds = %271, %223
  %232 = load i32, ptr %21, align 4, !tbaa !5
  %233 = icmp sle i32 %232, 200
  br i1 %233, label %235, label %234

234:                                              ; preds = %231
  store i32 29, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %274

235:                                              ; preds = %231
  %236 = load ptr, ptr %20, align 8, !tbaa !13
  %237 = load i32, ptr %21, align 4, !tbaa !5
  %238 = sext i32 %237 to i64
  %239 = getelementptr inbounds i32, ptr %236, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !5
  %241 = icmp ne i32 %240, 0
  br i1 %241, label %243, label %242

242:                                              ; preds = %235
  br label %271

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

244:                                              ; preds = %267, %243
  %245 = load i32, ptr %22, align 4, !tbaa !5
  %246 = icmp sle i32 %245, 200
  br i1 %246, label %248, label %247

247:                                              ; preds = %244
  store i32 32, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %270

248:                                              ; preds = %244
  %249 = load i32, ptr %22, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [201 x i32], ptr @_ZZ6solve6vE3res, i64 0, i64 %250
  %252 = load ptr, ptr %20, align 8, !tbaa !13
  %253 = load i32, ptr %21, align 4, !tbaa !5
  %254 = sext i32 %253 to i64
  %255 = getelementptr inbounds i32, ptr %252, i64 %254
  %256 = load i32, ptr %255, align 4, !tbaa !5
  %257 = load i32, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %258 = sext i32 %257 to i64
  %259 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 %258
  %260 = load i32, ptr %21, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [201 x [201 x i32]], ptr %259, i64 0, i64 %261
  %263 = load i32, ptr %22, align 4, !tbaa !5
  %264 = sext i32 %263 to i64
  %265 = getelementptr inbounds [201 x i32], ptr %262, i64 0, i64 %264
  %266 = load i32, ptr %265, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %251, i32 noundef %256, i32 noundef %266)
  br label %267

267:                                              ; preds = %248
  %268 = load i32, ptr %22, align 4, !tbaa !5
  %269 = add nsw i32 %268, 1
  store i32 %269, ptr %22, align 4, !tbaa !5
  br label %244, !llvm.loop !22

270:                                              ; preds = %247
  br label %271

271:                                              ; preds = %270, %242
  %272 = load i32, ptr %21, align 4, !tbaa !5
  %273 = add nsw i32 %272, 1
  store i32 %273, ptr %21, align 4, !tbaa !5
  br label %231, !llvm.loop !23

274:                                              ; preds = %234
  %275 = load ptr, ptr %20, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %275, ptr align 16 @_ZZ6solve6vE3res, i64 804, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  br label %276

276:                                              ; preds = %274
  %277 = load i32, ptr %14, align 4, !tbaa !5
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %14, align 4, !tbaa !5
  br label %206, !llvm.loop !24

279:                                              ; preds = %221
  %280 = load i32, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %281 = icmp ne i32 %280, 0
  %282 = xor i1 %281, true
  %283 = zext i1 %282 to i32
  store i32 %283, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %284 = load i32, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 %285
  %287 = getelementptr inbounds [201 x [201 x i32]], ptr %286, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %287, i8 0, i64 161604, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %288

288:                                              ; preds = %349, %279
  %289 = load i32, ptr %23, align 4, !tbaa !5
  %290 = icmp sle i32 %289, 200
  br i1 %290, label %292, label %291

291:                                              ; preds = %288
  store i32 35, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #8
  br label %352

292:                                              ; preds = %288
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %293

293:                                              ; preds = %345, %292
  %294 = load i32, ptr %24, align 4, !tbaa !5
  %295 = icmp sle i32 %294, 200
  br i1 %295, label %297, label %296

296:                                              ; preds = %293
  store i32 38, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %348

297:                                              ; preds = %293
  %298 = load i32, ptr %23, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds ([3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 2), i64 0, i64 %299
  %301 = load i32, ptr %24, align 4, !tbaa !5
  %302 = sext i32 %301 to i64
  %303 = getelementptr inbounds [201 x i32], ptr %300, i64 0, i64 %302
  %304 = load i32, ptr %303, align 4, !tbaa !5
  %305 = icmp ne i32 %304, 0
  br i1 %305, label %307, label %306

306:                                              ; preds = %297
  br label %345

307:                                              ; preds = %297
  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 = %341, %307
  %309 = load i32, ptr %25, align 4, !tbaa !5
  %310 = icmp sle i32 %309, 200
  br i1 %310, label %312, label %311

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

312:                                              ; preds = %308
  %313 = load i32, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %314 = sext i32 %313 to i64
  %315 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 %314
  %316 = load i32, ptr %23, align 4, !tbaa !5
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds [201 x [201 x i32]], ptr %315, i64 0, i64 %317
  %319 = load i32, ptr %25, align 4, !tbaa !5
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds [201 x i32], ptr %318, i64 0, i64 %320
  %322 = load i32, ptr %23, align 4, !tbaa !5
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds ([3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 2), i64 0, i64 %323
  %325 = load i32, ptr %24, align 4, !tbaa !5
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds [201 x i32], ptr %324, i64 0, i64 %326
  %328 = load i32, ptr %327, align 4, !tbaa !5
  %329 = load i32, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %330 = icmp ne i32 %329, 0
  %331 = xor i1 %330, true
  %332 = zext i1 %331 to i64
  %333 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 %332
  %334 = load i32, ptr %24, align 4, !tbaa !5
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds [201 x [201 x i32]], ptr %333, i64 0, i64 %335
  %337 = load i32, ptr %25, align 4, !tbaa !5
  %338 = sext i32 %337 to i64
  %339 = getelementptr inbounds [201 x i32], ptr %336, i64 0, i64 %338
  %340 = load i32, ptr %339, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %321, i32 noundef %328, i32 noundef %340)
  br label %341

341:                                              ; preds = %312
  %342 = load i32, ptr %25, align 4, !tbaa !5
  %343 = add nsw i32 %342, 1
  store i32 %343, ptr %25, align 4, !tbaa !5
  br label %308, !llvm.loop !25

344:                                              ; preds = %311
  br label %345

345:                                              ; preds = %344, %306
  %346 = load i32, ptr %24, align 4, !tbaa !5
  %347 = add nsw i32 %346, 1
  store i32 %347, ptr %24, align 4, !tbaa !5
  br label %293, !llvm.loop !26

348:                                              ; preds = %296
  br label %349

349:                                              ; preds = %348
  %350 = load i32, ptr %23, align 4, !tbaa !5
  %351 = add nsw i32 %350, 1
  store i32 %351, ptr %23, align 4, !tbaa !5
  br label %288, !llvm.loop !27

352:                                              ; preds = %291
  br label %353

353:                                              ; preds = %352
  %354 = load i32, ptr %18, align 4, !tbaa !5
  %355 = add nsw i32 %354, 1
  store i32 %355, ptr %18, align 4, !tbaa !5
  br label %200, !llvm.loop !28

356:                                              ; preds = %204
  %357 = load i32, ptr %5, align 4, !tbaa !5
  %358 = load i32, ptr %11, align 4, !tbaa !5
  %359 = sdiv i32 %357, %358
  %360 = icmp slt i32 %359, 500
  br i1 %360, label %361, label %362

361:                                              ; preds = %356
  store i32 14, ptr %19, align 4
  br label %367

362:                                              ; preds = %356
  %363 = load i32, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %364 = sext i32 %363 to i64
  %365 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 %364
  %366 = getelementptr inbounds [201 x [201 x i32]], ptr %365, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds ([3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 2), ptr align 4 %366, i64 161604, i1 false)
  store i32 0, ptr %19, align 4
  br label %367

367:                                              ; preds = %362, %361
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  %368 = load i32, ptr %19, align 4
  switch i32 %368, label %373 [
    i32 0, label %369
  ]

369:                                              ; preds = %367
  br label %370

370:                                              ; preds = %369
  %371 = load i32, ptr %11, align 4, !tbaa !5
  %372 = mul nsw i32 %371, 500
  store i32 %372, ptr %11, align 4, !tbaa !5
  br label %144, !llvm.loop !29

373:                                              ; preds = %367
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %374

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

375:                                              ; preds = %396, %374
  %376 = load i32, ptr %26, align 4, !tbaa !5
  %377 = load i32, ptr @q, align 4, !tbaa !5
  %378 = icmp slt i32 %376, %377
  br i1 %378, label %380, label %379

379:                                              ; preds = %375
  store i32 44, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %399

380:                                              ; preds = %375
  %381 = load i32, ptr %26, align 4, !tbaa !5
  %382 = sext i32 %381 to i64
  %383 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %382
  %384 = load i32, ptr %26, align 4, !tbaa !5
  %385 = sext i32 %384 to i64
  %386 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %385
  %387 = getelementptr inbounds %struct.Edge, ptr %386, i32 0, i32 1
  %388 = load i32, ptr %387, align 4, !tbaa !17
  %389 = sub nsw i32 %388, 1
  %390 = sext i32 %389 to i64
  %391 = getelementptr inbounds [201 x i32], ptr %383, i64 0, i64 %390
  %392 = load i32, ptr %391, align 4, !tbaa !5
  %393 = load i32, ptr %26, align 4, !tbaa !5
  %394 = sext i32 %393 to i64
  %395 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %394
  store i32 %392, ptr %395, align 4, !tbaa !5
  br label %396

396:                                              ; preds = %380
  %397 = load i32, ptr %26, align 4, !tbaa !5
  %398 = add nsw i32 %397, 1
  store i32 %398, ptr %26, align 4, !tbaa !5
  br label %375, !llvm.loop !30

399:                                              ; preds = %379
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #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 @"_ZSt4sortIPiZ6solve6vE3$_0EvT_S2_T0_"(ptr noundef, ptr noundef) #7

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

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, !6, i64 8}
!10 = !{!"_ZTS4Edge", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = !{!10, !6, i64 0}
!17 = !{!10, !6, i64 4}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}
!22 = distinct !{!22, !12}
!23 = distinct !{!23, !12}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !12}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !12}


; 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 local_unnamed_addr global [100001 x i32], align 16
@e = external dso_local local_unnamed_addr global [150001 x %struct.Edge], align 16
@que = external dso_local global [100001 x %struct.Edge], align 16
@.str.1 = external hidden unnamed_addr constant [61 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.12 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__._Z6solve6v = external hidden unnamed_addr constant [14 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [13 x i8], align 1
@_ZZ6solve6vE1o = external hidden local_unnamed_addr global i32, align 4
@_ZZ6solve6vE3mat = external hidden global [3 x [201 x [201 x i32]]], align 16
@_ZZ6solve6vE3ord = external hidden global [100001 x i32], align 16
@_ZZ6solve6vE3vec = external hidden local_unnamed_addr global [100001 x [201 x i32]], align 16
@.str.21 = external hidden unnamed_addr constant [9 x i8], align 1
@_ZZ6solve6vE3res = external hidden global [201 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 @_Z6solve6v() local_unnamed_addr #6 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = load i32, ptr @n, align 4
  %5 = icmp eq i32 %4, 200
  %6 = load i32, ptr @q, align 4
  %7 = icmp eq i32 %6, 100000
  %8 = select i1 %5, i1 %7, i1 false
  br i1 %8, label %.preheader99, label %11

.preheader99:                                     ; 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 %.lr.ph103.preheader

.lr.ph.preheader:                                 ; preds = %.preheader99
  %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.18, ptr noundef nonnull @.str.1, i32 noundef 356, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6solve6v) #8
  unreachable

12:                                               ; preds = %.lr.ph
  %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 %.lr.ph103.preheader, label %.lr.ph, !llvm.loop !9

.lr.ph103.preheader:                              ; preds = %12, %.preheader99
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  store i32 0, ptr %1, align 4, !tbaa !5
  br label %.lr.ph103

.lr.ph:                                           ; preds = %.lr.ph.preheader, %12
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %12 ]
  %13 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv, i32 2
  %14 = load i32, ptr %13, align 4, !tbaa !11
  %15 = icmp eq i32 %14, 1
  br i1 %15, label %12, label %16

16:                                               ; preds = %.lr.ph
  tail call void @__assert_fail(ptr noundef nonnull @.str.19, ptr noundef nonnull @.str.1, i32 noundef 358, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6solve6v) #8
  unreachable

._crit_edge104:                                   ; preds = %26
  %17 = load ptr, ptr @stderr, align 8, !tbaa !13
  %18 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %17, ptr noundef nonnull @.str.12, i32 noundef %28) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(161604) getelementptr inbounds (i8, ptr @_ZZ6solve6vE3mat, i64 323208), i8 0, i64 161604, i1 false)
  %19 = load i32, ptr @m, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph107.preheader, label %._crit_edge108

.lr.ph107.preheader:                              ; preds = %._crit_edge104
  %wide.trip.count146 = zext nneg i32 %19 to i64
  %xtraiter = and i64 %wide.trip.count146, 1
  %21 = icmp eq i32 %19, 1
  br i1 %21, label %._crit_edge108.loopexit.unr-lcssa, label %.lr.ph107.preheader.new

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

.lr.ph103:                                        ; preds = %.lr.ph103.preheader, %26
  %indvars.iv140 = phi i64 [ 0, %.lr.ph103.preheader ], [ %indvars.iv.next141, %26 ]
  %22 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv140, i32 2
  %23 = load i32, ptr %22, align 4, !tbaa !11
  %24 = icmp slt i32 %23, 1000000001
  br i1 %24, label %26, label %25

25:                                               ; preds = %.lr.ph103
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.1, i32 noundef 362, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6solve6v) #8
  unreachable

26:                                               ; preds = %.lr.ph103
  %27 = 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) %22)
  %28 = load i32, ptr %27, align 4, !tbaa !5
  store i32 %28, ptr %1, align 4, !tbaa !5
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %29 = load i32, ptr @q, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next141, %30
  br i1 %31, label %.lr.ph103, label %._crit_edge104, !llvm.loop !15

._crit_edge108.loopexit.unr-lcssa:                ; preds = %.lr.ph107, %.lr.ph107.preheader
  %indvars.iv143.unr = phi i64 [ 0, %.lr.ph107.preheader ], [ %indvars.iv.next144.1, %.lr.ph107 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge108, label %.lr.ph107.epil

.lr.ph107.epil:                                   ; preds = %._crit_edge108.loopexit.unr-lcssa
  %32 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv143.unr
  %33 = load i32, ptr %32, align 4, !tbaa !16
  %34 = add nsw i32 %33, -1
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds i8, ptr %32, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !17
  %38 = add nsw i32 %37, -1
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve6vE3mat, i64 323208), i64 0, i64 %35, i64 %39
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %40, align 4, !tbaa !5
  br label %._crit_edge108

._crit_edge108:                                   ; preds = %.lr.ph107.epil, %._crit_edge108.loopexit.unr-lcssa, %._crit_edge104
  %43 = load i32, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 %44
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(161604) %45, ptr noundef nonnull align 8 dereferenceable(161604) getelementptr inbounds (i8, ptr @_ZZ6solve6vE3mat, i64 323208), i64 161604, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80400804) @_ZZ6solve6vE3vec, i8 0, i64 80400804, i1 false)
  %46 = load i32, ptr @q, align 4, !tbaa !5
  %47 = icmp sgt i32 %46, 0
  br i1 %47, label %.lr.ph111.preheader, label %.preheader98.preheader

.lr.ph111.preheader:                              ; preds = %._crit_edge108
  %wide.trip.count151 = zext nneg i32 %46 to i64
  %xtraiter200 = and i64 %wide.trip.count151, 1
  %48 = icmp eq i32 %46, 1
  br i1 %48, label %.preheader98.preheader.loopexit.unr-lcssa, label %.lr.ph111.preheader.new

.lr.ph111.preheader.new:                          ; preds = %.lr.ph111.preheader
  %unroll_iter202 = and i64 %wide.trip.count151, 2147483646
  br label %.lr.ph111

.lr.ph107:                                        ; preds = %.lr.ph107, %.lr.ph107.preheader.new
  %indvars.iv143 = phi i64 [ 0, %.lr.ph107.preheader.new ], [ %indvars.iv.next144.1, %.lr.ph107 ]
  %niter = phi i64 [ 0, %.lr.ph107.preheader.new ], [ %niter.next.1, %.lr.ph107 ]
  %49 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv143
  %50 = load i32, ptr %49, align 8, !tbaa !16
  %51 = add nsw i32 %50, -1
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %49, i64 4
  %54 = load i32, ptr %53, align 4, !tbaa !17
  %55 = add nsw i32 %54, -1
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve6vE3mat, i64 323208), i64 0, i64 %52, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %57, align 4, !tbaa !5
  %indvars.iv.next144 = or disjoint i64 %indvars.iv143, 1
  %60 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv.next144
  %61 = load i32, ptr %60, align 4, !tbaa !16
  %62 = add nsw i32 %61, -1
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds i8, ptr %60, i64 4
  %65 = load i32, ptr %64, align 8, !tbaa !17
  %66 = add nsw i32 %65, -1
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve6vE3mat, i64 323208), i64 0, i64 %63, i64 %67
  %69 = load i32, ptr %68, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %68, align 4, !tbaa !5
  %indvars.iv.next144.1 = add nuw nsw i64 %indvars.iv143, 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_edge108.loopexit.unr-lcssa, label %.lr.ph107, !llvm.loop !18

.lr.ph111:                                        ; preds = %.lr.ph111, %.lr.ph111.preheader.new
  %indvars.iv148 = phi i64 [ 0, %.lr.ph111.preheader.new ], [ %indvars.iv.next149.1, %.lr.ph111 ]
  %niter203 = phi i64 [ 0, %.lr.ph111.preheader.new ], [ %niter203.next.1, %.lr.ph111 ]
  %71 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv148
  %72 = load i32, ptr %71, align 8, !tbaa !16
  %73 = add nsw i32 %72, -1
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %indvars.iv148, i64 %74
  store i32 1, ptr %75, align 4, !tbaa !5
  %76 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve6vE3ord, i64 0, i64 %indvars.iv148
  %77 = trunc nuw nsw i64 %indvars.iv148 to i32
  store i32 %77, ptr %76, align 8, !tbaa !5
  %indvars.iv.next149 = or disjoint i64 %indvars.iv148, 1
  %78 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv.next149
  %79 = load i32, ptr %78, align 4, !tbaa !16
  %80 = add nsw i32 %79, -1
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %indvars.iv.next149, i64 %81
  store i32 1, ptr %82, align 4, !tbaa !5
  %83 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve6vE3ord, i64 0, i64 %indvars.iv.next149
  %84 = trunc nuw nsw i64 %indvars.iv.next149 to i32
  store i32 %84, ptr %83, align 4, !tbaa !5
  %indvars.iv.next149.1 = add nuw nsw i64 %indvars.iv148, 2
  %niter203.next.1 = add i64 %niter203, 2
  %niter203.ncmp.1 = icmp eq i64 %niter203.next.1, %unroll_iter202
  br i1 %niter203.ncmp.1, label %.preheader98.preheader.loopexit.unr-lcssa, label %.lr.ph111, !llvm.loop !19

.preheader98.preheader.loopexit.unr-lcssa:        ; preds = %.lr.ph111, %.lr.ph111.preheader
  %indvars.iv148.unr = phi i64 [ 0, %.lr.ph111.preheader ], [ %indvars.iv.next149.1, %.lr.ph111 ]
  %lcmp.mod201.not = icmp eq i64 %xtraiter200, 0
  br i1 %lcmp.mod201.not, label %.preheader98.preheader, label %.lr.ph111.epil

.lr.ph111.epil:                                   ; preds = %.preheader98.preheader.loopexit.unr-lcssa
  %85 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv148.unr
  %86 = load i32, ptr %85, align 4, !tbaa !16
  %87 = add nsw i32 %86, -1
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %indvars.iv148.unr, i64 %88
  store i32 1, ptr %89, align 4, !tbaa !5
  %90 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve6vE3ord, i64 0, i64 %indvars.iv148.unr
  %91 = trunc nuw nsw i64 %indvars.iv148.unr to i32
  store i32 %91, ptr %90, align 4, !tbaa !5
  br label %.preheader98.preheader

.preheader98.preheader:                           ; preds = %.lr.ph111.epil, %.preheader98.preheader.loopexit.unr-lcssa, %._crit_edge108
  br label %.preheader98

.preheader98:                                     ; preds = %.preheader98.preheader, %163
  %.083 = phi i32 [ %167, %163 ], [ 1, %.preheader98.preheader ]
  %92 = load ptr, ptr @stderr, align 8, !tbaa !13
  %93 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %92, ptr noundef nonnull @.str.21, i32 noundef %.083) #10
  %94 = load i32, ptr @q, align 4, !tbaa !5
  %95 = icmp sgt i32 %94, 0
  br i1 %95, label %.lr.ph114.preheader, label %._crit_edge115

.lr.ph114.preheader:                              ; preds = %.preheader98
  %wide.trip.count156 = zext nneg i32 %94 to i64
  br label %.lr.ph114

._crit_edge115:                                   ; preds = %.lr.ph114, %.preheader98
  %96 = sext i32 %94 to i64
  %97 = getelementptr inbounds i32, ptr @_ZZ6solve6vE3ord, i64 %96
  call void @"_ZSt4sortIPiZ6solve6vE3$_0EvT_S2_T0_"(ptr noundef nonnull @_ZZ6solve6vE3ord, ptr noundef nonnull %97)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  %98 = load i32, ptr %1, align 4, !tbaa !5
  %99 = sdiv i32 %98, %.083
  store i32 %99, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  store i32 499, ptr %3, align 4, !tbaa !5
  %100 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %101 = load i32, ptr %100, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  %102 = load i32, ptr @q, align 4, !tbaa !5
  %103 = icmp sgt i32 %102, 0
  br i1 %103, label %.lr.ph118.preheader, label %.critedge

.lr.ph118.preheader:                              ; preds = %._crit_edge115
  %wide.trip.count161 = zext nneg i32 %102 to i64
  br label %.lr.ph118

.lr.ph114:                                        ; preds = %.lr.ph114.preheader, %.lr.ph114
  %indvars.iv153 = phi i64 [ 0, %.lr.ph114.preheader ], [ %indvars.iv.next154, %.lr.ph114 ]
  %104 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv153, i32 2
  %105 = load i32, ptr %104, align 4, !tbaa !11
  %106 = sdiv i32 %105, %.083
  %107 = srem i32 %106, 500
  %108 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %indvars.iv153, i64 200
  store i32 %107, ptr %108, align 4, !tbaa !5
  %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1
  %exitcond157.not = icmp eq i64 %indvars.iv.next154, %wide.trip.count156
  br i1 %exitcond157.not, label %._crit_edge115, label %.lr.ph114, !llvm.loop !20

.lr.ph118:                                        ; preds = %.lr.ph118.preheader, %114
  %indvars.iv158 = phi i64 [ 0, %.lr.ph118.preheader ], [ %indvars.iv.next159, %114 ]
  %109 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve6vE3ord, i64 0, i64 %indvars.iv158
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %111, i64 200
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %.not = icmp eq i32 %113, 0
  br i1 %.not, label %114, label %.critedge.loopexit.split.loop.exit196

114:                                              ; preds = %.lr.ph118
  %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1
  %exitcond162.not = icmp eq i64 %indvars.iv.next159, %wide.trip.count161
  br i1 %exitcond162.not, label %.critedge, label %.lr.ph118, !llvm.loop !21

.critedge.loopexit.split.loop.exit196:            ; preds = %.lr.ph118
  %115 = trunc nuw nsw i64 %indvars.iv158 to i32
  br label %.critedge

.critedge:                                        ; preds = %114, %.critedge.loopexit.split.loop.exit196, %._crit_edge115
  %.081.lcssa = phi i32 [ 0, %._crit_edge115 ], [ %115, %.critedge.loopexit.split.loop.exit196 ], [ %102, %114 ]
  %.not87132 = icmp slt i32 %101, 1
  br i1 %.not87132, label %._crit_edge135, label %.preheader97

.preheader97:                                     ; preds = %.critedge, %150
  %.079134 = phi i32 [ %151, %150 ], [ 1, %.critedge ]
  %.1133 = phi i32 [ %.2.lcssa, %150 ], [ %.081.lcssa, %.critedge ]
  %116 = load i32, ptr @q, align 4, !tbaa !5
  %117 = icmp slt i32 %.1133, %116
  br i1 %117, label %.lr.ph125.preheader, label %.critedge2

.lr.ph125.preheader:                              ; preds = %.preheader97
  %118 = sext i32 %.1133 to i64
  br label %.lr.ph125

._crit_edge135:                                   ; preds = %150, %.critedge
  %119 = load i32, ptr %1, align 4, !tbaa !5
  %120 = sdiv i32 %119, %.083
  %121 = icmp sgt i32 %120, 499
  br i1 %121, label %163, label %.critedge93.preheader

.critedge93.preheader:                            ; preds = %._crit_edge135
  %122 = load i32, ptr @q, align 4, !tbaa !5
  %123 = icmp sgt i32 %122, 0
  br i1 %123, label %.critedge93.preheader138, label %.critedge93._crit_edge

.critedge93.preheader138:                         ; preds = %.critedge93.preheader
  %wide.trip.count194 = zext nneg i32 %122 to i64
  %xtraiter204 = and i64 %wide.trip.count194, 1
  %124 = icmp eq i32 %122, 1
  br i1 %124, label %.critedge93._crit_edge.loopexit.unr-lcssa, label %.critedge93.preheader138.new

.critedge93.preheader138.new:                     ; preds = %.critedge93.preheader138
  %unroll_iter206 = and i64 %wide.trip.count194, 2147483646
  br label %.critedge93

.lr.ph125:                                        ; preds = %.lr.ph125.preheader, %133
  %indvars.iv171 = phi i64 [ %118, %.lr.ph125.preheader ], [ %indvars.iv.next172, %133 ]
  %125 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve6vE3ord, i64 0, i64 %indvars.iv171
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %127
  %129 = getelementptr inbounds i8, ptr %128, i64 800
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = icmp eq i32 %130, %.079134
  br i1 %131, label %132, label %.critedge2.loopexit

132:                                              ; preds = %.lr.ph125
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(804) @_ZZ6solve6vE3res, i8 0, i64 804, i1 false)
  br label %137

133:                                              ; preds = %.loopexit95
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(804) %128, ptr noundef nonnull align 16 dereferenceable(804) @_ZZ6solve6vE3res, i64 804, i1 false)
  %indvars.iv.next172 = add nsw i64 %indvars.iv171, 1
  %134 = load i32, ptr @q, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = icmp slt i64 %indvars.iv.next172, %135
  br i1 %136, label %.lr.ph125, label %.critedge2.loopexit, !llvm.loop !22

137:                                              ; preds = %132, %.loopexit95
  %indvars.iv167 = phi i64 [ 0, %132 ], [ %indvars.iv.next168, %.loopexit95 ]
  %138 = getelementptr inbounds i32, ptr %128, i64 %indvars.iv167
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %.not91 = icmp eq i32 %139, 0
  br i1 %.not91, label %.loopexit95, label %.preheader94

.preheader94:                                     ; preds = %137, %.preheader94
  %indvars.iv163 = phi i64 [ %indvars.iv.next164, %.preheader94 ], [ 0, %137 ]
  %140 = getelementptr inbounds [201 x i32], ptr @_ZZ6solve6vE3res, i64 0, i64 %indvars.iv163
  %141 = load i32, ptr %138, align 4, !tbaa !5
  %142 = load i32, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 %143, i64 %indvars.iv167, i64 %indvars.iv163
  %145 = load i32, ptr %144, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %140, i32 noundef %141, i32 noundef %145)
  %indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1
  %exitcond166.not = icmp eq i64 %indvars.iv.next164, 201
  br i1 %exitcond166.not, label %.loopexit95, label %.preheader94, !llvm.loop !23

.loopexit95:                                      ; preds = %.preheader94, %137
  %indvars.iv.next168 = add nuw nsw i64 %indvars.iv167, 1
  %exitcond170.not = icmp eq i64 %indvars.iv.next168, 201
  br i1 %exitcond170.not, label %133, label %137, !llvm.loop !24

.critedge2.loopexit:                              ; preds = %133, %.lr.ph125
  %.2.lcssa.ph.in = phi i64 [ %indvars.iv171, %.lr.ph125 ], [ %indvars.iv.next172, %133 ]
  %.2.lcssa.ph = trunc i64 %.2.lcssa.ph.in to i32
  br label %.critedge2

.critedge2:                                       ; preds = %.critedge2.loopexit, %.preheader97
  %.2.lcssa = phi i32 [ %.1133, %.preheader97 ], [ %.2.lcssa.ph, %.critedge2.loopexit ]
  %146 = load i32, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %.not88 = icmp eq i32 %146, 0
  %147 = zext i1 %.not88 to i32
  store i32 %147, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %148 = zext i1 %.not88 to i64
  %149 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 %148
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(161604) %149, i8 0, i64 161604, i1 false)
  br label %.preheader96

.preheader96:                                     ; preds = %.critedge2, %152
  %indvars.iv184 = phi i64 [ 0, %.critedge2 ], [ %indvars.iv.next185, %152 ]
  br label %153

150:                                              ; preds = %152
  %151 = add nuw i32 %.079134, 1
  %exitcond189.not = icmp eq i32 %.079134, %101
  br i1 %exitcond189.not, label %._crit_edge135, label %.preheader97, !llvm.loop !25

152:                                              ; preds = %.loopexit
  %indvars.iv.next185 = add nuw nsw i64 %indvars.iv184, 1
  %exitcond188.not = icmp eq i64 %indvars.iv.next185, 201
  br i1 %exitcond188.not, label %150, label %.preheader96, !llvm.loop !26

153:                                              ; preds = %.preheader96, %.loopexit
  %indvars.iv179 = phi i64 [ 0, %.preheader96 ], [ %indvars.iv.next180, %.loopexit ]
  %154 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve6vE3mat, i64 323208), i64 0, i64 %indvars.iv184, i64 %indvars.iv179
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %.not89 = icmp eq i32 %155, 0
  br i1 %.not89, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %153, %.preheader
  %indvars.iv174 = phi i64 [ %indvars.iv.next175, %.preheader ], [ 0, %153 ]
  %156 = load i32, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 %157, i64 %indvars.iv184, i64 %indvars.iv174
  %159 = load i32, ptr %154, align 4, !tbaa !5
  %.not90 = icmp eq i32 %156, 0
  %160 = zext i1 %.not90 to i64
  %161 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 %160, i64 %indvars.iv179, i64 %indvars.iv174
  %162 = load i32, ptr %161, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %158, i32 noundef %159, i32 noundef %162)
  %indvars.iv.next175 = add nuw nsw i64 %indvars.iv174, 1
  %exitcond178.not = icmp eq i64 %indvars.iv.next175, 201
  br i1 %exitcond178.not, label %.loopexit, label %.preheader, !llvm.loop !27

.loopexit:                                        ; preds = %.preheader, %153
  %indvars.iv.next180 = add nuw nsw i64 %indvars.iv179, 1
  %exitcond183.not = icmp eq i64 %indvars.iv.next180, 201
  br i1 %exitcond183.not, label %152, label %153, !llvm.loop !28

163:                                              ; preds = %._crit_edge135
  %164 = load i32, ptr @_ZZ6solve6vE1o, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve6vE3mat, i64 0, i64 %165
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(161604) getelementptr inbounds (i8, ptr @_ZZ6solve6vE3mat, i64 323208), ptr noundef nonnull align 4 dereferenceable(161604) %166, i64 161604, i1 false)
  %167 = mul nuw nsw i32 %.083, 500
  br label %.preheader98, !llvm.loop !29

.critedge93._crit_edge.loopexit.unr-lcssa:        ; preds = %.critedge93, %.critedge93.preheader138
  %indvars.iv190.unr = phi i64 [ 0, %.critedge93.preheader138 ], [ %indvars.iv.next191.1, %.critedge93 ]
  %lcmp.mod205.not = icmp eq i64 %xtraiter204, 0
  br i1 %lcmp.mod205.not, label %.critedge93._crit_edge, label %.critedge93.epil

.critedge93.epil:                                 ; preds = %.critedge93._crit_edge.loopexit.unr-lcssa
  %168 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv190.unr, i32 1
  %169 = load i32, ptr %168, align 4, !tbaa !17
  %170 = add nsw i32 %169, -1
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %indvars.iv190.unr, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !5
  %174 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %indvars.iv190.unr
  store i32 %173, ptr %174, align 4, !tbaa !5
  br label %.critedge93._crit_edge

.critedge93._crit_edge:                           ; preds = %.critedge93.epil, %.critedge93._crit_edge.loopexit.unr-lcssa, %.critedge93.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  ret void

.critedge93:                                      ; preds = %.critedge93, %.critedge93.preheader138.new
  %indvars.iv190 = phi i64 [ 0, %.critedge93.preheader138.new ], [ %indvars.iv.next191.1, %.critedge93 ]
  %niter207 = phi i64 [ 0, %.critedge93.preheader138.new ], [ %niter207.next.1, %.critedge93 ]
  %175 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv190, i32 1
  %176 = load i32, ptr %175, align 4, !tbaa !17
  %177 = add nsw i32 %176, -1
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %indvars.iv190, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %indvars.iv190
  store i32 %180, ptr %181, align 8, !tbaa !5
  %indvars.iv.next191 = or disjoint i64 %indvars.iv190, 1
  %182 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv.next191, i32 1
  %183 = load i32, ptr %182, align 8, !tbaa !17
  %184 = add nsw i32 %183, -1
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve6vE3vec, i64 0, i64 %indvars.iv.next191, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !5
  %188 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %indvars.iv.next191
  store i32 %187, ptr %188, align 4, !tbaa !5
  %indvars.iv.next191.1 = add nuw nsw i64 %indvars.iv190, 2
  %niter207.next.1 = add i64 %niter207, 2
  %niter207.ncmp.1 = icmp eq i64 %niter207.next.1, %unroll_iter206
  br i1 %niter207.ncmp.1, label %.critedge93._crit_edge.loopexit.unr-lcssa, label %.critedge93, !llvm.loop !30
}

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

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

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 8}
!12 = !{!"_ZTS4Edge", !6, i64 0, !6, i64 4, !6, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = !{!12, !6, i64 0}
!17 = !{!12, !6, i64 4}
!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}


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