; LLVM IR from tangjz/acm-icpc :: hdu/4673.ll (Z7prepareRiPiS0_)

; 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"

%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@s = external dso_local global [401 x i32], align 16
@w = external dso_local global [401 x i32], align 16
@f = external dso_local global [9 x [401 x i32]], align 16
@Q = external dso_local global %"class.std::priority_queue", align 8
@vis = external dso_local global [401 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL2dx = external hidden constant [4 x i32], align 16
@_ZL2dy = external hidden constant [4 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7prepareRiPiS0_(ptr noundef nonnull align 4 dereferenceable(4) %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"struct.std::pair", align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca %"struct.std::pair", align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  store i32 0, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %110, %3
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = icmp slt i32 %34, 20
  br i1 %35, label %37, label %36

36:                                               ; preds = %33
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %113

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

38:                                               ; preds = %104, %37
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = icmp slt i32 %39, 20
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %109

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %43 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %11)
  %44 = load i32, ptr %11, align 4, !tbaa !9
  %45 = icmp eq i32 %44, -1
  br i1 %45, label %46, label %50

46:                                               ; preds = %42
  %47 = load i32, ptr %8, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %48
  store i32 1, ptr %49, align 4, !tbaa !9
  br label %90

50:                                               ; preds = %42
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = icmp sle i32 %51, 1000
  br i1 %52, label %53, label %57

53:                                               ; preds = %50
  %54 = load i32, ptr %8, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %55
  store i32 0, ptr %56, align 4, !tbaa !9
  br label %89

57:                                               ; preds = %50
  %58 = load i32, ptr %11, align 4, !tbaa !9
  %59 = icmp sle i32 %58, 101000
  br i1 %59, label %60, label %69

60:                                               ; preds = %57
  %61 = load i32, ptr %11, align 4, !tbaa !9
  %62 = sub nsw i32 100000, %61
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %64, align 4, !tbaa !9
  %67 = sext i32 %65 to i64
  %68 = getelementptr inbounds i32, ptr %63, i64 %67
  store i32 %62, ptr %68, align 4, !tbaa !9
  br label %82

69:                                               ; preds = %57
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = icmp sle i32 %70, 201000
  br i1 %71, label %72, label %81

72:                                               ; preds = %69
  %73 = load i32, ptr %11, align 4, !tbaa !9
  %74 = sub nsw i32 %73, 200000
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %76, align 4, !tbaa !9
  %79 = sext i32 %77 to i64
  %80 = getelementptr inbounds i32, ptr %75, i64 %79
  store i32 %74, ptr %80, align 4, !tbaa !9
  br label %81

81:                                               ; preds = %72, %69
  br label %82

82:                                               ; preds = %81, %60
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = load i32, ptr %83, align 4, !tbaa !9
  %85 = shl i32 1, %84
  %86 = load i32, ptr %8, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %87
  store i32 %85, ptr %88, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %82, %53
  br label %90

90:                                               ; preds = %89, %46
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = icmp sge i32 %91, 0
  br i1 %92, label %93, label %98

93:                                               ; preds = %90
  %94 = load i32, ptr %11, align 4, !tbaa !9
  %95 = icmp sle i32 %94, 1000
  br i1 %95, label %96, label %98

96:                                               ; preds = %93
  %97 = load i32, ptr %11, align 4, !tbaa !9
  br label %99

98:                                               ; preds = %93, %90
  br label %99

99:                                               ; preds = %98, %96
  %100 = phi i32 [ %97, %96 ], [ 0, %98 ]
  %101 = load i32, ptr %8, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [401 x i32], ptr @w, i64 0, i64 %102
  store i32 %100, ptr %103, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %104

104:                                              ; preds = %99
  %105 = load i32, ptr %10, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %10, align 4, !tbaa !9
  %107 = load i32, ptr %8, align 4, !tbaa !9
  %108 = add nsw i32 %107, 1
  store i32 %108, ptr %8, align 4, !tbaa !9
  br label %38, !llvm.loop !11

109:                                              ; preds = %41
  br label %110

110:                                              ; preds = %109
  %111 = load i32, ptr %7, align 4, !tbaa !9
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %7, align 4, !tbaa !9
  br label %33, !llvm.loop !13

113:                                              ; preds = %36
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = load i32, ptr %114, align 4, !tbaa !9
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %118, label %117

117:                                              ; preds = %113
  br label %429

118:                                              ; preds = %113
  call void @llvm.memset.p0.i64(ptr align 16 @f, i8 63, i64 14436, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %119

119:                                              ; preds = %140, %118
  %120 = load i32, ptr %12, align 4, !tbaa !9
  %121 = icmp slt i32 %120, 400
  br i1 %121, label %123, label %122

122:                                              ; preds = %119
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %143

123:                                              ; preds = %119
  %124 = load i32, ptr %12, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !9
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %129, label %139

129:                                              ; preds = %123
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !9
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %134
  %136 = load i32, ptr %12, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [401 x i32], ptr %135, i64 0, i64 %137
  store i32 0, ptr %138, align 4, !tbaa !9
  br label %139

139:                                              ; preds = %129, %123
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %12, align 4, !tbaa !9
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %12, align 4, !tbaa !9
  br label %119, !llvm.loop !14

143:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %144

144:                                              ; preds = %371, %143
  %145 = load i32, ptr %13, align 4, !tbaa !9
  %146 = load ptr, ptr %4, align 8, !tbaa !5
  %147 = load i32, ptr %146, align 4, !tbaa !9
  %148 = shl i32 2, %147
  %149 = icmp slt i32 %145, %148
  br i1 %149, label %151, label %150

150:                                              ; preds = %144
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %374

151:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %152 = load i32, ptr %13, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %153
  %155 = getelementptr inbounds [401 x i32], ptr %154, i64 0, i64 0
  store ptr %155, ptr %14, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 401, i1 false)
  br label %156

156:                                              ; preds = %160, %151
  %157 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %158 = xor i1 %157, true
  br i1 %158, label %159, label %161

159:                                              ; preds = %156
  br label %160

160:                                              ; preds = %159
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br label %156, !llvm.loop !15

161:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %162

162:                                              ; preds = %255, %161
  %163 = load i32, ptr %15, align 4, !tbaa !9
  %164 = icmp slt i32 %163, 400
  br i1 %164, label %166, label %165

165:                                              ; preds = %162
  store i32 17, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %258

166:                                              ; preds = %162
  %167 = load i32, ptr %15, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !9
  %171 = icmp ne i32 %170, 0
  br i1 %171, label %172, label %181

172:                                              ; preds = %166
  %173 = load i32, ptr %13, align 4, !tbaa !9
  %174 = load i32, ptr %15, align 4, !tbaa !9
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %175
  %177 = load i32, ptr %176, align 4, !tbaa !9
  %178 = and i32 %173, %177
  %179 = icmp ne i32 %178, 0
  br i1 %179, label %181, label %180

180:                                              ; preds = %172
  br label %255

181:                                              ; preds = %172, %166
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %182 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %182, ptr %16, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %234, %181
  %184 = load i32, ptr %16, align 4, !tbaa !9
  %185 = icmp ne i32 %184, 0
  br i1 %185, label %187, label %186

186:                                              ; preds = %183
  store i32 20, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %239

187:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %188 = load i32, ptr %16, align 4, !tbaa !9
  %189 = load i32, ptr %15, align 4, !tbaa !9
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %190
  %192 = load i32, ptr %191, align 4, !tbaa !9
  %193 = or i32 %188, %192
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %194
  %196 = load i32, ptr %15, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [401 x i32], ptr %195, i64 0, i64 %197
  %199 = load i32, ptr %198, align 4, !tbaa !9
  %200 = load i32, ptr %13, align 4, !tbaa !9
  %201 = load i32, ptr %16, align 4, !tbaa !9
  %202 = xor i32 %200, %201
  %203 = load i32, ptr %15, align 4, !tbaa !9
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %204
  %206 = load i32, ptr %205, align 4, !tbaa !9
  %207 = or i32 %202, %206
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %208
  %210 = load i32, ptr %15, align 4, !tbaa !9
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [401 x i32], ptr %209, i64 0, i64 %211
  %213 = load i32, ptr %212, align 4, !tbaa !9
  %214 = add nsw i32 %199, %213
  %215 = load i32, ptr %15, align 4, !tbaa !9
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [401 x i32], ptr @w, i64 0, i64 %216
  %218 = load i32, ptr %217, align 4, !tbaa !9
  %219 = sub nsw i32 %214, %218
  store i32 %219, ptr %17, align 4, !tbaa !9
  %220 = load i32, ptr %17, align 4, !tbaa !9
  %221 = load ptr, ptr %14, align 8, !tbaa !5
  %222 = load i32, ptr %15, align 4, !tbaa !9
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds i32, ptr %221, i64 %223
  %225 = load i32, ptr %224, align 4, !tbaa !9
  %226 = icmp slt i32 %220, %225
  br i1 %226, label %227, label %233

227:                                              ; preds = %187
  %228 = load i32, ptr %17, align 4, !tbaa !9
  %229 = load ptr, ptr %14, align 8, !tbaa !5
  %230 = load i32, ptr %15, align 4, !tbaa !9
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds i32, ptr %229, i64 %231
  store i32 %228, ptr %232, align 4, !tbaa !9
  br label %233

233:                                              ; preds = %227, %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %234

234:                                              ; preds = %233
  %235 = load i32, ptr %16, align 4, !tbaa !9
  %236 = sub nsw i32 %235, 1
  %237 = load i32, ptr %13, align 4, !tbaa !9
  %238 = and i32 %236, %237
  store i32 %238, ptr %16, align 4, !tbaa !9
  br label %183, !llvm.loop !16

239:                                              ; preds = %186
  %240 = load ptr, ptr %14, align 8, !tbaa !5
  %241 = load i32, ptr %15, align 4, !tbaa !9
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds i32, ptr %240, i64 %242
  %244 = load i32, ptr %243, align 4, !tbaa !9
  %245 = icmp slt i32 %244, 1061109567
  br i1 %245, label %246, label %254

246:                                              ; preds = %239
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %247 = load ptr, ptr %14, align 8, !tbaa !5
  %248 = load i32, ptr %15, align 4, !tbaa !9
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds i32, ptr %247, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !9
  %252 = sub nsw i32 0, %251
  store i32 %252, ptr %19, align 4, !tbaa !9
  %253 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %15)
  store i64 %253, ptr %18, align 4
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %18)
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %254

254:                                              ; preds = %246, %239
  br label %255

255:                                              ; preds = %254, %180
  %256 = load i32, ptr %15, align 4, !tbaa !9
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %15, align 4, !tbaa !9
  br label %162, !llvm.loop !17

258:                                              ; preds = %165
  br label %259

259:                                              ; preds = %369, %367, %258
  %260 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %261 = xor i1 %260, true
  br i1 %261, label %262, label %370

262:                                              ; preds = %259
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %263 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %264 = getelementptr inbounds %"struct.std::pair", ptr %263, i32 0, i32 1
  %265 = load i32, ptr %264, align 4, !tbaa !18
  store i32 %265, ptr %20, align 4, !tbaa !9
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %266 = load i32, ptr %20, align 4, !tbaa !9
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [401 x i8], ptr @vis, i64 0, i64 %267
  %269 = load i8, ptr %268, align 1, !tbaa !20, !range !22, !noundef !23
  %270 = trunc i8 %269 to i1
  br i1 %270, label %271, label %272

271:                                              ; preds = %262
  store i32 23, ptr %9, align 4
  br label %367, !llvm.loop !24

272:                                              ; preds = %262
  %273 = load i32, ptr %20, align 4, !tbaa !9
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [401 x i8], ptr @vis, i64 0, i64 %274
  store i8 1, ptr %275, align 1, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %276 = load i32, ptr %20, align 4, !tbaa !9
  %277 = sdiv i32 %276, 20
  store i32 %277, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %278 = load i32, ptr %20, align 4, !tbaa !9
  %279 = srem i32 %278, 20
  store i32 %279, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  store i32 0, ptr %23, align 4, !tbaa !9
  br label %280

280:                                              ; preds = %363, %272
  %281 = load i32, ptr %23, align 4, !tbaa !9
  %282 = icmp slt i32 %281, 4
  br i1 %282, label %284, label %283

283:                                              ; preds = %280
  store i32 25, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %366

284:                                              ; preds = %280
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %285 = load i32, ptr %21, align 4, !tbaa !9
  %286 = load i32, ptr %23, align 4, !tbaa !9
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [4 x i32], ptr @_ZL2dx, i64 0, i64 %287
  %289 = load i32, ptr %288, align 4, !tbaa !9
  %290 = add nsw i32 %285, %289
  store i32 %290, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %291 = load i32, ptr %22, align 4, !tbaa !9
  %292 = load i32, ptr %23, align 4, !tbaa !9
  %293 = sext i32 %292 to i64
  %294 = getelementptr inbounds [4 x i32], ptr @_ZL2dy, i64 0, i64 %293
  %295 = load i32, ptr %294, align 4, !tbaa !9
  %296 = add nsw i32 %291, %295
  store i32 %296, ptr %25, align 4, !tbaa !9
  %297 = load i32, ptr %24, align 4, !tbaa !9
  %298 = icmp sge i32 %297, 0
  br i1 %298, label %299, label %308

299:                                              ; preds = %284
  %300 = load i32, ptr %24, align 4, !tbaa !9
  %301 = icmp slt i32 %300, 20
  br i1 %301, label %302, label %308

302:                                              ; preds = %299
  %303 = load i32, ptr %25, align 4, !tbaa !9
  %304 = icmp sge i32 %303, 0
  br i1 %304, label %305, label %308

305:                                              ; preds = %302
  %306 = load i32, ptr %25, align 4, !tbaa !9
  %307 = icmp slt i32 %306, 20
  br i1 %307, label %309, label %308

308:                                              ; preds = %305, %302, %299, %284
  store i32 27, ptr %9, align 4
  br label %360

309:                                              ; preds = %305
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %310 = load i32, ptr %24, align 4, !tbaa !9
  %311 = mul nsw i32 %310, 20
  %312 = load i32, ptr %25, align 4, !tbaa !9
  %313 = add nsw i32 %311, %312
  store i32 %313, ptr %26, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %314 = load i32, ptr %13, align 4, !tbaa !9
  %315 = load i32, ptr %26, align 4, !tbaa !9
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %316
  %318 = load i32, ptr %317, align 4, !tbaa !9
  %319 = or i32 %314, %318
  store i32 %319, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %320 = load ptr, ptr %14, align 8, !tbaa !5
  %321 = load i32, ptr %20, align 4, !tbaa !9
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds i32, ptr %320, i64 %322
  %324 = load i32, ptr %323, align 4, !tbaa !9
  %325 = load i32, ptr %26, align 4, !tbaa !9
  %326 = sext i32 %325 to i64
  %327 = getelementptr inbounds [401 x i32], ptr @w, i64 0, i64 %326
  %328 = load i32, ptr %327, align 4, !tbaa !9
  %329 = add nsw i32 %324, %328
  store i32 %329, ptr %28, align 4, !tbaa !9
  %330 = load i32, ptr %28, align 4, !tbaa !9
  %331 = load i32, ptr %27, align 4, !tbaa !9
  %332 = sext i32 %331 to i64
  %333 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %332
  %334 = load i32, ptr %26, align 4, !tbaa !9
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds [401 x i32], ptr %333, i64 0, i64 %335
  %337 = load i32, ptr %336, align 4, !tbaa !9
  %338 = icmp slt i32 %330, %337
  br i1 %338, label %339, label %359

339:                                              ; preds = %309
  %340 = load i32, ptr %28, align 4, !tbaa !9
  %341 = load i32, ptr %27, align 4, !tbaa !9
  %342 = sext i32 %341 to i64
  %343 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %342
  %344 = load i32, ptr %26, align 4, !tbaa !9
  %345 = sext i32 %344 to i64
  %346 = getelementptr inbounds [401 x i32], ptr %343, i64 0, i64 %345
  store i32 %340, ptr %346, align 4, !tbaa !9
  %347 = load i32, ptr %13, align 4, !tbaa !9
  %348 = load i32, ptr %27, align 4, !tbaa !9
  %349 = icmp eq i32 %347, %348
  br i1 %349, label %350, label %358

350:                                              ; preds = %339
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %351 = load ptr, ptr %14, align 8, !tbaa !5
  %352 = load i32, ptr %26, align 4, !tbaa !9
  %353 = sext i32 %352 to i64
  %354 = getelementptr inbounds i32, ptr %351, i64 %353
  %355 = load i32, ptr %354, align 4, !tbaa !9
  %356 = sub nsw i32 0, %355
  store i32 %356, ptr %30, align 4, !tbaa !9
  %357 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %30, ptr noundef nonnull align 4 dereferenceable(4) %26)
  store i64 %357, ptr %29, align 4
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %29)
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  br label %358

358:                                              ; preds = %350, %339
  br label %359

359:                                              ; preds = %358, %309
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  store i32 0, ptr %9, align 4
  br label %360

360:                                              ; preds = %359, %308
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  %361 = load i32, ptr %9, align 4
  switch i32 %361, label %430 [
    i32 0, label %362
    i32 27, label %363
  ]

362:                                              ; preds = %360
  br label %363

363:                                              ; preds = %362, %360
  %364 = load i32, ptr %23, align 4, !tbaa !9
  %365 = add nsw i32 %364, 1
  store i32 %365, ptr %23, align 4, !tbaa !9
  br label %280, !llvm.loop !25

366:                                              ; preds = %283
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  store i32 0, ptr %9, align 4
  br label %367

367:                                              ; preds = %366, %271
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  %368 = load i32, ptr %9, align 4
  switch i32 %368, label %430 [
    i32 0, label %369
    i32 23, label %259
  ]

369:                                              ; preds = %367
  br label %259, !llvm.loop !24

370:                                              ; preds = %259
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %371

371:                                              ; preds = %370
  %372 = load i32, ptr %13, align 4, !tbaa !9
  %373 = add nsw i32 %372, 1
  store i32 %373, ptr %13, align 4, !tbaa !9
  br label %144, !llvm.loop !26

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

375:                                              ; preds = %426, %374
  %376 = load i32, ptr %31, align 4, !tbaa !9
  %377 = icmp slt i32 %376, 400
  br i1 %377, label %379, label %378

378:                                              ; preds = %375
  store i32 28, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  br label %429

379:                                              ; preds = %375
  %380 = load i32, ptr %31, align 4, !tbaa !9
  %381 = sext i32 %380 to i64
  %382 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %381
  %383 = load i32, ptr %382, align 4, !tbaa !9
  %384 = icmp sgt i32 %383, 1
  br i1 %384, label %385, label %407

385:                                              ; preds = %379
  %386 = load i32, ptr %31, align 4, !tbaa !9
  %387 = sext i32 %386 to i64
  %388 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %387
  %389 = load i32, ptr %388, align 4, !tbaa !9
  %390 = or i32 %389, 1
  %391 = sext i32 %390 to i64
  %392 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %391
  %393 = load i32, ptr %31, align 4, !tbaa !9
  %394 = sext i32 %393 to i64
  %395 = getelementptr inbounds [401 x i32], ptr %392, i64 0, i64 %394
  %396 = load i32, ptr %395, align 4, !tbaa !9
  %397 = load ptr, ptr %6, align 8, !tbaa !5
  %398 = load i32, ptr %31, align 4, !tbaa !9
  %399 = sext i32 %398 to i64
  %400 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %399
  %401 = load i32, ptr %400, align 4, !tbaa !9
  %402 = icmp eq i32 %401, 2
  %403 = zext i1 %402 to i64
  %404 = select i1 %402, i32 0, i32 1
  %405 = sext i32 %404 to i64
  %406 = getelementptr inbounds i32, ptr %397, i64 %405
  store i32 %396, ptr %406, align 4, !tbaa !9
  br label %425

407:                                              ; preds = %379
  %408 = load i32, ptr %31, align 4, !tbaa !9
  %409 = sext i32 %408 to i64
  %410 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %409
  %411 = load i32, ptr %410, align 4, !tbaa !9
  %412 = icmp eq i32 %411, 1
  br i1 %412, label %413, label %424

413:                                              ; preds = %407
  %414 = load ptr, ptr %4, align 8, !tbaa !5
  %415 = load i32, ptr %414, align 4, !tbaa !9
  %416 = icmp eq i32 %415, 2
  br i1 %416, label %417, label %424

417:                                              ; preds = %413
  %418 = load i32, ptr %31, align 4, !tbaa !9
  %419 = sext i32 %418 to i64
  %420 = getelementptr inbounds [401 x i32], ptr getelementptr inbounds ([9 x [401 x i32]], ptr @f, i64 0, i64 7), i64 0, i64 %419
  %421 = load i32, ptr %420, align 4, !tbaa !9
  %422 = load ptr, ptr %6, align 8, !tbaa !5
  %423 = getelementptr inbounds i32, ptr %422, i64 2
  store i32 %421, ptr %423, align 4, !tbaa !9
  br label %424

424:                                              ; preds = %417, %413, %407
  br label %425

425:                                              ; preds = %424, %385
  br label %426

426:                                              ; preds = %425
  %427 = load i32, ptr %31, align 4, !tbaa !9
  %428 = add nsw i32 %427, 1
  store i32 %428, ptr %31, align 4, !tbaa !9
  br label %375, !llvm.loop !27

429:                                              ; preds = %378, %117
  ret void

430:                                              ; preds = %367, %360
  unreachable
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) #4 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #3 = { "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 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 #5 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = !{!19, !10, i64 4}
!19 = !{!"_ZTSSt4pairIiiE", !10, i64 0, !10, i64 4}
!20 = !{!21, !21, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = distinct !{!26, !12}
!27 = distinct !{!27, !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"

%"class.std::priority_queue" = type <{ %"class.std::vector", [8 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@s = external dso_local local_unnamed_addr global [401 x i32], align 16
@w = external dso_local local_unnamed_addr global [401 x i32], align 16
@f = external dso_local local_unnamed_addr global [9 x [401 x i32]], align 16
@Q = external dso_local global %"class.std::priority_queue", align 8
@vis = external dso_local local_unnamed_addr global [401 x i8], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@_ZL2dx = external hidden local_unnamed_addr constant [4 x i32], align 16
@_ZL2dy = external hidden local_unnamed_addr constant [4 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7prepareRiPiS0_(ptr nocapture noundef nonnull align 4 dereferenceable(4) %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #2 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair", align 8
  %10 = alloca i32, align 4
  store i32 0, ptr %0, align 4, !tbaa !5
  br label %.preheader109

.preheader109:                                    ; preds = %3, %15
  %.082113 = phi i32 [ 0, %3 ], [ %16, %15 ]
  %.083112 = phi i32 [ 0, %3 ], [ %12, %15 ]
  %11 = sext i32 %.083112 to i64
  %12 = add i32 %.083112, 20
  br label %17

13:                                               ; preds = %15
  %14 = load i32, ptr %0, align 4, !tbaa !5
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %.loopexit, label %vector.ph

15:                                               ; preds = %38
  %16 = add nuw nsw i32 %.082113, 1
  %exitcond128.not = icmp eq i32 %16, 20
  br i1 %exitcond128.not, label %13, label %.preheader109, !llvm.loop !9

17:                                               ; preds = %.preheader109, %38
  %indvars.iv = phi i64 [ %11, %.preheader109 ], [ %indvars.iv.next, %38 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %4)
  %19 = load i32, ptr %4, align 4
  %20 = icmp eq i32 %19, -1
  br i1 %20, label %38, label %21

21:                                               ; preds = %17
  %22 = icmp slt i32 %19, 1001
  br i1 %22, label %38, label %23

23:                                               ; preds = %21
  %24 = icmp ult i32 %19, 101001
  br i1 %24, label %25, label %27

25:                                               ; preds = %23
  %26 = sub nsw i32 100000, %19
  br label %.sink.split

27:                                               ; preds = %23
  %28 = icmp ult i32 %19, 201001
  br i1 %28, label %29, label %35

29:                                               ; preds = %27
  %30 = add nsw i32 %19, -200000
  br label %.sink.split

.sink.split:                                      ; preds = %25, %29
  %.sink = phi i32 [ %30, %29 ], [ %26, %25 ]
  %31 = load i32, ptr %0, align 4, !tbaa !5
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %0, align 4, !tbaa !5
  %33 = sext i32 %31 to i64
  %34 = getelementptr inbounds i32, ptr %1, i64 %33
  store i32 %.sink, ptr %34, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %.sink.split, %27
  %36 = load i32, ptr %0, align 4, !tbaa !5
  %37 = shl nuw i32 1, %36
  br label %38

38:                                               ; preds = %21, %17, %35
  %.sink150 = phi i32 [ %37, %35 ], [ 1, %17 ], [ 0, %21 ]
  %39 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %indvars.iv
  store i32 %.sink150, ptr %39, align 4, !tbaa !5
  %or.cond = icmp ult i32 %19, 1001
  %40 = select i1 %or.cond, i32 %19, i32 0
  %41 = getelementptr inbounds [401 x i32], ptr @w, i64 0, i64 %indvars.iv
  store i32 %40, ptr %41, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %12, %lftr.wideiv
  br i1 %exitcond.not, label %15, label %17, !llvm.loop !11

vector.ph:                                        ; preds = %13
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(14436) @f, i8 63, i64 14436, i1 false)
  br label %vector.body

vector.body:                                      ; preds = %pred.store.continue166, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue166 ]
  %42 = or disjoint i64 %index, 4
  %43 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %index
  %44 = getelementptr inbounds i8, ptr %43, i64 16
  %wide.load = load <4 x i32>, ptr %43, align 16, !tbaa !5
  %wide.load152 = load <4 x i32>, ptr %44, align 16, !tbaa !5
  %45 = icmp ne <4 x i32> %wide.load, zeroinitializer
  %46 = icmp ne <4 x i32> %wide.load152, zeroinitializer
  %47 = extractelement <4 x i1> %45, i64 0
  br i1 %47, label %pred.store.if, label %pred.store.continue

pred.store.if:                                    ; preds = %vector.body
  %48 = extractelement <4 x i32> %wide.load, i64 0
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %49, i64 %index
  store i32 0, ptr %50, align 4, !tbaa !5
  br label %pred.store.continue

pred.store.continue:                              ; preds = %pred.store.if, %vector.body
  %51 = extractelement <4 x i1> %45, i64 1
  br i1 %51, label %pred.store.if153, label %pred.store.continue154

pred.store.if153:                                 ; preds = %pred.store.continue
  %52 = or disjoint i64 %index, 1
  %53 = extractelement <4 x i32> %wide.load, i64 1
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %54, i64 %52
  store i32 0, ptr %55, align 4, !tbaa !5
  br label %pred.store.continue154

pred.store.continue154:                           ; preds = %pred.store.if153, %pred.store.continue
  %56 = extractelement <4 x i1> %45, i64 2
  br i1 %56, label %pred.store.if155, label %pred.store.continue156

pred.store.if155:                                 ; preds = %pred.store.continue154
  %57 = or disjoint i64 %index, 2
  %58 = extractelement <4 x i32> %wide.load, i64 2
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %59, i64 %57
  store i32 0, ptr %60, align 4, !tbaa !5
  br label %pred.store.continue156

pred.store.continue156:                           ; preds = %pred.store.if155, %pred.store.continue154
  %61 = extractelement <4 x i1> %45, i64 3
  br i1 %61, label %pred.store.if157, label %pred.store.continue158

pred.store.if157:                                 ; preds = %pred.store.continue156
  %62 = or disjoint i64 %index, 3
  %63 = extractelement <4 x i32> %wide.load, i64 3
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %64, i64 %62
  store i32 0, ptr %65, align 4, !tbaa !5
  br label %pred.store.continue158

pred.store.continue158:                           ; preds = %pred.store.if157, %pred.store.continue156
  %66 = extractelement <4 x i1> %46, i64 0
  br i1 %66, label %pred.store.if159, label %pred.store.continue160

pred.store.if159:                                 ; preds = %pred.store.continue158
  %67 = extractelement <4 x i32> %wide.load152, i64 0
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %68, i64 %42
  store i32 0, ptr %69, align 4, !tbaa !5
  br label %pred.store.continue160

pred.store.continue160:                           ; preds = %pred.store.if159, %pred.store.continue158
  %70 = extractelement <4 x i1> %46, i64 1
  br i1 %70, label %pred.store.if161, label %pred.store.continue162

pred.store.if161:                                 ; preds = %pred.store.continue160
  %71 = or disjoint i64 %index, 5
  %72 = extractelement <4 x i32> %wide.load152, i64 1
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %73, i64 %71
  store i32 0, ptr %74, align 4, !tbaa !5
  br label %pred.store.continue162

pred.store.continue162:                           ; preds = %pred.store.if161, %pred.store.continue160
  %75 = extractelement <4 x i1> %46, i64 2
  br i1 %75, label %pred.store.if163, label %pred.store.continue164

pred.store.if163:                                 ; preds = %pred.store.continue162
  %76 = or disjoint i64 %index, 6
  %77 = extractelement <4 x i32> %wide.load152, i64 2
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %78, i64 %76
  store i32 0, ptr %79, align 4, !tbaa !5
  br label %pred.store.continue164

pred.store.continue164:                           ; preds = %pred.store.if163, %pred.store.continue162
  %80 = extractelement <4 x i1> %46, i64 3
  br i1 %80, label %pred.store.if165, label %pred.store.continue166

pred.store.if165:                                 ; preds = %pred.store.continue164
  %81 = or disjoint i64 %index, 7
  %82 = extractelement <4 x i32> %wide.load152, i64 3
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %83, i64 %81
  store i32 0, ptr %84, align 4, !tbaa !5
  br label %pred.store.continue166

pred.store.continue166:                           ; preds = %pred.store.if165, %pred.store.continue164
  %index.next = add nuw i64 %index, 8
  %85 = icmp eq i64 %index.next, 400
  br i1 %85, label %.preheader108, label %vector.body, !llvm.loop !12

.preheader108:                                    ; preds = %pred.store.continue166
  %86 = load i32, ptr %0, align 4, !tbaa !5
  %87 = shl i32 2, %86
  %88 = icmp sgt i32 %87, 0
  br i1 %88, label %.lr.ph125.preheader, label %.preheader

.lr.ph125.preheader:                              ; preds = %.preheader108
  %89 = load i32, ptr @_ZL2dx, align 16
  %90 = load i32, ptr @_ZL2dy, align 16
  %91 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 4), align 4
  %92 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 4), align 4
  %93 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 8), align 8
  %94 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 8), align 8
  %95 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dx, i64 12), align 4
  %96 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL2dy, i64 12), align 4
  br label %.lr.ph125

.preheader:                                       ; preds = %._crit_edge123, %.preheader108
  %97 = getelementptr inbounds i8, ptr %2, i64 8
  br label %267

.lr.ph125:                                        ; preds = %.lr.ph125.preheader, %._crit_edge123
  %indvars.iv137 = phi i64 [ 0, %.lr.ph125.preheader ], [ %indvars.iv.next138, %._crit_edge123 ]
  %98 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %indvars.iv137
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(401) @vis, i8 0, i64 401, i1 false)
  %99 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %99, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph125, %.lr.ph
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %100 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %100, label %._crit_edge, label %.lr.ph, !llvm.loop !15

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph125
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  %.not101115 = icmp eq i64 %indvars.iv137, 0
  %101 = trunc nuw nsw i64 %indvars.iv137 to i32
  br label %104

102:                                              ; preds = %136
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  %103 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %103, label %._crit_edge123, label %.lr.ph122

104:                                              ; preds = %._crit_edge, %136
  %storemerge119 = phi i32 [ 0, %._crit_edge ], [ %138, %136 ]
  %105 = sext i32 %storemerge119 to i64
  %106 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %.not99 = icmp ne i32 %107, 0
  %108 = and i32 %107, %101
  %.not100 = icmp eq i32 %108, 0
  %or.cond103 = and i1 %.not99, %.not100
  br i1 %or.cond103, label %136, label %.preheader107

.preheader107:                                    ; preds = %104
  br i1 %.not101115, label %.preheader107.._crit_edge118_crit_edge, label %.lr.ph117

.preheader107.._crit_edge118_crit_edge:           ; preds = %.preheader107
  %.phi.trans.insert = getelementptr inbounds i32, ptr %98, i64 %105
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  br label %._crit_edge118

.lr.ph117:                                        ; preds = %.preheader107
  %109 = getelementptr inbounds [401 x i32], ptr @w, i64 0, i64 %105
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = getelementptr inbounds i32, ptr %98, i64 %105
  %.promoted = load i32, ptr %111, align 4, !tbaa !5
  br label %114

._crit_edge118:                                   ; preds = %129, %.preheader107.._crit_edge118_crit_edge
  %112 = phi i32 [ %.pre, %.preheader107.._crit_edge118_crit_edge ], [ %130, %129 ]
  %113 = icmp slt i32 %112, 1061109567
  br i1 %113, label %133, label %136

114:                                              ; preds = %.lr.ph117, %129
  %115 = phi i32 [ %.promoted, %.lr.ph117 ], [ %130, %129 ]
  %.088116 = phi i32 [ %101, %.lr.ph117 ], [ %132, %129 ]
  %116 = or i32 %.088116, %107
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %117, i64 %105
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = xor i32 %.088116, %101
  %121 = or i32 %120, %107
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %122, i64 %105
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = add nsw i32 %124, %119
  %126 = sub i32 %125, %110
  %127 = icmp slt i32 %126, %115
  br i1 %127, label %128, label %129

128:                                              ; preds = %114
  store i32 %126, ptr %111, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %128, %114
  %130 = phi i32 [ %126, %128 ], [ %115, %114 ]
  %131 = add nuw i32 %.088116, 2147483647
  %132 = and i32 %131, %101
  %.not101 = icmp eq i32 %132, 0
  br i1 %.not101, label %._crit_edge118, label %114, !llvm.loop !16

133:                                              ; preds = %._crit_edge118
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %134 = sub nsw i32 0, %112
  store i32 %134, ptr %7, align 4, !tbaa !5
  %135 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %5)
  store i64 %135, ptr %6, align 8
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  %.pre144 = load i32, ptr %5, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %104, %._crit_edge118, %133
  %137 = phi i32 [ %storemerge119, %104 ], [ %storemerge119, %._crit_edge118 ], [ %.pre144, %133 ]
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %5, align 4, !tbaa !5
  %139 = icmp slt i32 %137, 399
  br i1 %139, label %104, label %102, !llvm.loop !17

.lr.ph122:                                        ; preds = %102, %.loopexit106
  %140 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %141 = getelementptr inbounds i8, ptr %140, i64 4
  %142 = load i32, ptr %141, align 4, !tbaa !18
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE3popEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [401 x i8], ptr @vis, i64 0, i64 %143
  %145 = load i8, ptr %144, align 1, !tbaa !20, !range !22, !noundef !23
  %146 = trunc nuw i8 %145 to i1
  br i1 %146, label %.loopexit106, label %147, !llvm.loop !24

147:                                              ; preds = %.lr.ph122
  store i8 1, ptr %144, align 1, !tbaa !20
  %148 = sdiv i32 %142, 20
  %149 = srem i32 %142, 20
  %150 = getelementptr inbounds i32, ptr %98, i64 %143
  %151 = add nsw i32 %89, %148
  %152 = add nsw i32 %90, %149
  %or.cond3 = icmp ult i32 %151, 20
  %153 = icmp ult i32 %152, 20
  %or.cond7 = select i1 %or.cond3, i1 %153, i1 false
  br i1 %or.cond7, label %154, label %178

154:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %155 = mul nuw nsw i32 %151, 20
  %156 = add nuw nsw i32 %155, %152
  store i32 %156, ptr %8, align 4, !tbaa !5
  %157 = zext nneg i32 %156 to i64
  %158 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %157
  %159 = load i32, ptr %158, align 4, !tbaa !5
  %160 = or i32 %159, %101
  %161 = load i32, ptr %150, align 4, !tbaa !5
  %162 = getelementptr inbounds [401 x i32], ptr @w, i64 0, i64 %157
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = add nsw i32 %163, %161
  %165 = sext i32 %160 to i64
  %166 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %165, i64 %157
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = icmp slt i32 %164, %167
  br i1 %168, label %169, label %177

169:                                              ; preds = %154
  store i32 %164, ptr %166, align 4, !tbaa !5
  %170 = zext i32 %160 to i64
  %171 = icmp eq i64 %indvars.iv137, %170
  br i1 %171, label %172, label %177

172:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  %173 = getelementptr inbounds i32, ptr %98, i64 %157
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = sub nsw i32 0, %174
  store i32 %175, ptr %10, align 4, !tbaa !5
  %176 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %176, ptr %9, align 8
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %177

177:                                              ; preds = %169, %172, %154
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %178

178:                                              ; preds = %147, %177
  %179 = add nsw i32 %91, %148
  %180 = add nsw i32 %92, %149
  %or.cond3.1 = icmp ult i32 %179, 20
  %181 = icmp ult i32 %180, 20
  %or.cond7.1 = select i1 %or.cond3.1, i1 %181, i1 false
  br i1 %or.cond7.1, label %182, label %206

182:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %183 = mul nuw nsw i32 %179, 20
  %184 = add nuw nsw i32 %183, %180
  store i32 %184, ptr %8, align 4, !tbaa !5
  %185 = zext nneg i32 %184 to i64
  %186 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !5
  %188 = or i32 %187, %101
  %189 = load i32, ptr %150, align 4, !tbaa !5
  %190 = getelementptr inbounds [401 x i32], ptr @w, i64 0, i64 %185
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = add nsw i32 %191, %189
  %193 = sext i32 %188 to i64
  %194 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %193, i64 %185
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %196 = icmp slt i32 %192, %195
  br i1 %196, label %197, label %205

197:                                              ; preds = %182
  store i32 %192, ptr %194, align 4, !tbaa !5
  %198 = zext i32 %188 to i64
  %199 = icmp eq i64 %indvars.iv137, %198
  br i1 %199, label %200, label %205

200:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  %201 = getelementptr inbounds i32, ptr %98, i64 %185
  %202 = load i32, ptr %201, align 4, !tbaa !5
  %203 = sub nsw i32 0, %202
  store i32 %203, ptr %10, align 4, !tbaa !5
  %204 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %204, ptr %9, align 8
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %205

205:                                              ; preds = %200, %197, %182
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %206

206:                                              ; preds = %205, %178
  %207 = add nsw i32 %93, %148
  %208 = add nsw i32 %94, %149
  %or.cond3.2 = icmp ult i32 %207, 20
  %209 = icmp ult i32 %208, 20
  %or.cond7.2 = select i1 %or.cond3.2, i1 %209, i1 false
  br i1 %or.cond7.2, label %210, label %234

210:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %211 = mul nuw nsw i32 %207, 20
  %212 = add nuw nsw i32 %211, %208
  store i32 %212, ptr %8, align 4, !tbaa !5
  %213 = zext nneg i32 %212 to i64
  %214 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %213
  %215 = load i32, ptr %214, align 4, !tbaa !5
  %216 = or i32 %215, %101
  %217 = load i32, ptr %150, align 4, !tbaa !5
  %218 = getelementptr inbounds [401 x i32], ptr @w, i64 0, i64 %213
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %220 = add nsw i32 %219, %217
  %221 = sext i32 %216 to i64
  %222 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %221, i64 %213
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = icmp slt i32 %220, %223
  br i1 %224, label %225, label %233

225:                                              ; preds = %210
  store i32 %220, ptr %222, align 4, !tbaa !5
  %226 = zext i32 %216 to i64
  %227 = icmp eq i64 %indvars.iv137, %226
  br i1 %227, label %228, label %233

228:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  %229 = getelementptr inbounds i32, ptr %98, i64 %213
  %230 = load i32, ptr %229, align 4, !tbaa !5
  %231 = sub nsw i32 0, %230
  store i32 %231, ptr %10, align 4, !tbaa !5
  %232 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %232, ptr %9, align 8
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %233

233:                                              ; preds = %228, %225, %210
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %234

234:                                              ; preds = %233, %206
  %235 = add nsw i32 %95, %148
  %236 = add nsw i32 %96, %149
  %or.cond3.3 = icmp ult i32 %235, 20
  %237 = icmp ult i32 %236, 20
  %or.cond7.3 = select i1 %or.cond3.3, i1 %237, i1 false
  br i1 %or.cond7.3, label %238, label %.loopexit106

238:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %239 = mul nuw nsw i32 %235, 20
  %240 = add nuw nsw i32 %239, %236
  store i32 %240, ptr %8, align 4, !tbaa !5
  %241 = zext nneg i32 %240 to i64
  %242 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %241
  %243 = load i32, ptr %242, align 4, !tbaa !5
  %244 = or i32 %243, %101
  %245 = load i32, ptr %150, align 4, !tbaa !5
  %246 = getelementptr inbounds [401 x i32], ptr @w, i64 0, i64 %241
  %247 = load i32, ptr %246, align 4, !tbaa !5
  %248 = add nsw i32 %247, %245
  %249 = sext i32 %244 to i64
  %250 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %249, i64 %241
  %251 = load i32, ptr %250, align 4, !tbaa !5
  %252 = icmp slt i32 %248, %251
  br i1 %252, label %253, label %261

253:                                              ; preds = %238
  store i32 %248, ptr %250, align 4, !tbaa !5
  %254 = zext i32 %244 to i64
  %255 = icmp eq i64 %indvars.iv137, %254
  br i1 %255, label %256, label %261

256:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  %257 = getelementptr inbounds i32, ptr %98, i64 %241
  %258 = load i32, ptr %257, align 4, !tbaa !5
  %259 = sub nsw i32 0, %258
  store i32 %259, ptr %10, align 4, !tbaa !5
  %260 = call i64 @_ZSt9make_pairIiRiESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %8)
  store i64 %260, ptr %9, align 8
  call void @_ZNSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE4pushEOS1_(ptr noundef nonnull align 8 dereferenceable(25) @Q, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %261

261:                                              ; preds = %256, %253, %238
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %.loopexit106

.loopexit106:                                     ; preds = %234, %261, %.lr.ph122
  %262 = call noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25) @Q)
  br i1 %262, label %._crit_edge123, label %.lr.ph122

._crit_edge123:                                   ; preds = %.loopexit106, %102
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %263 = load i32, ptr %0, align 4, !tbaa !5
  %264 = shl i32 2, %263
  %265 = sext i32 %264 to i64
  %266 = icmp slt i64 %indvars.iv.next138, %265
  br i1 %266, label %.lr.ph125, label %.preheader, !llvm.loop !25

267:                                              ; preds = %.preheader, %286
  %indvars.iv140 = phi i64 [ 0, %.preheader ], [ %indvars.iv.next141, %286 ]
  %268 = getelementptr inbounds [401 x i32], ptr @s, i64 0, i64 %indvars.iv140
  %269 = load i32, ptr %268, align 4, !tbaa !5
  %270 = icmp sgt i32 %269, 1
  br i1 %270, label %271, label %279

271:                                              ; preds = %267
  %272 = or i32 %269, 1
  %273 = zext nneg i32 %272 to i64
  %274 = getelementptr inbounds [9 x [401 x i32]], ptr @f, i64 0, i64 %273, i64 %indvars.iv140
  %275 = load i32, ptr %274, align 4, !tbaa !5
  %276 = icmp ne i32 %269, 2
  %277 = zext i1 %276 to i64
  %278 = getelementptr inbounds i32, ptr %2, i64 %277
  store i32 %275, ptr %278, align 4, !tbaa !5
  br label %286

279:                                              ; preds = %267
  %280 = icmp eq i32 %269, 1
  %281 = load i32, ptr %0, align 4
  %282 = icmp eq i32 %281, 2
  %or.cond105 = select i1 %280, i1 %282, i1 false
  br i1 %or.cond105, label %283, label %286

283:                                              ; preds = %279
  %284 = getelementptr inbounds [401 x i32], ptr getelementptr inbounds (i8, ptr @f, i64 11228), i64 0, i64 %indvars.iv140
  %285 = load i32, ptr %284, align 4, !tbaa !5
  store i32 %285, ptr %97, align 4, !tbaa !5
  br label %286

286:                                              ; preds = %271, %283, %279
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %exitcond143.not = icmp eq i64 %indvars.iv.next141, 400
  br i1 %exitcond143.not, label %.loopexit, label %267, !llvm.loop !26

.loopexit:                                        ; preds = %286, %13
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt14priority_queueISt4pairIiiESt6vectorIS1_SaIS1_EESt4lessIS1_EE3topEv(ptr noundef nonnull align 8 dereferenceable(25)) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #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 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 #5 = { 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 = distinct !{!11, !10}
!12 = distinct !{!12, !10, !13, !14}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = !{!19, !6, i64 4}
!19 = !{!"_ZTSSt4pairIiiE", !6, i64 0, !6, i64 4}
!20 = !{!21, !21, i64 0}
!21 = !{!"bool", !7, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = distinct !{!24, !10}
!25 = distinct !{!25, !10}
!26 = distinct !{!26, !10}


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