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

; 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.5 = 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.20 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [33 x i8], align 1
@__PRETTY_FUNCTION__._Z6solve7v = external hidden unnamed_addr constant [14 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [12 x i8], align 1
@_ZZ6solve7vE1o = external hidden global i32, align 4
@_ZZ6solve7vE3mat = external hidden global [3 x [201 x [201 x i32]]], align 16
@_ZZ6solve7vE3ord = external hidden global [100001 x i32], align 16
@_ZZ6solve7vE3vec = external hidden global [100001 x [201 x i32]], align 16
@_ZZ6solve7vE3res = 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: 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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z6solve7v() #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 i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %class.anon.5, align 1
  %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 ptr, align 8
  %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
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #8
  store i32 100, 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
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = icmp eq i32 %29, 100
  br i1 %30, label %31, label %38

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

38:                                               ; preds = %31, %0
  %39 = phi i1 [ false, %0 ], [ %37, %31 ]
  br i1 %39, label %40, label %41

40:                                               ; preds = %38
  br label %43

41:                                               ; preds = %38
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str.1, i32 noundef 422, ptr noundef @__PRETTY_FUNCTION__._Z6solve7v) #9
  unreachable

42:                                               ; No predecessors!
  br label %43

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

44:                                               ; preds = %60, %43
  %45 = load i32, ptr %4, align 4, !tbaa !5
  %46 = load i32, ptr @m, align 4, !tbaa !5
  %47 = icmp slt i32 %45, %46
  br i1 %47, label %49, label %48

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

49:                                               ; preds = %44
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %51
  %53 = getelementptr inbounds %struct.Edge, ptr %52, i32 0, i32 2
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = icmp sle i32 %54, 2
  br i1 %55, label %56, label %57

56:                                               ; preds = %49
  br label %59

57:                                               ; preds = %49
  call void @__assert_fail(ptr noundef @.str.23, ptr noundef @.str.1, i32 noundef 424, ptr noundef @__PRETTY_FUNCTION__._Z6solve7v) #9
  unreachable

58:                                               ; No predecessors!
  br label %59

59:                                               ; preds = %58, %56
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %4, align 4, !tbaa !5
  br label %44, !llvm.loop !11

63:                                               ; preds = %48
  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 %64

64:                                               ; preds = %85, %63
  %65 = load i32, ptr %6, align 4, !tbaa !5
  %66 = load i32, ptr @q, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %69, label %68

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

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

77:                                               ; preds = %69
  br label %80

78:                                               ; preds = %69
  call void @__assert_fail(ptr noundef @.str.20, ptr noundef @.str.1, i32 noundef 428, ptr noundef @__PRETTY_FUNCTION__._Z6solve7v) #9
  unreachable

79:                                               ; No predecessors!
  br label %80

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

85:                                               ; preds = %80
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %6, align 4, !tbaa !5
  br label %64, !llvm.loop !15

88:                                               ; preds = %68
  %89 = load ptr, ptr @stderr, align 8, !tbaa !13
  %90 = load i32, ptr %5, align 4, !tbaa !5
  %91 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef @.str.12, i32 noundef %90) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 200, ptr %8, align 4, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 getelementptr inbounds ([3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 2), i8 0, i64 161604, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %104, %88
  %93 = load i32, ptr %9, align 4, !tbaa !5
  %94 = icmp slt i32 %93, 100
  br i1 %94, label %96, label %95

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

96:                                               ; preds = %92
  %97 = load i32, ptr %9, align 4, !tbaa !5
  %98 = add nsw i32 100, %97
  %99 = sext i32 %98 to i64
  %100 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds ([3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 2), i64 0, i64 %99
  %101 = load i32, ptr %9, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [201 x i32], ptr %100, i64 0, i64 %102
  store i32 1, ptr %103, align 4, !tbaa !5
  br label %104

104:                                              ; preds = %96
  %105 = load i32, ptr %9, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %9, align 4, !tbaa !5
  br label %92, !llvm.loop !16

107:                                              ; preds = %95
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %138, %107
  %109 = load i32, ptr %10, align 4, !tbaa !5
  %110 = load i32, ptr @m, align 4, !tbaa !5
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %113, label %112

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

113:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %114 = load i32, ptr %10, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %115
  store ptr %116, ptr %11, align 8, !tbaa !13
  %117 = load ptr, ptr %11, align 8, !tbaa !13
  %118 = getelementptr inbounds %struct.Edge, ptr %117, i32 0, i32 2
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = sub nsw i32 2, %119
  %121 = mul nsw i32 %120, 100
  %122 = load ptr, ptr %11, align 8, !tbaa !13
  %123 = getelementptr inbounds %struct.Edge, ptr %122, i32 0, i32 0
  %124 = load i32, ptr %123, align 4, !tbaa !17
  %125 = add nsw i32 %121, %124
  %126 = sub nsw i32 %125, 1
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds ([3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 2), i64 0, i64 %127
  %129 = load ptr, ptr %11, align 8, !tbaa !13
  %130 = getelementptr inbounds %struct.Edge, ptr %129, i32 0, i32 1
  %131 = load i32, ptr %130, align 4, !tbaa !18
  %132 = add nsw i32 100, %131
  %133 = sub nsw i32 %132, 1
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [201 x i32], ptr %128, i64 0, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = add nsw i32 %136, 1
  store i32 %137, ptr %135, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %138

138:                                              ; preds = %113
  %139 = load i32, ptr %10, align 4, !tbaa !5
  %140 = add nsw i32 %139, 1
  store i32 %140, ptr %10, align 4, !tbaa !5
  br label %108, !llvm.loop !19

141:                                              ; preds = %112
  %142 = load i32, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 %143
  %145 = getelementptr inbounds [201 x [201 x i32]], ptr %144, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %145, ptr align 8 getelementptr inbounds ([3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 2), i64 161604, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ6solve7vE3vec, i8 0, i64 80400804, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %168, %141
  %147 = load i32, ptr %12, align 4, !tbaa !5
  %148 = load i32, ptr @q, align 4, !tbaa !5
  %149 = icmp slt i32 %147, %148
  br i1 %149, label %151, label %150

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

151:                                              ; preds = %146
  %152 = load i32, ptr %12, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %153
  %155 = load i32, ptr %12, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %156
  %158 = getelementptr inbounds %struct.Edge, ptr %157, i32 0, i32 0
  %159 = load i32, ptr %158, align 4, !tbaa !17
  %160 = add nsw i32 100, %159
  %161 = sub nsw i32 %160, 1
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [201 x i32], ptr %154, i64 0, i64 %162
  store i32 1, ptr %163, align 4, !tbaa !5
  %164 = load i32, ptr %12, align 4, !tbaa !5
  %165 = load i32, ptr %12, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve7vE3ord, i64 0, i64 %166
  store i32 %164, ptr %167, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %151
  %169 = load i32, ptr %12, align 4, !tbaa !5
  %170 = add nsw i32 %169, 1
  store i32 %170, ptr %12, align 4, !tbaa !5
  br label %146, !llvm.loop !20

171:                                              ; preds = %150
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %398, %171
  %173 = load ptr, ptr @stderr, align 8, !tbaa !13
  %174 = load i32, ptr %13, align 4, !tbaa !5
  %175 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %173, ptr noundef @.str.21, i32 noundef %174) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %176

176:                                              ; preds = %194, %172
  %177 = load i32, ptr %14, align 4, !tbaa !5
  %178 = load i32, ptr @q, align 4, !tbaa !5
  %179 = icmp slt i32 %177, %178
  br i1 %179, label %181, label %180

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

181:                                              ; preds = %176
  %182 = load i32, ptr %14, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %183
  %185 = getelementptr inbounds %struct.Edge, ptr %184, i32 0, i32 2
  %186 = load i32, ptr %185, align 4, !tbaa !9
  %187 = load i32, ptr %13, align 4, !tbaa !5
  %188 = sdiv i32 %186, %187
  %189 = srem i32 %188, 500
  %190 = load i32, ptr %14, align 4, !tbaa !5
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %191
  %193 = getelementptr inbounds [201 x i32], ptr %192, i64 0, i64 200
  store i32 %189, ptr %193, align 4, !tbaa !5
  br label %194

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

197:                                              ; preds = %180
  %198 = load i32, ptr @q, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds i32, ptr @_ZZ6solve7vE3ord, i64 %199
  call void @"_ZSt4sortIPiZ6solve7vE3$_0EvT_S2_T0_"(ptr noundef @_ZZ6solve7vE3ord, ptr noundef %200)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %201 = load i32, ptr %5, align 4, !tbaa !5
  %202 = load i32, ptr %13, align 4, !tbaa !5
  %203 = sdiv i32 %201, %202
  store i32 %203, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  store i32 499, ptr %19, align 4, !tbaa !5
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %205 = load i32, ptr %204, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  store i32 %205, ptr %17, align 4, !tbaa !5
  br label %206

206:                                              ; preds = %224, %197
  %207 = load i32, ptr %16, 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 %16, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve7vE3ord, 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 @_ZZ6solve7vE3vec, 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 = icmp ne i32 %218, 0
  %220 = xor i1 %219, true
  br label %221

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

223:                                              ; preds = %221
  br label %224

224:                                              ; preds = %223
  %225 = load i32, ptr %16, align 4, !tbaa !5
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %16, align 4, !tbaa !5
  br label %206, !llvm.loop !22

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

228:                                              ; preds = %381, %227
  %229 = load i32, ptr %20, align 4, !tbaa !5
  %230 = load i32, ptr %17, align 4, !tbaa !5
  %231 = icmp sle i32 %229, %230
  br i1 %231, label %233, label %232

232:                                              ; preds = %228
  store i32 26, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %384

233:                                              ; preds = %228
  br label %234

234:                                              ; preds = %304, %233
  %235 = load i32, ptr %16, align 4, !tbaa !5
  %236 = load i32, ptr @q, align 4, !tbaa !5
  %237 = icmp slt i32 %235, %236
  br i1 %237, label %238, label %249

238:                                              ; preds = %234
  %239 = load i32, ptr %16, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve7vE3ord, i64 0, i64 %240
  %242 = load i32, ptr %241, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %243
  %245 = getelementptr inbounds [201 x i32], ptr %244, i64 0, i64 200
  %246 = load i32, ptr %245, align 4, !tbaa !5
  %247 = load i32, ptr %20, align 4, !tbaa !5
  %248 = icmp eq i32 %246, %247
  br label %249

249:                                              ; preds = %238, %234
  %250 = phi i1 [ false, %234 ], [ %248, %238 ]
  br i1 %250, label %251, label %307

251:                                              ; preds = %249
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %252 = load i32, ptr %16, align 4, !tbaa !5
  %253 = sext i32 %252 to i64
  %254 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve7vE3ord, i64 0, i64 %253
  %255 = load i32, ptr %254, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %256
  %258 = getelementptr inbounds [201 x i32], ptr %257, i64 0, i64 0
  store ptr %258, ptr %22, align 8, !tbaa !13
  call void @llvm.memset.p0.i64(ptr align 16 @_ZZ6solve7vE3res, i8 0, i64 804, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #8
  store i32 0, ptr %23, align 4, !tbaa !5
  br label %259

259:                                              ; preds = %299, %251
  %260 = load i32, ptr %23, align 4, !tbaa !5
  %261 = icmp sle i32 %260, 200
  br i1 %261, label %263, label %262

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

263:                                              ; preds = %259
  %264 = load ptr, ptr %22, align 8, !tbaa !13
  %265 = load i32, ptr %23, align 4, !tbaa !5
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds i32, ptr %264, i64 %266
  %268 = load i32, ptr %267, align 4, !tbaa !5
  %269 = icmp ne i32 %268, 0
  br i1 %269, label %271, label %270

270:                                              ; preds = %263
  br label %299

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

272:                                              ; preds = %295, %271
  %273 = load i32, ptr %24, align 4, !tbaa !5
  %274 = icmp sle i32 %273, 200
  br i1 %274, label %276, label %275

275:                                              ; preds = %272
  store i32 35, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %298

276:                                              ; preds = %272
  %277 = load i32, ptr %24, align 4, !tbaa !5
  %278 = sext i32 %277 to i64
  %279 = getelementptr inbounds [201 x i32], ptr @_ZZ6solve7vE3res, i64 0, i64 %278
  %280 = load ptr, ptr %22, align 8, !tbaa !13
  %281 = load i32, ptr %23, align 4, !tbaa !5
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds i32, ptr %280, i64 %282
  %284 = load i32, ptr %283, align 4, !tbaa !5
  %285 = load i32, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 %286
  %288 = load i32, ptr %23, align 4, !tbaa !5
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [201 x [201 x i32]], ptr %287, i64 0, i64 %289
  %291 = load i32, ptr %24, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [201 x i32], ptr %290, i64 0, i64 %292
  %294 = load i32, ptr %293, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %279, i32 noundef %284, i32 noundef %294)
  br label %295

295:                                              ; preds = %276
  %296 = load i32, ptr %24, align 4, !tbaa !5
  %297 = add nsw i32 %296, 1
  store i32 %297, ptr %24, align 4, !tbaa !5
  br label %272, !llvm.loop !23

298:                                              ; preds = %275
  br label %299

299:                                              ; preds = %298, %270
  %300 = load i32, ptr %23, align 4, !tbaa !5
  %301 = add nsw i32 %300, 1
  store i32 %301, ptr %23, align 4, !tbaa !5
  br label %259, !llvm.loop !24

302:                                              ; preds = %262
  %303 = load ptr, ptr %22, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %303, ptr align 16 @_ZZ6solve7vE3res, i64 804, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %304

304:                                              ; preds = %302
  %305 = load i32, ptr %16, align 4, !tbaa !5
  %306 = add nsw i32 %305, 1
  store i32 %306, ptr %16, align 4, !tbaa !5
  br label %234, !llvm.loop !25

307:                                              ; preds = %249
  %308 = load i32, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %309 = icmp ne i32 %308, 0
  %310 = xor i1 %309, true
  %311 = zext i1 %310 to i32
  store i32 %311, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %312 = load i32, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 %313
  %315 = getelementptr inbounds [201 x [201 x i32]], ptr %314, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 4 %315, i8 0, i64 161604, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #8
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %316

316:                                              ; preds = %377, %307
  %317 = load i32, ptr %25, align 4, !tbaa !5
  %318 = icmp sle i32 %317, 200
  br i1 %318, label %320, label %319

319:                                              ; preds = %316
  store i32 38, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #8
  br label %380

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

321:                                              ; preds = %373, %320
  %322 = load i32, ptr %26, align 4, !tbaa !5
  %323 = icmp sle i32 %322, 200
  br i1 %323, label %325, label %324

324:                                              ; preds = %321
  store i32 41, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #8
  br label %376

325:                                              ; preds = %321
  %326 = load i32, ptr %25, align 4, !tbaa !5
  %327 = sext i32 %326 to i64
  %328 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds ([3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 2), i64 0, i64 %327
  %329 = load i32, ptr %26, align 4, !tbaa !5
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds [201 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 = %325
  br label %373

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

336:                                              ; preds = %369, %335
  %337 = load i32, ptr %27, align 4, !tbaa !5
  %338 = icmp sle i32 %337, 200
  br i1 %338, label %340, label %339

339:                                              ; preds = %336
  store i32 44, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %372

340:                                              ; preds = %336
  %341 = load i32, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %342 = sext i32 %341 to i64
  %343 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 %342
  %344 = load i32, ptr %25, align 4, !tbaa !5
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds [201 x [201 x i32]], ptr %343, i64 0, i64 %345
  %347 = load i32, ptr %27, align 4, !tbaa !5
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds [201 x i32], ptr %346, i64 0, i64 %348
  %350 = load i32, ptr %25, align 4, !tbaa !5
  %351 = sext i32 %350 to i64
  %352 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds ([3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 2), i64 0, i64 %351
  %353 = load i32, ptr %26, align 4, !tbaa !5
  %354 = sext i32 %353 to i64
  %355 = getelementptr inbounds [201 x i32], ptr %352, i64 0, i64 %354
  %356 = load i32, ptr %355, align 4, !tbaa !5
  %357 = load i32, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %358 = icmp ne i32 %357, 0
  %359 = xor i1 %358, true
  %360 = zext i1 %359 to i64
  %361 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 %360
  %362 = load i32, ptr %26, align 4, !tbaa !5
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds [201 x [201 x i32]], ptr %361, i64 0, i64 %363
  %365 = load i32, ptr %27, align 4, !tbaa !5
  %366 = sext i32 %365 to i64
  %367 = getelementptr inbounds [201 x i32], ptr %364, i64 0, i64 %366
  %368 = load i32, ptr %367, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %349, i32 noundef %356, i32 noundef %368)
  br label %369

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

372:                                              ; preds = %339
  br label %373

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

376:                                              ; preds = %324
  br label %377

377:                                              ; preds = %376
  %378 = load i32, ptr %25, align 4, !tbaa !5
  %379 = add nsw i32 %378, 1
  store i32 %379, ptr %25, align 4, !tbaa !5
  br label %316, !llvm.loop !28

380:                                              ; preds = %319
  br label %381

381:                                              ; preds = %380
  %382 = load i32, ptr %20, align 4, !tbaa !5
  %383 = add nsw i32 %382, 1
  store i32 %383, ptr %20, align 4, !tbaa !5
  br label %228, !llvm.loop !29

384:                                              ; preds = %232
  %385 = load i32, ptr %5, align 4, !tbaa !5
  %386 = load i32, ptr %13, align 4, !tbaa !5
  %387 = sdiv i32 %385, %386
  %388 = icmp slt i32 %387, 500
  br i1 %388, label %389, label %390

389:                                              ; preds = %384
  store i32 17, ptr %21, align 4
  br label %395

390:                                              ; preds = %384
  %391 = load i32, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 %392
  %394 = getelementptr inbounds [201 x [201 x i32]], ptr %393, i64 0, i64 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds ([3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 2), ptr align 4 %394, i64 161604, i1 false)
  store i32 0, ptr %21, align 4
  br label %395

395:                                              ; preds = %390, %389
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  %396 = load i32, ptr %21, align 4
  switch i32 %396, label %401 [
    i32 0, label %397
  ]

397:                                              ; preds = %395
  br label %398

398:                                              ; preds = %397
  %399 = load i32, ptr %13, align 4, !tbaa !5
  %400 = mul nsw i32 %399, 500
  store i32 %400, ptr %13, align 4, !tbaa !5
  br label %172, !llvm.loop !30

401:                                              ; preds = %395
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %402

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

403:                                              ; preds = %425, %402
  %404 = load i32, ptr %28, align 4, !tbaa !5
  %405 = load i32, ptr @q, align 4, !tbaa !5
  %406 = icmp slt i32 %404, %405
  br i1 %406, label %408, label %407

407:                                              ; preds = %403
  store i32 47, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %428

408:                                              ; preds = %403
  %409 = load i32, ptr %28, align 4, !tbaa !5
  %410 = sext i32 %409 to i64
  %411 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %410
  %412 = load i32, ptr %28, align 4, !tbaa !5
  %413 = sext i32 %412 to i64
  %414 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %413
  %415 = getelementptr inbounds %struct.Edge, ptr %414, i32 0, i32 1
  %416 = load i32, ptr %415, align 4, !tbaa !18
  %417 = add nsw i32 100, %416
  %418 = sub nsw i32 %417, 1
  %419 = sext i32 %418 to i64
  %420 = getelementptr inbounds [201 x i32], ptr %411, i64 0, i64 %419
  %421 = load i32, ptr %420, align 4, !tbaa !5
  %422 = load i32, ptr %28, align 4, !tbaa !5
  %423 = sext i32 %422 to i64
  %424 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %423
  store i32 %421, ptr %424, align 4, !tbaa !5
  br label %425

425:                                              ; preds = %408
  %426 = load i32, ptr %28, align 4, !tbaa !5
  %427 = add nsw i32 %426, 1
  store i32 %427, ptr %28, align 4, !tbaa !5
  br label %403, !llvm.loop !31

428:                                              ; preds = %407
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  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 @"_ZSt4sortIPiZ6solve7vE3$_0EvT_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, !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 = distinct !{!16, !12}
!17 = !{!10, !6, i64 0}
!18 = !{!10, !6, i64 4}
!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}
!31 = distinct !{!31, !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.20 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [33 x i8], align 1
@__PRETTY_FUNCTION__._Z6solve7v = external hidden unnamed_addr constant [14 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [12 x i8], align 1
@_ZZ6solve7vE1o = external hidden local_unnamed_addr global i32, align 4
@_ZZ6solve7vE3mat = external hidden global [3 x [201 x [201 x i32]]], align 16
@_ZZ6solve7vE3ord = external hidden global [100001 x i32], align 16
@_ZZ6solve7vE3vec = external hidden local_unnamed_addr global [100001 x [201 x i32]], align 16
@_ZZ6solve7vE3res = 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: 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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z6solve7v() 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, !tbaa !5
  %5 = icmp eq i32 %4, 100
  %6 = load i32, ptr @q, align 4
  %7 = icmp eq i32 %6, 100000
  %or.cond = select i1 %5, i1 %7, i1 false
  br i1 %or.cond, label %.preheader110, label %.critedge

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

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

.critedge:                                        ; preds = %0
  tail call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.1, i32 noundef 422, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6solve7v) #8
  unreachable

10:                                               ; 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.ph114.preheader, label %.lr.ph, !llvm.loop !9

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

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

14:                                               ; preds = %.lr.ph
  tail call void @__assert_fail(ptr noundef nonnull @.str.23, ptr noundef nonnull @.str.1, i32 noundef 424, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6solve7v) #8
  unreachable

._crit_edge115:                                   ; preds = %21
  %15 = load ptr, ptr @stderr, align 8, !tbaa !13
  %16 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef nonnull @.str.12, i32 noundef %23) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(161604) getelementptr inbounds (i8, ptr @_ZZ6solve7vE3mat, i64 323208), i8 0, i64 161604, i1 false)
  br label %29

.lr.ph114:                                        ; preds = %.lr.ph114.preheader, %21
  %indvars.iv151 = phi i64 [ 0, %.lr.ph114.preheader ], [ %indvars.iv.next152, %21 ]
  %17 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv151, i32 2
  %18 = load i32, ptr %17, align 4, !tbaa !11
  %19 = icmp slt i32 %18, 1000000001
  br i1 %19, label %21, label %20

20:                                               ; preds = %.lr.ph114
  call void @__assert_fail(ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.1, i32 noundef 428, ptr noundef nonnull @__PRETTY_FUNCTION__._Z6solve7v) #8
  unreachable

21:                                               ; preds = %.lr.ph114
  %22 = 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) %17)
  %23 = load i32, ptr %22, align 4, !tbaa !5
  store i32 %23, ptr %1, align 4, !tbaa !5
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %24 = load i32, ptr @q, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = icmp slt i64 %indvars.iv.next152, %25
  br i1 %26, label %.lr.ph114, label %._crit_edge115, !llvm.loop !15

.preheader109:                                    ; preds = %29
  %27 = load i32, ptr @m, align 4, !tbaa !5
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %.lr.ph118.preheader, label %._crit_edge119

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

29:                                               ; preds = %29, %._crit_edge115
  %indvars.iv154 = phi i64 [ 0, %._crit_edge115 ], [ %indvars.iv.next155.4, %29 ]
  %30 = add nuw nsw i64 %indvars.iv154, 100
  %31 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve7vE3mat, i64 323208), i64 0, i64 %30, i64 %indvars.iv154
  store i32 1, ptr %31, align 4, !tbaa !5
  %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1
  %32 = add nuw nsw i64 %indvars.iv154, 101
  %33 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve7vE3mat, i64 323208), i64 0, i64 %32, i64 %indvars.iv.next155
  store i32 1, ptr %33, align 4, !tbaa !5
  %indvars.iv.next155.1 = add nuw nsw i64 %indvars.iv154, 2
  %34 = add nuw nsw i64 %indvars.iv154, 102
  %35 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve7vE3mat, i64 323208), i64 0, i64 %34, i64 %indvars.iv.next155.1
  store i32 1, ptr %35, align 4, !tbaa !5
  %indvars.iv.next155.2 = add nuw nsw i64 %indvars.iv154, 3
  %36 = add nuw nsw i64 %indvars.iv154, 103
  %37 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve7vE3mat, i64 323208), i64 0, i64 %36, i64 %indvars.iv.next155.2
  store i32 1, ptr %37, align 4, !tbaa !5
  %indvars.iv.next155.3 = add nuw nsw i64 %indvars.iv154, 4
  %38 = add nuw nsw i64 %indvars.iv154, 104
  %39 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve7vE3mat, i64 323208), i64 0, i64 %38, i64 %indvars.iv.next155.3
  store i32 1, ptr %39, align 4, !tbaa !5
  %indvars.iv.next155.4 = add nuw nsw i64 %indvars.iv154, 5
  %exitcond157.not.4 = icmp eq i64 %indvars.iv.next155.4, 100
  br i1 %exitcond157.not.4, label %.preheader109, label %29, !llvm.loop !16

._crit_edge119:                                   ; preds = %.lr.ph118, %.preheader109
  %40 = load i32, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 %41
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(161604) %42, ptr noundef nonnull align 8 dereferenceable(161604) getelementptr inbounds (i8, ptr @_ZZ6solve7vE3mat, i64 323208), i64 161604, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(80400804) @_ZZ6solve7vE3vec, i8 0, i64 80400804, i1 false)
  %43 = load i32, ptr @q, align 4, !tbaa !5
  %44 = icmp sgt i32 %43, 0
  br i1 %44, label %.lr.ph122.preheader, label %.preheader108.preheader

.lr.ph122.preheader:                              ; preds = %._crit_edge119
  %wide.trip.count166 = zext nneg i32 %43 to i64
  %xtraiter = and i64 %wide.trip.count166, 1
  %45 = icmp eq i32 %43, 1
  br i1 %45, label %.preheader108.preheader.loopexit.unr-lcssa, label %.lr.ph122.preheader.new

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

.lr.ph118:                                        ; preds = %.lr.ph118.preheader, %.lr.ph118
  %indvars.iv158 = phi i64 [ 0, %.lr.ph118.preheader ], [ %indvars.iv.next159, %.lr.ph118 ]
  %46 = getelementptr inbounds [150001 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv158
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  %48 = load i32, ptr %47, align 4, !tbaa !11
  %49 = sub nsw i32 2, %48
  %50 = mul nsw i32 %49, 100
  %51 = load i32, ptr %46, align 4, !tbaa !17
  %52 = add i32 %51, -1
  %53 = add i32 %52, %50
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds i8, ptr %46, i64 4
  %56 = load i32, ptr %55, align 4, !tbaa !18
  %57 = add nsw i32 %56, 99
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve7vE3mat, i64 323208), i64 0, i64 %54, i64 %58
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr %59, align 4, !tbaa !5
  %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 %._crit_edge119, label %.lr.ph118, !llvm.loop !19

.lr.ph122:                                        ; preds = %.lr.ph122, %.lr.ph122.preheader.new
  %indvars.iv163 = phi i64 [ 0, %.lr.ph122.preheader.new ], [ %indvars.iv.next164.1, %.lr.ph122 ]
  %niter = phi i64 [ 0, %.lr.ph122.preheader.new ], [ %niter.next.1, %.lr.ph122 ]
  %62 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv163
  %63 = load i32, ptr %62, align 8, !tbaa !17
  %64 = add nsw i32 %63, 99
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %indvars.iv163, i64 %65
  store i32 1, ptr %66, align 4, !tbaa !5
  %67 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve7vE3ord, i64 0, i64 %indvars.iv163
  %68 = trunc nuw nsw i64 %indvars.iv163 to i32
  store i32 %68, ptr %67, align 8, !tbaa !5
  %indvars.iv.next164 = or disjoint i64 %indvars.iv163, 1
  %69 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv.next164
  %70 = load i32, ptr %69, align 4, !tbaa !17
  %71 = add nsw i32 %70, 99
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %indvars.iv.next164, i64 %72
  store i32 1, ptr %73, align 4, !tbaa !5
  %74 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve7vE3ord, i64 0, i64 %indvars.iv.next164
  %75 = trunc nuw nsw i64 %indvars.iv.next164 to i32
  store i32 %75, ptr %74, align 4, !tbaa !5
  %indvars.iv.next164.1 = add nuw nsw i64 %indvars.iv163, 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 %.preheader108.preheader.loopexit.unr-lcssa, label %.lr.ph122, !llvm.loop !20

.preheader108.preheader.loopexit.unr-lcssa:       ; preds = %.lr.ph122, %.lr.ph122.preheader
  %indvars.iv163.unr = phi i64 [ 0, %.lr.ph122.preheader ], [ %indvars.iv.next164.1, %.lr.ph122 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader108.preheader, label %.lr.ph122.epil

.lr.ph122.epil:                                   ; preds = %.preheader108.preheader.loopexit.unr-lcssa
  %76 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv163.unr
  %77 = load i32, ptr %76, align 4, !tbaa !17
  %78 = add nsw i32 %77, 99
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %indvars.iv163.unr, i64 %79
  store i32 1, ptr %80, align 4, !tbaa !5
  %81 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve7vE3ord, i64 0, i64 %indvars.iv163.unr
  %82 = trunc nuw nsw i64 %indvars.iv163.unr to i32
  store i32 %82, ptr %81, align 4, !tbaa !5
  br label %.preheader108.preheader

.preheader108.preheader:                          ; preds = %.lr.ph122.epil, %.preheader108.preheader.loopexit.unr-lcssa, %._crit_edge119
  br label %.preheader108

.preheader108:                                    ; preds = %.preheader108.preheader, %154
  %.090 = phi i32 [ %158, %154 ], [ 1, %.preheader108.preheader ]
  %83 = load ptr, ptr @stderr, align 8, !tbaa !13
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef nonnull @.str.21, i32 noundef %.090) #10
  %85 = load i32, ptr @q, align 4, !tbaa !5
  %86 = icmp sgt i32 %85, 0
  br i1 %86, label %.lr.ph125.preheader, label %._crit_edge126

.lr.ph125.preheader:                              ; preds = %.preheader108
  %wide.trip.count171 = zext nneg i32 %85 to i64
  br label %.lr.ph125

._crit_edge126:                                   ; preds = %.lr.ph125, %.preheader108
  %87 = sext i32 %85 to i64
  %88 = getelementptr inbounds i32, ptr @_ZZ6solve7vE3ord, i64 %87
  call void @"_ZSt4sortIPiZ6solve7vE3$_0EvT_S2_T0_"(ptr noundef nonnull @_ZZ6solve7vE3ord, ptr noundef nonnull %88)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  %89 = load i32, ptr %1, align 4, !tbaa !5
  %90 = sdiv i32 %89, %.090
  store i32 %90, 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
  %91 = 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)
  %92 = load i32, ptr %91, 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
  %93 = load i32, ptr @q, align 4, !tbaa !5
  %94 = icmp sgt i32 %93, 0
  br i1 %94, label %.lr.ph129.preheader, label %.critedge2

.lr.ph129.preheader:                              ; preds = %._crit_edge126
  %wide.trip.count176 = zext nneg i32 %93 to i64
  br label %.lr.ph129

.lr.ph125:                                        ; preds = %.lr.ph125.preheader, %.lr.ph125
  %indvars.iv168 = phi i64 [ 0, %.lr.ph125.preheader ], [ %indvars.iv.next169, %.lr.ph125 ]
  %95 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv168, i32 2
  %96 = load i32, ptr %95, align 4, !tbaa !11
  %97 = sdiv i32 %96, %.090
  %98 = srem i32 %97, 500
  %99 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %indvars.iv168, i64 200
  store i32 %98, ptr %99, align 4, !tbaa !5
  %indvars.iv.next169 = add nuw nsw i64 %indvars.iv168, 1
  %exitcond172.not = icmp eq i64 %indvars.iv.next169, %wide.trip.count171
  br i1 %exitcond172.not, label %._crit_edge126, label %.lr.ph125, !llvm.loop !21

.lr.ph129:                                        ; preds = %.lr.ph129.preheader, %105
  %indvars.iv173 = phi i64 [ 0, %.lr.ph129.preheader ], [ %indvars.iv.next174, %105 ]
  %100 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve7vE3ord, i64 0, i64 %indvars.iv173
  %101 = load i32, ptr %100, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %102, i64 200
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %.not = icmp eq i32 %104, 0
  br i1 %.not, label %105, label %.critedge2.loopexit.split.loop.exit211

105:                                              ; preds = %.lr.ph129
  %indvars.iv.next174 = add nuw nsw i64 %indvars.iv173, 1
  %exitcond177.not = icmp eq i64 %indvars.iv.next174, %wide.trip.count176
  br i1 %exitcond177.not, label %.critedge2, label %.lr.ph129, !llvm.loop !22

.critedge2.loopexit.split.loop.exit211:           ; preds = %.lr.ph129
  %106 = trunc nuw nsw i64 %indvars.iv173 to i32
  br label %.critedge2

.critedge2:                                       ; preds = %105, %.critedge2.loopexit.split.loop.exit211, %._crit_edge126
  %.088.lcssa = phi i32 [ 0, %._crit_edge126 ], [ %106, %.critedge2.loopexit.split.loop.exit211 ], [ %93, %105 ]
  %.not96143 = icmp slt i32 %92, 1
  br i1 %.not96143, label %._crit_edge146, label %.preheader107

.preheader107:                                    ; preds = %.critedge2, %141
  %.086145 = phi i32 [ %142, %141 ], [ 1, %.critedge2 ]
  %.1144 = phi i32 [ %.2.lcssa, %141 ], [ %.088.lcssa, %.critedge2 ]
  %107 = load i32, ptr @q, align 4, !tbaa !5
  %108 = icmp slt i32 %.1144, %107
  br i1 %108, label %.lr.ph136.preheader, label %.critedge4

.lr.ph136.preheader:                              ; preds = %.preheader107
  %109 = sext i32 %.1144 to i64
  br label %.lr.ph136

._crit_edge146:                                   ; preds = %141, %.critedge2
  %110 = load i32, ptr %1, align 4, !tbaa !5
  %111 = sdiv i32 %110, %.090
  %112 = icmp sgt i32 %111, 499
  br i1 %112, label %154, label %.critedge103.preheader

.critedge103.preheader:                           ; preds = %._crit_edge146
  %113 = load i32, ptr @q, align 4, !tbaa !5
  %114 = icmp sgt i32 %113, 0
  br i1 %114, label %.critedge103.preheader149, label %.critedge103._crit_edge

.critedge103.preheader149:                        ; preds = %.critedge103.preheader
  %wide.trip.count209 = zext nneg i32 %113 to i64
  %xtraiter215 = and i64 %wide.trip.count209, 1
  %115 = icmp eq i32 %113, 1
  br i1 %115, label %.critedge103._crit_edge.loopexit.unr-lcssa, label %.critedge103.preheader149.new

.critedge103.preheader149.new:                    ; preds = %.critedge103.preheader149
  %unroll_iter217 = and i64 %wide.trip.count209, 2147483646
  br label %.critedge103

.lr.ph136:                                        ; preds = %.lr.ph136.preheader, %124
  %indvars.iv186 = phi i64 [ %109, %.lr.ph136.preheader ], [ %indvars.iv.next187, %124 ]
  %116 = getelementptr inbounds [100001 x i32], ptr @_ZZ6solve7vE3ord, i64 0, i64 %indvars.iv186
  %117 = load i32, ptr %116, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %118
  %120 = getelementptr inbounds i8, ptr %119, i64 800
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = icmp eq i32 %121, %.086145
  br i1 %122, label %123, label %.critedge4.loopexit

123:                                              ; preds = %.lr.ph136
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(804) @_ZZ6solve7vE3res, i8 0, i64 804, i1 false)
  br label %128

124:                                              ; preds = %.loopexit105
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(804) %119, ptr noundef nonnull align 16 dereferenceable(804) @_ZZ6solve7vE3res, i64 804, i1 false)
  %indvars.iv.next187 = add nsw i64 %indvars.iv186, 1
  %125 = load i32, ptr @q, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = icmp slt i64 %indvars.iv.next187, %126
  br i1 %127, label %.lr.ph136, label %.critedge4.loopexit, !llvm.loop !23

128:                                              ; preds = %123, %.loopexit105
  %indvars.iv182 = phi i64 [ 0, %123 ], [ %indvars.iv.next183, %.loopexit105 ]
  %129 = getelementptr inbounds i32, ptr %119, i64 %indvars.iv182
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %.not100 = icmp eq i32 %130, 0
  br i1 %.not100, label %.loopexit105, label %.preheader104

.preheader104:                                    ; preds = %128, %.preheader104
  %indvars.iv178 = phi i64 [ %indvars.iv.next179, %.preheader104 ], [ 0, %128 ]
  %131 = getelementptr inbounds [201 x i32], ptr @_ZZ6solve7vE3res, i64 0, i64 %indvars.iv178
  %132 = load i32, ptr %129, align 4, !tbaa !5
  %133 = load i32, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 %134, i64 %indvars.iv182, i64 %indvars.iv178
  %136 = load i32, ptr %135, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %131, i32 noundef %132, i32 noundef %136)
  %indvars.iv.next179 = add nuw nsw i64 %indvars.iv178, 1
  %exitcond181.not = icmp eq i64 %indvars.iv.next179, 201
  br i1 %exitcond181.not, label %.loopexit105, label %.preheader104, !llvm.loop !24

.loopexit105:                                     ; preds = %.preheader104, %128
  %indvars.iv.next183 = add nuw nsw i64 %indvars.iv182, 1
  %exitcond185.not = icmp eq i64 %indvars.iv.next183, 201
  br i1 %exitcond185.not, label %124, label %128, !llvm.loop !25

.critedge4.loopexit:                              ; preds = %124, %.lr.ph136
  %.2.lcssa.ph.in = phi i64 [ %indvars.iv186, %.lr.ph136 ], [ %indvars.iv.next187, %124 ]
  %.2.lcssa.ph = trunc i64 %.2.lcssa.ph.in to i32
  br label %.critedge4

.critedge4:                                       ; preds = %.critedge4.loopexit, %.preheader107
  %.2.lcssa = phi i32 [ %.1144, %.preheader107 ], [ %.2.lcssa.ph, %.critedge4.loopexit ]
  %137 = load i32, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %.not97 = icmp eq i32 %137, 0
  %138 = zext i1 %.not97 to i32
  store i32 %138, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %139 = zext i1 %.not97 to i64
  %140 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 %139
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(161604) %140, i8 0, i64 161604, i1 false)
  br label %.preheader106

.preheader106:                                    ; preds = %.critedge4, %143
  %indvars.iv199 = phi i64 [ 0, %.critedge4 ], [ %indvars.iv.next200, %143 ]
  br label %144

141:                                              ; preds = %143
  %142 = add nuw i32 %.086145, 1
  %exitcond204.not = icmp eq i32 %.086145, %92
  br i1 %exitcond204.not, label %._crit_edge146, label %.preheader107, !llvm.loop !26

143:                                              ; preds = %.loopexit
  %indvars.iv.next200 = add nuw nsw i64 %indvars.iv199, 1
  %exitcond203.not = icmp eq i64 %indvars.iv.next200, 201
  br i1 %exitcond203.not, label %141, label %.preheader106, !llvm.loop !27

144:                                              ; preds = %.preheader106, %.loopexit
  %indvars.iv194 = phi i64 [ 0, %.preheader106 ], [ %indvars.iv.next195, %.loopexit ]
  %145 = getelementptr inbounds [201 x [201 x i32]], ptr getelementptr inbounds (i8, ptr @_ZZ6solve7vE3mat, i64 323208), i64 0, i64 %indvars.iv199, i64 %indvars.iv194
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %.not98 = icmp eq i32 %146, 0
  br i1 %.not98, label %.loopexit, label %.preheader

.preheader:                                       ; preds = %144, %.preheader
  %indvars.iv189 = phi i64 [ %indvars.iv.next190, %.preheader ], [ 0, %144 ]
  %147 = load i32, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 %148, i64 %indvars.iv199, i64 %indvars.iv189
  %150 = load i32, ptr %145, align 4, !tbaa !5
  %.not99 = icmp eq i32 %147, 0
  %151 = zext i1 %.not99 to i64
  %152 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 %151, i64 %indvars.iv194, i64 %indvars.iv189
  %153 = load i32, ptr %152, align 4, !tbaa !5
  call void @_Z11mod_inc_mulRiii(ptr noundef nonnull align 4 dereferenceable(4) %149, i32 noundef %150, i32 noundef %153)
  %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1
  %exitcond193.not = icmp eq i64 %indvars.iv.next190, 201
  br i1 %exitcond193.not, label %.loopexit, label %.preheader, !llvm.loop !28

.loopexit:                                        ; preds = %.preheader, %144
  %indvars.iv.next195 = add nuw nsw i64 %indvars.iv194, 1
  %exitcond198.not = icmp eq i64 %indvars.iv.next195, 201
  br i1 %exitcond198.not, label %143, label %144, !llvm.loop !29

154:                                              ; preds = %._crit_edge146
  %155 = load i32, ptr @_ZZ6solve7vE1o, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [3 x [201 x [201 x i32]]], ptr @_ZZ6solve7vE3mat, i64 0, i64 %156
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(161604) getelementptr inbounds (i8, ptr @_ZZ6solve7vE3mat, i64 323208), ptr noundef nonnull align 4 dereferenceable(161604) %157, i64 161604, i1 false)
  %158 = mul nuw nsw i32 %.090, 500
  br label %.preheader108, !llvm.loop !30

.critedge103._crit_edge.loopexit.unr-lcssa:       ; preds = %.critedge103, %.critedge103.preheader149
  %indvars.iv205.unr = phi i64 [ 0, %.critedge103.preheader149 ], [ %indvars.iv.next206.1, %.critedge103 ]
  %lcmp.mod216.not = icmp eq i64 %xtraiter215, 0
  br i1 %lcmp.mod216.not, label %.critedge103._crit_edge, label %.critedge103.epil

.critedge103.epil:                                ; preds = %.critedge103._crit_edge.loopexit.unr-lcssa
  %159 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv205.unr, i32 1
  %160 = load i32, ptr %159, align 4, !tbaa !18
  %161 = add nsw i32 %160, 99
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %indvars.iv205.unr, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %indvars.iv205.unr
  store i32 %164, ptr %165, align 4, !tbaa !5
  br label %.critedge103._crit_edge

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

.critedge103:                                     ; preds = %.critedge103, %.critedge103.preheader149.new
  %indvars.iv205 = phi i64 [ 0, %.critedge103.preheader149.new ], [ %indvars.iv.next206.1, %.critedge103 ]
  %niter218 = phi i64 [ 0, %.critedge103.preheader149.new ], [ %niter218.next.1, %.critedge103 ]
  %166 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv205, i32 1
  %167 = load i32, ptr %166, align 4, !tbaa !18
  %168 = add nsw i32 %167, 99
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %indvars.iv205, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %indvars.iv205
  store i32 %171, ptr %172, align 8, !tbaa !5
  %indvars.iv.next206 = or disjoint i64 %indvars.iv205, 1
  %173 = getelementptr inbounds [100001 x %struct.Edge], ptr @que, i64 0, i64 %indvars.iv.next206, i32 1
  %174 = load i32, ptr %173, align 8, !tbaa !18
  %175 = add nsw i32 %174, 99
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [100001 x [201 x i32]], ptr @_ZZ6solve7vE3vec, i64 0, i64 %indvars.iv.next206, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = getelementptr inbounds [100001 x i32], ptr @ans, i64 0, i64 %indvars.iv.next206
  store i32 %178, ptr %179, align 4, !tbaa !5
  %indvars.iv.next206.1 = add nuw nsw i64 %indvars.iv205, 2
  %niter218.next.1 = add i64 %niter218, 2
  %niter218.ncmp.1 = icmp eq i64 %niter218.next.1, %unroll_iter217
  br i1 %niter218.ncmp.1, label %.critedge103._crit_edge.loopexit.unr-lcssa, label %.critedge103, !llvm.loop !31
}

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @"_ZSt4sortIPiZ6solve7vE3$_0EvT_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 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 = distinct !{!16, !10}
!17 = !{!12, !6, i64 0}
!18 = !{!12, !6, i64 4}
!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}


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